ciphers

package
v2.0.0-...-a2ae2e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const PASSPHRASE_WORDS = 12
View Source
const SCRYPT_L = 32
View Source
const SCRYPT_N = 1048576
View Source
const SCRYPT_P = 1
View Source
const SCRYPT_R = 8
View Source
const SCRYPT_SALT = "DTWdTA8L9VZG5J8p5dNaUmrQ"
View Source
const SUBKEY_L = 32

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(sk Subkey, ct Ciphertext) ([]byte, error)

func GeneratePassphrase

func GeneratePassphrase() (string, error)

Types

type Ciphertext

type Ciphertext struct {
	Data  []byte
	Nonce []byte
}

func Encrypt

func Encrypt(sk Subkey, pt []byte) (Ciphertext, error)

type Key

type Key []byte

func DeriveKey

func DeriveKey(passphrase string) (Key, error)

type Subkey

type Subkey []byte

func DeriveSubkeys

func DeriveSubkeys(k Key) ([2]Subkey, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL