Crate lakers_shared

Source
Expand description

Common data structures used by lakers and its dependent crates

This crate is separate from lakers to avoid circular dependencies that would otherwise arise from the pattern in which lakers-ead combined the main crate with variations of the protocol’s EAD handling. As its types will then likely move over into the main lakers crate, it is recommended to use them through the public re-export there wherever possible.

Structs§

CBORDecoder
Completed
ConnId
Value of C_R or C_I, as chosen by ourself or the peer.
Credential
A credential for use in EDHOC
EADItem
EdhocBuffer
A fixed-size (but parameterized) buffer for EDHOC messages.
EdhocMessageBuffer
An owned u8 vector of a limited length
ErrCode
Representation of an EDHOC ERR_CODE
IdCred
A value of ID_CRED_x: a credential identifier.
InitiatorStart
PreparingM3
ProcessedM2
ProcessedM3
ProcessingM1
ProcessingM2
ProcessingM3
ResponderStart
WaitM2
WaitM3
WaitM4

Enums§

CBORError
CredentialKey
CredentialTransfer
CredentialType
EDHOCError
EDHOCMethod
EDHOCSuite
EdhocBufferError
IdCredType
MessageBufferError

Constants§

AES_CCM_IV_LEN
AES_CCM_KEY_LEN
AES_CCM_TAG_LEN
CBOR_BYTE_STRING
CBOR_MAJOR_ARRAY
CBOR_MAJOR_ARRAY_MAX
CBOR_MAJOR_BYTE_STRING
CBOR_MAJOR_BYTE_STRING_MAX
CBOR_MAJOR_MAP
CBOR_MAJOR_TEXT_STRING
CBOR_NEG_INT_1BYTE_END
CBOR_NEG_INT_1BYTE_START
CBOR_TEXT_STRING
CBOR_UINT_1BYTE
CBOR_UINT_1BYTE_END
CBOR_UINT_1BYTE_START
EDHOC_METHOD
EDHOC_SUITES
EDHOC_SUPPORTED_SUITES
ENCODED_VOUCHER_LEN
ENC_STRUCTURE_LEN
ID_CRED_LEN
KCCS_LABEL
KCSS_LABELDeprecated
KID_LABEL
MAC_LENGTH
MAC_LENGTH_2
MAC_LENGTH_3
MAX_BUFFER_LEN
MAX_EAD_SIZE_LEN
MAX_INFO_LEN
MAX_KDF_CONTEXT_LEN
MAX_KDF_LABEL_LEN
MAX_MESSAGE_SIZE_LEN
MAX_SUITES_LEN
P256_ELEM_LEN
SHA256_DIGEST_LEN
SUITES_LEN
SUPPORTED_SUITES_LEN

Traits§

Crypto
Interface between the lakers crate and any implementations of the required crypto primitives.

Functions§

decode_plaintext_2
decode_plaintext_3
decode_plaintext_4
encode_info
parse_ead
parse_message_1
parse_message_2
parse_suites_i
prepare_suites_i
Returns the SUITES_I array, or an error if selected_suite is not supported.

Type Aliases§

BufferCiphertext2
BufferCiphertext3
BufferCiphertext4
BufferCred
BufferIdCred
BufferKid
BufferMessage1
BufferMessage2
BufferMessage3
BufferMessage4
BufferPlaintext2
BufferPlaintext3
BufferPlaintext4
Bytes8
BytesCcmIvLen
BytesCcmKeyLen
BytesEad2
BytesEncStructureLen
BytesEncodedVoucher
BytesHashLen
BytesIdCred
BytesKeyAES128
BytesKeyEC2
BytesMac
BytesMac2
BytesMac3
BytesMaxBuffer
BytesMaxContextBuffer
BytesMaxInfoBuffer
BytesMaxLabelBuffeer
BytesP256ElemLen
BytesSuites
BytesSupportedSuites
EADMessageBuffer