import "github.com/hashicorp/vault/helper/dhutil"
Use AES256-GCM to decrypt some ciphertext with a provided key and nonce. The returned values are the plaintext and error respectively.
DeriveSharedKey uses HKDF to derive a key from a shared secret and public keys
Use AES256-GCM to encrypt some plaintext with a provided key. The returned values are the ciphertext, the nonce, and error respectively.
generatePublicPrivateKey uses curve25519 to generate a public and private key pair.
GenerateSharedSecret uses the private key and the other party's public key to generate the shared secret.
type Envelope struct { Curve25519PublicKey []byte `json:"curve25519_public_key"` Nonce []byte `json:"nonce"` EncryptedPayload []byte `json:"encrypted_payload"` }
Package dhutil imports 11 packages (graph) and is imported by 4 packages. Updated 2020-10-12. Refresh now. Tools for package owners.