Expand description
Bessie is an authenticated, chunked cipher based on BLAKE3. It’s still in the design stages, and it’s not suitable for production use.
§Examples
Encrypt a message.
let key = bessie::generate_key();
let ciphertext: Vec<u8> = bessie::encrypt(&key, b"hello world");
Decrypt that message.
let plaintext: Vec<u8> = bessie::decrypt(&key, &ciphertext)?;
assert_eq!(b"hello world", &plaintext[..]);
Modules§
- testing
- Functions that take a nonce from the caller, mainly for testing
Structs§
- Decrypt
Reader - An incremental decrypter supporting
std::io::Read
andstd::io::Seek
. - Encrypt
Writer - An incremental encrypter supporting
std::io::Write
. - Error
- An opaque decryption error.
Constants§
Functions§
- ciphertext_
len - Compute the length of a ciphertext, given the length of a plaintext.
- decrypt
- Decrypt a message and return the plaintext as
Result
ofVec<u8>
. - decrypt_
to_ slice - Decrypt a message, write the plaintext to an existing slice, and return a
Result
. - encrypt
- Encrypt a message and return the ciphertext as a
Vec<u8>
. - encrypt_
to_ slice - Encrypt a message and write the ciphertext to an existing slice.
- generate_
key - Create a new 32-byte key from a cryptographically secure random number generator.
- plaintext_
len - Compute the length of a plaintext, given the length of a ciphertext.