Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptAES ¶
Use AES256-GCM to decrypt some ciphertext with a provided key and nonce. The returned values are the plaintext and error respectively.
func EncryptAES ¶
Use AES256-GCM to encrypt some plaintext with a provided key. The returned values are the ciphertext, the nonce, and error respectively.
func GeneratePublicPrivateKey ¶
generatePublicPrivateKey uses curve25519 to generate a public and private key pair.
func GenerateSharedKey ¶
generateSharedKey uses the private key and the other party's public key to generate the shared secret.
Types ¶
type PublicKeyInfo ¶
type PublicKeyInfo struct {
Curve25519PublicKey []byte `json:"curve25519_public_key"`
}
Click to show internal directories.
Click to hide internal directories.