encryption

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Unlicense Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChaChaDecryptBase64String

func ChaChaDecryptBase64String(key string, encrypted string) (result string)

func ChaChaDecryptBytes

func ChaChaDecryptBytes(key string, encrypted_bytes []byte) (result []byte)

func ChaChaDecryptFile

func ChaChaDecryptFile(key string, file_path string) (result_file_path string)

func ChaChaEncryptBytes

func ChaChaEncryptBytes(key string, plain_text_bytes []byte) (result []byte)

func ChaChaEncryptFile

func ChaChaEncryptFile(key string, file_path string) (encrypted_file_path string)

func ChaChaEncryptString

func ChaChaEncryptString(key string, plain_text string) (result string)

func ChaChaGenerateKey

func ChaChaGenerateKey(password string) (key [32]byte)

func ChaChaSharedSecretDecryptMessage

func ChaChaSharedSecretDecryptMessage(shared_secret [32]byte, encrypted_message []byte) (plain_text []byte)

func ChaChaSharedSecretEncryptMessage

func ChaChaSharedSecretEncryptMessage(shared_secret [32]byte, message []byte) (encrypted_message []byte)

func CurveX25519GenerateKeyPair

func CurveX25519GenerateKeyPair() (public_key [32]byte, private_key [32]byte)

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 GenerateRandomString

func GenerateRandomString(byte_length int) (result string)

func KyberDecrypt

func KyberDecrypt(cipher_text [1568]byte, private_key [3168]byte) (shared_secret [32]byte)

func KyberEncrypt

func KyberEncrypt(public_key [1568]byte) (cipher_text [1568]byte, shared_secret [32]byte)

func KyberGenerateKeyPair

func KyberGenerateKeyPair() (public_key [1568]byte, private_key [3168]byte)

1024 bit keypair

func SecretBoxDecrypt

func SecretBoxDecrypt(key string, encrypted string) (result string)

func SecretBoxEncrypt

func SecretBoxEncrypt(key string, plain_text string) (result string)

func SecretBoxGenerateKey

func SecretBoxGenerateKey(password string) (key [32]byte)

func SecretBoxGenerateRandomKey

func SecretBoxGenerateRandomKey() (key [32]byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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