pub enum KEM {
DHKEM_P256_HKDF_SHA256,
DHKEM_P384_HKDF_SHA384,
DHKEM_P521_HKDF_SHA512,
DHKEM_X25519_HKDF_SHA256,
DHKEM_X448_HKDF_SHA512,
}
Expand description
Key Encapsulation Mechanisms (KEMs)
Value | KEM | Nsecret | Nenc | Npk | Nsk | Auth | Reference |
---|---|---|---|---|---|---|---|
0x0000 | (reserved) | N/A | N/A | N/A | N/A | yes | N/A |
0x0010 | DHKEM(P-256, HKDF-SHA256) | 32 | 65 | 65 | 32 | yes | NISTCurves, RFC5869 |
0x0011 | DHKEM(P-384, HKDF-SHA384) | 48 | 97 | 97 | 48 | yes | NISTCurves, RFC5869 |
0x0012 | DHKEM(P-521, HKDF-SHA512) | 64 | 133 | 133 | 66 | yes | NISTCurves, RFC5869 |
0x0020 | DHKEM(X25519, HKDF-SHA256) | 32 | 32 | 32 | 32 | yes | RFC7748, RFC5869 |
0x0021 | DHKEM(X448, HKDF-SHA512) | 64 | 56 | 56 | 56 | yes | RFC7748, RFC5869 |
The Auth
column indicates if the KEM algorithm provides the AuthEncap()
/AuthDecap()
interface and is therefore suitable for the Auth and AuthPSK modes. The meaning of all
other columns is explained below. All algorithms are suitable for the
PSK mode.
KEM Identifiers
The “HPKE KEM Identifiers” registry lists identifiers for key encapsulation algorithms defined for use with HPKE. These identifiers are two-byte values, so the maximum possible value is 0xFFFF = 65535.
Template:
- Value: The two-byte identifier for the algorithm
- KEM: The name of the algorithm
- Nsecret: The length in bytes of a KEM shared secret produced by the algorithm
- Nenc: The length in bytes of an encoded encapsulated key produced by the algorithm
- Npk: The length in bytes of an encoded public key for the algorithm
- Nsk: The length in bytes of an encoded private key for the algorithm
- Auth: A boolean indicating if this algorithm provides the
AuthEncap()
/AuthDecap()
interface - Reference: Where this algorithm is defined
Variants
DHKEM_P256_HKDF_SHA256
0x0010
DHKEM_P384_HKDF_SHA384
0x0011
DHKEM_P521_HKDF_SHA512
0x0012
DHKEM_X25519_HKDF_SHA256
0x0020
DHKEM_X448_HKDF_SHA512
0x0021
Trait Implementations
impl Copy for KEM
impl StructuralPartialEq for KEM
Auto Trait Implementations
impl RefUnwindSafe for KEM
impl Send for KEM
impl Sync for KEM
impl Unpin for KEM
impl UnwindSafe for KEM
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more