Z-Wave Protocol Controller Reference
Security 2 Keystore

Z-Wave Keystore. More...

Collaboration diagram for Security 2 Keystore:

Enumerations

enum  zwave_s2_keystore_ecdh_key_mode_t { ZWAVE_S2_KEYSTORE_STATIC_ECDH_KEY , ZWAVE_S2_KEYSTORE_DYNAMIC_ECDH_KEY }
 ECDH key mode types. More...
 

Functions

void zwave_s2_keystore_get_dsk (zwave_s2_keystore_ecdh_key_mode_t mode, zwave_dsk_t dsk)
 Return one of the DSKs of the controller. More...
 
uint8_t zwave_s2_keystore_get_assigned_keys ()
 Get the set of the currently assigned keys. More...
 
void zwave_s2_keystore_reset_assigned_keys ()
 Resets the list of assigned keys (sets them to 0) Use this function before receiving keys when entering in a network. More...
 
void zwave_s2_create_new_network_keys ()
 
void zwave_s2_log_security_keys (sl_log_level_t log_level)
 
void zwave_s2_save_security_keys (const char *filename)
 

Detailed Description

Z-Wave Keystore.

The Z-Wave keystore is storing, accesing and gerating the Z-Wave network keys as well as the ECDH keys which are used in Security 2. All keys are stored in the NVM of the Z-Wave module.

Enumeration Type Documentation

◆ zwave_s2_keystore_ecdh_key_mode_t

ECDH key mode types.

Enumerator
ZWAVE_S2_KEYSTORE_STATIC_ECDH_KEY 

This is a static key used for being included when at least one Authenticated Security Class is granted. It matches the ZPC's DSK exchanged out of band. This key is fetched from the NVM of the module.

ZWAVE_S2_KEYSTORE_DYNAMIC_ECDH_KEY 

This is a dynamic key used for

  1. Including new nodes (add mode)
  2. Being included when no Authenticated Security Class is granted. The key must be regenerated after each S2 bootstrapping attempt

Function Documentation

◆ zwave_s2_create_new_network_keys()

void zwave_s2_create_new_network_keys ( )

Create new random network keys, which marks all keys as granted.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_keystore_get_assigned_keys()

uint8_t zwave_s2_keystore_get_assigned_keys ( )

Get the set of the currently assigned keys.

Returns
uint8_t Bit field of keys
Here is the caller graph for this function:

◆ zwave_s2_keystore_get_dsk()

void zwave_s2_keystore_get_dsk ( zwave_s2_keystore_ecdh_key_mode_t  mode,
zwave_dsk_t  dsk 
)

Return one of the DSKs of the controller.

This function can be used fetch the DSK of the controller. There are two use cases of this, as follows:

  1. When including the controller into an other z-wave network, in this case the ZWAVE_S2_KEYSTORE_STATIC_ECDH_KEY should be used.
  2. When including a node using CSA inclusion, In this case the ZWAVE_S2_KEYSTORE_DYNAMIC_ECDH_KEY should be used.
Parameters
modeWhich dsk to get.
dskpointer to a zwave_dsk_t to copy the dsk to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_keystore_reset_assigned_keys()

void zwave_s2_keystore_reset_assigned_keys ( )

Resets the list of assigned keys (sets them to 0) Use this function before receiving keys when entering in a network.

Here is the caller graph for this function:

◆ zwave_s2_log_security_keys()

void zwave_s2_log_security_keys ( sl_log_level_t  log_level)

Logs the Security Keys using sl_log.

Parameters
log_levelThe Log leve to use to log the keys.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwave_s2_save_security_keys()

void zwave_s2_save_security_keys ( const char *  filename)

Save the Z-Wave Security Keys in a file in Zniffer friendly format.

Parameters
filenameName/path of the file where keys should be saved
Here is the call graph for this function: