Arduino LMIC 6.0.1
Arduino LoRaWAN(r) MAC in C
Loading...
Searching...
No Matches
lmic_secure_element_interface.h File Reference
#include "../../lmic/lmic_env.h"
#include "../../lmic/oslmic_types.h"
Include dependency graph for lmic_secure_element_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  LMIC_SecureElement_Aes128Key_s
 an object to carry an AES128 (16-byte) key. More...
struct  LMIC_SecureElement_EUI_s
 an object to carry a 64-bit EUI. More...
struct  LMIC_SecureLElement_JoinRequest_s
 an object to carry a LoRaWAN Join Request message. More...

Macros

#define LMIC_SecureElement_DECLARE_DRIVER_FNS(a_driver)
 Declare secure element functions for a given driver.
#define LMIC_SecureElement_KeySelector_NAME_MULTISZ_INIT
 Names for values of LMIC_SecureElement_KeySelector_t.

Typedefs

typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_aes128Encrypt_t(const uint8_t *pKey, const uint8_t *pInput, uint8_t *pOutput)
 Perform an AES128 encryption.
typedef struct LMIC_SecureElement_Aes128Key_s LMIC_SecureElement_Aes128Key_t
 an object to carry an AES128 (16-byte) key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_createJoinRequest_t(uint8_t *pJoinRequestBytes, LMIC_SecureElement_JoinFormat_t joinFormat)
 Create a join request.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_decodeJoinAccept_t(const uint8_t *pJoinAcceptBytes, uint8_t nJoinAcceptBytes, uint8_t *pJoinAcceptClearText, LMIC_SecureElement_JoinFormat_t joinFormat)
 Decode a join accept message; capture keys.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_decodeMessage_t(const uint8_t *pPhyPayload, uint8_t nPhyPayload, uint32_t devAddr, uint32_t FCntDown, LMIC_SecureElement_KeySelector_t iKey, uint8_t *pClearTextBuffer)
 Decode an application message.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_encodeMessage_t(const uint8_t *pMessage, uint8_t nMessage, uint8_t iPayload, uint8_t *pCipherTextBuffer, LMIC_SecureElement_KeySelector_t iKey)
 Encode an application uplink message.
typedef enum LMIC_SecureElement_Error_e LMIC_SecureElement_Error_t
 Controlled-width type for LMIC_SecureElement_Error_e.
typedef struct LMIC_SecureElement_EUI_s LMIC_SecureElement_EUI_t
 an object to carry a 64-bit EUI.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_fillRandomBuffer_t(uint8_t *buffer, uint8_t nBuffer)
 Fill buffer with random independently distributed integers, each in [0..255].
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_getAppEUI_t(LMIC_SecureElement_EUI_t *pAppEUI)
 Get application EUI.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_getAppKey_t(LMIC_SecureElement_Aes128Key_t *pAppKey)
 Get application key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_getAppSKey_t(LMIC_SecureElement_Aes128Key_t *pAppSKey, LMIC_SecureElement_KeySelector_t iKey)
 Get application session key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_getDevEUI_t(LMIC_SecureElement_EUI_t *pDevEUI)
 Get device EUI.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_getNwkSKey_t(LMIC_SecureElement_Aes128Key_t *pNwkSKey, LMIC_SecureElement_KeySelector_t iKey)
 Get network session key.
typedef uint8_t LMIC_ABI_STD LMIC_SecureElement_getRandomU1_t(void)
 Return a random integer uniformly distributed in [0..255].
typedef uint16_t LMIC_ABI_STD LMIC_SecureElement_getRandomU2_t(void)
 Return a random integer uniformly distributed in [0..65535].
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_initialize_t(void)
 Initialize the Secure Element.
typedef uint8_t LMIC_SecureElement_JoinFormat_t
 Controlled-width type for LMIC_SecureElement_JoinFormat_e.
typedef struct LMIC_SecureLElement_JoinRequest_s LMIC_SecureElement_JoinRequest_t
 an object to carry a LoRaWAN Join Request message.
typedef uint8_t LMIC_SecureElement_KeySelector_t
 Controlled-width type for LMIC_SecureElement_KeySelector_e.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_setAppEUI_t(const LMIC_SecureElement_EUI_t *pAppEUI)
 Set application EUI.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_setAppKey_t(const LMIC_SecureElement_Aes128Key_t *pAppKey)
 Set application key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_setAppSKey_t(const LMIC_SecureElement_Aes128Key_t *pAppSKey, LMIC_SecureElement_KeySelector_t iKey)
 Set application session key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_setDevEUI_t(const LMIC_SecureElement_EUI_t *pDevEUI)
 Set device EUI.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_setNwkSKey_t(const LMIC_SecureElement_Aes128Key_t *pNwkSKey, LMIC_SecureElement_KeySelector_t iKey)
 Set network session key.
typedef LMIC_SecureElement_Error_t LMIC_ABI_STD LMIC_SecureElement_verifyMIC_t(const uint8_t *pPhyPayload, uint8_t nPhyPayload, uint32_t devAddr, uint32_t FCntDown, LMIC_SecureElement_KeySelector_t iKey)
 Verify the MIC of a downlink message.

Enumerations

enum  LMIC_SecureElement_Error_e {
  LMIC_SecureElement_Error_OK = 0 , LMIC_SecureElement_Error_InvalidParameter , LMIC_SecureElement_Error_Permission , LMIC_SecureElement_Error_NotProvisioned ,
  LMIC_SecureElement_Error_InvalidMIC , LMIC_SecureElement_Error_Implementation
}
 Values of type and LMIC_SecureElement_Error_t enumerate errors returned by the Secure Element APIs. More...
enum  LMIC_SecureElement_JoinFormat_e {
  LMIC_SecureElement_JoinFormat_JoinRequest10 , LMIC_SecureElement_JoinFormat_JoinRequest11 , LMIC_SecureElement_JoinFormat_RejoinRequest0 , LMIC_SecureElement_JoinFormat_RejoinRequest1 ,
  LMIC_SecureElement_JoinFormat_RejoinRequest2 , LMIC_SecureElement_JoinFormat_SIZE
}
 Values of this type and LMIC_SecureElement_JoinFormat_t select specific formats of Join Request. More...
enum  LMIC_SecureElement_KeySelector_e {
  LMIC_SecureElement_KeySelector_Unicast = 0 , LMIC_SecureElement_KeySelector_Mc0 , LMIC_SecureElement_KeySelector_Mc1 , LMIC_SecureElement_KeySelector_Mc2 ,
  LMIC_SecureElement_KeySelector_Mc3 , LMIC_SecureElement_KeySelector_AppKey , LMIC_SecureElement_KeySelector_SIZE
}
 Values of this type and LMIC_SecureElement_KeySelector_t select specific keys for encryption/decryption operations. More...