Expand description
Implementation of EDHOC (Ephemeral Diffie-Hellman Over COSE, RFC9528), a lightweight authenticated key exchange for the Internet of Things.
The crate provides a high-level interface through the EdhocInitiator and the EdhocResponder
structs. Both these wrap the lower level [State] struct that is mainly used through internal
functions in the edhoc
module. This separation is relevant because the lower level tools are
subject of ongoing formal verification, whereas the high-level interfaces aim for good
usability.
Both EdhocInitiator and EdhocResponder are used in a type stated way. Following the EDHOC protocol, they generate (or process) messages, progressively provide more information about their peer, and on eventually devolve into an EdhocInitiatorDone and EdhocResponderDone, respectively, through which the EDHOC key material can be obtained.
Structs§
- Value of C_R or C_I, as chosen by ourself or the peer.
- A credential for use in EDHOC
- A fixed-size (but parameterized) buffer for EDHOC messages.
- Starting point for performing EDHOC in the role of the Initiator.
- An owned u8 vector of a limited length
- Starting point for performing EDHOC in the role of the Responder.
- Representation of an EDHOC ERR_CODE
- A value of ID_CRED_x: a credential identifier
Enums§
Constants§
Traits§
- Interface between the lakers crate and any implementations of the required crypto primitives.
- Interface between the lakers crate and any implementations of the required crypto primitives.
Functions§
- generates an identifier that can be serialized as a single CBOR integer, i.e. -24 <= x <= 23
- Returns the SUITES_I array, or an error if selected_suite is not supported.