Skip to content

divviup/hpke-dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

153 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid public key encryption with algorithms dispatched at runtime

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.

Available cargo features:

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 aes and chacha algorithm features. Enabled by default.

  • kdf-all: Enables hkdfsha2 and shake algorithm features. Enabled by default.

  • kem-all: Enables x25519, nistp and mlkem algorithm features. Enabled by default.

  • serde: enables derived serde serialization and deserialization for all public structs and enums. Disabled by default.

Example feature usage:

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"].

About

hybrid public key encryption with runtime algorithm selection

Resources

License

Code of conduct

Contributing

Stars

5 stars

Watchers

4 watching

Forks

Contributors

Languages