Documentation ¶
Index ¶
- func ChaChaDecryptBase64String(key string, encrypted string) (result string)
- func ChaChaDecryptBytes(key string, encrypted_bytes []byte) (result []byte)
- func ChaChaDecryptFile(key string, file_path string) (result_file_path string)
- func ChaChaEncryptBytes(key string, plain_text_bytes []byte) (result []byte)
- func ChaChaEncryptFile(key string, file_path string) (encrypted_file_path string)
- func ChaChaEncryptString(key string, plain_text string) (result string)
- func ChaChaGenerateKey(password string) (key [32]byte)
- func ChaChaSharedSecretDecryptMessage(shared_secret [32]byte, encrypted_message []byte) (plain_text []byte)
- func ChaChaSharedSecretEncryptMessage(shared_secret [32]byte, message []byte) (encrypted_message []byte)
- func CurveX25519GenerateKeyPair() (public_key [32]byte, private_key [32]byte)
- func CurveX25519KeyExchange(private_key [32]byte, other_public_key [32]byte) (shared_secret [32]byte)
- func GenerateEntropyBytes1(byte_length int) (result []byte)
- func GenerateEntropyBytes2(byte_length int) (result []byte)
- func GenerateRandomBytes(byte_length int) (result []byte)
- func GenerateRandomString(byte_length int) (result string)
- func KyberDecrypt(cipher_text [1568]byte, private_key [3168]byte) (shared_secret [32]byte)
- func KyberEncrypt(public_key [1568]byte) (cipher_text [1568]byte, shared_secret [32]byte)
- func KyberGenerateKeyPair() (public_key [1568]byte, private_key [3168]byte)
- func SecretBoxDecrypt(key string, encrypted string) (result string)
- func SecretBoxEncrypt(key string, plain_text string) (result string)
- func SecretBoxGenerateKey(password string) (key [32]byte)
- func SecretBoxGenerateRandomKey() (key [32]byte)
- func Sha256Sum(entries [][]byte) (result []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChaChaDecryptBytes ¶
func ChaChaDecryptFile ¶
func ChaChaEncryptBytes ¶
func ChaChaEncryptFile ¶
func ChaChaEncryptString ¶
func ChaChaGenerateKey ¶
func CurveX25519KeyExchange ¶
func CurveX25519KeyExchange(private_key [32]byte, other_public_key [32]byte) (shared_secret [32]byte)
X25519KeyExchange performs a key exchange to compute a shared secret given a private key and another party's public key.
func GenerateEntropyBytes1 ¶ added in v1.0.8
func GenerateEntropyBytes2 ¶ added in v1.0.8
func GenerateRandomBytes ¶ added in v1.0.8
func GenerateRandomString ¶
func KyberDecrypt ¶
func KyberEncrypt ¶
func KyberGenerateKeyPair ¶
1024 bit keypair lattice space = determined by keypair vectors. public public key = "bad" basis vector = far from perpendicular , long private key = "good" basis vector = close to perpendicular , short - allows the receiver correct the errors of the ciphertext - finding nearest neighbor efficiently - navigate the lattice and perform a form of error correction ( de-noise ) cipher text : - essentially its a "noisy" shared key - its some point in the lattice space that is in-between the real members of the lattice. - its "noisy" , translated away from a true valid point. - the attacker can't tell from which of the original points it was derived from https://cryptopedia.dev/posts/kyber https://www.youtube.com/watch?v=QDdOoYdb748 https://www.youtube.com/watch?v=K026C5YaB3A https://en.wikipedia.org/wiki/Grover's_algorithm
func SecretBoxDecrypt ¶
func SecretBoxEncrypt ¶
func SecretBoxGenerateKey ¶
func SecretBoxGenerateRandomKey ¶
func SecretBoxGenerateRandomKey() (key [32]byte)
Types ¶
This section is empty.