Documentation ¶
Overview ¶
Package xaes256gcm implements the XAES-256-GCM extended-nonce AEAD, an efficient combination of a NIST SP 800-108r1 KDF and AES-256-GCM.
Index ¶
Constants ¶
const KeySize = 32
KeySize is the size of XAES-256-GCM keys.
const NonceSize = 24
NonceSize is the size of nonces that must be passed to Seal and Open, if the AEAD was created with NewWithManualNonces.
const Overhead = 40
Overhead is the difference between the lengths of a plaintext and its ciphertext, if the AEAD was created with [New]. It includes the length of the randomly-generated and automatically-managed nonce.
const OverheadWithManualNonces = 16
OverheadWithManualNonces is the difference between the lengths of a plaintext and its ciphertext, if the AEAD was created with NewWithManualNonces.
Variables ¶
This section is empty.
Functions ¶
func NewWithManualNonces ¶
NewWithManualNonces returns a new XAES-256-GCM instance that expects 24-byte nonces to be passed to Open and Seal. nonces can be safely generated with crypto/rand.Read. key must be exactly 32 bytes long.
Most applications should use [New] instead, which automatically generates random nonces and prepends them to the ciphertext. (Note that New is not implemented yet.)
Types ¶
This section is empty.