Key Establishment Client/Server#
API and Callbacks for the Key Establishment Cluster Client/Server Component.
Silicon Labs implementation of the Smart Energy Key Establishment cluster. The key establishment cluster is used by the Smart Energy profile to perform Certificate-Based Key Establishment (CBKE), which performs mutual authentication and establishes a symmetric APS link key. Direct CBKE between any two non-TC devices is supported after the two devices have completed partner link key exchange via Trust Center. This component defaults to using CBKE functions with the 163k ECC curve support, but users can also choose the 283k1 ECC curve by selecting the 'CBKE 283k1' component.
API#
Enumerations#
Typedefs#
Variables#
Macros#
Init - bytes: suite (2), key gen time (1), derive secret time (1), cert (48)
Terminate - bytes: status (1), wait time (1), suite (2)
The offset within the 163k1 curve certificate struct where the issuer field lives. 22-bytes for Public Key Reconstruction data, and 8-bytes for subject.
The offset within the 283k1 curve certificate struct where the issuer field lives. 22-bytes for Public Key Reconstruction data, and 8-bytes for subject.
These values reported to the remote device as to how long the local device takes to execute these operations.
API Documentation#
checkIssuer#
bool checkIssuer (uint8_t * issuer)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t * | N/A | issuer |
cleanupAndStopWithDelay#
void cleanupAndStopWithDelay (sl_zigbee_af_key_establishment_notify_message_t message, uint8_t delayInSec)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_af_key_establishment_notify_message_t | N/A | message | |
| uint8_t | N/A | delayInSec |
sendCertificate#
sl_zigbee_af_key_establishment_notify_message_t sendCertificate (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
sendNextKeyEstablishMessage#
void sendNextKeyEstablishMessage (sli_zigbee_key_establish_message_t message, uint8_t * data)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sli_zigbee_key_establish_message_t | N/A | message | |
| uint8_t * | N/A | data |
Enumeration Documentation#
sli_zigbee_key_establish_event_t#
sli_zigbee_key_establish_event_t
| Enumerator | |
|---|---|
| NO_KEY_ESTABLISHMENT_EVENT | |
| CHECK_SUPPORTED_CURVES | |
| BEGIN_KEY_ESTABLISHMENT | |
| GENERATE_KEYS | |
| SEND_EPHEMERAL_DATA_MESSAGE | |
| GENERATE_SHARED_SECRET | |
| SEND_CONFIRM_KEY_MESSAGE | |
| INITIATOR_RECEIVED_CONFIRM_KEY | |
Typedef Documentation#
Variable Documentation#
sli_zigbee_af_key_establish_message_to_data_size#
const uint8_t sli_zigbee_af_key_establish_message_to_data_size[]
sli_zigbee_af_available_cbke_suite#
sl_zigbee_af_cbke_key_establishment_suite_t sli_zigbee_af_available_cbke_suite
sli_zigbee_af_current_cbke_suite#
sl_zigbee_af_cbke_key_establishment_suite_t sli_zigbee_af_current_cbke_suite
sl_zigbee_af_key_establishment_aps_duplicate_detection_event#
sl_zigbee_af_event_t sl_zigbee_af_key_establishment_aps_duplicate_detection_event
Macro Definition Documentation#
EM_AF_KE_INITIATE_SIZE#
#define EM_AF_KE_INITIATE_SIZEValue:
(2 + 1 + 1 + SL_ZIGBEE_CERTIFICATE_SIZE)
Init - bytes: suite (2), key gen time (1), derive secret time (1), cert (48)
EM_AF_KE_INITIATE_SIZE_283K1#
#define EM_AF_KE_INITIATE_SIZE_283K1Value:
(2 + 1 + 1 + SL_ZIGBEE_CERTIFICATE_283K1_SIZE)
EM_AF_KE_EPHEMERAL_SIZE_283K1#
#define EM_AF_KE_EPHEMERAL_SIZE_283K1Value:
SL_ZIGBEE_PUBLIC_KEY_283K1_SIZE
EM_AF_KE_TERMINATE_SIZE#
#define EM_AF_KE_TERMINATE_SIZEValue:
(1 + 1 + 2)
Terminate - bytes: status (1), wait time (1), suite (2)
KEY_ESTABLISHMENT_APS_DUPLICATE_DETECTION_TIMEOUT_SEC#
#define KEY_ESTABLISHMENT_APS_DUPLICATE_DETECTION_TIMEOUT_SECValue:
5
CERT_SUBJECT_OFFSET#
#define CERT_SUBJECT_OFFSETValue:
22
The offset within the 163k1 curve certificate struct where the issuer field lives. 22-bytes for Public Key Reconstruction data, and 8-bytes for subject.
CERT_SUBJECT_OFFSET_283K1#
#define CERT_SUBJECT_OFFSET_283K1Value:
(1 + 8 + 1 + 1 + 8 + 5 + 4)
The offset within the 283k1 curve certificate struct where the issuer field lives. 22-bytes for Public Key Reconstruction data, and 8-bytes for subject.
DEFAULT_EPHEMERAL_DATA_GENERATE_TIME_SECONDS#
#define DEFAULT_EPHEMERAL_DATA_GENERATE_TIME_SECONDSValue:
(10 + APS_ACK_TIMEOUT_SECONDS)
These values reported to the remote device as to how long the local device takes to execute these operations.
DEFAULT_GENERATE_SHARED_SECRET_TIME_SECONDS
#define DEFAULT_GENERATE_SHARED_SECRET_TIME_SECONDSValue:
(15 + APS_ACK_TIMEOUT_SECONDS)
sli_zigbee_af_key_establishment_generate_cbke_keys_handler#
#define sli_zigbee_af_key_establishment_generate_cbke_keys_handlerValue:
sli_zigbee_af_generate_cbke_keys_callback
sli_zigbee_af_key_establishment_calculate_smacs_handler#
#define sli_zigbee_af_key_establishment_calculate_smacs_handlerValue:
sli_zigbee_af_calculate_smacs_callback
sli_zigbee_af_key_establishment_generate_cbke_keys_handler283k1#
#define sli_zigbee_af_key_establishment_generate_cbke_keys_handler283k1Value:
sli_zigbee_af_generate_cbke_keys_callback_283k1
sli_zigbee_af_key_establishment_calculate_smacs_handler283k1#
#define sli_zigbee_af_key_establishment_calculate_smacs_handler283k1Value:
sli_zigbee_af_calculate_smacs_callback_283k1
TERMINATE_STATUS_STRINGS#
#define TERMINATE_STATUS_STRINGSValue:
isCbkeKeyEstablishmentSuite163k1#
#define isCbkeKeyEstablishmentSuite163k1Value:
isCbkeKeyEstablishmentSuite283k1#
#define isCbkeKeyEstablishmentSuite283k1Value: