franziskuskiefer / hpke-rs

Pure Rust implementation of HPKE (https://www.rfc-editor.org/rfc/rfc9180.html)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HPKE

Maturity Level Build & Test ARM Build crates.io Docs Rust Version

An implementation of HPKE with flexible crypto backends.

From the RFC:

This scheme provides a variant of public-key encryption of arbitrary-sized plaintexts for a recipient public key. It also includes three authenticated variants, including one which authenticates possession of a pre-shared key, and two optional ones which authenticate possession of a KEM private key.

This version is compatible with draft-12, which is expected to be equivalent to the RFC.

Supported HPKE modes

  • Base
  • PSK
  • Auth
  • AuthPSK

Supported cipher suites

KEM

  • DH KEM x25519
  • DH KEM P256

AEAD

  • AES GCM 128
  • AES GCM 256
  • ChaCha20 Poly1305
  • Exporter only

KDF

  • HKDF SHA-256
  • HKDF SHA-384
  • HKDF SHA-512

Crypto Backends

This crate does not implement the cryptographic primitives used itself. Instead it expects an implementation of the HpkeCrypto trait.

About

Pure Rust implementation of HPKE (https://www.rfc-editor.org/rfc/rfc9180.html)


Languages

Language:Rust 99.8%Language:Shell 0.2%