Expand description
The cryptographic primitives used in the Bramble protocols
Structs§
- Hash
- The output of a hash function
- KeyPair
- An asymmetric cryptography key pair
- Mac
- A message-authentication code
- Nonce
- A nonce
- Public
Key - An asymmetric public key
- Secret
Key - An asymmetric secret key
- Symmetric
Key - A symmetric cryptography key
Enums§
Constants§
- AUTH_
LEN - The length of the AEAD auth tags
- HASH_
LEN - The length of hashes
- KEY_LEN
- The length of keys
- MAC_LEN
- The length of MACs
- NONCE_
LEN - The length of the AEAD nonces
- PRF_LEN
- The length of the PRF output
Functions§
- dec
- Decrypts an authenticated ciphertext.
- dh
- Performs a Diffie-Hellman operation between the two given keys.
- enc
- Encrypts a plaintext with an authenticated cipher
- hash
- Computes a hash of the given messages with the given label as domain separator.
- kdf
- Derives a key from the given key and messages with the given label as domain separator.
- kex
- Performs a key exchange from the given DH keys and the given messages with the given label as domain separator.
- mac
- Derives a MAC from the given key and messages with the given label as domain separator.
- prf
- A pseudo-random function.
- stream
- Expands a key into a stream of pseudo-random bytes.
Type Aliases§
- Result
- Result type for Bramble errors.