Skip to main content

Crate fedimint_aead

Crate fedimint_aead 

Source

Modules§

envs
error 🔒

Structs§

Aad
The additionally authenticated data (AAD) for an opening or sealing operation. This data is authenticated but is not encrypted.
EncryptError
Why encrypt could not seal a plaintext.
EncryptionKeyError
Why get_encryption_key could not derive a key: Argon2 rejected the password or the salt, such as a salt that is too short.
LessSafeKey
Immutable keys for use in situations where OpeningKey/SealingKey and NonceSequence cannot reasonably be used.
UnboundKey
An AEAD key without a designated role or nonce sequence.

Enums§

DecryptError
Why decrypt could not open a ciphertext.
EncryptedReadError
Why encrypted_read could not read a file.
EncryptedWriteError
Why encrypted_write could not write a file.

Constants§

NONCE_LEN
All the AEADs we support use 96-bit nonces.

Functions§

argon2 🔒
Constructs Argon2 with default params, easier if the weak crypto flag is set for testing
decrypt
Decrypts a ciphertext using key.
encrypt
Encrypt plaintext using key.
encrypted_read
Reads encrypted data from a file
encrypted_write
Write data encrypted to a file with a random nonce that will be encoded in the file
get_encryption_key
Key used to encrypt and authenticate data stored on the filesystem with a user password.
get_random_nonce
Get a random nonce.
random_salt
Generates a B64-encoded random salt string of the recommended 16 byte length