Skip to main content

Module crypto

Module crypto 

Source
Expand description

The Mesh security toolbox (Mesh Protocol 3.9.2): the salt generation function s1, the key derivation functions k1 to k4, and AES-CCM with the 32 and 64-bit MICs Mesh uses. Keys and values are byte arrays most significant octet first, as the specification and its sample data write them (Mesh, unlike SMP, sends them in that order too).

Structs§

NetworkMaterial
What k2 derives from a network key: NID, EncryptionKey and PrivacyKey.

Functions§

beacon_key
The beacon key.
ccm_decrypt
AES-CCM decryption of ciphertext then MIC; None when it does not authenticate.
ccm_encrypt
AES-CCM with a 13-octet nonce and a 4 or 8-octet MIC: ciphertext then MIC.
cmac
AES-CMAC.
device_key
The device key a provisioner and device share after provisioning.
e
e: AES-128 of one block.
identity_key
The identity key (node identity) and beacon key (secure network beacons).
k1
k1: derives a key from n with salt and p.
k2
k2: the network key material; p is 0x00 for the master credentials, or 0x01 followed by the LPN and friend addresses and counters for friendship credentials.
k3
k3: the 64-bit Network ID of a network key.
k4
k4: the 6-bit AID of an application key.
s1
s1: the salt generation function.

Type Aliases§

Key
A 128-bit key or value.