[−][src]Crate hpke
Re-exports
pub use digest::generic_array; |
Modules
aead | |
kdf | |
kem | |
kex | |
op_mode | |
setup | |
single_shot |
Structs
AeadCtx | The HPKE encryption context. This is what you use to |
EncappedKey | This holds the content of an encapsulated secret. It is output by the |
Psk | A preshared key, i.e., a secret that the sender and recipient both know before any exchange has happened |
PskBundle | Contains preshared key bytes and an identifier |
Enums
HpkeError | Describes things that can go wrong when trying to seal or open a ciphertext |
OpModeR | The operation mode of the receiver's side of HPKE. This determines what information is folded
into the encryption context derived in the |
OpModeS | The operation mode of the sender's side of HPKE. This determines what information is folded
into the encryption context derived in the |
Traits
Kem | Defines a combination of key exchange mechanism and a KDF, which together form a KEM |
KeyExchange | This trait captures the requirements of a DH-based KEM (draft02 §5.1). It must have a way to generate keypairs, perform the DH computation, and marshall/umarshall DH pubkeys |
Marshallable | Implemented by types that have a fixed-length byte representation |
Unmarshallable | Implemented by types that can be deserialized from byte representation |
Functions
setup_receiver | Initiates an encryption context given a private key |
setup_sender | Initiates an encryption context to the given recipient. Does an "authenticated" encapsulation
if |
single_shot_open | Does a |
single_shot_seal | Does a |