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)
N/A | issuer |
151
of file app/framework/plugin/key-establishment/key-establishment.h
cleanupAndStopWithDelay#
void cleanupAndStopWithDelay (EmberAfKeyEstablishmentNotifyMessage message, uint8_t delayInSec)
N/A | message | |
N/A | delayInSec |
152
of file app/framework/plugin/key-establishment/key-establishment.h
sendCertificate#
EmberAfKeyEstablishmentNotifyMessage sendCertificate (void )
N/A |
154
of file app/framework/plugin/key-establishment/key-establishment.h
sendNextKeyEstablishMessage#
void sendNextKeyEstablishMessage (KeyEstablishMessage message, uint8_t * data)
N/A | message | |
N/A | data |
155
of file app/framework/plugin/key-establishment/key-establishment.h
Enumeration Documentation#
KeyEstablishEvent#
KeyEstablishEvent
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 |
114
of file app/framework/plugin/key-establishment/key-establishment.h
Typedef Documentation#
KeyEstablishMessage#
typedef uint8_t KeyEstablishMessage
128
of file app/framework/plugin/key-establishment/key-establishment.h
Variable Documentation#
emAfKeyEstablishMessageToDataSize#
const uint8_t emAfKeyEstablishMessageToDataSize[]
81
of file app/framework/plugin/key-establishment/key-establishment.h
emAfAvailableCbkeSuite#
EmberAfCbkeKeyEstablishmentSuite emAfAvailableCbkeSuite
130
of file app/framework/plugin/key-establishment/key-establishment.h
emAfCurrentCbkeSuite#
EmberAfCbkeKeyEstablishmentSuite emAfCurrentCbkeSuite
131
of file app/framework/plugin/key-establishment/key-establishment.h
Macro Definition Documentation#
EM_AF_KE_INITIATE_SIZE#
#define EM_AF_KE_INITIATE_SIZEValue:
(2 + 1 + 1 + EMBER_CERTIFICATE_SIZE)
Init - bytes: suite (2), key gen time (1), derive secret time (1), cert (48)
48
of file app/framework/plugin/key-establishment/key-establishment.h
EM_AF_KE_INITIATE_SIZE_283K1#
#define EM_AF_KE_INITIATE_SIZE_283K1Value:
(2 + 1 + 1 + EMBER_CERTIFICATE_283K1_SIZE)
49
of file app/framework/plugin/key-establishment/key-establishment.h
EM_AF_KE_EPHEMERAL_SIZE#
#define EM_AF_KE_EPHEMERAL_SIZEValue:
EMBER_PUBLIC_KEY_SIZE
50
of file app/framework/plugin/key-establishment/key-establishment.h
EM_AF_KE_EPHEMERAL_SIZE_283K1#
#define EM_AF_KE_EPHEMERAL_SIZE_283K1Value:
EMBER_PUBLIC_KEY_283K1_SIZE
51
of file app/framework/plugin/key-establishment/key-establishment.h
EM_AF_KE_SMAC_SIZE#
#define EM_AF_KE_SMAC_SIZEValue:
EMBER_SMAC_SIZE
52
of file app/framework/plugin/key-establishment/key-establishment.h
EM_AF_KE_TERMINATE_SIZE#
#define EM_AF_KE_TERMINATE_SIZEValue:
(1 + 1 + 2)
Terminate - bytes: status (1), wait time (1), suite (2)
56
of file app/framework/plugin/key-establishment/key-establishment.h
APS_ACK_TIMEOUT_SECONDS#
#define APS_ACK_TIMEOUT_SECONDSValue:
1
58
of file app/framework/plugin/key-establishment/key-establishment.h
KEY_ESTABLISHMENT_APS_DUPLICATE_DETECTION_TIMEOUT_SEC#
#define KEY_ESTABLISHMENT_APS_DUPLICATE_DETECTION_TIMEOUT_SECValue:
5
60
of file app/framework/plugin/key-establishment/key-establishment.h
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.
65
of file app/framework/plugin/key-establishment/key-establishment.h
CERT_ISSUER_OFFSET#
#define CERT_ISSUER_OFFSETValue:
(CERT_SUBJECT_OFFSET + 8)
66
of file app/framework/plugin/key-establishment/key-establishment.h
CERT_ISSUER_SIZE#
#define CERT_ISSUER_SIZEValue:
8
67
of file app/framework/plugin/key-establishment/key-establishment.h
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.
72
of file app/framework/plugin/key-establishment/key-establishment.h
CERT_ISSUER_OFFSET_283K1#
#define CERT_ISSUER_OFFSET_283K1Value:
(1 + 8 + 1 + 1)
73
of file app/framework/plugin/key-establishment/key-establishment.h
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.
78
of file app/framework/plugin/key-establishment/key-establishment.h
DEFAULT_GENERATE_SHARED_SECRET_TIME_SECONDS
#define DEFAULT_GENERATE_SHARED_SECRET_TIME_SECONDSValue:
(15 + APS_ACK_TIMEOUT_SECONDS)
79
of file app/framework/plugin/key-establishment/key-establishment.h
emAfPluginKeyEstablishmentGenerateCbkeKeysHandler#
#define emAfPluginKeyEstablishmentGenerateCbkeKeysHandlerValue:
emAfGenerateCbkeKeysCallback
84
of file app/framework/plugin/key-establishment/key-establishment.h
emAfPluginKeyEstablishmentCalculateSmacsHandler#
#define emAfPluginKeyEstablishmentCalculateSmacsHandlerValue:
emAfCalculateSmacsCallback
85
of file app/framework/plugin/key-establishment/key-establishment.h
emAfPluginKeyEstablishmentGenerateCbkeKeysHandler283k1#
#define emAfPluginKeyEstablishmentGenerateCbkeKeysHandler283k1Value:
emAfGenerateCbkeKeysCallback283k1
86
of file app/framework/plugin/key-establishment/key-establishment.h
emAfPluginKeyEstablishmentCalculateSmacsHandler283k1#
#define emAfPluginKeyEstablishmentCalculateSmacsHandler283k1Value:
emAfCalculateSmacsCallback283k1
87
of file app/framework/plugin/key-establishment/key-establishment.h
TERMINATE_STATUS_STRINGS#
#define TERMINATE_STATUS_STRINGSValue:
102
of file app/framework/plugin/key-establishment/key-establishment.h
UNKNOWN_TERMINATE_STATUS#
#define UNKNOWN_TERMINATE_STATUSValue:
7
112
of file app/framework/plugin/key-establishment/key-establishment.h
isCbkeKeyEstablishmentSuiteValid#
#define isCbkeKeyEstablishmentSuiteValidValue:
()
133
of file app/framework/plugin/key-establishment/key-establishment.h
isCbkeKeyEstablishmentSuite163k1#
#define isCbkeKeyEstablishmentSuite163k1Value:
136
of file app/framework/plugin/key-establishment/key-establishment.h
isCbkeKeyEstablishmentSuite283k1#
#define isCbkeKeyEstablishmentSuite283k1Value:
140
of file app/framework/plugin/key-establishment/key-establishment.h
cleanupAndStop#
#define cleanupAndStopValue:
(message)
144
of file app/framework/plugin/key-establishment/key-establishment.h