Z-Wave Protocol Controller Reference
zwave_s2_nonce_management.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
25#ifndef ZWAVE_S2_NONCE_MANAGEMENT_H
26#define ZWAVE_S2_NONCE_MANAGEMENT_H
27
28#include "sl_status.h"
31
33#define CTR_DRBG_KEY_LENGTH 16
35#define CTR_DRBG_INTERNAL_STATE_LENGTH 16
37#define MPAN_INNER_STATE_LENGTH 16
38
43typedef struct span_entry {
44 uint8_t df;
47 uint8_t rx_sequence;
48 uint8_t tx_sequence;
49 uint8_t class_id;
51
56typedef struct mpan_entry {
59 uint8_t group_id;
60 uint8_t class_id;
62
63#ifdef __cplusplus
64extern "C" {
65#endif
66
79 span_entry_t *span_data);
80
88 const span_entry_t *span_data);
89
104 mpan_entry_t *mpan_data);
105
113void zwave_s2_set_mpan_data(zwave_node_id_t owner_node_id,
115 const mpan_entry_t *mpan_data);
123
132void zwave_s2_reset_mpan(zwave_node_id_t owner_node_id,
134#ifdef __cplusplus
135}
136#endif
137
138#endif //ZWAVE_S2_NONCE_MANAGEMENT_H
uint32_t sl_status_t
Definition: sl_status.h:139
uint8_t zwave_multicast_group_id_t
Definition: zwave_controller_types.h:43
uint16_t zwave_node_id_t
Z-Wave NodeID type.
Definition: zwave_node_id_definitions.h:84
sl_status_t zwave_s2_get_span_data(zwave_node_id_t node_id, span_entry_t *span_data)
Fetches a Span entry object from the S2 SPAN table.
Definition: zwave_s2_nonce_management.c:80
struct span_entry span_entry_t
Structure holding a SPAN entry. Refer to LibS2 for field descriptions.
#define CTR_DRBG_INTERNAL_STATE_LENGTH
Length of the internal state of the CTR_DRBG.
Definition: zwave_s2_nonce_management.h:35
void zwave_s2_reset_span(zwave_node_id_t node_id)
Resets the SPAN for node_id by setting its state to SPAN_NOT_USED.
Definition: zwave_s2_nonce_management.c:102
#define MPAN_INNER_STATE_LENGTH
Length of the inner state of an MPAN.
Definition: zwave_s2_nonce_management.h:37
void zwave_s2_reset_mpan(zwave_node_id_t owner_node_id, zwave_multicast_group_id_t group_id)
Resets the MPAN entry matching owner_node_id and group_id by setting its state to MPAN_NOT_USED.
Definition: zwave_s2_nonce_management.c:115
sl_status_t zwave_s2_get_mpan_data(zwave_node_id_t owner_node_id, zwave_multicast_group_id_t group_id, mpan_entry_t *mpan_data)
Fetches an MPAN entry object from the S2 MPAN table.
Definition: zwave_s2_nonce_management.c:157
#define CTR_DRBG_KEY_LENGTH
Length of the key in the CTR_DRBG.
Definition: zwave_s2_nonce_management.h:33
void zwave_s2_set_span_table(zwave_node_id_t node_id, const span_entry_t *span_data)
Copies a Span entry object into an entry of the S2 SPAN table.
Definition: zwave_s2_nonce_management.c:132
struct mpan_entry mpan_entry_t
Structure holding an MPAN entry. Refer to LibS2 for field descriptions.
void zwave_s2_set_mpan_data(zwave_node_id_t owner_node_id, zwave_multicast_group_id_t group_id, const mpan_entry_t *mpan_data)
Copies an MPAN entry object into an entry of the S2 MPAN table.
Definition: zwave_s2_nonce_management.c:178
SL Status Codes.
Structure holding an MPAN entry. Refer to LibS2 for field descriptions.
Definition: zwave_s2_nonce_management.h:56
uint8_t group_id
Definition: zwave_s2_nonce_management.h:59
uint8_t inner_state[MPAN_INNER_STATE_LENGTH]
Definition: zwave_s2_nonce_management.h:57
zwave_node_id_t owner_node_id
Definition: zwave_s2_nonce_management.h:58
uint8_t class_id
Definition: zwave_s2_nonce_management.h:60
Structure holding a SPAN entry. Refer to LibS2 for field descriptions.
Definition: zwave_s2_nonce_management.h:43
uint8_t rx_sequence
Definition: zwave_s2_nonce_management.h:47
uint8_t key[CTR_DRBG_KEY_LENGTH]
Definition: zwave_s2_nonce_management.h:46
uint8_t tx_sequence
Definition: zwave_s2_nonce_management.h:48
uint8_t df
Definition: zwave_s2_nonce_management.h:44
uint8_t working_state[CTR_DRBG_INTERNAL_STATE_LENGTH]
Definition: zwave_s2_nonce_management.h:45
uint8_t class_id
Definition: zwave_s2_nonce_management.h:49
const zwave_node_id_t node_id