35#ifndef LR1110_CRYPTO_ENGINE_TYPES_H
36#define LR1110_CRYPTO_ENGINE_TYPES_H
62#define LR1110_CRYPTO_MIC_LENGTH 0x04
67#define LR1110_CRYPTO_AES_CMAC_LENGTH 0x10
72#define LR1110_CRYPTO_DATA_MAX_LENGTH 0x0100
77#define LR1110_CRYPTO_KEY_LENGTH 0x10
82#define LR1110_CRYPTO_NONCE_LENGTH 0x10
87#define LR1110_CRYPTO_PARAMETER_LENGTH 0x04
92#define LR1110_CRYPTO_STATUS_LENGTH 0x01
#define LR1110_CRYPTO_KEY_LENGTH
Length in bytes of a key for AES computation.
Definition lr1110_crypto_engine_types.h:77
lr1110_crypto_keys_idx_e
Crypto keys table index definition.
Definition lr1110_crypto_engine_types.h:158
@ LR1110_CRYPTO_KEYS_IDX_J_S_ENC_KEY
Definition lr1110_crypto_engine_types.h:162
@ LR1110_CRYPTO_KEYS_IDX_MC_NWK_S_KEY_0
Definition lr1110_crypto_engine_types.h:180
@ LR1110_CRYPTO_KEYS_IDX_NWK_KEY
Definition lr1110_crypto_engine_types.h:160
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_5
Definition lr1110_crypto_engine_types.h:169
@ LR1110_CRYPTO_KEYS_IDX_J_S_INT_KEY
Definition lr1110_crypto_engine_types.h:163
@ LR1110_CRYPTO_KEYS_IDX_S_NWK_S_INT_KEY
Definition lr1110_crypto_engine_types.h:172
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_2
Definition lr1110_crypto_engine_types.h:166
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_1
Definition lr1110_crypto_engine_types.h:165
@ LR1110_CRYPTO_KEYS_IDX_APP_KEY
Definition lr1110_crypto_engine_types.h:161
@ LR1110_CRYPTO_KEYS_IDX_F_NWK_S_INT_KEY
Definition lr1110_crypto_engine_types.h:171
@ LR1110_CRYPTO_KEYS_IDX_MOTHER_KEY
Definition lr1110_crypto_engine_types.h:159
@ LR1110_CRYPTO_KEYS_IDX_MC_NWK_S_KEY_1
Definition lr1110_crypto_engine_types.h:181
@ LR1110_CRYPTO_KEYS_IDX_MC_APP_S_KEY_0
Definition lr1110_crypto_engine_types.h:176
@ LR1110_CRYPTO_KEYS_IDX_NWK_S_ENC_KEY
Definition lr1110_crypto_engine_types.h:173
@ LR1110_CRYPTO_KEYS_IDX_MC_NWK_S_KEY_2
Definition lr1110_crypto_engine_types.h:182
@ LR1110_CRYPTO_KEYS_IDX_MC_NWK_S_KEY_3
Definition lr1110_crypto_engine_types.h:183
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_0
Definition lr1110_crypto_engine_types.h:164
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_3
Definition lr1110_crypto_engine_types.h:167
@ LR1110_CRYPTO_KEYS_IDX_GP0
Definition lr1110_crypto_engine_types.h:184
@ LR1110_CRYPTO_KEYS_IDX_MC_APP_S_KEY_3
Definition lr1110_crypto_engine_types.h:179
@ LR1110_CRYPTO_KEYS_IDX_APP_S_KEY
Definition lr1110_crypto_engine_types.h:170
@ LR1110_CRYPTO_KEYS_IDX_GP_KE_KEY_4
Definition lr1110_crypto_engine_types.h:168
@ LR1110_CRYPTO_KEYS_IDX_GP1
Definition lr1110_crypto_engine_types.h:185
@ LR1110_CRYPTO_KEYS_IDX_MC_APP_S_KEY_1
Definition lr1110_crypto_engine_types.h:177
@ LR1110_CRYPTO_KEYS_IDX_MC_APP_S_KEY_2
Definition lr1110_crypto_engine_types.h:178
@ LR1110_CRYPTO_KEYS_IDX_RFU_0
Definition lr1110_crypto_engine_types.h:174
@ LR1110_CRYPTO_KEYS_IDX_RFU_1
Definition lr1110_crypto_engine_types.h:175
lr1110_crypto_status_t
The status returned by the crypto API.
Definition lr1110_crypto_engine_types.h:137
@ LR1110_CRYPTO_STATUS_ERROR_BUFFER_SIZE
Invalid data buffer size.
Definition lr1110_crypto_engine_types.h:141
@ LR1110_CRYPTO_STATUS_ERROR_FAIL_CMAC
AES-CMAC invalid or comparison failed.
Definition lr1110_crypto_engine_types.h:139
@ LR1110_CRYPTO_STATUS_ERROR
Other error.
Definition lr1110_crypto_engine_types.h:142
@ LR1110_CRYPTO_STATUS_ERROR_INVALID_KEY_ID
Invalid key ID (source, destination)
Definition lr1110_crypto_engine_types.h:140
@ LR1110_CRYPTO_STATUS_SUCCESS
The API command was successful.
Definition lr1110_crypto_engine_types.h:138
enum lr1110_crypto_keys_idx_e lr1110_crypto_keys_idx_t
Crypto keys table index definition.
lr1110_crypto_lorawan_version_t
The supported LoRaWAN versions.
Definition lr1110_crypto_engine_types.h:149
@ LR1110_CRYPTO_LORAWAN_VERSION_1_0_X
Definition lr1110_crypto_engine_types.h:150
@ LR1110_CRYPTO_LORAWAN_VERSION_1_1_X
Definition lr1110_crypto_engine_types.h:151
uint8_t lr1110_crypto_aes_cmac_t[LR1110_CRYPTO_AES_CMAC_LENGTH]
Fixed-length array to store an AES CMAC.
Definition lr1110_crypto_engine_types.h:107
uint8_t lr1110_crypto_mic_t[LR1110_CRYPTO_MIC_LENGTH]
Fixed-length array to store an AES CMAC.
Definition lr1110_crypto_engine_types.h:102
uint8_t lr1110_crypto_param_t[LR1110_CRYPTO_PARAMETER_LENGTH]
Fixed-length array to store a crypto parameter.
Definition lr1110_crypto_engine_types.h:122
#define LR1110_CRYPTO_PARAMETER_LENGTH
Length in bytes of a crypto parameter.
Definition lr1110_crypto_engine_types.h:87
uint8_t lr1110_crypto_nonce_t[LR1110_CRYPTO_NONCE_LENGTH]
Fixed-length array to store a crypto nonce.
Definition lr1110_crypto_engine_types.h:117
uint8_t lr1110_crypto_key_t[LR1110_CRYPTO_KEY_LENGTH]
Fixed-length array to store a crypto key.
Definition lr1110_crypto_engine_types.h:112
#define LR1110_CRYPTO_MIC_LENGTH
Length in bytes of a MIC.
Definition lr1110_crypto_engine_types.h:62
lr1110_crypto_element_t
The supported crypto elements.
Definition lr1110_crypto_engine_types.h:128
@ LR1110_CRYPTO_ELEMENT_SECURE_ELEMENT
External secure element.
Definition lr1110_crypto_engine_types.h:130
@ LR1110_CRYPTO_ELEMENT_CRYPTO_ENGINE
Internal crypto engine (default)
Definition lr1110_crypto_engine_types.h:129
#define LR1110_CRYPTO_AES_CMAC_LENGTH
Length in bytes of a AES CMAC.
Definition lr1110_crypto_engine_types.h:67
#define LR1110_CRYPTO_NONCE_LENGTH
Length in bytes of a nonce.
Definition lr1110_crypto_engine_types.h:82