35#ifndef LR1110_CRYPTO_ENGINE_H
36#define LR1110_CRYPTO_ENGINE_H
132 uint8_t* data_in, uint8_t length, uint8_t* data_out );
184 uint16_t length, uint8_t* result );
202 uint16_t length, uint8_t* result );
220 uint16_t length, uint8_t* result );
err_t lr1110_crypto_store_to_flash(lriot_t *ctx, uint8_t *status)
Store the crypto data (keys, parameters) from RAM into the flash memory.
err_t lr1110_crypto_process_join_accept(lriot_t *ctx, uint8_t *status, uint8_t dec_key_id, uint8_t ver_key_id, lr1110_crypto_lorawan_version_t lorawan_version, uint8_t *header, uint8_t *data_in, uint8_t length, uint8_t *data_out)
Perform the needed operations to extract the payload from a join accept message.
err_t lr1110_crypto_derive_key(lriot_t *ctx, uint8_t *status, uint8_t src_key_id, uint8_t dest_key_id, lr1110_crypto_nonce_t nonce)
Derive a key previously set.
err_t lr1110_crypto_compute_aes_cmac(lriot_t *ctx, uint8_t *status, uint8_t key_id, uint8_t *data_buf, uint16_t length, lr1110_crypto_mic_t mic)
Compute an AES-CMAC.
err_t lr1110_crypto_aes_encrypt(lriot_t *ctx, uint8_t *status, uint8_t key_id, uint8_t *data_buf, uint16_t length, uint8_t *result)
Compute an AES encryption with a key ID specified in parameter.
err_t lr1110_crypto_select(lriot_t *ctx, lr1110_crypto_element_t element)
Select the crypto element to be used.
err_t lr1110_crypto_get_parameter(lriot_t *ctx, uint8_t *status, uint8_t param_id, lr1110_crypto_param_t parameter)
Get a specific parameter identified by paramID from the crypto RAM.
err_t lr1110_crypto_aes_encrypt_01(lriot_t *ctx, uint8_t *status, uint8_t key_id, uint8_t *data_buf, uint16_t length, uint8_t *result)
Compute an AES encryption with a key ID specified in parameter.
err_t lr1110_crypto_set_key(lriot_t *ctx, uint8_t *status, uint8_t key_id, lr1110_crypto_key_t key)
Set a key in the previously selected crypto element.
err_t lr1110_crypto_aes_decrypt(lriot_t *ctx, uint8_t *status, uint8_t key_id, uint8_t *data_buf, uint16_t length, uint8_t *result)
Compute an AES decryption with a key ID specified in parameter.
err_t lr1110_crypto_verify_aes_cmac(lriot_t *ctx, uint8_t *status, uint8_t key_id, uint8_t *data_buf, uint16_t length, lr1110_crypto_mic_t mic)
Compute an AES-CMAC and make a comparison with a value given as parameter.
err_t lr1110_crypto_set_parameter(lriot_t *ctx, uint8_t *status, uint8_t param_id, lr1110_crypto_param_t parameter)
Set a specific parameter identified by param_id in the crypto RAM.
err_t lr1110_crypto_restore_from_flash(lriot_t *ctx, uint8_t *status)
Restore the crypto data (keys, parameters) from flash memory into RAM.
Cryptographic engine driver types for LR1110.
lr1110_crypto_lorawan_version_t
The supported LoRaWAN versions.
Definition lr1110_crypto_engine_types.h:149
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
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
lr1110_crypto_element_t
The supported crypto elements.
Definition lr1110_crypto_engine_types.h:128
Hardware Abstraction Layer (HAL) interface for LR1110.
Type definitions for LR1110.
LR IoT Click context object.
Definition lriot.h:273