This crate provides a generic-free interface to the hpke
crate, a rust implementation of the draft RFC9180 hybrid public key
encryption
scheme. If you know the specific (aead, kdf, kem) triple at compile
time, you should use the hpke crate directly.
Currently, this crate only exposes interfaces for the Base mode (0) described in the hpke draft, and within base mode, only stateless single-shot message encryption/decryption, as defined in RFC9180§6.
The algorithms supported in this crate and their codepoints are as described in the HPKE specification and draft-ietf-hpke-pq.
hpke-dispatch's cargo features are designed to align directly with those of hpke. See
that crate's documentation for discussion of how to selectively enable algorithms.
hpke-dispatch defines the following additional features:
-
algo-all: enables all aead, kdf, and kem algorithms. Enabled by default.
-
aead-all: Enables
aesandchachaalgorithm features. Enabled by default. -
kdf-all: Enables
hkdfsha2andshakealgorithm features. Enabled by default. -
kem-all: Enables
x25519,nistpandmlkemalgorithm features. Enabled by default. -
serde: enables derived serde serialization and deserialization for all public structs and enums. Disabled by default.
To depend on this crate with all algorithms, use default features.
To depend on this crate with only AES, NIST curves, SHA-2 and Serde enabled, use
default-features = false, features = ["aes", "hkdfsha2", "nistp", "serde"].