KeyExchangeAlgorithm

The EDHOC key exchange algorithm of a cipher suite (RFC 9528 §3.6).

RFC 9528 specifies the key exchange as elliptic-curve Diffie-Hellman, and notes that method 0 also works with a key-encapsulation mechanism (RFC 9528 §9.4). draft-ietf-lake-pqsuites §3 makes that precise: the Initiator sends its encapsulation key as G_X, the Responder encapsulates and sends the ciphertext as G_Y, and G_XY is the KEM shared secret. KEMs cannot replace static Diffie-Hellman authentication, so a KEM suite only works with EdhocMethod.SIGNATURE_SIGNATURE.

Inheritors

Types

Link copied to clipboard

Ephemeral-ephemeral ECDH on curve. G_X and G_Y are the x-coordinates of the public keys in the compact representation of RFC 9528 Appendix B, so both have the curve's coordinate length.

Link copied to clipboard
data class Kem(val algorithm: KemAlgorithm) : KeyExchangeAlgorithm

A key-encapsulation mechanism (draft-ietf-lake-pqsuites §3): G_X is the encapsulation key, G_Y the ciphertext, with the lengths of draft-ietf-lake-pqsuites Table 1.

Properties

Link copied to clipboard

The type of the ephemeral key pair the Initiator generates for G_X.

Link copied to clipboard

Length of G_X in message_1, in bytes.

Link copied to clipboard

Length of G_Y at the start of G_Y_CIPHERTEXT_2 in message_2, in bytes.

Link copied to clipboard

Whether the algorithm is a Diffie-Hellman function that static-DH authentication (methods 1–3) can use: the "Supports DH/NIKE" column that draft-ietf-lake-pqsuites §6.4 adds to the registry.