Expand description
Encryption module providing AEAD encryption primitives.
Supports XChaCha20-Poly1305 (the high-level default) and explicit AES-256-GCM.
Structs§
- Encrypt
Options - Encryption options
- Encryption
Result - Result of an encryption operation
- Key
- 256-bit encryption key
- X25519
KeyPair - X25519 key pair used for Diffie-Hellman key exchange.
Enums§
- Algorithm
- Supported encryption algorithms
Constants§
- HKDF_
SHA256_ MAX_ OUTPUT - Maximum HKDF-SHA256 output permitted by RFC 5869 (255 * HashLen).
- PBKD
F2_ MAX_ ITERATIONS - Maximum synchronous PBKDF2 work factor accepted by Voided.
- PBKD
F2_ MAX_ SALT_ SIZE - Maximum salt size accepted by password-based derivation.
- PBKD
F2_ MIN_ ITERATIONS - Minimum PBKDF2-HMAC-SHA256 work factor accepted by the high-level API.
- PBKD
F2_ MIN_ SALT_ SIZE - Minimum salt size accepted by password-based derivation.
- X25519_
KEY_ SIZE - X25519 key size in bytes.
Functions§
- decrypt
- Decrypt data using AEAD decryption.
- decrypt_
aes_ gcm - Decrypt data using AES-256-GCM
- decrypt_
bytes - Decrypt data from binary format.
- decrypt_
with_ aad - Decrypt data using AEAD decryption with Additional Authenticated Data.
- decrypt_
xchacha20 - Decrypt data using XChaCha20-Poly1305
- derive_
key_ from_ shared_ secret - Derive a 256-bit AEAD key from a raw X25519 shared secret.
- derive_
key_ hkdf - Derive a key using HKDF-SHA256
- derive_
key_ hkdf_ raw - Derive raw bytes using HKDF-SHA256.
- derive_
key_ pbkdf2 - Derive a key using PBKDF2-HMAC-SHA256
- encrypt
- Encrypt data using AEAD encryption.
- encrypt_
aes_ gcm - Encrypt data using AES-256-GCM.
- encrypt_
xchacha20 - Encrypt data using XChaCha20-Poly1305
- generate_
key - Generate a random 256-bit encryption key
- generate_
x25519_ key_ pair - Generate an X25519 key pair.
- validate_
pbkdf2_ parameters - Validate the bounded policy used by Voided’s synchronous PBKDF2 APIs.
- x25519_
shared_ secret - Compute X25519 shared secret.