X-CUBE-ALIRO: Main Page

X-CUBE-ALIRO 1.0.0
Software for STM32 which implements the CSA Aliro protocol for access control
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
Main Page

X-CUBE-ALIRO

The X-CUBE-ALIRO implements the CSA Aliro protocol for access control.

This package contains the following projects: Aliro

X-CUBE-ALIRO - Firmware architecture

The X-CUBE-ALIRO runs on NUCLEO-U545RE + X-NUCLEO-NFC10, NUCLEO-U545RE + X-NUCLEO-NFC12, NUCLEO-WBA65RI + X-NUCLEO-NFC10 and NUCLEO-WBA65RI + X-NUCLEO-NFC12. Moreover it is compatible with the Aliro app.

NFC-ONLY
use case

NFC-ONLY
use case

NFC / BLERKE / BLEUWB
use case

NFC / BLERKE / BLEUWB
use case

NUCLEO-U545RE + X-NUCLEO-NFC10A1 | NUCLEO-U545RE + X-NUCLEO-NFC12A1 | NUCLEO-WBA65RI + X-NUCLEO-NFC10A1 | NUCLEO-WBA65RI + X-NUCLEO-NFC12A1
NUCLEO-U545RE + X-NUCLEO-NFC10A1 | NUCLEO-U545RE + X-NUCLEO-NFC12A1 | NUCLEO-WBA65RI + X-NUCLEO-NFC10A1 | NUCLEO-WBA65RI + X-NUCLEO-NFC12A1

documents image | Brick image | hardware image | Firmware image
Hardware documents | Main components | Getting started with hardware | Getting started with firmware

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 information

  • Related Pages
  • Modules
  • Data Structures
  • Files
NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 information

Description

The NUCLEO-U545RE-Q provides an affordable and flexible way for users to try out new concepts and build prototypes by choosing from the various combinations of performance and power consumption features provided by the STM32 microcontroller. For the compatible boards, the internal or external SMPS significantly reduces power consumption in Run mode..

The NUCLEO-WBA65RI is a Bluetooth® LE wireless and ultra low power board embedding a powerful and ultra low power radio compliant with the Bluetooth® LE SIG specification, IEEE 802.15.4-2015 PHY and MAC, supporting Thread, Matter, and Zigbee®.

In all these NUCLEO boards, the ARDUINO® Uno V3 connectivity support and the ST morpho headers allow the easy expansion of the functionality of the STM32 Nucleo open development platform with a wide choice of specialized shields. The STM32 Nucleo-64 board does not require any separate probe as it integrates the ST-LINK debugger/programmer.

The X-NUCLEO-NFC10A1 NFC card reader expansion board is based on the ST25R200 device. The expansion board is configured to support ISO14443A/B, ISO15693. The ST25R200 manages frame coding and decoding in reader mode for standard applications, such as NFC, proximity, and vicinity HF RFID standards. It supports ISO/IEC 14443 type A/B and ISO/IEC 15693 RF communication protocols as well as the detection, reading and writing of NFC Forum type 1, 2, 4, and 5 tags. It embeds a low power wake-up system capable of detecting an approaching tag. It also features a low power RC oscillator and wake-up timer to wake up the device automatically after a selected time period and check for a tag presence.

The X-NUCLEO-NFC12A1 The X-NUCLEO-NFC12A1 NFC card reader expansion board is based on the ST25R300 device. The expansion board is configured to support all five NFC Forum tag types in reader mode. The ST25R300 manages frame coding and decoding in reader mode for standard applications. It supports ISO/IEC 14443 type A/B and ISO/IEC 15693 (single subcarrier only) and ISO/IEC 18092 communication protocols as well as the detection, reading and writing of NFC Forum type 1, 2, 3, 4, and 5 tags. Integrated HF reader/NFC initiator/NFC target IC with an antenna etched on the PCB and the related tuning circuit.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 Building blocks

  • Files
NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 Building blocks

Main components

The NUCLEO-U545RE baords is built around the following STMicroelectronics microcontroller.

  • STM32U545RE Ultra-low-power with FPU Arm Cortex-M33 MCU with TrustZone, 160 MHz with 512 Kbytes of Flash memory

The NUCLEO-WBA65RI baords is built around the following STMicroelectronics microcontroller.

  • STM32WBA65RI Ultra-low-power, Arm Cortex-M33 TZ MCU 100 MHz with 2 Mbytes of Flash memory, Bluetooth LE 6.0, 802.15.4, Zigbee, Thread

The X-NUCLEO-NFC10A1 baords is built around the following STMicroelectronics NFC device

  • ST25R200 Powerful general-purpose NFC reader for consumer and industrial applications

The X-NUCLEO-NFC12A1 baords is built around the following STMicroelectronics NFC device

  • ST25R300 High-end NFC reader for NFC charging, payment and consumer applications

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Getting started with hardware

Getting started with hardware

How to get started with hardware

Before to start - Rquired material

  • a PC
  • the STM32CubeProgrammer software to update the firmware
  • Serial terminal software (i.e. Tera Term)
  • Aliro firmware in .hex format
  • one among the supported NUCLEO board (NUCLEO-U545RE, NUCLEO-WBA65RI)
  • one omong the supported X-NUCLEO-NFC expansion board (X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1)
  • a type-A or USB Type-C to Micro-B cable and 14pin-cables in case it is necessary debug or program the board working with the STM32 ecosystem

STEP1 - Board connection

  • Mount the NFC X-NUCLEO on the MCU NUCLEO board
  • Connect the board to the PC using the USB Type-C® cable
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Getting started with firmware

Getting started with firmware

How to get started with firmware

STEP1 - Board programming

  • Launch the STM32CubeProgrammer software
  • Connect to the board by clicking Connect
  • Navigate to the Erasing & Programming tab
  • Click Full chip erase
  • Navigate to the Memory & File editing tab
  • Load the appropriate firmware.(e.g. Aliro_WBA65_1.hex) drag-and-drop or click +, select Open file
  • Click Download to flash the selected firmware, and wait for confirmation
  • Click Disconnect, then Connect, and finally Disconnect again
  • Close STM32CubeProgrammer

STEP2 - Serial terminal setup

  • Open a serial terminal (e.g. TeraTerm)
  • the WBA65RI has two active COM ports, choose the one that has “Port” in its name, and NOT “Port 2” and connect to it
  • Set the baud rate to 921600

STEP3 - Initial configuration commands

  • Once the serial connection is established, type the following command sequence:
    • type s and press Enter to save default provisioning
  • A menu with 4 options will appear. Among them:
    • type 1 and press Enter that means save provisioning WITHOUT certificate
  • Then:
    • type r and press Enter to restart the system

The board is now ready for testing! It has been provisioned with the “default” set of keys, which corresponds to the “Default” configuration of the Android Door Lock mobile app

  • After reboot, press p to show the current provisioning
    Look at certificate_data, it`s empty, the reader is configured without certificate
  • Moreover look at the following information:
    • reader_identifier, reader_PrivK, reader_PubK and group_resolving_key are populated. It means that the reader is provisioned
    • certificate_data is empty. It means that no certificate present on the reader, reader_PubK will be used by user_device
    • at least one endpoint_PubK is present. It means that the user_device with this public key will be able to actuate the lock
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Todo List

Todo List
Global AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES
Update this value as needed.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Modules

Modules
Here is a list of all modules:
[detail level 123456]
▼ ALIRO APPLICATION |
▼ PROVISIONING |
▼ FLASH MANAGER |
Flash_mng_Exported_Types |
Flash_mng_Exported_Functions |
▼ Provisioning Mng Core |
Provisioning_Exported_Constants |
Provisioning_Exported_Variables |
Provisioning_Exported_Types |
Provisioning_Exported_Functions |
Provisioning_info_Constants |
Provisioning_info_Macros |
Provisioning_info_Includes |
User Provisioning Profiles |
▼ NFC MANAGER |
▼ TRANSPORT LAYER WRAPPER |
▼ ALIRO_SECURITY |
▼ MCU CRYPTO |
SM_Crypto_Exported_Constants |
SM_Crypto_Exported_Types |
SM_Crypto_Exported_Functions |
SM_crypto_mcu_Exported_Constants |
SM_crypto_mcu_Exported_Functions |
SM_crypto_stsafe_Exported_Functions |
▼ ACWG SECURITY |
ACWG_build_info_Exported_Constants |
ACWG_build_info_Exported_Types |
ACWG_security_Exported_Constants |
ACWG_security_Exported_Types |
ACWG_security_Exported_Variables |
ACWG_security_Exported_Functions |
ACWG_version_Exported_Constants |
▼ STEPUP MANAGER |
▼ CERTIFICATE UTILITY |
Certificate parser | Certificate parser
Certificate cryptography | Certificate cryptography functions
Certificate subparsing routines | Certificate subparsing routines
▼ STEPUP CORE |
STEPUP_MGR_Exported_Types |
STEPUP_MGR_Exported_Constants |
STEPUP_MGR_Exported_Macros |
STEPUP_MGR_Private_Defines |
STEPUP_MGR_Exported_Functions |
▼ NFC |
Aliro_NFC_ExportedTypes | Exported types for Aliro NFC module
Aliro_NFC_ExportedConstants | Exported constants for Aliro NFC module
Aliro_NFC_ExportedMacros | Exported macros for Aliro NFC module
Aliro_NFC_ExportedFunctions | Exported functions for Aliro NFC module
TLWrapper_Nfc_Exported_Types |
TLWrapper_Nfc_Exported_Variables |
TLWrapper_Nfc_Exported_Functions |
▼ BLE UWB |
UWB_Exported_Functions |
TLWrapper_BleUwb_Exported_Types |
TLWrapper_BleUwb_Exported_Variables |
TLWrapper_BleUwb_Exported_Functions |
▼ WRAPPER UTILITY |
TLWrapper_Utils_Exported_Types |
TLWrapper_Utils_Exported_Variables |
TLWrapper_Utils_Exported_Functions |
▼ TLV UTILITIES |
TLV_Utilities_Exported_Types |
TLV_Utilities_Exported_Functions |
▼ NFCBLE |
Aliro_app_Exported_Types |
Aliro_app_Exported_Variables |
Aliro_app_Exported_Constants |
Aliro_app_Exported_Macros |
Aliro_app_Exported_Functions |
App_build_info_Exported_Constants |
App_build_info_Exported_Types |
App_build_info_Exported_Variables |
App_Version_Exported_Constants |
Log_module_u5_Exported_Types |
Log_module_u5_Exported_Macros |


X-CUBE-ALIRO: ALIRO APPLICATION

Modules
ALIRO APPLICATION
Collaboration diagram for ALIRO APPLICATION:

Modules

PROVISIONING
NFC MANAGER
NFCBLE

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: PROVISIONING

Modules
PROVISIONING
ALIRO APPLICATION
Collaboration diagram for PROVISIONING:

Modules

FLASH MANAGER
Provisioning Mng Core
User Provisioning Profiles

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: FLASH MANAGER

Modules
FLASH MANAGER
ALIRO APPLICATION » PROVISIONING
Collaboration diagram for FLASH MANAGER:

Modules

Flash_mng_Exported_Types
Flash_mng_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Flash_mng_Exported_Types

Typedefs | Enumerations
Flash_mng_Exported_Types
ALIRO APPLICATION » PROVISIONING » FLASH MANAGER
Collaboration diagram for Flash_mng_Exported_Types:

Typedefs

typedef enum _flashOpStatus flashOpStatus_e

Enumerations

enum _flashOpStatus { FLASH_OP_OK , FLASH_OP_BUSY , FLASH_OP_ERROR }

Detailed Description

Enumeration Type Documentation

◆ _flashOpStatus

enum _flashOpStatus
Enumerator
FLASH_OP_OK | Operation successful
FLASH_OP_BUSY | Flash is busy
FLASH_OP_ERROR | Operation failed
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Flash_mng_Exported_Functions

Functions
Flash_mng_Exported_Functions
ALIRO APPLICATION » PROVISIONING » FLASH MANAGER
Collaboration diagram for Flash_mng_Exported_Functions:

Functions

flashOpStatus_e | WriteToFlash (void *data, uint32_t nBytes, uint32_t nAddress)
Writes data to flash memory. More...
flashOpStatus_e | EraseWriteToFlash (void *data, uint32_t nBytes, uint32_t nAddress)
Erases the flash sector and writes data to it. More...
flashOpStatus_e | EraseFlash (uint32_t nAddress, uint32_t nBytes)
Erases a region of flash memory. More...

Detailed Description

Function Documentation

◆ EraseFlash()

flashOpStatus_e EraseFlash | ( | uint32_t | nAddress,
 |  | uint32_t | nBytes
 | ) |  |

Erases a region of flash memory.

Parameters
nAddress | Start address of the region to erase.
nBytes | Number of bytes to erase.
Returns
Status of the operation.

◆ EraseWriteToFlash()

flashOpStatus_e EraseWriteToFlash | ( | void * | data,
 |  | uint32_t | nBytes,
 |  | uint32_t | nAddress
 | ) |  |

Erases the flash sector and writes data to it.

Parameters
data | Pointer to the data to write.
nBytes | Number of bytes to write.
nAddress | Destination address in flash.
Returns
Status of the operation.

◆ WriteToFlash()

flashOpStatus_e WriteToFlash | ( | void * | data,
 |  | uint32_t | nBytes,
 |  | uint32_t | nAddress
 | ) |  |

Writes data to flash memory.

Parameters
data | Pointer to the data to write.
nBytes | Number of bytes to write.
nAddress | Destination address in flash.
Returns
Status of the operation.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Provisioning Mng Core

Modules
Provisioning Mng Core
ALIRO APPLICATION » PROVISIONING
Collaboration diagram for Provisioning Mng Core:

Modules

Provisioning_Exported_Constants
Provisioning_Exported_Variables
Provisioning_Exported_Types
Provisioning_Exported_Functions
Provisioning_info_Constants
Provisioning_info_Macros
Provisioning_info_Includes

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Provisioning_Exported_Constants

Macros
Provisioning_Exported_Constants
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_Exported_Constants:

Macros

#define | PRIVATE_KEY_SIZE_BYTES ((uint32_t)32)
Size of private key in bytes.
#define | AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
Length of authentication public key in bytes.
#define | GROUP_RESOLVING_KEY_SIZE_BYTES ((uint32_t)16)
Size of group resolving key in bytes.
#define | DEVICE_NAME_SIZE_BYTES ((uint32_t)16)
Size of device name in bytes.
#define | B1_VENDOR_SPEC_EXT_SIZE_BYTES ((uint32_t)64)
Size of vendor specific extension in bytes.
#define | RESERVED_PAIRING_KEYS_SIZE_BYTES ((uint32_t)32)
Size of buffer in bytes reserved for future use .
#define | CERTIFICATE_SIZE ((uint32_t)400)
Size of certificate data in bytes.
#define | NUM_PROV_DEVICES 5
Maximum number of provisioned devices.

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Provisioning_Exported_Variables

Provisioning_Exported_Variables
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_Exported_Variables:
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Provisioning_Exported_Types

Data Structures | Typedefs
Provisioning_Exported_Types
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_Exported_Types:

Data Structures

struct | devices_s
struct | provstruct_s
struct | devices_t
Structure representing a provisioned device. More...
struct | provstruct_t
Structure representing the provisioning data. More...

Typedefs

typedef struct devices_s | devices_t
typedef struct provstruct_s | provstruct_t

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: devices_s Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
devices_s Struct Reference
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core » Provisioning_Exported_Types

Data Fields

uint8_t | name [DEVICE_NAME_SIZE_BYTES]
uint8_t | endpoint_Keyslot [AUTH_KEYSLOT_LEN_BYTES]
uint8_t | endpoint_PubK [AUTH_PUBKEY_LEN_BYTES]
uint8_t | endpoint_PrivK [PRIVATE_KEY_SIZE_BYTES]

Field Documentation

◆ endpoint_Keyslot

uint8_t endpoint_Keyslot[AUTH_KEYSLOT_LEN_BYTES]

Endpoint keyslot

◆ endpoint_PrivK

uint8_t endpoint_PrivK[PRIVATE_KEY_SIZE_BYTES]

Endpoint private key

◆ endpoint_PubK

uint8_t endpoint_PubK[AUTH_PUBKEY_LEN_BYTES]

Endpoint public key

◆ name

uint8_t name[DEVICE_NAME_SIZE_BYTES]

Device name

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: provstruct_s Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
provstruct_s Struct Reference
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core » Provisioning_Exported_Types
Collaboration diagram for provstruct_s:
[legend]

Data Fields

uint32_t | isValid
uint8_t | readerID [AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]
uint8_t | readerPubK [AUTH_PUBKEY_LEN_BYTES]
uint8_t | staticPrivateKey [PRIVATE_KEY_SIZE_BYTES]
uint8_t | group_resolving_key [GROUP_RESOLVING_KEY_SIZE_BYTES]
uint8_t | certificate_data [CERTIFICATE_SIZE]
uint32_t | certificate_len
uint8_t | readerIssuerPubK [AUTH_PUBKEY_LEN_BYTES]
uint8_t | b1VendorSpecificExtension [B1_VENDOR_SPEC_EXT_SIZE_BYTES]
uint32_t | b1VendorSpecificExtensionLen
uint32_t | numDevices
devices_t devices [NUM_PROV_DEVICES]
uint32_t | isValidReserved
uint8_t | reservedPairingKeys [RESERVED_PAIRING_KEYS_SIZE_BYTES]
uint32_t | struct_size

Field Documentation

◆ b1VendorSpecificExtension

uint8_t b1VendorSpecificExtension[B1_VENDOR_SPEC_EXT_SIZE_BYTES]

Vendor specific extension

◆ b1VendorSpecificExtensionLen

uint32_t b1VendorSpecificExtensionLen

Vendor specific extension length

◆ certificate_data

uint8_t certificate_data[CERTIFICATE_SIZE]

Certificate data

◆ certificate_len

uint32_t certificate_len

Certificate length

◆ devices

devices_t devices[NUM_PROV_DEVICES]

Array of provisioned devices

◆ group_resolving_key

uint8_t group_resolving_key[GROUP_RESOLVING_KEY_SIZE_BYTES]

Group resolving key

◆ isValid

uint32_t isValid

Validity flag

◆ isValidReserved

uint32_t isValidReserved

RESERVED validity flag

◆ numDevices

uint32_t numDevices

Number of devices

◆ readerID

uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]

Reader ID

◆ readerIssuerPubK

uint8_t readerIssuerPubK[AUTH_PUBKEY_LEN_BYTES]

Reader issuer public key

◆ readerPubK

uint8_t readerPubK[AUTH_PUBKEY_LEN_BYTES]

Reader public key

◆ reservedPairingKeys

uint8_t reservedPairingKeys[RESERVED_PAIRING_KEYS_SIZE_BYTES]

RESERVED pairing keys

◆ staticPrivateKey

uint8_t staticPrivateKey[PRIVATE_KEY_SIZE_BYTES]

Static private key

◆ struct_size

uint32_t struct_size

Structure size

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: devices_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
devices_t Struct Reference
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core » Provisioning_Exported_Types

Structure representing a provisioned device. More...

#include <provisioning.h>

Detailed Description

Structure representing a provisioned device.


X-CUBE-ALIRO: provstruct_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
provstruct_t Struct Reference
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core » Provisioning_Exported_Types

Structure representing the provisioning data. More...

#include <provisioning.h>

Detailed Description

Structure representing the provisioning data.


X-CUBE-ALIRO: Provisioning_Exported_Functions

Functions
Provisioning_Exported_Functions
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_Exported_Functions:

Functions

void | showJsonStatus ()
Shows the status of the JSON provisioning data.
void | showProvisioningStatus ()
Shows the status of the provisioning data.
void | saveProvisioningToFlash (uint32_t profile_num)
Saves the provisioning data to flash memory. More...
provstruct_t * getProvisioningFromFlash ()
Retrieves the provisioning data from flash memory. More...
void | loadProvisionFromJson (uint32_t jsonAddress, provstruct_t *provstruct)
Loads provisioning data from a JSON address. More...
void | convertProvisioningFromJson (uint32_t jsonAddress)
Converts provisioning data from JSON format. More...
void | convertDefaultProvisioningFromJson ()
Converts default provisioning data from JSON format.
void | printDeviceJson ()
Prints the device JSON data.
void | printScriptJson ()
Prints the script JSON data.
void | saveRDPubKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader public key to flash memory. More...
void | saveRDPrvKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader private key to flash memory. More...
void | saveRDidenToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader identity to flash memory. More...
void | saveRDgrrkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader group resolving key to flash memory. More...
void | saveCredIsPkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the credential issuer public key to flash memory. More...
void | saveAccessCredentialPuBK (uint8_t *pkey, const uint8_t ksize, uint8_t nSlot, uint8_t *pkeyname)
Saves the access credential public key. More...
uint8_t | is_zeros (uint8_t *pBuf, uint32_t nSize)
Checks if a buffer contains only zeros. More...
uint8_t | ProvisioningCheckEndpointPubK (uint8_t *endp_PubK)
Checks the endpoint public key for provisioning. More...
uint8_t | ProvisioningGetEndpointPubKFromKeyslot (uint8_t *endp_PubK, uint8_t *endp_Keyslot, uint8_t *slotFound)
Gets the endpoint public key from a keyslot. More...
void | hexStrToHex (char *p, uint32_t len, uint8_t *hexp)
Converts a hex string to a hex buffer. More...

Detailed Description

Function Documentation

◆ convertProvisioningFromJson()

void convertProvisioningFromJson ( uint32_t jsonAddress )

Converts provisioning data from JSON format.

Parameters
jsonAddress Address of the JSON data.

◆ getProvisioningFromFlash()

provstruct_t * getProvisioningFromFlash ( )

Retrieves the provisioning data from flash memory.

Returns
Pointer to the provisioning structure.

◆ hexStrToHex()

void hexStrToHex | ( | char * | p,
 |  | uint32_t | len,
 |  | uint8_t * | hexp
 | ) |  |

Converts a hex string to a hex buffer.

Parameters
p | Pointer to the hex string.
len | Length of the string.
hexp | Pointer to the hex buffer.

◆ is_zeros()

uint8_t is_zeros | ( | uint8_t * | pBuf,
 |  | uint32_t | nSize
 | ) |  |

Checks if a buffer contains only zeros.

Parameters
pBuf | Pointer to the buffer.
nSize | Size of the buffer.
Returns
1 if all zeros, 0 otherwise.

Checks if a buffer contains only zeros.

This function iterates through a buffer of size nSize and checks if every byte is equal to 0x00.

Parameters
pBuf | Pointer to the buffer to check.
nSize | Number of bytes to check in the buffer.
Returns
uint8_t Returns 1 if all bytes are zero, 0 otherwise.

◆ loadProvisionFromJson()

void loadProvisionFromJson | ( | uint32_t | jsonAddress,
 |  | provstruct_t * | provstruct
 | ) |  |

Loads provisioning data from a JSON address.

Parameters
jsonAddress | Address of the JSON data.
provstruct | Pointer to the provisioning structure to fill.

◆ ProvisioningCheckEndpointPubK()

uint8_t ProvisioningCheckEndpointPubK ( uint8_t * endp_PubK )

Checks the endpoint public key for provisioning.

Parameters
endp_PubK Pointer to the endpoint public key.
Returns
Status code.

◆ ProvisioningGetEndpointPubKFromKeyslot()

uint8_t ProvisioningGetEndpointPubKFromKeyslot | ( | uint8_t * | endp_PubK,
 |  | uint8_t * | endp_Keyslot,
 |  | uint8_t * | slotFound
 | ) |  |

Gets the endpoint public key from a keyslot.

Parameters
endp_PubK | Pointer to the endpoint public key.
endp_Keyslot | Pointer to the endpoint keyslot.
slotFound | Pointer to the found slot.
Returns
Status code.

Gets the endpoint public key from a keyslot.

This function searches through the provisioned devices to find a device whose endpoint keyslot matches the provided keyslot. If a match is found, the function sets the slotFound flag to 1. The public key copy operation is currently not implemented.

Parameters
[out] | endp_PubK | Pointer to the buffer where the endpoint public key should be copied.
[in] | endp_Keyslot | Pointer to the keyslot to search for.
[out] | slotFound | Pointer to a flag that will be set to 1 if the keyslot is found, 0 otherwise.
Returns
Always returns 0.

◆ saveAccessCredentialPuBK()

void saveAccessCredentialPuBK | ( | uint8_t * | pkey,
 |  | const uint8_t | ksize,
 |  | uint8_t | nSlot,
 |  | uint8_t * | pkeyname
 | ) |  |

Saves the access credential public key.

Parameters
last_pkey | Pointer to the last public key.
ksize | Size of the key.
nSlot | Slot number.

Saves the access credential public key.

This function attempts to save the provided public key (last_pkey) into a provisioning slot. If the specified slot (nSlot) is invalid or occupied, it searches for the first available slot. The function also computes a SHA-1 hash of the public key (with a prepended byte) to generate a keyslot, if the keyslot is currently empty. The provisioning structure is then written back to flash memory.

Parameters
last_pkey | Pointer to the public key to be saved.
ksize | Size of the public key in bytes.
nSlot | Desired slot index for saving the public key. If invalid, the function finds the first free slot.
Note
The function logs status messages and handles errors in slot allocation and SHA-1 computation.
The function assumes that getProvisioningFromFlash, isValidProvisioning, is_zeros, COMPUTE_SHA1, and EraseWriteToFlash are implemented elsewhere.

◆ saveCredIsPkToFlash()

void saveCredIsPkToFlash | ( | const uint8_t * | pkey,
 |  | const uint8_t | ksize
 | ) |  |

Saves the credential issuer public key to flash memory.

Parameters
pkey | Pointer to the credential issuer public key.
ksize | Size of the public key.

Saves the credential issuer public key to flash memory.

This function retrieves the current provisioning structure from flash, updates the issuer's public key field with the provided key, and writes the updated structure back to flash memory.

Parameters
[in] | pkey | Pointer to the buffer containing the issuer's public key.
[in] | ksize | Size (in bytes) of the public key to be saved.

◆ saveProvisioningToFlash()

void saveProvisioningToFlash ( uint32_t profile_num )

Saves the provisioning data to flash memory.

Parameters
profile_num Profile number to save.

◆ saveRDgrrkToFlash()

void saveRDgrrkToFlash | ( | const uint8_t * | pkey,
 |  | const uint8_t | ksize
 | ) |  |

Saves the reader group resolving key to flash memory.

Parameters
pkey | Pointer to the group resolving key.
ksize | Size of the key.

Saves the reader group resolving key to flash memory.

This function retrieves the current provisioning structure from flash, validates it, updates the group resolving key with the provided key, and writes the updated structure back to flash memory.

Parameters
[in] | pkey | Pointer to the group resolving key to be saved.
[in] | ksize | Size of the group resolving key in bytes.

◆ saveRDidenToFlash()

void saveRDidenToFlash | ( | const uint8_t * | prid,
 |  | const uint8_t | ksize
 | ) |  |

Saves the reader identity to flash memory.

Parameters
pkey | Pointer to the identity data.
ksize | Size of the identity data.

Saves the reader identity to flash memory.

This function copies the provided reader identifier (prid) of size ksize into a temporary provisioning structure, then writes it to flash memory at the provisioning start address. The function first retrieves the current provisioning data from flash, validates it, and then updates the reader ID.

Parameters
prid | Pointer to the reader identifier data to be saved.
ksize | Size of the reader identifier data in bytes.

◆ saveRDPrvKToFlash()

void saveRDPrvKToFlash | ( | const uint8_t * | pkey,
 |  | const uint8_t | ksize
 | ) |  |

Saves the reader private key to flash memory.

Parameters
pkey | Pointer to the private key.
ksize | Size of the key.

Saves the reader private key to flash memory.

This function retrieves the current provisioning structure from flash, validates it, updates the static private key field with the provided key, and writes the updated structure back to flash memory.

Parameters
[in] | pkey | Pointer to the private key data to be saved.
[in] | ksize | Size of the private key in bytes.

◆ saveRDPubKToFlash()

void saveRDPubKToFlash | ( | const uint8_t * | pkey,
 |  | const uint8_t | ksize
 | ) |  |

Saves the reader public key to flash memory.

Parameters
pkey | Pointer to the public key.
ksize | Size of the key.


X-CUBE-ALIRO: Provisioning_info_Constants

Macros
Provisioning_info_Constants
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_info_Constants:

Macros

#define | ALIRO_APP_NAME "TruELock"
Application name string.
#define | DEFAULT_CMD_PARAMS_VALUE 0
Default command parameters value (0 = Standard, 1 = Fast).
#define | NFC_PROP_BUF_CONTENT { 0 }
Default NFC property buffer content.
#define | BLE_ADV_DISABLE 0
Disable BLE advertising (0 = enabled).
#define | ALIRO_NFC_TOTAL_DURATION 1000U
Total duration for NFC operations in milliseconds.
#define | TEST_HARNESS_SIMULATION 0
Enable test harness simulation (0 = disabled).
#define | ALIRO_PROT_VER xProtocolVersionSupported
Defines the default Aliro protocol versions supported for authentication and transport. More...
#define | ALIRO_PROT_VER_DEFAULT ( AUTH_EXP_TRANS_PROT_VERSION )
#define | ALIRO_MAIN_PROT_VER (ALIRO_PROT_VER & 0xffff)
Main protocol version (lower 16 bits).
#define | ALIRO_HAS_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)?(1):(0))
Check if secondary protocol version is present.
#define | ALIRO_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)>>16)
Secondary protocol version (upper 16 bits).
#define | DEVICE_PROVISIONING_STRUCT_IS_VALID 0xA5A55A5A
Magic value indicating a valid device provisioning structure.
#define | EXPIRY_TIME_STAMP_DEFAULT_VALUE 0x76100fe0
Default expiry timestamp value.

Detailed Description

Macro Definition Documentation

◆ ALIRO_PROT_VER

#define ALIRO_PROT_VER xProtocolVersionSupported

Defines the default Aliro protocol versions supported for authentication and transport.

Defines the Aliro protocol versions supported for authentication and transport.


X-CUBE-ALIRO: Provisioning_info_Macros

Macros
Provisioning_info_Macros
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_info_Macros:

Macros

#define | DISPLAY_SPLASH()
Macro to display splash screen.
#define | LOAD_NFC_PROP()
Macro to load NFC properties.
#define | DET_NFC_PROP()
Macro to detect NFC properties.
#define | INIT_NFC_PROP()
Macro to initialize NFC properties.
#define | UWB_SESSION_ID_DEFAULT getUwbSessionId()
Default UWB session ID value.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Provisioning_info_Includes

Provisioning_info_Includes
ALIRO APPLICATION » PROVISIONING » Provisioning Mng Core
Collaboration diagram for Provisioning_info_Includes:


X-CUBE-ALIRO: User Provisioning Profiles

Macros
User Provisioning Profiles
ALIRO APPLICATION » PROVISIONING
Collaboration diagram for User Provisioning Profiles:

Macros

#define | READER_ID_2 {0x8f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}
Reader ID and Sub ID for User provisioning without certificate. More...
#define | READER_PUB_KEY_2 {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}
Reader public key for User provisioning without certificate. More...
#define | READER_PRIVATE_KEY_2 {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}
Reader private key for User provisioning without certificate. More...
#define | READER_ISSUER_PUB_KEY_2 { 0 }
Reader issuer public key for User provisioning without certificate. More...
#define | READER_ISSUER_PRIVATE_KEY_2 { 0 }
Reader issuer private key for User provisioning without certificate. More...
#define | READER_CERTIFICATE_2 { 0 }
Reader certificate for User provisioning without certificate. More...
#define | GROUP_RESOLVING_KEY_2 GROUP_RESOLVING_KEY
Group resolving key for User provisioning without certificate. More...
#define | ENDPOINT_KEYSLOT_2 ENDPOINT_KEYSLOT
Endpoint key slot for User provisioning without certificate. More...
#define | ENDPOINT_PUBLIC_KEY_2 ENDPOINT_PUBLIC_KEY
Endpoint public key for User provisioning without certificate. More...
#define | ENDPOINT_PRIVATE_KEY_2 ENDPOINT_PRIVATE_KEY
Endpoint private key for User provisioning without certificate. More...
#define | ENDPOINT_NAME_2 "User"
Endpoint name for User provisioning without certificate. More...
#define | B1_VENDOR_SPECIFIC_EXTENSION_2 B1_VENDOR_SPECIFIC_EXTENSION
Vendor specific extension for User provisioning without certificate. More...
#define | B1_VENDOR_SPECIFIC_EXTENSION_LEN_2 B1_VENDOR_SPECIFIC_EXTENSION_LEN
Length of vendor specific extension for User provisioning without certificate. More...
#define | READER_ID {0x9f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}
Reader ID and Sub ID for User provisioning with certificate. More...
#define | READER_PUB_KEY {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}
Reader public key for User provisioning with certificate. More...
#define | READER_PRIVATE_KEY {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}
Reader private key for User provisioning with certificate. More...
#define | READER_ISSUER_PUB_KEY {0xfb, 0xc3, 0xfd, 0xac, 0x29, 0x16, 0x06, 0xa0, 0xa9, 0x86, 0x86, 0x20, 0x04, 0xbb, 0xe5, 0xc6, 0x18, 0x8c, 0xe6, 0x40, 0x98, 0xf4, 0xa6, 0x5b, 0x7a, 0x65, 0x95, 0xfc, 0x31, 0xf4, 0x16, 0x25, 0x91, 0x41, 0xa9, 0x72, 0xb9, 0x16, 0xe6, 0x32, 0x1d, 0xbe, 0xee, 0x22, 0xb7, 0x7e, 0xec, 0x59, 0x29, 0xd8, 0x07, 0x79, 0xc9, 0x9f, 0x8e, 0xbe, 0x5c, 0x25, 0x88, 0xf2, 0x4b, 0x24, 0xde, 0x68}
Reader issuer public key for User provisioning with certificate. More...
#define | READER_ISSUER_PRIVATE_KEY {0x31, 0x22, 0x2e, 0xc2, 0x12, 0x5a, 0x29, 0x21, 0x67, 0x1e, 0x47, 0x1a, 0xe6, 0x7b, 0x87, 0x96, 0x66, 0x8e, 0x37, 0xc0, 0x16, 0x7c, 0x72, 0xbf, 0x54, 0x0e, 0x4c, 0x53, 0x93, 0x59, 0x9f, 0x85}
Reader issuer private key for User provisioning with certificate. More...
#define | READER_CERTIFICATE {0x30, 0x81, 0xe8, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0xe1, 0x80, 0x14, 0x26, 0x9e, 0x06, 0x80, 0x73, 0x1d, 0x79, 0x67, 0x03, 0x57, 0x6b, 0xe4, 0x2b, 0x66, 0x8a, 0x7d, 0xfe, 0x9c, 0x1e, 0x29, 0x81, 0x12, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x08, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xf1, 0xe0, 0xb8, 0x4a, 0xd6, 0x4a, 0xa0, 0x78, 0xa0, 0x39, 0xcc, 0x1b, 0xe8, 0x50, 0xa9, 0xd1, 0x53, 0x4d, 0x52, 0xa2, 0x6d, 0x6a, 0x5e, 0x13, 0x7e, 0x0a, 0x71, 0x0f, 0x59, 0xf1, 0x2b, 0x49, 0x02, 0x21, 0x00, 0xd0, 0x89, 0xe4, 0x52, 0xee, 0x10, 0x2c, 0xb5, 0x81, 0x3e, 0xad, 0xed, 0x86, 0x25, 0xcc, 0x4b, 0x54, 0xb6, 0x98, 0x35, 0xec, 0x2e, 0x4c, 0x59, 0xc1, 0x2e, 0x2a, 0x4a, 0x49, 0x5d, 0xdd, 0xaf}
Reader certificate for User provisioning with certificate. More...
#define | READER_LONG_CERTIFICATE {0x30, 0x82, 0x01, 0x0b, 0x04, 0x02, 0x00, 0x00, 0x30, 0x82, 0x01, 0x03, 0x80, 0x14, 0x12, 0xc2, 0xa2, 0x06, 0x61, 0x96, 0x49, 0x81, 0xc9, 0x2c, 0xd2, 0x42, 0xe6, 0xd0, 0x6d, 0x2c, 0xe8, 0x05, 0x3b, 0x4f, 0x81, 0x1f, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x1f, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x6a, 0xef, 0x6a, 0x6c, 0xf1, 0x12, 0xf9, 0x7c, 0x16, 0xc1, 0xe8, 0x44, 0xf6, 0x5e, 0xf3, 0x91, 0x3c, 0xbe, 0x38, 0x8b, 0x4e, 0x9e, 0xe8, 0x79, 0x5f, 0xbc, 0x08, 0xf2, 0x40, 0xf5, 0x33, 0x77, 0x02, 0x20, 0x5d, 0xa0, 0x3a, 0xd1, 0x02, 0xa6, 0x3e, 0x10, 0x95, 0xda, 0x56, 0x92, 0xa4, 0x63, 0xdb, 0x8d, 0x18, 0x86, 0x6b, 0x07, 0xe5, 0x58, 0x0f, 0x6e, 0xf0, 0xf2, 0x8c, 0x51, 0x53, 0xac, 0x34, 0x00}
Reader long certificate for User provisioning with certificate. More...
#define | READER_SHORT_CERTIFICATE {0x30, 0x81, 0x94, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0x8d, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x04, 0x06, 0x0b, 0x7e, 0xc9, 0x61, 0x15, 0x55, 0x8a, 0xaa, 0x21, 0x68, 0x6b, 0x8a, 0x5c, 0xd7, 0x6c, 0x3c, 0xf0, 0xef, 0x02, 0x14, 0xef, 0x3d, 0x93, 0x18, 0x9b, 0x78, 0x96, 0x24, 0xc4, 0x8f, 0x02, 0x20, 0x31, 0x66, 0x4d, 0xc3, 0x26, 0x77, 0xff, 0x6e, 0xba, 0x89, 0x12, 0x6e, 0xbd, 0x21, 0x2f, 0x90, 0x3d, 0xc0, 0xdc, 0x8a, 0x4c, 0x83, 0x7e, 0xbb, 0x30, 0x6e, 0x06, 0x2b, 0xa2, 0x23, 0x1b, 0xe2}
Reader short certificate for User provisioning with certificate. More...
#define | GROUP_RESOLVING_KEY {0x03, 0x75, 0xed, 0x63, 0x68, 0x55, 0x70, 0xf6, 0xb2, 0x16, 0x8e, 0xab, 0x72, 0x96, 0xec, 0x01}
Group resolving key for User provisioning with certificate. More...
#define | ENDPOINT_KEYSLOT {0x54, 0xb5, 0x4e, 0x27, 0xd5, 0x15, 0xac, 0x4c}
Endpoint key slot for User provisioning with certificate. More...
#define | ENDPOINT_PUBLIC_KEY {0x77, 0x3f, 0x9a, 0xa8, 0x4a, 0xc9, 0x70, 0x51, 0x61, 0xc4, 0x90, 0xa2, 0xdb, 0xa0, 0xb4, 0xa1, 0x9a, 0x3d, 0x2a, 0x78, 0x70, 0x5a, 0x80, 0x1c, 0xff, 0x92, 0x4e, 0x26, 0x35, 0x7e, 0x42, 0x13, 0x19, 0x1d, 0xb8, 0x37, 0x89, 0xa2, 0x59, 0x16, 0xe4, 0xac, 0xce, 0xa1, 0xfd, 0x6f, 0x09, 0x23, 0x9b, 0x4c, 0xf2, 0xdd, 0x0d, 0x05, 0xb3, 0x3b, 0x72, 0xd8, 0xa3, 0xa6, 0x42, 0xe3, 0x08, 0x66}
Endpoint public key for User provisioning with certificate. More...
#define | ENDPOINT_PRIVATE_KEY {0xdb, 0x1d, 0x65, 0x24, 0x99, 0x0a, 0xec, 0xce, 0x49, 0xc3, 0xc5, 0xc7, 0x9e, 0xe4, 0x13, 0x61, 0xb0, 0x1b, 0x49, 0x30, 0x2e, 0xac, 0x1c, 0xc5, 0xf9, 0xde, 0xcd, 0x0d, 0x10, 0x58, 0xd1, 0x4e}
Endpoint private key for User provisioning with certificate. More...
#define | ENDPOINT_NAME "User_cert"
Endpoint name for User provisioning with certificate. More...
#define | B1_VENDOR_SPECIFIC_EXTENSION "ST Rooms"
Vendor specific extension for User provisioning with certificate. More...
#define | B1_VENDOR_SPECIFIC_EXTENSION_LEN 8
Vendor specific extension length for User provisioning with certificate. More...
#define | CREDENTIAL_ISSUER_PUB_KEY_2 { 0x7B, 0xA3, 0x19, 0x38, 0x49, 0x2E, 0x3F, 0x5E, 0x97, 0xBC, 0x91, 0x80, 0x6B, 0x58, 0x35, 0xB5, 0xD9, 0xE4, 0x26, 0x60, 0x91, 0x39, 0x00, 0x67, 0x11, 0xE5, 0xFB, 0x7A, 0x67, 0x0E, 0xE4, 0xE1, 0x2F, 0xC9, 0xF2, 0x53, 0x96, 0xC0, 0x13, 0xCC, 0x20, 0x16, 0x60, 0x29, 0xD7, 0x61, 0xA1, 0x05, 0xDE, 0xA5, 0xE0, 0x71, 0xE8, 0x4A, 0x9E, 0x49, 0x99, 0x20, 0x52, 0x4C, 0xE2, 0x30, 0x11, 0x37 }
Credential issuer public key for User provisioning. More...
#define | CREDENTIAL_ISSUER_PRIVATE_KEY_2 { 0 }
Credential issuer private key for User provisioning. More...

Detailed Description

Macro Definition Documentation

◆ B1_VENDOR_SPECIFIC_EXTENSION

#define B1_VENDOR_SPECIFIC_EXTENSION "ST Rooms"

Vendor specific extension for User provisioning with certificate.

Vendor specific extension for endpoint.

◆ B1_VENDOR_SPECIFIC_EXTENSION_2

#define B1_VENDOR_SPECIFIC_EXTENSION_2 B1_VENDOR_SPECIFIC_EXTENSION

Vendor specific extension for User provisioning without certificate.

Vendor specific extension for endpoint.

◆ B1_VENDOR_SPECIFIC_EXTENSION_LEN

#define B1_VENDOR_SPECIFIC_EXTENSION_LEN 8

Vendor specific extension length for User provisioning with certificate.

Vendor specific extension length for endpoint.

◆ B1_VENDOR_SPECIFIC_EXTENSION_LEN_2

#define B1_VENDOR_SPECIFIC_EXTENSION_LEN_2 B1_VENDOR_SPECIFIC_EXTENSION_LEN

Length of vendor specific extension for User provisioning without certificate.

Length of vendor specific extension for endpoint.

◆ CREDENTIAL_ISSUER_PRIVATE_KEY_2

#define CREDENTIAL_ISSUER_PRIVATE_KEY_2 { 0 }

Credential issuer private key for User provisioning.

Credential issuer private key for stepup menager.

◆ CREDENTIAL_ISSUER_PUB_KEY_2

#define CREDENTIAL_ISSUER_PUB_KEY_2 { 0x7B, 0xA3, 0x19, 0x38, 0x49, 0x2E, 0x3F, 0x5E, 0x97, 0xBC, 0x91, 0x80, 0x6B, 0x58, 0x35, 0xB5, 0xD9, 0xE4, 0x26, 0x60, 0x91, 0x39, 0x00, 0x67, 0x11, 0xE5, 0xFB, 0x7A, 0x67, 0x0E, 0xE4, 0xE1, 0x2F, 0xC9, 0xF2, 0x53, 0x96, 0xC0, 0x13, 0xCC, 0x20, 0x16, 0x60, 0x29, 0xD7, 0x61, 0xA1, 0x05, 0xDE, 0xA5, 0xE0, 0x71, 0xE8, 0x4A, 0x9E, 0x49, 0x99, 0x20, 0x52, 0x4C, 0xE2, 0x30, 0x11, 0x37 }

Credential issuer public key for User provisioning.

Credential issuer public key for stepup menager.

◆ ENDPOINT_KEYSLOT

#define ENDPOINT_KEYSLOT {0x54, 0xb5, 0x4e, 0x27, 0xd5, 0x15, 0xac, 0x4c}

Endpoint key slot for User provisioning with certificate.

Key slot identifier for endpoint.

◆ ENDPOINT_KEYSLOT_2

#define ENDPOINT_KEYSLOT_2 ENDPOINT_KEYSLOT

Endpoint key slot for User provisioning without certificate.

Key slot identifier for endpoint.

◆ ENDPOINT_NAME

#define ENDPOINT_NAME "User_cert"

Endpoint name for User provisioning with certificate.

Endpoint name for endpoint.

◆ ENDPOINT_NAME_2

#define ENDPOINT_NAME_2 "User"

Endpoint name for User provisioning without certificate.

Endpoint name for endpoint.

◆ ENDPOINT_PRIVATE_KEY

#define ENDPOINT_PRIVATE_KEY {0xdb, 0x1d, 0x65, 0x24, 0x99, 0x0a, 0xec, 0xce, 0x49, 0xc3, 0xc5, 0xc7, 0x9e, 0xe4, 0x13, 0x61, 0xb0, 0x1b, 0x49, 0x30, 0x2e, 0xac, 0x1c, 0xc5, 0xf9, 0xde, 0xcd, 0x0d, 0x10, 0x58, 0xd1, 0x4e}

Endpoint private key for User provisioning with certificate.

Endpoint private key for endpoint.

◆ ENDPOINT_PRIVATE_KEY_2

#define ENDPOINT_PRIVATE_KEY_2 ENDPOINT_PRIVATE_KEY

Endpoint private key for User provisioning without certificate.

Endpoint private key for endpoint.

◆ ENDPOINT_PUBLIC_KEY

#define ENDPOINT_PUBLIC_KEY {0x77, 0x3f, 0x9a, 0xa8, 0x4a, 0xc9, 0x70, 0x51, 0x61, 0xc4, 0x90, 0xa2, 0xdb, 0xa0, 0xb4, 0xa1, 0x9a, 0x3d, 0x2a, 0x78, 0x70, 0x5a, 0x80, 0x1c, 0xff, 0x92, 0x4e, 0x26, 0x35, 0x7e, 0x42, 0x13, 0x19, 0x1d, 0xb8, 0x37, 0x89, 0xa2, 0x59, 0x16, 0xe4, 0xac, 0xce, 0xa1, 0xfd, 0x6f, 0x09, 0x23, 0x9b, 0x4c, 0xf2, 0xdd, 0x0d, 0x05, 0xb3, 0x3b, 0x72, 0xd8, 0xa3, 0xa6, 0x42, 0xe3, 0x08, 0x66}

Endpoint public key for User provisioning with certificate.

Endpoint public key for endpoint.

◆ ENDPOINT_PUBLIC_KEY_2

#define ENDPOINT_PUBLIC_KEY_2 ENDPOINT_PUBLIC_KEY

Endpoint public key for User provisioning without certificate.

Endpoint public key for endpoint.

◆ GROUP_RESOLVING_KEY

#define GROUP_RESOLVING_KEY {0x03, 0x75, 0xed, 0x63, 0x68, 0x55, 0x70, 0xf6, 0xb2, 0x16, 0x8e, 0xab, 0x72, 0x96, 0xec, 0x01}

Group resolving key for User provisioning with certificate.

Group resolving key used for User provisioning with certificate.

◆ GROUP_RESOLVING_KEY_2

#define GROUP_RESOLVING_KEY_2 GROUP_RESOLVING_KEY

Group resolving key for User provisioning without certificate.

Group resolving key used for User provisioning without certificate.

◆ READER_CERTIFICATE

#define READER_CERTIFICATE {0x30, 0x81, 0xe8, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0xe1, 0x80, 0x14, 0x26, 0x9e, 0x06, 0x80, 0x73, 0x1d, 0x79, 0x67, 0x03, 0x57, 0x6b, 0xe4, 0x2b, 0x66, 0x8a, 0x7d, 0xfe, 0x9c, 0x1e, 0x29, 0x81, 0x12, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x08, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xf1, 0xe0, 0xb8, 0x4a, 0xd6, 0x4a, 0xa0, 0x78, 0xa0, 0x39, 0xcc, 0x1b, 0xe8, 0x50, 0xa9, 0xd1, 0x53, 0x4d, 0x52, 0xa2, 0x6d, 0x6a, 0x5e, 0x13, 0x7e, 0x0a, 0x71, 0x0f, 0x59, 0xf1, 0x2b, 0x49, 0x02, 0x21, 0x00, 0xd0, 0x89, 0xe4, 0x52, 0xee, 0x10, 0x2c, 0xb5, 0x81, 0x3e, 0xad, 0xed, 0x86, 0x25, 0xcc, 0x4b, 0x54, 0xb6, 0x98, 0x35, 0xec, 0x2e, 0x4c, 0x59, 0xc1, 0x2e, 0x2a, 0x4a, 0x49, 0x5d, 0xdd, 0xaf}

Reader certificate for User provisioning with certificate.

Reader certificate for User provisioning with certificate.

◆ READER_CERTIFICATE_2

#define READER_CERTIFICATE_2 { 0 }

Reader certificate for User provisioning without certificate.

Not used for User provisioning without certificate.

◆ READER_ID

#define READER_ID {0x9f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}

Reader ID and Sub ID for User provisioning with certificate.

Reader ID and Sub ID used for User provisioning with certificate.

◆ READER_ID_2

#define READER_ID_2 {0x8f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}

Reader ID and Sub ID for User provisioning without certificate.

Reader ID and Sub ID used for User provisioning without certificate.

◆ READER_ISSUER_PRIVATE_KEY

#define READER_ISSUER_PRIVATE_KEY {0x31, 0x22, 0x2e, 0xc2, 0x12, 0x5a, 0x29, 0x21, 0x67, 0x1e, 0x47, 0x1a, 0xe6, 0x7b, 0x87, 0x96, 0x66, 0x8e, 0x37, 0xc0, 0x16, 0x7c, 0x72, 0xbf, 0x54, 0x0e, 0x4c, 0x53, 0x93, 0x59, 0x9f, 0x85}

Reader issuer private key for User provisioning with certificate.

Reader issuer private key for User provisioning with certificate.

◆ READER_ISSUER_PRIVATE_KEY_2

#define READER_ISSUER_PRIVATE_KEY_2 { 0 }

Reader issuer private key for User provisioning without certificate.

Not used for User provisioning without certificate.

◆ READER_ISSUER_PUB_KEY

#define READER_ISSUER_PUB_KEY {0xfb, 0xc3, 0xfd, 0xac, 0x29, 0x16, 0x06, 0xa0, 0xa9, 0x86, 0x86, 0x20, 0x04, 0xbb, 0xe5, 0xc6, 0x18, 0x8c, 0xe6, 0x40, 0x98, 0xf4, 0xa6, 0x5b, 0x7a, 0x65, 0x95, 0xfc, 0x31, 0xf4, 0x16, 0x25, 0x91, 0x41, 0xa9, 0x72, 0xb9, 0x16, 0xe6, 0x32, 0x1d, 0xbe, 0xee, 0x22, 0xb7, 0x7e, 0xec, 0x59, 0x29, 0xd8, 0x07, 0x79, 0xc9, 0x9f, 0x8e, 0xbe, 0x5c, 0x25, 0x88, 0xf2, 0x4b, 0x24, 0xde, 0x68}

Reader issuer public key for User provisioning with certificate.

Reader issuer public key for User provisioning with certificate.

◆ READER_ISSUER_PUB_KEY_2

#define READER_ISSUER_PUB_KEY_2 { 0 }

Reader issuer public key for User provisioning without certificate.

Not used for User provisioning without certificate.

◆ READER_LONG_CERTIFICATE

#define READER_LONG_CERTIFICATE {0x30, 0x82, 0x01, 0x0b, 0x04, 0x02, 0x00, 0x00, 0x30, 0x82, 0x01, 0x03, 0x80, 0x14, 0x12, 0xc2, 0xa2, 0x06, 0x61, 0x96, 0x49, 0x81, 0xc9, 0x2c, 0xd2, 0x42, 0xe6, 0xd0, 0x6d, 0x2c, 0xe8, 0x05, 0x3b, 0x4f, 0x81, 0x1f, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x1f, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x6a, 0xef, 0x6a, 0x6c, 0xf1, 0x12, 0xf9, 0x7c, 0x16, 0xc1, 0xe8, 0x44, 0xf6, 0x5e, 0xf3, 0x91, 0x3c, 0xbe, 0x38, 0x8b, 0x4e, 0x9e, 0xe8, 0x79, 0x5f, 0xbc, 0x08, 0xf2, 0x40, 0xf5, 0x33, 0x77, 0x02, 0x20, 0x5d, 0xa0, 0x3a, 0xd1, 0x02, 0xa6, 0x3e, 0x10, 0x95, 0xda, 0x56, 0x92, 0xa4, 0x63, 0xdb, 0x8d, 0x18, 0x86, 0x6b, 0x07, 0xe5, 0x58, 0x0f, 0x6e, 0xf0, 0xf2, 0x8c, 0x51, 0x53, 0xac, 0x34, 0x00}

Reader long certificate for User provisioning with certificate.

Reader long certificate for User provisioning with certificate.

◆ READER_PRIVATE_KEY

#define READER_PRIVATE_KEY {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}

Reader private key for User provisioning with certificate.

Reader private key for User provisioning with certificate.

◆ READER_PRIVATE_KEY_2

#define READER_PRIVATE_KEY_2 {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}

Reader private key for User provisioning without certificate.

Reader private key for User provisioning without certificate.

◆ READER_PUB_KEY

#define READER_PUB_KEY {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}

Reader public key for User provisioning with certificate.

Reader public key for User provisioning with certificate.

◆ READER_PUB_KEY_2

#define READER_PUB_KEY_2 {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}

Reader public key for User provisioning without certificate.

Reader public key for User provisioning without certificate.

◆ READER_SHORT_CERTIFICATE

#define READER_SHORT_CERTIFICATE {0x30, 0x81, 0x94, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0x8d, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x04, 0x06, 0x0b, 0x7e, 0xc9, 0x61, 0x15, 0x55, 0x8a, 0xaa, 0x21, 0x68, 0x6b, 0x8a, 0x5c, 0xd7, 0x6c, 0x3c, 0xf0, 0xef, 0x02, 0x14, 0xef, 0x3d, 0x93, 0x18, 0x9b, 0x78, 0x96, 0x24, 0xc4, 0x8f, 0x02, 0x20, 0x31, 0x66, 0x4d, 0xc3, 0x26, 0x77, 0xff, 0x6e, 0xba, 0x89, 0x12, 0x6e, 0xbd, 0x21, 0x2f, 0x90, 0x3d, 0xc0, 0xdc, 0x8a, 0x4c, 0x83, 0x7e, 0xbb, 0x30, 0x6e, 0x06, 0x2b, 0xa2, 0x23, 0x1b, 0xe2}

Reader short certificate for User provisioning with certificate.

Reader short certificate for User provisioning with certificate.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: NFC MANAGER

Modules
NFC MANAGER
ALIRO APPLICATION
Collaboration diagram for NFC MANAGER:

Modules

TRANSPORT LAYER WRAPPER

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TRANSPORT LAYER WRAPPER

Modules
TRANSPORT LAYER WRAPPER
ALIRO APPLICATION » NFC MANAGER
Collaboration diagram for TRANSPORT LAYER WRAPPER:

Modules

ALIRO_SECURITY
STEPUP MANAGER
NFC
BLE UWB
WRAPPER UTILITY
TLV UTILITIES

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ALIRO_SECURITY

Modules
ALIRO_SECURITY
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for ALIRO_SECURITY:

Modules

MCU CRYPTO
ACWG SECURITY

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: MCU CRYPTO

Modules
MCU CRYPTO
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY
Collaboration diagram for MCU CRYPTO:

Modules

SM_Crypto_Exported_Constants
SM_Crypto_Exported_Types
SM_Crypto_Exported_Functions
SM_crypto_mcu_Exported_Constants
SM_crypto_mcu_Exported_Functions
SM_crypto_stsafe_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: SM_Crypto_Exported_Constants

Macros
SM_Crypto_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_Crypto_Exported_Constants:

Macros

#define | RAW_PRIV_KEY_BYTE_SIZE ((uint32_t)32)
Size of raw private key in bytes.
#define | SHA256_BYTE_SIZE ((uint32_t)32)
Size of SHA-256 hash in bytes.
#define | ECDSA_256_SIG_BYTE_SIZE ((uint32_t)64)
Size of ECDSA-256 signature in bytes.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: SM_Crypto_Exported_Types

Enumerations
SM_Crypto_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_Crypto_Exported_Types:

Enumerations

enum SM_Crypto_Error_t { SM_Crypto_OK = 0 , SM_Crypto_Error , SM_Crypto_HW_Error }
Error codes for SM cryptographic operations. More...

Detailed Description

Enumeration Type Documentation

◆ SM_Crypto_Error_t

enum SM_Crypto_Error_t

Error codes for SM cryptographic operations.

Enumerator
SM_Crypto_OK | Operation successful
SM_Crypto_Error | General error
SM_Crypto_HW_Error | Hardware error


X-CUBE-ALIRO: SM_Crypto_Exported_Functions

Functions
SM_Crypto_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_Crypto_Exported_Functions:

Functions

SM_Crypto_Error_t | SM_init (void)
Initializes the cryptographic module. More...
SM_Crypto_Error_t | SM_genRandomBytes (uint8_t *bytes, uint32_t size)
Generates random bytes. More...
SM_Crypto_Error_t | SM_genKeypair (uint8_t *pub)
Generates a keypair and returns the public key. More...
SM_Crypto_Error_t | SM_KDFRFC5869 (const uint8_t *pZ, uint32_t ZSize, const uint8_t *pSalt, uint32_t saltSize, const uint8_t *pFixedInfo, uint32_t fixedInfoSize, uint32_t L, uint8_t *pOutput)
Key Derivation Function RFC5869. More...
SM_Crypto_Error_t | SM_sha1 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-1 hash. More...
SM_Crypto_Error_t | SM_sha256 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-256 hash. More...
SM_Crypto_Error_t | SM_sha256_start (void)
Starts SHA-256 computation. More...
SM_Crypto_Error_t | SM_sha256_update (const uint8_t *input, uint32_t inputSize)
Updates SHA-256 computation with new data. More...
SM_Crypto_Error_t | SM_sha256_finish (uint8_t *hash, const uint8_t *input, uint32_t inputSize)
Finishes SHA-256 computation and returns the hash. More...
SM_Crypto_Error_t | SM_sign (const uint8_t *tbs, uint32_t tbsSize, uint8_t *signature)
Signs data using ECDSA. More...
SM_Crypto_Error_t | SM_Ecdh (const uint8_t *pPublicKey, uint8_t *pSharedSecret)
Performs ECDH key agreement. More...
SM_Crypto_Error_t | SM_deriveKdh (const uint8_t *pZ, const uint8_t *info, uint32_t infoSize, uint8_t *pKdh)
Derives KDH key. More...
SM_Crypto_Error_t | SM_aes256GcmDecrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pPayload, const uint32_t payloadSize, uint8_t *pPlaintext, const uint8_t *pTag)
Decrypts data using AES-256 GCM. More...
SM_Crypto_Error_t | SM_aes256GcmEncrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pInput, const uint32_t inputSize, uint8_t *pOutput, uint32_t *pOutputSize)
Encrypts data using AES-256 GCM. More...
SM_Crypto_Error_t | SM_verify (const uint8_t *pPublicKey, const uint8_t *tbs, const uint32_t tbsSize, const uint8_t *signature)
Verifies a signature using ECDSA. More...
SM_Crypto_Error_t | SM_getCertificate (uint8_t *certificate, uint32_t *certificateSize)
Gets the certificate. More...

Detailed Description

Function Documentation

◆ SM_aes256GcmDecrypt()

SM_Crypto_Error_t SM_aes256GcmDecrypt | ( | const uint8_t * | pKey,
 |  | const uint8_t * | pNonce,
 |  | const uint8_t * | pAad,
 |  | const uint32_t | aadSize,
 |  | const uint8_t * | pPayload,
 |  | const uint32_t | payloadSize,
 |  | uint8_t * | pPlaintext,
 |  | const uint8_t * | pTag
 | ) |  |

Decrypts data using AES-256 GCM.

Parameters
pKey | Pointer to key.
pNonce | Pointer to nonce.
pAad | Pointer to additional authenticated data.
aadSize | Size of AAD.
pPayload | Pointer to encrypted payload.
payloadSize | Size of payload.
pPlaintext | Pointer to output plaintext buffer.
pTag | Pointer to authentication tag.
Returns
Error code.

Decrypts data using AES-256 GCM.

Parameters
pKey | Pointer to key.
pNonce | Pointer to nonce.
pAad | Pointer to additional authenticated data.
aadSize | Size of AAD.
pPayload | Pointer to encrypted payload.
payloadSize | Size of payload.
pPlaintext | Pointer to output plaintext buffer.
pTag | Pointer to authentication tag.
Returns
SM_Crypto_Error_t error code.

◆ SM_aes256GcmEncrypt()

SM_Crypto_Error_t SM_aes256GcmEncrypt | ( | const uint8_t * | pKey,
 |  | const uint8_t * | pNonce,
 |  | const uint8_t * | pAad,
 |  | const uint32_t | aadSize,
 |  | const uint8_t * | pInput,
 |  | const uint32_t | inputSize,
 |  | uint8_t * | pOutput,
 |  | uint32_t * | pOutputSize
 | ) |  |

Encrypts data using AES-256 GCM.

Parameters
pKey | Pointer to key.
pNonce | Pointer to nonce.
pAad | Pointer to additional authenticated data.
aadSize | Size of AAD.
pInput | Pointer to input data.
inputSize | Size of input data.
pOutput | Pointer to output buffer.
pOutputSize | Pointer to output size.
Returns
Error code.

Encrypts data using AES-256 GCM.

Parameters
pKey | Pointer to key.
pNonce | Pointer to nonce.
pAad | Pointer to additional authenticated data.
aadSize | Size of AAD.
pInput | Pointer to input data.
inputSize | Size of input data.
pOutput | Pointer to output buffer.
pOutputSize | Pointer to output size.
Returns
SM_Crypto_Error_t error code.

◆ SM_deriveKdh()

SM_Crypto_Error_t SM_deriveKdh | ( | const uint8_t * | pZ,
 |  | const uint8_t * | info,
 |  | uint32_t | infoSize,
 |  | uint8_t * | pKdh
 | ) |  |

Derives KDH key.

Parameters
pZ | Pointer to input keying material.
info | Pointer to info data.
infoSize | Size of info data.
pKdh | Pointer to output KDH key.
Returns
Error code.

Derives KDH key.

Parameters
pZ | Pointer to input keying material.
info | Pointer to info data.
infoSize | Size of info data.
pKdh | Pointer to output KDH key.
Returns
SM_Crypto_Error_t error code.

◆ SM_Ecdh()

SM_Crypto_Error_t SM_Ecdh | ( | const uint8_t * | pPublicKey,
 |  | uint8_t * | pSharedSecret
 | ) |  |

Performs ECDH key agreement.

Parameters
pPublicKey | Pointer to public key.
pSharedSecret | Pointer to output shared secret.
Returns
Error code.

Performs ECDH key agreement.

Parameters
pPublicKey | Pointer to public key.
pSharedSecret | Pointer to output shared secret.
Returns
SM_Crypto_Error_t error code.

◆ SM_genKeypair()

SM_Crypto_Error_t SM_genKeypair ( uint8_t * pub )

Generates a keypair and returns the public key.

Parameters
pub Pointer to output public key buffer.
Returns
Error code.

Generates a keypair and returns the public key.

Parameters
pub Pointer to output public key.
Returns
SM_Crypto_Error_t error code.

◆ SM_genRandomBytes()

SM_Crypto_Error_t SM_genRandomBytes | ( | uint8_t * | bytes,
 |  | uint32_t | size
 | ) |  |

Generates random bytes.

Parameters
bytes | Pointer to output buffer.
size | Number of bytes to generate.
Returns
Error code.

Generates random bytes.

Parameters
bytes | Pointer to output buffer.
size | Number of bytes to generate.
Returns
SM_Crypto_Error_t error code.

◆ SM_getCertificate()

SM_Crypto_Error_t SM_getCertificate | ( | uint8_t * | certificate,
 |  | uint32_t * | certificateSize
 | ) |  |

Gets the certificate.

Parameters
certificate | Pointer to output certificate buffer.
certificateSize | Pointer to output certificate size.
Returns
Error code.

Gets the certificate.

Parameters
certificate | Pointer to output certificate buffer.
certificateSize | Pointer to output certificate size.
Returns
SM_Crypto_Error_t error code.

◆ SM_init()

SM_Crypto_Error_t SM_init ( void )

Initializes the cryptographic module.

Returns
Error code.

◆ SM_KDFRFC5869()

SM_Crypto_Error_t SM_KDFRFC5869 | ( | const uint8_t * | pZ,
 |  | uint32_t | ZSize,
 |  | const uint8_t * | pSalt,
 |  | uint32_t | saltSize,
 |  | const uint8_t * | pFixedInfo,
 |  | uint32_t | fixedInfoSize,
 |  | uint32_t | L,
 |  | uint8_t * | pOutput
 | ) |  |

Key Derivation Function RFC5869.

Parameters
pZ | Input keying material.
ZSize | Size of input keying material.
pSalt | Pointer to salt.
saltSize | Size of salt.
pFixedInfo | Pointer to fixed info.
fixedInfoSize | Size of fixed info.
L | Length of output keying material.
pOutput | Pointer to output buffer.
Returns
Error code.

Key Derivation Function RFC5869.

Parameters
pZ | Pointer to input keying material.
ZSize | Size of input keying material.
pSalt | Pointer to salt.
saltSize | Size of salt.
pFixedInfo | Pointer to fixed info.
fixedInfoSize | Size of fixed info.
L | Length of output keying material.
pOutput | Pointer to output buffer.
Returns
SM_Crypto_Error_t error code.

◆ SM_sha1()

SM_Crypto_Error_t SM_sha1 | ( | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | hash
 | ) |  |

Computes SHA-1 hash.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
hash | Pointer to output hash buffer.
Returns
Error code.

Computes SHA-1 hash.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
hash | Pointer to output hash buffer.
Returns
SM_Crypto_Error_t error code.

◆ SM_sha256()

SM_Crypto_Error_t SM_sha256 | ( | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | hash
 | ) |  |

Computes SHA-256 hash.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
hash | Pointer to output hash buffer.
Returns
Error code.

Computes SHA-256 hash.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
hash | Pointer to output hash buffer.
Returns
SM_Crypto_Error_t error code.

◆ SM_sha256_finish()

SM_Crypto_Error_t SM_sha256_finish | ( | uint8_t * | hash,
 |  | const uint8_t * | input,
 |  | uint32_t | inputSize
 | ) |  |

Finishes SHA-256 computation and returns the hash.

Parameters
hash | Pointer to output hash buffer.
input | Pointer to input data.
inputSize | Size of input data.
Returns
Error code.

Finishes SHA-256 computation and returns the hash.

Parameters
hash | Pointer to output hash buffer.
input | Pointer to input data.
inputSize | Size of input data.
Returns
SM_Crypto_Error_t error code.

◆ SM_sha256_start()

SM_Crypto_Error_t SM_sha256_start ( void )

Starts SHA-256 computation.

Returns
Error code.

Starts SHA-256 computation.

Returns
SM_Crypto_Error_t error code.

◆ SM_sha256_update()

SM_Crypto_Error_t SM_sha256_update | ( | const uint8_t * | input,
 |  | uint32_t | inputSize
 | ) |  |

Updates SHA-256 computation with new data.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
Returns
Error code.

Updates SHA-256 computation with new data.

Parameters
input | Pointer to input data.
inputSize | Size of input data.
Returns
SM_Crypto_Error_t error code.

◆ SM_sign()

SM_Crypto_Error_t SM_sign | ( | const uint8_t * | digest,
 |  | uint32_t | digestSize,
 |  | uint8_t * | signature
 | ) |  |

Signs data using ECDSA.

Parameters
tbs | Pointer to data to be signed.
tbsSize | Size of data to be signed.
signature | Pointer to output signature buffer.
Returns
Error code.

Signs data using ECDSA.

Parameters
digest | Pointer to digest to sign.
digestSize | Size of digest.
signature | Pointer to output signature.
Returns
SM_Crypto_Error_t error code.

◆ SM_verify()

SM_Crypto_Error_t SM_verify | ( | const uint8_t * | pPublicKey,
 |  | const uint8_t * | digest,
 |  | const uint32_t | digestSize,
 |  | const uint8_t * | signature
 | ) |  |

Verifies a signature using ECDSA.

Parameters
pPublicKey | Pointer to public key.
tbs | Pointer to data to be verified.
tbsSize | Size of data to be verified.
signature | Pointer to signature.
Returns
Error code.

Verifies a signature using ECDSA.

Parameters
pPublicKey | Pointer to public key.
digest | Pointer to digest.
digestSize | Size of digest.
signature | Pointer to signature.
Returns
SM_Crypto_Error_t error code.


X-CUBE-ALIRO: SM_crypto_mcu_Exported_Constants

Macros
SM_crypto_mcu_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_crypto_mcu_Exported_Constants:

Macros

#define MAX_FIXED_INFO_SIZE ((uint32_t)256)
Maximum size for fixed info buffer in bytes.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: SM_crypto_mcu_Exported_Functions

Functions
SM_crypto_mcu_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_crypto_mcu_Exported_Functions:

Functions

SM_Crypto_Error_t SM_initCryptoMCU (RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp)
Initializes cryptographic hardware modules for MCU. More...

Detailed Description

Function Documentation

◆ SM_initCryptoMCU()

SM_Crypto_Error_t SM_initCryptoMCU | ( | RNG_HandleTypeDef * | rng,
 |  | PKA_HandleTypeDef * | pka,
 |  | HASH_HandleTypeDef * | hash,
 |  | CRYP_HandleTypeDef * | cryp
 | ) |  |

Initializes cryptographic hardware modules for MCU.

Parameters
rng | Pointer to RNG handle.
pka | Pointer to PKA handle.
hash | Pointer to HASH handle.
cryp | Pointer to CRYP handle.
Returns
SM_Crypto_Error_t error code.

Initializes cryptographic hardware modules for MCU.

Parameters
rng | Pointer to RNG handle.
pka | Pointer to PKA handle.
hash | Pointer to HASH handle.
cryp | Pointer to CRYP handle.
Returns
SM_Crypto_Error_t error code.


X-CUBE-ALIRO: SM_crypto_stsafe_Exported_Functions

Functions
SM_crypto_stsafe_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » MCU CRYPTO
Collaboration diagram for SM_crypto_stsafe_Exported_Functions:

Functions

SM_Crypto_Error_t SM_initCryptoStSafe (uint8_t *pairingdone)
Initializes cryptographic operations using STSAFE. More...

Detailed Description

Function Documentation

◆ SM_initCryptoStSafe()

SM_Crypto_Error_t SM_initCryptoStSafe ( uint8_t * pairingdone )

Initializes cryptographic operations using STSAFE.

Parameters
pairingdone Pointer to a flag indicating if pairing is done.
Returns
SM_Crypto_Error_t error code.


X-CUBE-ALIRO: ACWG SECURITY

Modules
ACWG SECURITY
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY
Collaboration diagram for ACWG SECURITY:

Modules

ACWG_build_info_Exported_Constants
ACWG_build_info_Exported_Types
ACWG_security_Exported_Constants
ACWG_security_Exported_Types
ACWG_security_Exported_Variables
ACWG_security_Exported_Functions
ACWG_version_Exported_Constants

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_build_info_Exported_Constants

Macros
ACWG_build_info_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_build_info_Exported_Constants:

Macros

#define | ACWG_BI_FW_DESCRIPTION_LEN 24
#define | ACWG_BI_VERSION 1
Length of the firmware description string in the build info structure.
#define | ACWG_ALIRO_SPEC_VERSION_MAJ 0
Version of the ACWG build info structure.
#define | ACWG_ALIRO_SPEC_VERSION_MIN 9
Major version number of the Aliro specification.
#define | ACWG_ALIRO_SPEC_VERSION_SUBMIN 5
Minor version number of the Aliro specification.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_build_info_Exported_Types

Data Structures | Typedefs
ACWG_build_info_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_build_info_Exported_Types:

Data Structures

struct ACWG_build_info_s
Various info about the firmware build. More...

Typedefs

typedef struct ACWG_build_info_s ACWG_build_info_t
Various info about the firmware build. More...

Detailed Description

Typedef Documentation

◆ ACWG_build_info_t

typedef struct ACWG_build_info_s ACWG_build_info_t

Various info about the firmware build.

The build info are put at a specific address in flash (e.g. 0x0200), so that we can easily recover it with an external application which would read the flash.


X-CUBE-ALIRO: ACWG_build_info_s Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_build_info_s Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_build_info_Exported_Types

Various info about the firmware build. More...

#include <ACWG_build_info.h>

Data Fields

uint8_t | magic_cookie [4]
A magic cookie that external application could easily read: 'A', 'C', 'W', 'G'.
uint8_t | build_info_version
Version of this structure, e.g. MBI_VERSION.
uint8_t | ver_major
Major version number of the acwg.
uint8_t | ver_minor
Minor version number of the acwg.
uint8_t | ver_subminor
Subminor version number of the acwg.
char | date [12]
Build date, e.g. "Jan 1 1970".
char | time [12]
Build time, e.g. "01:00:00".
uint8_t | aliro_spec_major
Major version number of the Aliro spec.
uint8_t | aliro_spec_minor
Minor version number of the Aliro spec.
uint8_t | aliro_spec_subminor
Subminor version number of the Aliro spec.
char | fw_description [ACWG_BI_FW_DESCRIPTION_LEN]
Name of the firmware.

Detailed Description

Various info about the firmware build.

The build info are put at a specific address in flash (e.g. 0x0200), so that we can easily recover it with an external application which would read the flash.


X-CUBE-ALIRO: ACWG_security_Exported_Constants

Macros
ACWG_security_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_security_Exported_Constants:

Macros

#define | AUTH_EXP_TRANS_PROT_VERSION ((uint16_t)0x0100)
#define | AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES ((uint32_t)64)
Maximum length in bytes for endpoint property TLV.
#define | AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES ((uint32_t)8)
Maximum length in bytes for private mailbox data subset. More...
#define | AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
Length in bytes of a public key.
#define | AUTH_TRANS_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a transaction ID.
#define | AUTH_READER_GROUP_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a reader group ID.
#define | AUTH_READER_GROUP_SUB_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a reader group sub ID.
#define | AUTH_KEYSLOT_LEN_BYTES ((uint32_t)8)
Length in bytes of a keyslot.
#define | AUTH_CRYPTOGRAM_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of a cryptogram session key.
#define | AUTH_CRYPTOGRAM_LEN_BYTES ((uint32_t)64)
Length in bytes of a cryptogram.
#define | AUTH_MAX_PAYLOAD_LEN_BYTES ((uint32_t)256)
Maximum payload length in bytes.
#define | AUTH_PERSISTENT_KEY_LEN_BYTES ((uint32_t)32)
Length in bytes of a persistent key.
#define | AUTH_EXCH_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of an exchange session key.
#define | AUTH_STEPUP_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of a step-up session key.
#define | AUTH_BLESK_LEN_BYTES ((uint32_t)32)
Length in bytes of a BLE session key.
#define | AUTH_URSK_LEN_BYTES ((uint32_t)32)
Length in bytes of a uRSK key.
#define | AUTH_READER_EXT_MAX_LEN_BYTES ((uint32_t)128)
Maximum length in bytes for reader extension.
#define | AUTH_ENDPOINT_EXT_MAX_LEN_BYTES ((uint32_t)128)
Maximum length in bytes for endpoint extension.
#define | AUTH_MAX_PERSISTENT_KEYS_STORED ((uint32_t)2)
Maximum number of persistent keys stored.
#define | AUTH_MAX_KEYSLOTS_STORED ((uint32_t)2)
Maximum number of keyslots stored.
#define | AUTH_CRED_SIG_TIME_LEN_BYTES ((uint32_t)20)
Length in bytes of credential signature time.
#define | AUTH_REVOC_SIG_TIME_LEN_BYTES ((uint32_t)20)
Length in bytes of revocation signature time.
#define | AUTH_SIGNALING_BITMAP_LEN_BYTES ((uint32_t)2)
Length in bytes of signaling bitmap.
#define | AUTH_SALT_TYPE_BYTES_LEN ((uint32_t)12)
Length in bytes of salt type.
#define | AUTH_SALT_MAX_LEN_BYTES
Maximum length in bytes for salt. More...
#define | AUTH_INFO_LEN_BYTES ((uint32_t)AUTH_PUBKEY_LEN_BYTES)
Length in bytes of info.
#define | AUTH1_CMD_PARAM ((uint8_t)1)
Command parameter for AUTH1 (endpoint public key expected in auth1 response).
#define | AUTH1_AUTH_DATA_LEN_BYTES
Length in bytes of AUTH1 authentication data. More...
#define | CMD_PARAMS_EXP_FAST_MASK ((uint8_t)0x1)
Mask for expected fast command parameters.
#define | KDH_LEN_BYTES ((uint32_t)32)
Length in bytes of KDH.
#define | UWB_CONFIGURATION_IDENTIFIER_ID ((uint8_t) 0)
UWB configuration identifier attribute ID.
#define | PULSE_SHAPE_COMBO_ID ((uint8_t) 1)
Pulse shape combo attribute ID.
#define | UWB_SESSION_IDENTIFIER_ID ((uint8_t) 2)
UWB session identifier attribute ID.
#define | CHANNEL_BITMASK_ID ((uint8_t) 3)
Channel bitmask attribute ID.
#define | RAN_MULTIPLIER_ID ((uint8_t) 4)
RAN multiplier attribute ID.
#define | SLOT_BITMASK_ID ((uint8_t) 5)
Slot bitmask attribute ID.
#define | SYNC_CODE_INDEX_BITMASK_ID ((uint8_t) 6)
Sync code index bitmask attribute ID.
#define | SYNC_CODE_INDEX_ID ((uint8_t) 7)
Sync code index attribute ID.
#define | HOPPING_CONFIGURATION_BITMASK_ID ((uint8_t) 8)
Hopping configuration bitmask attribute ID.
#define | NUMBER_CHAPS_PER_SLOT_ID ((uint8_t) 9)
Number of chaps per slot attribute ID.
#define | NUMBER_RESPONDERS_NODES_ID ((uint8_t) 10)
Number of responder nodes attribute ID.
#define | NUMBER_SLOTS_PER_ROUND_ID ((uint8_t) 11)
Number of slots per round attribute ID.
#define | STS_INDEX0_ID ((uint8_t) 12)
STS index0 attribute ID.
#define | UWB_TIME0_ID ((uint8_t) 13)
UWB time0 attribute ID.
#define | HOP_MODE_KEY_ID ((uint8_t) 14)
Hop mode key attribute ID.
#define | MAC_MODE_ID ((uint8_t) 15)
MAC mode attribute ID.
#define | VENDOR_SPECIFIC_ID ((uint8_t) 16)
Vendor specific attribute ID.
#define | STATUS_ID ((uint8_t) 17)
Status attribute ID.
#define | UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES ((uint8_t)2)
Length in bytes of UWB configuration identifier (2 x m).
#define | UWB_SESSION_IDENTIFIER_LEN_BYTES ((uint8_t)4)
Length in bytes of UWB session identifier.
#define | SYNC_CODE_INDEX_BITMASK_LEN_BYTES ((uint8_t)4)
Length in bytes of sync code index bitmask.
#define | STS_INDEX0_LEN_BYTES ((uint8_t)4)
Length in bytes of STS index0.
#define | UWB_TIME0_LEN_BYTES ((uint8_t)8)
Length in bytes of UWB time0.
#define | HOP_MODE_KEY_LEN_BYTES ((uint8_t)4)
Length in bytes of hop mode key.
#define | VENDOR_SPECIFIC_LEN_BYTES1 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 1 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES2 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 2 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES3 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 3 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES4 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 4 (3 + Attribute Value Len).

Detailed Description

Macro Definition Documentation

◆ AUTH1_AUTH_DATA_LEN_BYTES

#define AUTH1_AUTH_DATA_LEN_BYTES
Value:
(2 + AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES +\
2 + (AUTH_PUBKEY_LEN_BYTES / 2) +\
2 + (AUTH_PUBKEY_LEN_BYTES / 2) +\
2 + AUTH_TRANS_ID_LEN_BYTES +\
2 + 4)
AUTH_READER_GROUP_SUB_ID_LEN_BYTES
#define AUTH_READER_GROUP_SUB_ID_LEN_BYTES
Length in bytes of a reader group sub ID.
Definition: ACWG_Security.h:72
AUTH_TRANS_ID_LEN_BYTES
#define AUTH_TRANS_ID_LEN_BYTES
Length in bytes of a transaction ID.
Definition: ACWG_Security.h:62
AUTH_READER_GROUP_ID_LEN_BYTES
#define AUTH_READER_GROUP_ID_LEN_BYTES
Length in bytes of a reader group ID.
Definition: ACWG_Security.h:67
AUTH_PUBKEY_LEN_BYTES
#define AUTH_PUBKEY_LEN_BYTES
Length in bytes of a public key.
Definition: ACWG_Security.h:57

Length in bytes of AUTH1 authentication data.

◆ AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES

#define AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES ((uint32_t)8)

Maximum length in bytes for private mailbox data subset.

Todo:
Update this value as needed.

◆ AUTH_SALT_MAX_LEN_BYTES

#define AUTH_SALT_MAX_LEN_BYTES
Value:
((uint32_t)(\
(AUTH_PUBKEY_LEN_BYTES / 2) + \
AUTH_SALT_TYPE_BYTES_LEN + \
AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES + \
1 + \
1 + \
1 + \
2 + \
(AUTH_PUBKEY_LEN_BYTES / 2) + \
AUTH_TRANS_ID_LEN_BYTES + \
2 + \
AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES + \
2 + \
(AUTH_PUBKEY_LEN_BYTES / 2) \
))
AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES
#define AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES
Maximum length in bytes for endpoint property TLV.
Definition: ACWG_Security.h:46

Maximum length in bytes for salt.


X-CUBE-ALIRO: ACWG_security_Exported_Types

Data Structures | Typedefs | Enumerations
ACWG_security_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_security_Exported_Types:

Data Structures

struct | ACWG_SessionContextInit
Initialization parameters for an ACWG session context. More...
struct | ACWG_UWB_Context
UWB (Ultra-Wideband) context for ACWG session. More...
struct | ACWG_SessionContext
Session context for ACWG Security operations. More...
struct | ACWG_PersistentKeys
Structure for persistent keys storage. More...
struct | ACWG_Keyslot
Structure for keyslot storage. More...

Typedefs

typedef enum ACWG_Status | ACWG_Status_t
Status codes for ACWG Security operations.
typedef enum transactionState | transactionState_t
Transaction state machine for ACWG Security.
typedef struct ACWG_SessionContextInit | ACWG_SessionContextInit_t
Initialization parameters for an ACWG session context.
typedef struct ACWG_UWB_Context | ACWG_UWB_Context_t
UWB (Ultra-Wideband) context for ACWG session.
typedef struct ACWG_SessionContext | ACWG_SessionContext_t
Session context for ACWG Security operations.
typedef struct ACWG_PersistentKeys | persistentKeys_t
Structure for persistent keys storage.
typedef struct ACWG_Keyslot | keyslot_t
Structure for keyslot storage.

Enumerations

enum ACWG_Status {
ACWG_OK = 0x764E8BAC , ACWG_Error_Generic = 0x0abedead , ACWG_Error_FastTransFailed , ACWG_Error_Parsing ,
ACWG_Error_ShortBuf , ACWG_Error_Crypto_KeyGen , ACWG_Error_Crypto_TransIDGen , ACWG_Error_Crypto_ECDH ,
ACWG_Error_Crypto_Derivation , ACWG_Error_Crypto_EncryptDecrypt , ACWG_Error_Crypto_Hash , ACWG_Error_Crypto_SigGen ,
ACWG_Error_Crypto_SigVerif , ACWG_Error_HW , ACWG_Error_WrongState , ACWG_Error_KeyslotNotFound ,
ACWG_Error_Parsing_NoKeyslot , ACWG_Error_Parsing_NoPublicKey
}
Status codes for ACWG Security operations. More...
enum transactionState {
invalid = 0 , selectDone , auth0StdDone , auth0FastDone ,
auth1Done , inStepUp , failed
}
Transaction state machine for ACWG Security. More...

Detailed Description

Enumeration Type Documentation

◆ ACWG_Status

enum ACWG_Status

Status codes for ACWG Security operations.

Enumerator
ACWG_OK | Operation successful
ACWG_Error_Generic | Generic error
ACWG_Error_FastTransFailed | Fast transaction failed
ACWG_Error_Parsing | Parsing error
ACWG_Error_ShortBuf | Buffer too short
ACWG_Error_Crypto_KeyGen | Cryptographic key generation error
ACWG_Error_Crypto_TransIDGen | Transaction ID generation error
ACWG_Error_Crypto_ECDH | ECDH cryptographic error
ACWG_Error_Crypto_Derivation | Key derivation error
ACWG_Error_Crypto_EncryptDecrypt | Encryption/Decryption error
ACWG_Error_Crypto_Hash | Hashing error
ACWG_Error_Crypto_SigGen | Signature generation error
ACWG_Error_Crypto_SigVerif | Signature verification error
ACWG_Error_HW | Hardware error
ACWG_Error_WrongState | Wrong state error
ACWG_Error_KeyslotNotFound | Keyslot not found
ACWG_Error_Parsing_NoKeyslot | Parsing error: no keyslot
ACWG_Error_Parsing_NoPublicKey | Parsing error: no public key

◆ transactionState

enum transactionState

Transaction state machine for ACWG Security.

Enumerator
invalid | Invalid state
selectDone | SELECT command completed
auth0StdDone | AUTH0 standard completed
auth0FastDone | AUTH0 fast transaction completed
auth1Done | AUTH1 completed successfully
inStepUp | In step-up phase
failed | Transaction failed


X-CUBE-ALIRO: ACWG_SessionContextInit Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_SessionContextInit Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_security_Exported_Types

Initialization parameters for an ACWG session context. More...

#include <ACWG_Security.h>

Data Fields

uint8_t | cmdParams
uint8_t | useKeyslot
uint8_t | useExchange
uint8_t | useLoadCert
uint8_t | useStepUp
uint8_t | RESERVED0
uint8_t | RESERVED1
uint8_t | RESERVED2
uint8_t | RESERVED3
uint8_t | NotVerifyKey
uint8_t | interface
uint8_t | authPolicy
uint8_t | readerID [AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]
uint16_t | expTransProtVer
uint8_t * | readerExt
uint32_t | readerExtSize
uint32_t | lockStatus

Detailed Description

Initialization parameters for an ACWG session context.

Field Documentation

◆ authPolicy

uint8_t authPolicy

Authentication policy

◆ cmdParams

uint8_t cmdParams

Command parameters

◆ expTransProtVer

uint16_t expTransProtVer

Expected transaction protocol version

◆ interface

uint8_t interface

Interface type (0xc3 for Bluetooth, 0x5e for NFC)

◆ lockStatus

uint32_t lockStatus

Lock status

◆ NotVerifyKey

uint8_t NotVerifyKey

Do not verify key flag

◆ readerExt

uint8_t* readerExt

Pointer to reader extension data

◆ readerExtSize

uint32_t readerExtSize

Size of reader extension data

◆ readerID

uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]

Reader ID

◆ RESERVED0

uint8_t RESERVED0

Reserved

◆ RESERVED1

uint8_t RESERVED1

Reserved

◆ RESERVED2

uint8_t RESERVED2

Reserved

◆ RESERVED3

uint8_t RESERVED3

Reserved

◆ useExchange

uint8_t useExchange

Use exchange flag

◆ useKeyslot

uint8_t useKeyslot

Use keyslot flag

◆ useLoadCert

uint8_t useLoadCert

Use load certificate flag

◆ useStepUp

uint8_t useStepUp

Use step-up flag

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_UWB_Context Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_UWB_Context Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_security_Exported_Types

UWB (Ultra-Wideband) context for ACWG session. More...

#include <ACWG_Security.h>

Data Fields

uint8_t | UWB_Configuration_Identifier [UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES]
uint8_t | Pulse_Shape_Combo
uint8_t | UWB_Session_Identifier [UWB_SESSION_IDENTIFIER_LEN_BYTES]
uint8_t | Channel_Bitmask
uint8_t | RAN_Multiplier
uint8_t | Slot_Bitmask
uint8_t | SYNC_Code_Index_Bitmask [SYNC_CODE_INDEX_BITMASK_LEN_BYTES]
uint8_t | SYNC_Code_Index
uint8_t | Hopping_Configuration_Bitmask
uint8_t | Number_Chaps_per_Slot
uint8_t | Number_Responders_Nodes
uint8_t | Number_Slots_per_Round
uint8_t | STS_Index0 [STS_INDEX0_LEN_BYTES]
uint8_t | UWB_Time0 [UWB_TIME0_LEN_BYTES]
uint8_t | HOP_Mode_Key [HOP_MODE_KEY_LEN_BYTES]
uint8_t | MAC_Mode
uint8_t | Vendor_Specific1 [VENDOR_SPECIFIC_LEN_BYTES1]
uint8_t | Vendor_Specific2 [VENDOR_SPECIFIC_LEN_BYTES2]
uint8_t | Vendor_Specific3 [VENDOR_SPECIFIC_LEN_BYTES3]
uint8_t | Vendor_Specific4 [VENDOR_SPECIFIC_LEN_BYTES4]
uint8_t | Vendor_Specific1_len
uint8_t | Vendor_Specific2_len
uint8_t | Vendor_Specific3_len
uint8_t | Vendor_Specific4_len
uint8_t | Status

Detailed Description

UWB (Ultra-Wideband) context for ACWG session.

Field Documentation

◆ Channel_Bitmask

uint8_t Channel_Bitmask

Channel bitmask

◆ HOP_Mode_Key

uint8_t HOP_Mode_Key[HOP_MODE_KEY_LEN_BYTES]

Hop mode key

◆ Hopping_Configuration_Bitmask

uint8_t Hopping_Configuration_Bitmask

Hopping configuration bitmask

◆ MAC_Mode

uint8_t MAC_Mode

MAC mode

◆ Number_Chaps_per_Slot

uint8_t Number_Chaps_per_Slot

Number of chaps per slot

◆ Number_Responders_Nodes

uint8_t Number_Responders_Nodes

Number of responder nodes

◆ Number_Slots_per_Round

uint8_t Number_Slots_per_Round

Number of slots per round

◆ Pulse_Shape_Combo

uint8_t Pulse_Shape_Combo

Pulse shape combo

◆ RAN_Multiplier

uint8_t RAN_Multiplier

RAN multiplier

◆ Slot_Bitmask

uint8_t Slot_Bitmask

Slot bitmask

◆ Status

uint8_t Status

Status

◆ STS_Index0

uint8_t STS_Index0[STS_INDEX0_LEN_BYTES]

STS index0

◆ SYNC_Code_Index

uint8_t SYNC_Code_Index

Sync code index

◆ SYNC_Code_Index_Bitmask

uint8_t SYNC_Code_Index_Bitmask[SYNC_CODE_INDEX_BITMASK_LEN_BYTES]

Sync code index bitmask

◆ UWB_Configuration_Identifier

uint8_t UWB_Configuration_Identifier[UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES]

UWB configuration identifier

◆ UWB_Session_Identifier

uint8_t UWB_Session_Identifier[UWB_SESSION_IDENTIFIER_LEN_BYTES]

UWB session identifier

◆ UWB_Time0

uint8_t UWB_Time0[UWB_TIME0_LEN_BYTES]

UWB time0

◆ Vendor_Specific1

uint8_t Vendor_Specific1[VENDOR_SPECIFIC_LEN_BYTES1]

Vendor specific field 1

◆ Vendor_Specific1_len

uint8_t Vendor_Specific1_len

Length of vendor specific field 1

◆ Vendor_Specific2

uint8_t Vendor_Specific2[VENDOR_SPECIFIC_LEN_BYTES2]

Vendor specific field 2

◆ Vendor_Specific2_len

uint8_t Vendor_Specific2_len

Length of vendor specific field 2

◆ Vendor_Specific3

uint8_t Vendor_Specific3[VENDOR_SPECIFIC_LEN_BYTES3]

Vendor specific field 3

◆ Vendor_Specific3_len

uint8_t Vendor_Specific3_len

Length of vendor specific field 3

◆ Vendor_Specific4

uint8_t Vendor_Specific4[VENDOR_SPECIFIC_LEN_BYTES4]

Vendor specific field 4

◆ Vendor_Specific4_len

uint8_t Vendor_Specific4_len

Length of vendor specific field 4

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_SessionContext Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_SessionContext Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_security_Exported_Types

Session context for ACWG Security operations. More...

#include <ACWG_Security.h>

Collaboration diagram for ACWG_SessionContext:
[legend]

Data Fields

ACWG_SessionContextInit_t init
ACWG_UWB_Context_t uwb_ctx
uint32_t | expDeviceCounter
uint32_t | expReaderCounter
uint32_t | stepUpDeviceCounter
uint32_t | stepUpReaderCounter
uint32_t | bleDeviceCounter
uint32_t | bleReaderCounter
uint8_t | transId [AUTH_TRANS_ID_LEN_BYTES]
uint8_t | readerEPub [AUTH_PUBKEY_LEN_BYTES]
uint8_t | endpointEPub [AUTH_PUBKEY_LEN_BYTES]
uint8_t | endpointPub [AUTH_PUBKEY_LEN_BYTES]
transactionState_t transState
transactionState_t stateBeforeStepUp
uint8_t | cryptogramSK [AUTH_CRYPTOGRAM_SK_LEN_BYTES]
uint8_t | expSKReader [AUTH_EXCH_SK_LEN_BYTES]
uint8_t | expSKDevice [AUTH_EXCH_SK_LEN_BYTES]
uint8_t | bleSK [AUTH_BLESK_LEN_BYTES]
uint8_t | bleSKReader [AUTH_BLESK_LEN_BYTES]
uint8_t | bleSKDevice [AUTH_BLESK_LEN_BYTES]
uint8_t | uRSK [AUTH_URSK_LEN_BYTES]
uint8_t | stepUpSK [AUTH_STEPUP_SK_LEN_BYTES]
uint8_t | stepUpSKReader [AUTH_STEPUP_SK_LEN_BYTES]
uint8_t | stepUpSKDevice [AUTH_STEPUP_SK_LEN_BYTES]
uint8_t | kPersistent [AUTH_PERSISTENT_KEY_LEN_BYTES]
uint8_t | endpointExt [AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]
uint32_t | endpointExtSize
uint8_t * | endpointPropTLV
uint32_t | endpointPropTLVSize
uint8_t | authData [AUTH1_AUTH_DATA_LEN_BYTES]
uint8_t | signalingBitmap [AUTH_SIGNALING_BITMAP_LEN_BYTES]
uint8_t | kdh [KDH_LEN_BYTES]
uint32_t | lockActionRequest
uint8_t | salt [AUTH_SALT_MAX_LEN_BYTES]
uint8_t | info [AUTH_INFO_LEN_BYTES+AUTH_READER_EXT_MAX_LEN_BYTES+AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]

Detailed Description

Session context for ACWG Security operations.

Field Documentation

◆ authData

uint8_t authData[AUTH1_AUTH_DATA_LEN_BYTES]

AUTH1 authentication data

◆ bleDeviceCounter

uint32_t bleDeviceCounter

BLE device counter

◆ bleReaderCounter

uint32_t bleReaderCounter

BLE reader counter

◆ bleSK

uint8_t bleSK[AUTH_BLESK_LEN_BYTES]

BLE session key

◆ bleSKDevice

uint8_t bleSKDevice[AUTH_BLESK_LEN_BYTES]

BLE session key (device)

◆ bleSKReader

uint8_t bleSKReader[AUTH_BLESK_LEN_BYTES]

BLE session key (reader)

◆ cryptogramSK

uint8_t cryptogramSK[AUTH_CRYPTOGRAM_SK_LEN_BYTES]

Cryptogram session key

◆ endpointEPub

uint8_t endpointEPub[AUTH_PUBKEY_LEN_BYTES]

Endpoint ephemeral public key

◆ endpointExt

uint8_t endpointExt[AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]

Endpoint extension

◆ endpointExtSize

uint32_t endpointExtSize

Endpoint extension size

◆ endpointPropTLV

uint8_t* endpointPropTLV

Pointer to endpoint property TLV

◆ endpointPropTLVSize

uint32_t endpointPropTLVSize

Size of endpoint property TLV

◆ endpointPub

uint8_t endpointPub[AUTH_PUBKEY_LEN_BYTES]

Endpoint public key

◆ expDeviceCounter

uint32_t expDeviceCounter

Expected device counter

◆ expReaderCounter

uint32_t expReaderCounter

Expected reader counter

◆ expSKDevice

uint8_t expSKDevice[AUTH_EXCH_SK_LEN_BYTES]

Exchange session key (device)

◆ expSKReader

uint8_t expSKReader[AUTH_EXCH_SK_LEN_BYTES]

Exchange session key (reader)

◆ info

uint8_t info[AUTH_INFO_LEN_BYTES+AUTH_READER_EXT_MAX_LEN_BYTES+AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]

Info

◆ init

ACWG_SessionContextInit_t init

Initialization parameters

◆ kdh

uint8_t kdh[KDH_LEN_BYTES]

KDH key

◆ kPersistent

uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES]

Persistent key

◆ lockActionRequest

uint32_t lockActionRequest

Lock action request

◆ readerEPub

uint8_t readerEPub[AUTH_PUBKEY_LEN_BYTES]

Reader ephemeral public key

◆ salt

uint8_t salt[AUTH_SALT_MAX_LEN_BYTES]

Salt

◆ signalingBitmap

uint8_t signalingBitmap[AUTH_SIGNALING_BITMAP_LEN_BYTES]

Signaling bitmap

◆ stateBeforeStepUp

transactionState_t stateBeforeStepUp

State before step-up

◆ stepUpDeviceCounter

uint32_t stepUpDeviceCounter

Step-up device counter

◆ stepUpReaderCounter

uint32_t stepUpReaderCounter

Step-up reader counter

◆ stepUpSK

uint8_t stepUpSK[AUTH_STEPUP_SK_LEN_BYTES]

Step-up session key

◆ stepUpSKDevice

uint8_t stepUpSKDevice[AUTH_STEPUP_SK_LEN_BYTES]

Step-up session key (device)

◆ stepUpSKReader

uint8_t stepUpSKReader[AUTH_STEPUP_SK_LEN_BYTES]

Step-up session key (reader)

◆ transId

uint8_t transId[AUTH_TRANS_ID_LEN_BYTES]

Transaction ID

◆ transState

transactionState_t transState

Current transaction state

◆ uRSK

uint8_t uRSK[AUTH_URSK_LEN_BYTES]

uRSK key

◆ uwb_ctx

ACWG_UWB_Context_t uwb_ctx

UWB context

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_PersistentKeys Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_PersistentKeys Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_security_Exported_Types

Structure for persistent keys storage. More...

#include <ACWG_Security.h>

Data Fields

uint8_t | endpointPubK [AUTH_PUBKEY_LEN_BYTES]
uint8_t | kPersistent [AUTH_PERSISTENT_KEY_LEN_BYTES]

Detailed Description

Structure for persistent keys storage.

Field Documentation

◆ endpointPubK

uint8_t endpointPubK[AUTH_PUBKEY_LEN_BYTES]

Endpoint public key

◆ kPersistent

uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES]

Persistent key

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_Keyslot Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ACWG_Keyslot Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY » ACWG_security_Exported_Types

Structure for keyslot storage. More...

#include <ACWG_Security.h>

Data Fields

uint8_t | slot [AUTH_KEYSLOT_LEN_BYTES]
uint8_t | publicKey [AUTH_PUBKEY_LEN_BYTES]

Detailed Description

Structure for keyslot storage.

Field Documentation

◆ publicKey

uint8_t publicKey[AUTH_PUBKEY_LEN_BYTES]

Public key

◆ slot

uint8_t slot[AUTH_KEYSLOT_LEN_BYTES]

Keyslot

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_security_Exported_Variables

Functions
ACWG_security_Exported_Variables
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_security_Exported_Variables:

Functions

const ACWG_build_info_t * ACWG_SecurityGetVersion (void)

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ACWG_security_Exported_Functions

Functions
ACWG_security_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_security_Exported_Functions:

Functions

ACWG_Status_t | ACWG_initSessionContext (ACWG_SessionContext_t *context)
Initializes the ACWG session context. More...
ACWG_Status_t | ACWG_selectDone (ACWG_SessionContext_t *context)
Processes the SELECT command completion. More...
ACWG_Status_t | ACWG_prepareEphemeralKeypairAndTransactionId (ACWG_SessionContext_t *context)
Prepares an ephemeral keypair and generates a transaction ID for the session. More...
ACWG_Status_t | ACWG_generateAUTH0CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH0 command payload. More...
ACWG_Status_t | ACWG_processAUTH0ResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH0 response payload. More...
ACWG_Status_t | ACWG_generateLOADCERTCommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the LOADCERT command payload. More...
ACWG_Status_t | ACWG_generateAUTH1CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH1 command payload. More...
ACWG_Status_t | ACWG_computeKDHandVolatileKeys (ACWG_SessionContext_t *context)
Computes the KDH and volatile keys for the session. More...
ACWG_Status_t | ACWG_derivePersistentKeys (ACWG_SessionContext_t *context)
Derives persistent keys for the session. More...
ACWG_Status_t | ACWG_processAUTH1ResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH1 response payload. More...
ACWG_Status_t | ACWG_generateExchangeCommandPayload (ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Exchange command payload. More...
ACWG_Status_t | ACWG_processExchangeResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Processes the Exchange response payload. More...
ACWG_Status_t | ACWG_initBLEEncryptedSession (ACWG_SessionContext_t *context, uint8_t *versions, uint32_t versionsSize)
Initializes a BLE encrypted session. More...
ACWG_Status_t | ACWG_encryptBle (ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Encrypts data for BLE communication. More...
ACWG_Status_t | ACWG_decryptBle (ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Decrypts data received over BLE communication. More...
ACWG_Status_t | ACWG_generateEnvelopeCommandPayload (ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Envelope command payload. More...
ACWG_Status_t | ACWG_getGetResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Gets the response payload for a GET command. More...
ACWG_Status_t | ACWG_enterStepUp (ACWG_SessionContext_t *context)
Enters the step-up phase in the session context. More...
ACWG_Status_t | ACWG_exitStepUp (ACWG_SessionContext_t *context)
Exits the step-up phase in the session context. More...
ACWG_Status_t | ACWG_generateM1CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M1 command payload. More...
ACWG_Status_t | ACWG_processM2Payload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M2 payload. More...
ACWG_Status_t | ACWG_generateM3CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M3 command payload. More...
ACWG_Status_t | ACWG_processM4Payload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M4 payload. More...
void | PrintBufferHex (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format if enabled. More...

Detailed Description

Function Documentation

◆ ACWG_computeKDHandVolatileKeys()

ACWG_Status_t ACWG_computeKDHandVolatileKeys ( ACWG_SessionContext_t * context )

Computes the KDH and volatile keys for the session.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_decryptBle()

ACWG_Status_t ACWG_decryptBle | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t | protocolHeader,
 |  | uint8_t | msgID,
 |  | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | output,
 |  | uint32_t * | outputSize
 | ) |  |

Decrypts data received over BLE communication.

Parameters
context | Pointer to the session context structure.
protocolHeader | Protocol header byte.
msgID | Message ID byte.
input | Pointer to the input buffer.
inputSize | Size of the input buffer.
output | Pointer to the buffer where the decrypted data will be written.
outputSize | Pointer to the variable that will receive the output size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_derivePersistentKeys()

ACWG_Status_t ACWG_derivePersistentKeys ( ACWG_SessionContext_t * context )

Derives persistent keys for the session.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_encryptBle()

ACWG_Status_t ACWG_encryptBle | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t | protocolHeader,
 |  | uint8_t | msgID,
 |  | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | output,
 |  | uint32_t * | outputSize
 | ) |  |

Encrypts data for BLE communication.

Parameters
context | Pointer to the session context structure.
protocolHeader | Protocol header byte.
msgID | Message ID byte.
input | Pointer to the input buffer.
inputSize | Size of the input buffer.
output | Pointer to the buffer where the encrypted data will be written.
outputSize | Pointer to the variable that will receive the output size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_enterStepUp()

ACWG_Status_t ACWG_enterStepUp ( ACWG_SessionContext_t * context )

Enters the step-up phase in the session context.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_exitStepUp()

ACWG_Status_t ACWG_exitStepUp ( ACWG_SessionContext_t * context )

Exits the step-up phase in the session context.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateAUTH0CommandPayload()

ACWG_Status_t ACWG_generateAUTH0CommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the AUTH0 command payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateAUTH1CommandPayload()

ACWG_Status_t ACWG_generateAUTH1CommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the AUTH1 command payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateEnvelopeCommandPayload()

ACWG_Status_t ACWG_generateEnvelopeCommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the Envelope command payload.

Parameters
context | Pointer to the session context structure.
input | Pointer to the input buffer.
inputSize | Size of the input buffer.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateExchangeCommandPayload()

ACWG_Status_t ACWG_generateExchangeCommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | input,
 |  | uint32_t | inputSize,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the Exchange command payload.

Parameters
context | Pointer to the session context structure.
input | Pointer to the input buffer.
inputSize | Size of the input buffer.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateLOADCERTCommandPayload()

ACWG_Status_t ACWG_generateLOADCERTCommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the LOADCERT command payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateM1CommandPayload()

ACWG_Status_t ACWG_generateM1CommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the M1 command payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_generateM3CommandPayload()

ACWG_Status_t ACWG_generateM3CommandPayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t * | payloadSize
 | ) |  |

Generates the M3 command payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the buffer where the payload will be written.
payloadSize | Pointer to the variable that will receive the payload size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_getGetResponsePayload()

ACWG_Status_t ACWG_getGetResponsePayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize,
 |  | uint32_t * | outputSize
 | ) |  |

Gets the response payload for a GET command.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
outputSize | Pointer to the variable that will receive the output size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_initBLEEncryptedSession()

ACWG_Status_t ACWG_initBLEEncryptedSession | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | versions,
 |  | uint32_t | versionsSize
 | ) |  |

Initializes a BLE encrypted session.

Parameters
context | Pointer to the session context structure.
versions | Pointer to the versions buffer.
versionsSize | Size of the versions buffer.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_initSessionContext()

ACWG_Status_t ACWG_initSessionContext ( ACWG_SessionContext_t * context )

Initializes the ACWG session context.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_prepareEphemeralKeypairAndTransactionId()

ACWG_Status_t ACWG_prepareEphemeralKeypairAndTransactionId ( ACWG_SessionContext_t * context )

Prepares an ephemeral keypair and generates a transaction ID for the session.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_processAUTH0ResponsePayload()

ACWG_Status_t ACWG_processAUTH0ResponsePayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize
 | ) |  |

Processes the AUTH0 response payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_processAUTH1ResponsePayload()

ACWG_Status_t ACWG_processAUTH1ResponsePayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize
 | ) |  |

Processes the AUTH1 response payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_processExchangeResponsePayload()

ACWG_Status_t ACWG_processExchangeResponsePayload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize,
 |  | uint32_t * | outputSize
 | ) |  |

Processes the Exchange response payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
outputSize | Pointer to the variable that will receive the output size.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_processM2Payload()

ACWG_Status_t ACWG_processM2Payload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize
 | ) |  |

Processes the M2 payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_processM4Payload()

ACWG_Status_t ACWG_processM4Payload | ( | ACWG_SessionContext_t * | context,
 |  | uint8_t * | payload,
 |  | uint32_t | payloadSize
 | ) |  |

Processes the M4 payload.

Parameters
context | Pointer to the session context structure.
payload | Pointer to the received payload buffer.
payloadSize | Size of the received payload.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ ACWG_selectDone()

ACWG_Status_t ACWG_selectDone ( ACWG_SessionContext_t * context )

Processes the SELECT command completion.

Parameters
context Pointer to the session context structure.
Returns
ACWG_Status_t Status code indicating success or error type.

◆ PrintBufferHex()

void PrintBufferHex | ( | const char * | pstr,
 |  | const uint8_t * | pBuf,
 |  | const uint32_t | nSize
 | ) |  |

Prints a buffer in hexadecimal format if enabled.

Prints a buffer in hexadecimal format.

Parameters
pstr | Description string to print before the buffer.
pBuf | Pointer to the buffer to print.
nSize | Size of the buffer.


X-CUBE-ALIRO: ACWG_version_Exported_Constants

Macros
ACWG_version_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » ALIRO_SECURITY » ACWG SECURITY
Collaboration diagram for ACWG_version_Exported_Constants:

Macros

#define | ACWG_VERSION_MAJ 0
Major version number of the ACWG Security Middleware.
#define | ACWG_VERSION_MIN 3
Minor version number of the ACWG Security Middleware.
#define | ACWG_VERSION_SUBMIN 4
Sub-minor version number of the ACWG Security Middleware.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: STEPUP MANAGER

Modules
STEPUP MANAGER
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for STEPUP MANAGER:

Modules

CERTIFICATE UTILITY
STEPUP CORE

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: CERTIFICATE UTILITY

Modules
CERTIFICATE UTILITY
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER
Collaboration diagram for CERTIFICATE UTILITY:

Modules

Certificate parser
Certificate parser.
Certificate cryptography
Certificate cryptography functions.
Certificate subparsing routines
Certificate subparsing routines.

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Certificate parser

Data Structures | Typedefs | Enumerations | Functions
Certificate parser
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY

Certificate parser. More...

Collaboration diagram for Certificate parser:

Data Structures

struct | validity_st
typedef for the structure keeping the validity More...
struct | cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key More...
struct | ECDSAsign_st
typedef for the structure keeping the ECDSA Signature More...
struct | internal_certificate
internal structure used to keep the values parsed from the x509 More...

Typedefs

typedef struct validity_st | cert_validity_t
typedef for the structure keeping the validity
typedef struct cert_public_key_t | cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key
typedef struct ECDSAsign_st | cert_signature_t
typedef for the structure keeping the ECDSA Signature
typedef struct internal_certificate | certificate_t
typedef for the certificate_t

Enumerations

enum certificate_status_t {
CERT_OK = 0x00 , CERT_INVALID_PARAMETER = 0x01 , CERT_UNEXPECTED_SEQUENCE , CERT_UNEXPECTED_BITSTRING ,
CERT_INVALID_SIGNATURE , CERT_INVALID_CERTIFICATE , CERT_CA_NOT_MATCHING , CERT_UNSUPPORTED_FEATURE ,
CERT_BAD_SIZE
}
response codes enumeration More...
enum certificate_signature_algorithms_t {
CERT_SIG_ECDSA_SHA1 = 0 , CERT_SIG_ECDSA_SHA224 , CERT_SIG_ECDSA_SHA256 , CERT_SIG_ECDSA_SHA384 ,
CERT_SIG_ECDSA_SHA512
}
Definitions of available signature algorithms. More...
enum certificate_elliptic_curves_t {
CERT_EC_P256 = 0 , CERT_EC_P384 , CERT_EC_P521 , CERT_EC_bp256r1 ,
CERT_EC_bp256t1 , CERT_EC_bp384r1 , CERT_EC_bp384t1 , CERT_EC_bp512r1 ,
CERT_EC_bp512t1
}
Definitions of supported Elliptic Curve Names. More...

Functions

void | certificate_init (certificate_t *cert)
Initialize a certificate (certificate_t) to an empty one. More...
certificate_status_t | certificate_parse (const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse an x509 certificate. More...
certificate_status_t | certificate_find_tbs_and_signature (const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse the top of x509 certificate to find the tbs and the signature. More...
void | certificate_parse_tbs (certificate_t *certificate)
Parse the tbs part of a certificate. More...
certificate_status_t | certificate_is_valid (const certificate_t *certificate, const cert_validity_t *currentTime)
Check that an imported x509 certificate is valid. More...
certificate_status_t | certificate_is_CA (const certificate_t *cert)
Check whether a certificate is marked as belonging to a CA. More...
certificate_status_t | certificate_is_parent (const certificate_t *parent, const certificate_t *child, const cert_validity_t *currentTime)
Check whether "parent" issued "child". More...
void | certificate_copy (certificate_t *copiedCert, const certificate_t *originalCert)
Copy a certificate (certificate_t) into another structure. More...
certificate_status_t | certificate_parse_chain (uint8_t *rootCA, uint8_t *certChain, uint16_t certChainSize, certificate_t *leafCert)
Iterate over the certificate chain in argument and check each child/parent pairs. More...

Detailed Description

Certificate parser.

Enumeration Type Documentation

◆ certificate_elliptic_curves_t

enum certificate_elliptic_curves_t

Definitions of supported Elliptic Curve Names.

Enumerator
CERT_EC_P256 | NIST P-256
CERT_EC_P384 | NIST P-384
CERT_EC_P521 | NIST P-521
CERT_EC_bp256r1 | brainpoolP256r1
CERT_EC_bp256t1 | brainpoolP256t1
CERT_EC_bp384r1 | brainpoolP384r1
CERT_EC_bp384t1 | brainpoolP384t1
CERT_EC_bp512r1 | brainpoolP512r1
CERT_EC_bp512t1 | brainpoolP512t1

◆ certificate_signature_algorithms_t

enum certificate_signature_algorithms_t

Definitions of available signature algorithms.

Enumerator
CERT_SIG_ECDSA_SHA1 | ECDSA with SHA1 algorithm
CERT_SIG_ECDSA_SHA224 | ECDSA with SHA224 algorithm
CERT_SIG_ECDSA_SHA256 | ECDSA with SHA256 algorithm
CERT_SIG_ECDSA_SHA384 | ECDSA with SHA384 algorithm
CERT_SIG_ECDSA_SHA512 | ECDSA with SHA512 algorithm

◆ certificate_status_t

enum certificate_status_t

response codes enumeration

Enumerator
CERT_OK | Successful processing
CERT_INVALID_PARAMETER | Wrong function parameters

Function Documentation

◆ certificate_copy()

void certificate_copy | ( | certificate_t * | copiedCert,
 |  | const certificate_t * | originalCert
 | ) |  |

Copy a certificate (certificate_t) into another structure.

Parameters
[out] | copiedCert | pointer to the certificate_t that will be written
[out] | originalCert | pointer to the certificate_t that will be copied
Returns
certificate_status_t : CERT_OK on success ; error code otherwise

◆ certificate_find_tbs_and_signature()

certificate_status_t certificate_find_tbs_and_signature | ( | const uint8_t * | cert,
 |  | uint32_t | max_size,
 |  | certificate_t * | certificate,
 |  | const uint8_t ** | next
 | ) |  |

Parse the top of x509 certificate to find the tbs and the signature.

Parameters
[in] | cert | pointer to the x509 certificate to be parsed
[in] | max_size | maximum size of certificate to be parsed
[out] | certificate | pointer to the certificate_t that will be filled
[out] | next | pointer to cert array after the parsed certificate (it can be NULL)
Returns
certificate_status_t : CERT_OK on success ; error code otherwise
Warning
The parsed certificated could be empty, it is necessary to call a function which verifies the certificate to be valid before using it.

◆ certificate_init()

void certificate_init ( certificate_t * cert )

Initialize a certificate (certificate_t) to an empty one.

Parameters
[in,out] cert pointer to the certificate_t to be initialized
Note
This functions should be called before parsing a certificate

◆ certificate_is_CA()

certificate_status_t certificate_is_CA ( const certificate_t * cert )

Check whether a certificate is marked as belonging to a CA.

Parameters
[in] *cert pointer to the parsed x509 certificate to be checked
Returns
certificate_status_t : CERT_OK on success ; error code otherwise

◆ certificate_is_parent()

certificate_status_t certificate_is_parent | ( | const certificate_t * | parent,
 |  | const certificate_t * | child,
 |  | const cert_validity_t * | currentTime
 | ) |  |

Check whether "parent" issued "child".

Parameters
[in] | parent | pointer to the parsed x509 certificate of the supposed issuer of child
[in] | child | pointer to the parsed x509 certificate of the certificated supposedly issued by parent
[in] | currentTime | pointer to a cert_validity_t with the current DateTime. If NULL no date check is done.
Returns
certificate_status_t : CERT_OK on success ; error code otherwise
Note
RFC 5280 mandates an extremely expensive comparison, which we don't perform. As result of this simplification some legitimate parentship relation could be not acknowledged (the opposite should not occur).
Warning
This check only a single level parent relashion (i.e. whether parent issued child)

◆ certificate_is_valid()

certificate_status_t certificate_is_valid | ( | const certificate_t * | certificate,
 |  | const cert_validity_t * | currentTime
 | ) |  |

Check that an imported x509 certificate is valid.

Parameters
[in] | certificate | pointer to the parsed x509 certificate to be validated
[in] | currentTime | pointer to a cert_validity_t with the current DateTime. If NULL no date check is done
Returns
certificate_status_t : CERT_OK on success ; error code otherwise
Warning
If currentTime==NULL the check on the validity dates of the certificate will be bypassed.

◆ certificate_parse()

certificate_status_t certificate_parse | ( | const uint8_t * | cert,
 |  | uint32_t | max_size,
 |  | certificate_t * | certificate,
 |  | const uint8_t ** | next
 | ) |  |

Parse an x509 certificate.

Parameters
[in] | cert | pointer to the x509 certificate to be parsed
[in] | max_size | maximum size of certificate to be parsed
[out] | certificate | pointer to the certificate_t that will be filled
[out] | next | pointer to cert array after the parsed certificate (it can be NULL)
Returns
certificate_status_t : CERT_OK on success ; error code otherwise
Warning
The parsed certificated could be empty, it is necessary to call a function which verifies the certificate to be valid before using it.

◆ certificate_parse_chain()

certificate_status_t certificate_parse_chain | ( | uint8_t * | rootCA,
 |  | uint8_t * | certChain,
 |  | uint16_t | certChainSize,
 |  | certificate_t * | leafCert
 | ) |  |

Iterate over the certificate chain in argument and check each child/parent pairs.

Parameters
[in] | rootCA | Pointer to the root CA certificate buffer
[in] | certChain | Pointer to the certificate chain buffer
[in] | certChainSize | Size of the certificate chain buffer
[out] | leafCert | Pointer to the leaf certificate structure
Returns
: ertificate_status_t 0 on success ; error code otherwise

◆ certificate_parse_tbs()

void certificate_parse_tbs ( certificate_t * certificate )

Parse the tbs part of a certificate.

Parameters
[in/out] *certificate pointer to the certificate_t
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: validity_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
validity_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate parser

typedef for the structure keeping the validity More...

#include <certificate.h>

Data Fields

uint8_t | seconds
uint8_t | minutes
uint8_t | hours
uint8_t | days
uint8_t | month
uint32_t | year

Detailed Description

typedef for the structure keeping the validity

Field Documentation

◆ days

uint8_t days

days (range 1 to 31)

◆ hours

uint8_t hours

hours (range 0 to 23)

◆ minutes

uint8_t minutes

minutes (range 0 to 59)

◆ month

uint8_t month

month (range 1 to 12)

◆ seconds

uint8_t seconds

seconds (range 0 to 59)

◆ year

uint32_t year

years 0 to whatever


X-CUBE-ALIRO: cert_public_key_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
cert_public_key_t Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate parser

typedef for the structure keeping the Ellipitc Curve Public Key More...

#include <certificate.h>

Data Fields

const uint8_t * | pX
const uint8_t * | pY
uint32_t | fsize

Detailed Description

typedef for the structure keeping the Ellipitc Curve Public Key

Field Documentation

◆ fsize

uint32_t fsize

Size of the field in bytes

◆ pX

const uint8_t* pX

Pointer to X Coordinate

◆ pY

const uint8_t* pY

Pointer to Y Coordiante

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: ECDSAsign_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ECDSAsign_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate parser

typedef for the structure keeping the ECDSA Signature More...

#include <certificate.h>

Data Fields

const uint8_t * | pR
uint32_t | rSize
const uint8_t * | pS
uint32_t | sSize

Detailed Description

typedef for the structure keeping the ECDSA Signature

Field Documentation

◆ pR

const uint8_t* pR

Pointer to r

◆ pS

const uint8_t* pS

Pointer to s

◆ rSize

uint32_t rSize

size to r

◆ sSize

uint32_t sSize

size to s


X-CUBE-ALIRO: internal_certificate Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
internal_certificate Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate parser

internal structure used to keep the values parsed from the x509 More...

#include <certificate.h>

Collaboration diagram for internal_certificate:
[legend]

Data Fields

const uint8_t * | pPubKey_point_representation_id
const uint8_t * | tbs
uint32_t | tbsSize
uint32_t | x509Version
const uint8_t * | serialNumber
uint32_t | serialNumberSize
uint32_t | signature
const uint8_t * | issuer
uint32_t | issuerSize
const uint8_t * | validity
uint32_t | validitySize
const uint8_t * | subject
uint32_t | subjectSize
uint32_t | EllipticCurve
cert_public_key_t PubKey
const uint8_t * | extensions
uint32_t | extensionsSize
uint32_t | extensionsFlags
const uint8_t * | extAKIkeyIdentifier
uint32_t | extAKIkeyIdentifierSize
uint32_t | SignatureAlgorithm
cert_signature_t Sign

Detailed Description

internal structure used to keep the values parsed from the x509

Field Documentation

◆ EllipticCurve

uint32_t EllipticCurve

Identifies the Elliptic Curve

◆ extAKIkeyIdentifier

const uint8_t* extAKIkeyIdentifier

field key identifier of extension authority key identifier

◆ extAKIkeyIdentifierSize

uint32_t extAKIkeyIdentifierSize

size of previous field

◆ extensions

const uint8_t* extensions

Pointer to Extensions

◆ extensionsFlags

uint32_t extensionsFlags

Integer encoding the fields present in the tcs:
bit 0: BasicConstraints is present
bit 1: BasicConstraints is critical
bit 2: BasicConstraints indicates this is a CA
bit 3: BasicConstraints has a pathLenConstraint
bit 4-7: PathLen
bit 8: keyUsage is present
bit 9: keyUsage is critical
bit 15: keyUsage field decipherOnly
bit 16: keyUsage field digitalSignature
bit 17: keyUsage field contentCommitment/nonRepudiation
bit 18: keyUsage field keyEncipherment
bit 19: keyUsage field dataEncipherment
bit 20: keyUsage field keyAgreement
bit 21: keyUsage field keyCertSign
bit 22: keyUsage field cRLSign
bit 23: keyUsage field encipherOnly
bit 24: ExtendedKeyUsage is present
bit 25: ExtendedKeyUsage is critical
bit 27-29: Unused

◆ extensionsSize

uint32_t extensionsSize

Size of Extensions

◆ issuer

const uint8_t* issuer

Pointer to Issuer

◆ issuerSize

uint32_t issuerSize

Size of Issuer

◆ pPubKey_point_representation_id

const uint8_t* pPubKey_point_representation_id

0x04: Uncompressed key, 0x02 or 0x03: Compressed key

◆ PubKey

cert_public_key_t PubKey

Contain the struct cert_public_key_t

◆ serialNumber

const uint8_t* serialNumber

Pointer to SerialNumber

◆ serialNumberSize

uint32_t serialNumberSize

Size of SerialNumber

◆ Sign

cert_signature_t Sign

Contain the struct cert_signature_t

◆ signature

uint32_t signature

Signature (algorithm) but from tcs

◆ SignatureAlgorithm

uint32_t SignatureAlgorithm

SignatureAlgorithm

◆ subject

const uint8_t* subject

Pointer to subject

◆ subjectSize

uint32_t subjectSize

Size of Subject

◆ tbs

const uint8_t* tbs

Pointer to tcs field

◆ tbsSize

uint32_t tbsSize

Size of tcs

◆ validity

const uint8_t* validity

Pointer to Validity

◆ validitySize

uint32_t validitySize

Size of Validity

◆ x509Version

uint32_t x509Version

x509 Version


X-CUBE-ALIRO: Certificate cryptography

Functions
Certificate cryptography
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY

Certificate cryptography functions. More...

Collaboration diagram for Certificate cryptography:

Functions

certificate_status_t | certificate_verify_signature (const uint8_t *signing_public_key, uint32_t signing_public_key_size, const certificate_t *certificate)
Verify the signature of a certificate with a public key. More...
certificate_status_t | certificate_verify_child_signature (const certificate_t *parent, const certificate_t *child)
Check whether "parent" signed "child". More...

Detailed Description

Certificate cryptography functions.

Function Documentation

◆ certificate_verify_child_signature()

certificate_status_t certificate_verify_child_signature | ( | const certificate_t * | parent,
 |  | const certificate_t * | child
 | ) |  |

Check whether "parent" signed "child".

Parameters
[in] | parent | pointer to the parsed x509 certificate of the supposed issuer of child
[in] | child | pointer to the parsed x509 certificate of the certificated supposedly issued by parent
Returns
certificate_status_t : CERT_OK on success ; error code otherwise

◆ certificate_verify_signature()

certificate_status_t certificate_verify_signature | ( | const uint8_t * | signing_public_key,
 |  | uint32_t | signing_public_key_size,
 |  | const certificate_t * | certificate
 | ) |  |

Verify the signature of a certificate with a public key.

Parameters
[in] | signing_public_key | pointer to the parsed x509 certificate containing the public key to be used for the signature verification
[in] | signing_public_key_size | size in bytes of the digest of the message to be verified
[in] | certificate | pointer to the parsed x509 certificate to verify
Returns
certificate_status_t : CERT_OK on success ; error code otherwise
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Certificate subparsing routines

Data Structures | Macros | Typedefs | Enumerations | Functions
Certificate subparsing routines
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY

Certificate subparsing routines. More...

Collaboration diagram for Certificate subparsing routines:

Data Structures

struct | SignatureAlgorithmOID_st
Structure used to keep SignatureAlgorithm OIDs. More...
struct | AttributeOID_st
Structure used to keep Name Attribute OIDs. More...
struct | EllipticCurveOID_st
Structure used to keep named Elliptic Curve OIDs. More...
struct | attribute_st
typedef for the attribute More...
struct | ExtensionOID_st
Structure used to keep Name Attribute OIDs. More...
struct | extension_st
typedef for the extension More...

Macros

#define IS_VALID_TAG(tag)
Macro which checks if a TAG is valid (known) More...

Typedefs

typedef struct attribute_st | cert_attribute_t
typedef for the attribute
typedef struct extension_st | cert_extension_t
typedef for the extension

Enumerations

enum certificate_tag_t {
TAG_BOOLEAN = 0x01 , TAG_INTEGER , TAG_BITSTRING , TAG_OCTETSTRING ,
TAG_NULL , TAG_OBJECT_IDENTIFIER , TAG_ObjectDescriptor , TAG_ENUMERATED = 0x0A ,
TAG_UTF8String = 0x0C , TAG_PrintableString = 0x13 , TAG_IA5String = 0x16 , TAG_UTCTime ,
TAG_GeneralizedTime , TAG_SEQUENCE = 0x30 , TAG_SET , TAG_OPTION_0 = 0x80 ,
TAG_OPTION_1 , TAG_OPTION_2 , TAG_OPTION_3 , TAG_x509VERSION = 0xA0 ,
TAG_issuerUniqueID , TAG_subjectUniqueID , TAG_extensions
}
Definitions of X509 TAGs. More...
enum certificate_name_attributes_t {
ATTR_CN = 3 , ATTR_SN = 5 , ATTR_C = 6 , ATTR_LN = 7 ,
ATTR_SOPN = 8 , ATTR_ON = 10 , ATTR_OUN = 11 , ATTR_UID = 45 ,
ATTR_DN = 49
}
Definitions of supported Name Attributes. More...
enum certificate_extensions_type_t { EXTENSION_KU = 15 , EXTENSION_BC = 19 , EXTENSION_AKI = 35 , EXTENSION_EKU = 37 }
Definitions of supported Extensions types. More...

Functions

int32_t | certificate_identify_ASN1_TLV (const uint8_t *asn1, int32_t *parsed, int32_t *size, const uint8_t **value, uint32_t *max_size)
Identify the ASN.1 TLV. More...
int32_t | certificate_identify_attribute (const uint8_t *oid, int32_t size)
Identify the Name Attribute from its OID. More...
void | certificate_parse_ECDSA_signature (const uint8_t *signature, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECDSA signature. More...
void | certificate_parse_X509_version (const uint8_t *x509VersionField, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse the x509 Version of a certificate. More...
void | certificate_parse_signature_algorithm (const uint8_t *SA, uint32_t *singatureAlgorithm, const uint8_t **next_thing, uint32_t *max_size)
Parse a SignatureAlgorithm (or signature of a tbsCertificate) More...
void | certificate_parse_ECC_public_key (const uint8_t *EccPK, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECC public Key from a certificate. More...
void | certificate_parse_integer (const uint8_t *integer, const uint8_t **outp, uint32_t *outSize, const uint8_t **next_thing, uint32_t *max_size)
Parse an ASN.1 INTEGER. More...
void | certificate_parse_validity (const uint8_t *p, cert_validity_t *notBefore_st, cert_validity_t *notAfter_st, const uint8_t **next_thing, uint32_t *max_size)
Parse the validity of a certificate. More...
void | certificate_parse_relative_distinguished_name (const uint8_t *p, const uint8_t **nextRDN, const uint8_t **attribute, uint32_t *max_size)
Parse an RelativeDistinguishedName. More...
void | certificate_parse_attribute (const uint8_t *p, cert_attribute_t *attribute_st, const uint8_t **next_thing, uint32_t *max_size)
Parse a Name Attribute. More...
int32_t | certificate_date_compare (const cert_validity_t *D1, const cert_validity_t *D2)
Compare two cert_validity_t structures. More...
int32_t | certificate_count_attributes (const uint8_t *p)
Count the number of Attributes within a NAME. More...
int32_t | certificate_case_insensitive_compare (const uint8_t *p1, const uint8_t *p2, int32_t size)
String Comparison (case insensitive and for utf8) More...
int32_t | certificate_case_identify_extension (const uint8_t *oid, int32_t size)
Identify the Extension from its OID. More...
void | certificate_parse_extension (const uint8_t *ext, certificate_t *certificate, cert_extension_t *ext_st, uint32_t *max_size)
Parse an x509 Extension. More...
int32_t | certificate_get_small_integer (const uint8_t *value, int32_t size)
Reads the value of an INTEGER and returns it as a int32_t. More...

Detailed Description

Certificate subparsing routines.

Macro Definition Documentation

◆ IS_VALID_TAG

#define IS_VALID_TAG ( tag )
Value:
(( \
(TAG_BOOLEAN <= (tag) && (tag) <= TAG_ObjectDescriptor) || \
(tag) == TAG_ENUMERATED || \
(tag) == TAG_UTF8String || \
(tag) == TAG_PrintableString || \
(TAG_IA5String <= (tag) && (tag) <= TAG_GeneralizedTime) || \
(tag) == TAG_SEQUENCE || \
(tag) == TAG_SET || \
(TAG_OPTION_0 <= (tag) && (tag) <= TAG_OPTION_3) || \
(TAG_x509VERSION <= (tag) && (tag) <= TAG_extensions) ) ? 1 : 0)
TAG_OPTION_0
@ TAG_OPTION_0
Definition: certificate_subparsing.h:44
TAG_BOOLEAN
@ TAG_BOOLEAN
Definition: certificate_subparsing.h:29
TAG_SEQUENCE
@ TAG_SEQUENCE
Definition: certificate_subparsing.h:42
TAG_x509VERSION
@ TAG_x509VERSION
Definition: certificate_subparsing.h:48
TAG_PrintableString
@ TAG_PrintableString
Definition: certificate_subparsing.h:38
TAG_ENUMERATED
@ TAG_ENUMERATED
Definition: certificate_subparsing.h:36
TAG_OPTION_3
@ TAG_OPTION_3
Definition: certificate_subparsing.h:47
TAG_extensions
@ TAG_extensions
Definition: certificate_subparsing.h:51
TAG_SET
@ TAG_SET
Definition: certificate_subparsing.h:43
TAG_UTF8String
@ TAG_UTF8String
Definition: certificate_subparsing.h:37
TAG_ObjectDescriptor
@ TAG_ObjectDescriptor
Definition: certificate_subparsing.h:35
TAG_IA5String
@ TAG_IA5String
Definition: certificate_subparsing.h:39
TAG_GeneralizedTime
@ TAG_GeneralizedTime
Definition: certificate_subparsing.h:41

Macro which checks if a TAG is valid (known)

Enumeration Type Documentation

◆ certificate_extensions_type_t

enum certificate_extensions_type_t

Definitions of supported Extensions types.

Enumerator
EXTENSION_KU | KeyUsage
EXTENSION_BC | BasicContrains
EXTENSION_AKI | authority key identifier
EXTENSION_EKU | extKeyUsage

◆ certificate_name_attributes_t

enum certificate_name_attributes_t

Definitions of supported Name Attributes.

Enumerator
ATTR_CN | CommonName
ATTR_SN | SerialNumber
ATTR_C | Country
ATTR_LN | LocalityName
ATTR_SOPN | stateOrProvinceName
ATTR_ON | Organization Name
ATTR_OUN | Organization Unit Name
ATTR_UID | UniqueIdentifier
ATTR_DN | DistinguishedName

◆ certificate_tag_t

enum certificate_tag_t

Definitions of X509 TAGs.

Enumerator
TAG_BOOLEAN | x509 tag for BOOLEAN
TAG_INTEGER | x509 tag for INTEGER
TAG_BITSTRING | x509 tag for BITSTRING
TAG_OCTETSTRING | x509 tag for OCTETSTRING
TAG_NULL | x509 tag for NULL
TAG_OBJECT_IDENTIFIER | x509 tag for OBJECT_IDENTIFIER
TAG_ObjectDescriptor | x509 tag for ObjectDescriptor
TAG_ENUMERATED | x509 tag for ENUMERATED
TAG_UTF8String | x509 tag for UTF8String
TAG_PrintableString | x509 tag for PrintableString
TAG_IA5String | x509 tag for IA5String
TAG_UTCTime | x509 tag for UTCTime
TAG_GeneralizedTime | x509 tag for GeneralizedTime
TAG_SEQUENCE | x509 tag for SEQUENCE
TAG_SET | x509 tag for SET
TAG_OPTION_0 | x509 tag for option 0
TAG_OPTION_1 | x509 tag for option 1
TAG_OPTION_2 | x509 tag for option 2
TAG_OPTION_3 | x509 tag for option 3
TAG_x509VERSION | x509 tag for x509VERSION
TAG_issuerUniqueID | x509 tag for issuerUniqueID
TAG_subjectUniqueID | x509 tag for subjectUniqueID
TAG_extensions | x509 tag for extensions

Function Documentation

◆ certificate_case_identify_extension()

int32_t certificate_case_identify_extension | ( | const uint8_t * | oid,
 |  | int32_t | size
 | ) |  |

Identify the Extension from its OID.

Parameters
[in] | *oid | The value of the OID of the Extension (got from certificate_identify_ASN1_TLV )
[in] | size | size (in bytes) of the value field of this OID (got from certificate_identify_ASN1_TLV )
Note
Only a very limited set of Extension is supported
Returns
The internal type identifing the Extension or -1 for failure

◆ certificate_case_insensitive_compare()

int32_t certificate_case_insensitive_compare | ( | const uint8_t * | p1,
 |  | const uint8_t * | p2,
 |  | int32_t | size
 | ) |  |

String Comparison (case insensitive and for utf8)

Parameters
[in] | *p1 | first string to compare
[in] | *p2 | second string to compare
[in] | size | p1/p2 size
Returns
result of comparison
Return values
-1 | strings are different
0 | strings match

◆ certificate_count_attributes()

int32_t certificate_count_attributes ( const uint8_t * p )

Count the number of Attributes within a NAME.

Parameters
[in] *p pointer to the RDNSequence to be parsed \returun The number of Attributes

◆ certificate_date_compare()

int32_t certificate_date_compare | ( | const cert_validity_t * | D1,
 |  | const cert_validity_t * | D2
 | ) |  |

Compare two cert_validity_t structures.

Parameters
[in] | *D1 | pointer to the first cert_validity_t
[in] | *D2 | pointer to the second cert_validity_t
Returns
Result of Comparison
Return values
-1 | D1 < D2
0 | D1 = D2
1 | D1 > D2

◆ certificate_get_small_integer()

int32_t certificate_get_small_integer | ( | const uint8_t * | value,
 |  | int32_t | size
 | ) |  |

Reads the value of an INTEGER and returns it as a int32_t.

Parameters
[in] | *value | pointer to the value field of an INTEGER TLV (got from certificate_identify_ASN1_TLV)
[in] | size | size of the integer (got from certificate_identify_ASN1_TLV)
Returns
the integer value as an int32_t
Warning
only non-negative integers are supported

◆ certificate_identify_ASN1_TLV()

int32_t certificate_identify_ASN1_TLV | ( | const uint8_t * | asn1,
 |  | int32_t * | parsed,
 |  | int32_t * | size,
 |  | const uint8_t ** | value,
 |  | uint32_t * | max_size
 | ) |  |

Identify the ASN.1 TLV.

Parameters
[in] | *asn1 | pointer to the ASN.1 TLV
[out] | *parsed | will contain the number of processed bytes (rarely used)
[out] | *size | will contain the size (in bytes) of the value field of this ASN.1 TLV
[out] | **value | will contain a pointer to the value field of this ASN.1 TLV
[in/out] | *max_size maximum size left for value
Returns
The internal TAG identifier of this TLV or -1 if failure

◆ certificate_identify_attribute()

int32_t certificate_identify_attribute | ( | const uint8_t * | oid,
 |  | int32_t | size
 | ) |  |

Identify the Name Attribute from its OID.

Parameters
[in] | *oid | The value of the OID of the Attribute (got from certificate_identify_ASN1_TLV )
[in] | size | size (in bytes) of the value field of this OID (got from certificate_identify_ASN1_TLV )
Note
Only a very limited set of Attributes is supported
Returns
The internal type identifing the Attribute or -1 for failure

◆ certificate_parse_attribute()

void certificate_parse_attribute | ( | const uint8_t * | p,
 |  | cert_attribute_t * | attribute_st,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse a Name Attribute.

Parameters
[in] | *p | pointer to the AttributeTypeAndValue SEQUENCE to be parsed
[out] | *attribute_st | pointer to cert_attribute_t structure that will be filled
[out] | **next_thing | output pointer to next TLV

◆ certificate_parse_ECC_public_key()

void certificate_parse_ECC_public_key | ( | const uint8_t * | EccPK,
 |  | certificate_t * | certificate,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse an ECC public Key from a certificate.

Parameters
[in] | *EccPK | pointer to the ECC public Key
[out] | *certificate | pointer to the certificate_t that will be filled
[out] | **next_thing | output pointer to next TLV

◆ certificate_parse_ECDSA_signature()

void certificate_parse_ECDSA_signature | ( | const uint8_t * | signature,
 |  | certificate_t * | certificate,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse an ECDSA signature.

Parameters
[in] | *signature | pointer to the expected signature field of the x509 certificate
[out] | *certificate | pointer to the certificate_t that will be filled
[out] | **next_thing | will contain a pointer to the next TLV

◆ certificate_parse_extension()

void certificate_parse_extension | ( | const uint8_t * | ext,
 |  | certificate_t * | certificate,
 |  | cert_extension_t * | ext_st,
 |  | uint32_t * | max_size
 | ) |  |

Parse an x509 Extension.

Parameters
[in] | *ext | pointer to the extension
[out] | certificate | structure
[out] | *ext_st | pointer to an cert_extension_t structure

◆ certificate_parse_integer()

void certificate_parse_integer | ( | const uint8_t * | integer,
 |  | const uint8_t ** | outp,
 |  | uint32_t * | outSize,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse an ASN.1 INTEGER.

Parameters
[in] | *integer | pointer to the expected INTEGER TLV
[out] | *outp | will point to the starting byte of the integer
[out] | *outSize | will contain the size of the integer in bytes
[out] | **next_thing | will contain a pointer to the next TLV
Note
This doesn't copy the integer. To keep memory small this just returns a pointer to it.
Warning
only non-negative integers are supported

◆ certificate_parse_relative_distinguished_name()

void certificate_parse_relative_distinguished_name | ( | const uint8_t * | p,
 |  | const uint8_t ** | nextRDN,
 |  | const uint8_t ** | attribute,
 |  | uint32_t * | max_size
 | ) |  |

Parse an RelativeDistinguishedName.

Parameters
[in] | *p | pointer to the RelativeDistinguishedName (expeting a SET)
[out] | **nextRDN | output pointer to next RDN
[out] | **attribute | output pointer to RDN first attribute

◆ certificate_parse_signature_algorithm()

void certificate_parse_signature_algorithm | ( | const uint8_t * | SA,
 |  | uint32_t * | singatureAlgorithm,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse a SignatureAlgorithm (or signature of a tbsCertificate)

Parameters
[in] | *SA | pointer to the SignatureAlgorithm (or signature of a tbsCertificate)
[out] | *singatureAlgorithm | integer that will be filled with the internal encoding of signatureAlgorithm
[out] | **next_thing | output pointer to next TLV
Note
Only a very limited set of SignatureAlgorithm is supported

◆ certificate_parse_validity()

void certificate_parse_validity | ( | const uint8_t * | p,
 |  | cert_validity_t * | notBefore_st,
 |  | cert_validity_t * | notAfter_st,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse the validity of a certificate.

Parameters
[in] | *p | pointer to the Name Attribute SET to be parsed
[out] | *notBefore_st | pointer to cert_validity_t structure that will be filled with the "not before" date
[out] | *notAfter_st | pointer to cert_validity_t structure that will be filled with the "not after" date
[out] | **next_thing | output pointer to next TLV
Note
In this function next_thing can be NULL

◆ certificate_parse_X509_version()

void certificate_parse_X509_version | ( | const uint8_t * | x509VersionField,
 |  | certificate_t * | certificate,
 |  | const uint8_t ** | next_thing,
 |  | uint32_t * | max_size
 | ) |  |

Parse the x509 Version of a certificate.

Parameters
[in] | *x509VersionField | pointer to the version field of a certificate
[out] | *certificate | pointer to the certificate_t that will be filled
[out] | **next_thing | output pointer to next TLV
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: SignatureAlgorithmOID_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
SignatureAlgorithmOID_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

Structure used to keep SignatureAlgorithm OIDs. More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | len
uint32_t | type
uint8_t | oid [8]

Detailed Description

Structure used to keep SignatureAlgorithm OIDs.

Field Documentation

◆ len

uint32_t len

size of the encoded OID

◆ oid

uint8_t oid[8]

encoded OID

◆ type

uint32_t type

type of OID


X-CUBE-ALIRO: AttributeOID_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
AttributeOID_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

Structure used to keep Name Attribute OIDs. More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | len
uint32_t | type
uint8_t | oid [3]

Detailed Description

Structure used to keep Name Attribute OIDs.

Field Documentation

◆ len

uint32_t len

size of the encoded OID

◆ oid

uint8_t oid[3]

encoded OID

◆ type

uint32_t type

type of OID


X-CUBE-ALIRO: EllipticCurveOID_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
EllipticCurveOID_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

Structure used to keep named Elliptic Curve OIDs. More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | len
uint32_t | type
uint8_t | oid [9]

Detailed Description

Structure used to keep named Elliptic Curve OIDs.

Field Documentation

◆ len

uint32_t len

size of the encoded OID

◆ oid

uint8_t oid[9]

encoded OID

◆ type

uint32_t type

type of OID


X-CUBE-ALIRO: attribute_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
attribute_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

typedef for the attribute More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | type
uint32_t | strFormat
const uint8_t * | str
uint32_t | strSize

Detailed Description

typedef for the attribute

Field Documentation

◆ str

const uint8_t* str

pointer to the string of the attribute

◆ strFormat

uint32_t strFormat

format of the string

◆ strSize

uint32_t strSize

size of the string

◆ type

uint32_t type

type of attribute (corresponding to OID)


X-CUBE-ALIRO: ExtensionOID_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
ExtensionOID_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

Structure used to keep Name Attribute OIDs. More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | len
uint32_t | type
uint8_t | oid [5]

Detailed Description

Structure used to keep Name Attribute OIDs.

Field Documentation

◆ len

uint32_t len

size of the encoded OID

◆ oid

uint8_t oid[5]

encoded OID

◆ type

uint32_t type

type of OID


X-CUBE-ALIRO: extension_st Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
extension_st Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » CERTIFICATE UTILITY » Certificate subparsing routines

typedef for the extension More...

#include <certificate_subparsing.h>

Data Fields

uint32_t | type
uint32_t | critical
const uint8_t * | value
uint32_t | valueSize

Detailed Description

typedef for the extension

Field Documentation

◆ critical

uint32_t critical

critical

◆ type

uint32_t type

type of extension (corresponding to OID)

◆ value

const uint8_t* value

pointer to the value hold by the extension (this is an octet string)

◆ valueSize

uint32_t valueSize

size of the string


X-CUBE-ALIRO: STEPUP CORE

Modules
STEPUP CORE
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER
Collaboration diagram for STEPUP CORE:

Modules

STEPUP_MGR_Exported_Types
STEPUP_MGR_Exported_Constants
STEPUP_MGR_Exported_Macros
STEPUP_MGR_Private_Defines
STEPUP_MGR_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: STEPUP_MGR_Exported_Types

STEPUP_MGR_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » STEPUP CORE
Collaboration diagram for STEPUP_MGR_Exported_Types:


X-CUBE-ALIRO: STEPUP_MGR_Exported_Constants

STEPUP_MGR_Exported_Constants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » STEPUP CORE
Collaboration diagram for STEPUP_MGR_Exported_Constants:


X-CUBE-ALIRO: STEPUP_MGR_Exported_Macros

STEPUP_MGR_Exported_Macros
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » STEPUP CORE
Collaboration diagram for STEPUP_MGR_Exported_Macros:


X-CUBE-ALIRO: STEPUP_MGR_Private_Defines

STEPUP_MGR_Private_Defines
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » STEPUP CORE
Collaboration diagram for STEPUP_MGR_Private_Defines:


X-CUBE-ALIRO: STEPUP_MGR_Exported_Functions

Functions
STEPUP_MGR_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » STEPUP MANAGER » STEPUP CORE
Collaboration diagram for STEPUP_MGR_Exported_Functions:

Functions

uint8_t | stepup_request (ACWG_SessionContext_t *acwgctx, uint8_t *stringAccElem, uint32_t AccElemLen, uint8_t *stringRevElem, uint32_t RevElemLen, uint8_t *buf, uint32_t *len)
Requests a step-up operation. More...
uint8_t | stepup_pushdata (uint8_t *buf, uint32_t len)
Pushes step-up data to the buffer. More...
uint8_t | stepup_process (ACWG_SessionContext_t *acwgctx)
Processes the step-up operation. More...
uint8_t | stepup_CheckEndpointPubK (uint8_t *endp_PubK)
Checks the endpoint public key for step-up. More...

Detailed Description

Function Documentation

◆ stepup_CheckEndpointPubK()

uint8_t stepup_CheckEndpointPubK ( uint8_t * endp_PubK )

Checks the endpoint public key for step-up.

Parameters
endp_PubK Pointer to the endpoint public key.
Returns
Status code.

◆ stepup_process()

uint8_t stepup_process ( ACWG_SessionContext_t * acwgctx )

Processes the step-up operation.

Parameters
acwgctx Pointer to the session context.
Returns
Status code.

◆ stepup_pushdata()

uint8_t stepup_pushdata | ( | uint8_t * | buf,
 |  | uint32_t | len
 | ) |  |

Pushes step-up data to the buffer.

Parameters
buf | Pointer to the data buffer.
len | Length of the data.
Returns
Status code.

◆ stepup_request()

uint8_t stepup_request | ( | ACWG_SessionContext_t * | acwgctx,
 |  | uint8_t * | stringAccElem,
 |  | uint32_t | AccElemLen,
 |  | uint8_t * | stringRevElem,
 |  | uint32_t | RevElemLen,
 |  | uint8_t * | buf,
 |  | uint32_t * | len
 | ) |  |

Requests a step-up operation.

Parameters
acwgctx | Pointer to the session context.
buf | Pointer to the buffer for request data.
len | Pointer to the length of the buffer.
Returns
Status code.


X-CUBE-ALIRO: NFC

Modules
NFC
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for NFC:

Modules

Aliro_NFC_ExportedTypes
Exported types for Aliro NFC module.
Aliro_NFC_ExportedConstants
Exported constants for Aliro NFC module.
Aliro_NFC_ExportedMacros
Exported macros for Aliro NFC module.
Aliro_NFC_ExportedFunctions
Exported functions for Aliro NFC module.
TLWrapper_Nfc_Exported_Types
TLWrapper_Nfc_Exported_Variables
TLWrapper_Nfc_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_NFC_ExportedTypes

Aliro_NFC_ExportedTypes
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC

Exported types for Aliro NFC module.

Collaboration diagram for Aliro_NFC_ExportedTypes:

Exported types for Aliro NFC module.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_NFC_ExportedConstants

Aliro_NFC_ExportedConstants
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC

Exported constants for Aliro NFC module.

Collaboration diagram for Aliro_NFC_ExportedConstants:

Exported constants for Aliro NFC module.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_NFC_ExportedMacros

Aliro_NFC_ExportedMacros
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC

Exported macros for Aliro NFC module.

Collaboration diagram for Aliro_NFC_ExportedMacros:

Exported macros for Aliro NFC module.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_NFC_ExportedFunctions

Functions
Aliro_NFC_ExportedFunctions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC

Exported functions for Aliro NFC module. More...

Collaboration diagram for Aliro_NFC_ExportedFunctions:

Functions

bool | AliroNfcIni (ACWG_SessionContext_t *context)
Initializes the NFC module for Aliro. More...
void | AliroNfcCycle (ACWG_SessionContext_t *context)
Executes the main NFC cycle for Aliro. More...
void | AliroNfcStop (void)
Stops the NFC module for Aliro. More...
uint16_t | AliroNfcGetDiscoverTechs2Find (void)
Gets the technologies to find during NFC discovery. More...
uint16_t | AliroNfcGetDiscoverTotalDuration (void)
Gets the total duration for NFC discovery. More...
void | AliroNfcHwInit (void)
Initializes the NFC hardware for Aliro. More...

Detailed Description

Exported functions for Aliro NFC module.

Function Documentation

◆ AliroNfcCycle()

void AliroNfcCycle ( ACWG_SessionContext_t * context )

Executes the main NFC cycle for Aliro.

Parameters
context Pointer to the session context.

Executes the main NFC cycle for Aliro.

This function executes the demo state machine. It must be called periodically

Executes the NFC demo state machine. Should be called periodically.

Parameters
context Pointer to the session context.

◆ AliroNfcGetDiscoverTechs2Find()

uint16_t AliroNfcGetDiscoverTechs2Find ( void )

Gets the technologies to find during NFC discovery.

Returns
Bitmask of technologies to find.

Gets the technologies to find during NFC discovery.

Returns the NFC discovery parameter: Techs2Find.

Returns
The techs2Find value from the discovery parameters.

◆ AliroNfcGetDiscoverTotalDuration()

uint16_t AliroNfcGetDiscoverTotalDuration ( void )

Gets the total duration for NFC discovery.

Returns
Duration in milliseconds.

Gets the total duration for NFC discovery.

Returns the total duration for NFC discovery.

Returns
The total duration value from the discovery parameters.

◆ AliroNfcHwInit()

void AliroNfcHwInit ( void )

Initializes the NFC hardware for Aliro.

Initializes the NFC hardware for Aliro.

◆ AliroNfcIni()

bool AliroNfcIni ( ACWG_SessionContext_t * context )

Initializes the NFC module for Aliro.

Parameters
context Pointer to the session context.
Returns
true if initialization is successful, false otherwise.

Initializes the NFC module for Aliro.

This function initializes the required layers for the demo

Returns
true : Initialization ok
false : Initialization failed

Initializes the NFC demo layers and parameters.

Parameters
context Pointer to the session context.
Returns
true if initialization is successful, false otherwise.

◆ AliroNfcStop()

void AliroNfcStop ( void )

Stops the NFC module for Aliro.

Stops the NFC module for Aliro.

This function stops the demo operation

Stops the NFC demo operation and deactivates NFC.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_Nfc_Exported_Types

Data Structures | Typedefs | Enumerations
TLWrapper_Nfc_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC
Collaboration diagram for TLWrapper_Nfc_Exported_Types:

Data Structures

struct | _tlwrapper_SM_nfc
struct | tlw_SM_nfc_t
Structure for NFC state machine context in TLWrapper. More...

Typedefs

typedef enum _tlw_state_nfc | tlw_state_nfc_e
typedef struct _tlwrapper_SM_nfc | tlw_SM_nfc_t

Enumerations

enum _tlw_state_nfc {
TLW_STATE_NFC_PREPARE_SELECT = 0 , TLW_STATE_NFC_PROCESS_SELECT , TLW_STATE_NFC_PREPARE_AUTH0 , TLW_STATE_NFC_PROCESS_AUTH0 ,
TLW_STATE_NFC_PREPARE_LOAD_CERT , TLW_STATE_NFC_PROCESS_LOAD_CERT , TLW_STATE_NFC_PREPARE_AUTH1 , TLW_STATE_NFC_PROCESS_AUTH1 ,
TLW_STATE_NFC_PREPARE_AUTH1_CHAINED , TLW_STATE_NFC_PROCESS_AUTH1_CHAINED , TLW_STATE_NFC_PREPARE_SELECT_STEPUP , TLW_STATE_NFC_PROCESS_SELECT_STEPUP ,
TLW_STATE_NFC_PREPARE_STEPUP , TLW_STATE_NFC_PROCESS_STEPUP , TLW_STATE_NFC_PREPARE_GET_RESPONSE , TLW_STATE_NFC_PREPARE_EXCHANGE ,
TLW_STATE_NFC_PROCESS_EXCHANGE , TLW_STATE_NFC_PREPARE_CONTROL_FLOW , TLW_STATE_NFC_PROCESS_CONTROL_FLOW , TLW_STATE_NFC_PREPARE_READER_STATUS_EXCHANGE ,
TLW_STATE_NFC_PROCESS_READER_STATUS_EXCHANGE , TLW_STATE_NFC_ERROR , TLW_STATE_NFC_END
}

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: _tlwrapper_SM_nfc Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_tlwrapper_SM_nfc Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC » TLWrapper_Nfc_Exported_Types
Collaboration diagram for _tlwrapper_SM_nfc:
[legend]

Data Fields

uint8_t | flags_nfc
tlw_state_nfc_e | state
ACWG_SessionContext_t * | ctx
uint8_t * | input
uint16_t * | input_len
uint8_t | output [512]
uint16_t | output_len
ACWG_Status_t(* | callback )(ACWG_SessionContext_t *ctx)


X-CUBE-ALIRO: tlw_SM_nfc_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
tlw_SM_nfc_t Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC » TLWrapper_Nfc_Exported_Types

Structure for NFC state machine context in TLWrapper. More...

#include <tlwrapper.h>

Detailed Description

Structure for NFC state machine context in TLWrapper.


X-CUBE-ALIRO: TLWrapper_Nfc_Exported_Variables

Variables
TLWrapper_Nfc_Exported_Variables
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC
Collaboration diagram for TLWrapper_Nfc_Exported_Variables:

Variables

tlw_SM_nfc_t nfc_SM
Global NFC state machine context.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_Nfc_Exported_Functions

Functions
TLWrapper_Nfc_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » NFC
Collaboration diagram for TLWrapper_Nfc_Exported_Functions:

Functions

tlw_error_e | tlw_init_nfc (ACWG_SessionContext_t *ctx)
Initializes the NFC state machine. More...
tlw_error_e | tlw_reload_nfc (ACWG_SessionContext_t *ctx)
Reloads the NFC state machine. More...
tlw_error_e | tlw_prepare_nfc (void)
Prepares the NFC state machine for operation. More...
tlw_error_e | tlw_process_nfc (void)
Processes the NFC state machine. More...

Detailed Description

Function Documentation

◆ tlw_init_nfc()

tlw_error_e tlw_init_nfc ( ACWG_SessionContext_t * ctx )

Initializes the NFC state machine.

Parameters
ctx Pointer to session context.
Returns
Error code.

◆ tlw_prepare_nfc()

tlw_error_e tlw_prepare_nfc ( void )

Prepares the NFC state machine for operation.

Returns
Error code.

◆ tlw_process_nfc()

tlw_error_e tlw_process_nfc ( void )

Processes the NFC state machine.

Returns
Error code.

◆ tlw_reload_nfc()

tlw_error_e tlw_reload_nfc ( ACWG_SessionContext_t * ctx )

Reloads the NFC state machine.

Parameters
ctx Pointer to session context.
Returns
Error code.


X-CUBE-ALIRO: BLE UWB

Modules
BLE UWB
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for BLE UWB:

Modules

UWB_Exported_Functions
TLWrapper_BleUwb_Exported_Types
TLWrapper_BleUwb_Exported_Variables
TLWrapper_BleUwb_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: UWB_Exported_Functions

Functions
UWB_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB
Collaboration diagram for UWB_Exported_Functions:

Functions

void | Initiate_uwb_ctx (ACWG_SessionContext_t *ctx)
Initialize UWB session. Uses for UWB Context and ranging session initialization. More...
void | Handle_uwb_Time_Sync (ACWG_SessionContext_t *ctx)
Handle UWB time synchronization frame. Uses to process and apply time sync information for the current UWB session. More...
void | Fill_uwb_M1 (ACWG_SessionContext_t *ctx)
Fill outbound M1 message fields. Uses to fill UWB M1 message fields: The first three fields depends of the UWB capabilities. More...
void | Handle_uwb_M2 (ACWG_SessionContext_t *ctx)
Handle inbound M2 message fields. Uses to handle UWB M2 message fields: The first three fields is linked to the same in M1 and represents the device selection, then the follow fields are session parameters/mask available by device: More...
void | Fill_uwb_M3 (ACWG_SessionContext_t *ctx)
Fill outbound M3 message fields. Uses to fill UWB M3 message fields: The follow fields are session parameters set by the Reader based on M2 content:
More...
void | Handle_uwb_M4 (ACWG_SessionContext_t *ctx)
Handle inbound M4 message fields. Uses to handle UWB M4 message fields. The follow fields are session parameters set by the device based on M3 content: More...
void | Prepare_ranging_init (ACWG_SessionContext_t *ctx)
Prepare the ranging initialization step. Called only once after M1/M2/M3/M4 exchange. More...
void | Prepare_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Prepare the ranging loop step. Called repeatedly in the prepare ranging loop until timeout expires. Uses to setup uwb ranging parameters before starting ranging. More...
void | Execute_ranging_init (ACWG_SessionContext_t *ctx)
Execute the ranging initialization step. Called only one time after prepare ranging steps. Uses to start the UWB ranging . More...
void | Execute_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Execute the ranging loop step. Called repeatedly in the execute ranging loop until timeout expires. Uses to perform UWB ranging acquisition and evaluate ranging results. Exiting this loop the Handle_lock_actuation function is called. More...
void | Close_ranging_init (ACWG_SessionContext_t *ctx)
Close the ranging initialization step. Called only one time after Handle_lock_actuation. Uses to stop and deinit UWB ranging session. More...
void | Close_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Close the ranging loop step. Called repeatedly in the close ranging loop until timeout expires. More...
void | Suspend_ranging_init (ACWG_SessionContext_t *ctx)
Suspend the ranging initialization step. Called only one time after suspend response or suspend event in ranging session. Uses to stop UWB ranging session. More...
void | Suspend_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Suspend the ranging loop step. Called repeatedly in the suspend ranging loop until timeout expires. More...
void | Resume_ranging_init (ACWG_SessionContext_t *ctx)
Resume the ranging initialization step. Called only one time after resume response in ranging session. Uses to set new Time0 and SlotIndex0 in UWB ranging session. More...
void | Resume_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Resume the ranging loop step. Called repeatedly in the resume ranging loop until timeout expires. After exiting this loop the Execute_ranging_init function is called. More...
uint8_t | Handle_distance_result (ACWG_SessionContext_t *ctx)
Handle and evaluate distance results. Called only one time during preparing Reader Status Exchange frame. Uses to notify if distance allowed to open the lock. More...
void | Handle_lock_actuation (ACWG_SessionContext_t *ctx)
Trigger lock actuation based on session state. Called only one time after Execute_ranging_loop. Uses to actuate the lock based on distance result evaluation. More...
void | UWB_HW_init (void)
Initialize UWB hardware. Uses for UWB hardware initialization, called only one time at startup.
void | UWB_HW_loop (void)
Run periodic UWB hardware tasks. Uses for periodic UWB hardware tasks, called repeatedly in main loop.

Detailed Description

Function Documentation

◆ Close_ranging_init()

void Close_ranging_init ( ACWG_SessionContext_t * ctx )

Close the ranging initialization step. Called only one time after Handle_lock_actuation. Uses to stop and deinit UWB ranging session.

Parameters
ctx Session context.

◆ Close_ranging_loop()

void Close_ranging_loop | ( | ACWG_SessionContext_t * | ctx,
 |  | uint32_t * | timeout
 | ) |  |

Close the ranging loop step. Called repeatedly in the close ranging loop until timeout expires.

Parameters
ctx | Session context.
timeout | Pointer to timeout in ms. Set to 1 to exit the loop.

◆ Execute_ranging_init()

void Execute_ranging_init ( ACWG_SessionContext_t * ctx )

Execute the ranging initialization step. Called only one time after prepare ranging steps. Uses to start the UWB ranging .

Parameters
ctx Session context.

◆ Execute_ranging_loop()

void Execute_ranging_loop | ( | ACWG_SessionContext_t * | ctx,
 |  | uint32_t * | timeout
 | ) |  |

Execute the ranging loop step. Called repeatedly in the execute ranging loop until timeout expires. Uses to perform UWB ranging acquisition and evaluate ranging results. Exiting this loop the Handle_lock_actuation function is called.

Parameters
ctx | Session context.
timeout | Pointer to timeout in ms. Set to 1 to exit the loop.

◆ Fill_uwb_M1()

void Fill_uwb_M1 ( ACWG_SessionContext_t * ctx )

Fill outbound M1 message fields. Uses to fill UWB M1 message fields: The first three fields depends of the UWB capabilities.

  1. UWB Configuration Identifier
  2. Pulse Shape Combination
  3. Channel Bitmask
  4. UWB Session Identifier
  5. Vendor Specific attribute is optionally present.
    Parameters
    ctx Session context.

◆ Fill_uwb_M3()

void Fill_uwb_M3 ( ACWG_SessionContext_t * ctx )

Fill outbound M3 message fields. Uses to fill UWB M3 message fields: The follow fields are session parameters set by the Reader based on M2 content:

  1. RAN Multiplier
  2. Number Chaps per Slot
  3. Number Responders Nodes
  4. Number Slots per Round
  5. SYNC Code Index Bitmask
  6. Hopping Configuration Bitmask
  7. MAC Mode
  8. Vendor Specific attribute is optionally present.
    Parameters
    ctx Session context.

◆ Handle_distance_result()

uint8_t Handle_distance_result ( ACWG_SessionContext_t * ctx )

Handle and evaluate distance results. Called only one time during preparing Reader Status Exchange frame. Uses to notify if distance allowed to open the lock.

Parameters
ctx Session context.
Returns
1 if distance allowed to open lock, 0 otherwise.

◆ Handle_lock_actuation()

void Handle_lock_actuation ( ACWG_SessionContext_t * ctx )

Trigger lock actuation based on session state. Called only one time after Execute_ranging_loop. Uses to actuate the lock based on distance result evaluation.

Parameters
ctx Session context.

◆ Handle_uwb_M2()

void Handle_uwb_M2 ( ACWG_SessionContext_t * ctx )

Handle inbound M2 message fields. Uses to handle UWB M2 message fields: The first three fields is linked to the same in M1 and represents the device selection, then the follow fields are session parameters/mask available by device:

  1. UWB Configuration Identifier
  2. Pulse Shape Combination
  3. Channel Bitmask
  4. SYNC Code Index Bitmask
  5. RAN Multiplier
  6. Slot Bitmask
  7. Hopping Configuration Bitmask
  8. Vendor Specific attribute is optionally present.
    Parameters
    ctx Session context.

◆ Handle_uwb_M4()

void Handle_uwb_M4 ( ACWG_SessionContext_t * ctx )

Handle inbound M4 message fields. Uses to handle UWB M4 message fields. The follow fields are session parameters set by the device based on M3 content:

  1. STS Index0
  2. UWB Time0
  3. HOP Mode Key
  4. SYNC Code Index
  5. Vendor Specific attribute is optionally present.
    Parameters
    ctx Session context.

◆ Handle_uwb_Time_Sync()

void Handle_uwb_Time_Sync ( ACWG_SessionContext_t * ctx )

Handle UWB time synchronization frame. Uses to process and apply time sync information for the current UWB session.

Parameters
ctx Session context.

◆ Initiate_uwb_ctx()

void Initiate_uwb_ctx ( ACWG_SessionContext_t * ctx )

Initialize UWB session. Uses for UWB Context and ranging session initialization.

Parameters
ctx Session context.

◆ Prepare_ranging_init()

void Prepare_ranging_init ( ACWG_SessionContext_t * ctx )

Prepare the ranging initialization step. Called only once after M1/M2/M3/M4 exchange.

Parameters
ctx Session context.

◆ Prepare_ranging_loop()

void Prepare_ranging_loop | ( | ACWG_SessionContext_t * | ctx,
 |  | uint32_t * | timeout
 | ) |  |

Prepare the ranging loop step. Called repeatedly in the prepare ranging loop until timeout expires. Uses to setup uwb ranging parameters before starting ranging.

Parameters
ctx Session context.
timeout Pointer to timeout in ms. Set to 1 to exit the loop.

◆ Resume_ranging_init()

void Resume_ranging_init ( ACWG_SessionContext_t * ctx )

Resume the ranging initialization step. Called only one time after resume response in ranging session. Uses to set new Time0 and SlotIndex0 in UWB ranging session.

Parameters
ctx Session context.

◆ Resume_ranging_loop()

void Resume_ranging_loop | ( | ACWG_SessionContext_t * | ctx,
 |  | uint32_t * | timeout
 | ) |  |

Resume the ranging loop step. Called repeatedly in the resume ranging loop until timeout expires. After exiting this loop the Execute_ranging_init function is called.

Parameters
ctx | Session context.
timeout | Pointer to timeout in ms. Set to 1 to exit the loop.

◆ Suspend_ranging_init()

void Suspend_ranging_init ( ACWG_SessionContext_t * ctx )

Suspend the ranging initialization step. Called only one time after suspend response or suspend event in ranging session. Uses to stop UWB ranging session.

Parameters
ctx Session context.

◆ Suspend_ranging_loop()

void Suspend_ranging_loop | ( | ACWG_SessionContext_t * | ctx,
 |  | uint32_t * | timeout
 | ) |  |

Suspend the ranging loop step. Called repeatedly in the suspend ranging loop until timeout expires.

Parameters
ctx | Session context.
timeout | Pointer to timeout in ms. Set to 1 to exit the loop.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_BleUwb_Exported_Types

Data Structures | Typedefs | Enumerations
TLWrapper_BleUwb_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB
Collaboration diagram for TLWrapper_BleUwb_Exported_Types:

Data Structures

struct | _tlwrapper_SM_ble
struct | tlw_SM_ble_t
Structure for BLE state machine context in TLWrapper. More...

Typedefs

typedef enum _tlw_state_ble | tlw_state_ble_e
typedef struct _tlwrapper_SM_ble | tlw_SM_ble_t

Enumerations

enum _tlw_state_ble {
TLW_STATE_BLE_PREPARE_SELECT = 0 , TLW_STATE_BLE_PROCESS_SELECT , TLW_STATE_BLE_PREPARE_AUTH0 , TLW_STATE_BLE_PROCESS_AUTH0 ,
TLW_STATE_BLE_PREPARE_LOAD_CERT , TLW_STATE_BLE_PROCESS_LOAD_CERT , TLW_STATE_BLE_PREPARE_AUTH1 , TLW_STATE_BLE_PROCESS_AUTH1 ,
TLW_STATE_BLE_PREPARE_STEPUP , TLW_STATE_BLE_PROCESS_STEPUP , TLW_STATE_BLE_PREPARE_GET_RESPONSE , TLW_STATE_BLE_PREPARE_EXCHANGE ,
TLW_STATE_BLE_PROCESS_EXCHANGE , TLW_STATE_BLE_PREPARE_AP_COMPLETED , TLW_STATE_BLE_PROCESS_AP_COMPLETED , TLW_STATE_BLE_PROCESS_TIME_SYNC ,
TLW_STATE_BLE_PROCESS_INITIATE_RANGING_SESSION , TLW_STATE_BLE_PREPARE_M1 , TLW_STATE_BLE_PROCESS_M2 , TLW_STATE_BLE_PREPARE_M3 ,
TLW_STATE_BLE_PROCESS_M4 , TLW_STATE_BLE_PREPARE_SUSPEND_RQU , TLW_STATE_BLE_PROCESS_SUSPEND_RSP , TLW_STATE_BLE_PREPARE_SUSPEND_RSP ,
TLW_STATE_BLE_PROCESS_SUSPEND , TLW_STATE_BLE_PREPARE_EVENT_RANGING_SUSPENDED , TLW_STATE_BLE_PROCESS_EVENT_RANGING_SUSPENDED , TLW_STATE_BLE_PROCESS_EVENT_RANGING_RESUME ,
TLW_STATE_BLE_PROCESS_RESUME_RSP , TLW_STATE_BLE_PREPARE_RANGING , TLW_STATE_BLE_EXECUTE_RANGING , TLW_STATE_BLE_HANDLE_SUSPEND ,
TLW_STATE_BLE_HANDLE_RESUME , TLW_STATE_BLE_PREPARE_RESUME_RQU , TLW_STATE_BLE_HANDLE_DOOR_LOCK_OPERATION , TLW_STATE_BLE_PREPARE_READER_STATUS_EXCHANGE ,
TLW_STATE_BLE_PROCESS_READER_STATUS_EXCHANGE , TLW_STATE_BLE_PREPARE_NOTIFICATION_EVENT_ERR , TLW_STATE_BLE_ERROR , TLW_STATE_BLE_END
}

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: _tlwrapper_SM_ble Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_tlwrapper_SM_ble Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB » TLWrapper_BleUwb_Exported_Types
Collaboration diagram for _tlwrapper_SM_ble:
[legend]

Data Fields

bool | isBleOnly
General_Error_Attribute_ID_e | general_error_ble
uint8_t | flags_ble
tlw_state_ble_e | state
ACWG_SessionContext_t * | ctx
uint8_t * | input
uint16_t * | input_len
uint8_t | output [300]
uint16_t | output_len
ACWG_Status_t(* | callback )(ACWG_SessionContext_t *ctx)
uint8_t(* | sendData )(uint8_t *buff, uint16_t len)
uint8_t(* | disconnect )(void)


X-CUBE-ALIRO: tlw_SM_ble_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
tlw_SM_ble_t Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB » TLWrapper_BleUwb_Exported_Types

Structure for BLE state machine context in TLWrapper. More...

#include <tlwrapper.h>

Detailed Description

Structure for BLE state machine context in TLWrapper.


X-CUBE-ALIRO: TLWrapper_BleUwb_Exported_Variables

Variables
TLWrapper_BleUwb_Exported_Variables
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB
Collaboration diagram for TLWrapper_BleUwb_Exported_Variables:

Variables

tlw_SM_ble_t ble_SM
Global BLE state machine context.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_BleUwb_Exported_Functions

Functions
TLWrapper_BleUwb_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » BLE UWB
Collaboration diagram for TLWrapper_BleUwb_Exported_Functions:

Functions

tlw_error_e | tlw_init_ble (ACWG_SessionContext_t *ctx)
Initializes the BLE state machine. More...
tlw_error_e | tlw_reload_ble (ACWG_SessionContext_t *ctx)
Reloads the BLE state machine. More...
tlw_error_e | tlw_prepare_ble (void)
Prepares the BLE state machine for operation. More...
tlw_error_e | tlw_process_ble (void)
Processes the BLE state machine. More...
tlw_error_e | tlw_ble_receivedData (uint8_t *data, uint8_t *len, uint8_t(*sendData_fn)(uint8_t *, uint16_t))
Handles received BLE data and sends response. More...
tlw_error_e | tlw_ble_SM_step (void)
Steps the BLE state machine. More...
uint32_t | getUwbSessionId (void)
Gets the current UWB session ID. More...

Detailed Description

Function Documentation

◆ getUwbSessionId()

uint32_t getUwbSessionId ( void )

Gets the current UWB session ID.

Returns
UWB session ID value.

◆ tlw_ble_receivedData()

tlw_error_e tlw_ble_receivedData | ( | uint8_t * | data,
 |  | uint8_t * | len,
 |  | uint8_t(*)(uint8_t *, uint16_t) | sendData_fn
 | ) |  |

Handles received BLE data and sends response.

Parameters
data | Pointer to received data buffer.
len | Pointer to length of received data.
sendData_fn | Function pointer to send data.
Returns
Error code.

◆ tlw_ble_SM_step()

tlw_error_e tlw_ble_SM_step ( void )

Steps the BLE state machine.

Returns
Error code.

◆ tlw_init_ble()

tlw_error_e tlw_init_ble ( ACWG_SessionContext_t * ctx )

Initializes the BLE state machine.

Parameters
ctx Pointer to session context.
Returns
Error code.

◆ tlw_prepare_ble()

tlw_error_e tlw_prepare_ble ( void )

Prepares the BLE state machine for operation.

Returns
Error code.

◆ tlw_process_ble()

tlw_error_e tlw_process_ble ( void )

Processes the BLE state machine.

Returns
Error code.

◆ tlw_reload_ble()

tlw_error_e tlw_reload_ble ( ACWG_SessionContext_t * ctx )

Reloads the BLE state machine.

Parameters
ctx Pointer to session context.
Returns
Error code.


X-CUBE-ALIRO: WRAPPER UTILITY

Modules
WRAPPER UTILITY
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for WRAPPER UTILITY:

Modules

TLWrapper_Utils_Exported_Types
TLWrapper_Utils_Exported_Variables
TLWrapper_Utils_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_Utils_Exported_Types

Data Structures | Typedefs | Enumerations
TLWrapper_Utils_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » WRAPPER UTILITY
Collaboration diagram for TLWrapper_Utils_Exported_Types:

Data Structures

struct | _access_mngr_data
struct | access_mngr_data_t
Structure for access manager data. More...

Typedefs

typedef enum _tlw_error | tlw_error_e
typedef enum _General_Error_Attribute_ID | General_Error_Attribute_ID_e
typedef struct _access_mngr_data | access_mngr_data_t

Enumerations

enum _tlw_error {
TLW_ERROR_NONE = 0 , TLW_NEW_OUTPUT , TLW_NO_PREPARE_NEEDED , TLW_ERROR_FAST ,
TLW_NEED_GET_RESPONSE , TLW_NEED_AUTH1 , TLW_NEED_LOAD_CERT , TLW_BUSY ,
TLW_FAIL_GENERATE , TLW_FAIL_PROCESS , TLW_FAIL_GENERIC , TLW_FAIL_TIMEOUT ,
TLW_END
}
enum _General_Error_Attribute_ID { GENERAL_UNKNOWN_ERROR = 0U , GENERAL_RESOURCE_UNAVAILABLE = 1U , GENERAL_WRONG_PARAMETERS = 2U , GENERAL_URSK_UNAVAILABLE = 3U }

Detailed Description

Enumeration Type Documentation

◆ _tlw_error

enum _tlw_error
Enumerator
TLW_ERROR_NONE | No error
TLW_NEW_OUTPUT | New output available
TLW_NO_PREPARE_NEEDED | No preparation needed
TLW_ERROR_FAST | Fast error
TLW_NEED_GET_RESPONSE | Need to get response
TLW_NEED_AUTH1 | Need authentication 1
TLW_NEED_LOAD_CERT | Need to load certificate
TLW_BUSY | Busy state
TLW_FAIL_GENERATE | Generation failed
TLW_FAIL_PROCESS | Processing failed
TLW_FAIL_GENERIC | Generic failure
TLW_FAIL_TIMEOUT | Timeout failure
TLW_END | End of error codes


X-CUBE-ALIRO: _access_mngr_data Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_access_mngr_data Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » WRAPPER UTILITY » TLWrapper_Utils_Exported_Types

Data Fields

uint8_t access_credential_PuBK_last [64]


X-CUBE-ALIRO: access_mngr_data_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
access_mngr_data_t Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » WRAPPER UTILITY » TLWrapper_Utils_Exported_Types

Structure for access manager data. More...

#include <tlwrapper.h>

Detailed Description

Structure for access manager data.


X-CUBE-ALIRO: TLWrapper_Utils_Exported_Variables

Variables
TLWrapper_Utils_Exported_Variables
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » WRAPPER UTILITY
Collaboration diagram for TLWrapper_Utils_Exported_Variables:

Variables

access_mngr_data_t access_mngr_data
Global access manager data.

Detailed Description

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLWrapper_Utils_Exported_Functions

Functions
TLWrapper_Utils_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » WRAPPER UTILITY
Collaboration diagram for TLWrapper_Utils_Exported_Functions:

Functions

uint8_t | tlw_CheckEndpointKey (ACWG_SessionContext_t *ctx)
Checks the endpoint public key. More...
uint8_t * | tlw_GetLastEndpointKey (void)
Gets the last endpoint public key. More...
void | tlw_SetAccessElementString (uint8_t *AccElmStr)
Sets the access element string. More...
uint8_t * | tlw_GetAccessElementString (void)
Gets the access element string. More...

Detailed Description

Function Documentation

◆ tlw_CheckEndpointKey()

uint8_t tlw_CheckEndpointKey ( ACWG_SessionContext_t * ctx )

Checks the endpoint public key.

Parameters
endpointPub Pointer to context that contains endpoint public key.
Returns
Status code.

◆ tlw_GetAccessElementString()

uint8_t * tlw_GetAccessElementString ( void )

Gets the access element string.

Returns
Pointer to the access element string.

◆ tlw_GetLastEndpointKey()

uint8_t * tlw_GetLastEndpointKey ( void )

Gets the last endpoint public key.

Returns
Pointer to the last endpoint public key.

◆ tlw_SetAccessElementString()

void tlw_SetAccessElementString ( uint8_t * AccElmStr )

Sets the access element string.

Parameters
AccElmStr Pointer to the access element string.


X-CUBE-ALIRO: TLV UTILITIES

Modules
TLV UTILITIES
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER
Collaboration diagram for TLV UTILITIES:

Modules

TLV_Utilities_Exported_Types
TLV_Utilities_Exported_Functions

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLV_Utilities_Exported_Types

Data Structures | Enumerations
TLV_Utilities_Exported_Types
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » TLV UTILITIES
Collaboration diagram for TLV_Utilities_Exported_Types:

Data Structures

struct tlv_t
Structure representing a TLV (Tag-Length-Value) element. More...

Enumerations

enum tlvStatus_t {
TLV_SUCCESS , TLV_ERROR_SHORT_PAYLOAD , TLV_ERROR_INVALID_LENGTH , TLV_ERROR_SHORT_BUFFER ,
TLV_ERROR_TAG_NOT_FOUND
}
Status codes for TLV operations. More...

Detailed Description

Enumeration Type Documentation

◆ tlvStatus_t

enum tlvStatus_t

Status codes for TLV operations.

Enumerator
TLV_SUCCESS | Operation successful
TLV_ERROR_SHORT_PAYLOAD | Payload too short
TLV_ERROR_INVALID_LENGTH | Invalid length
TLV_ERROR_SHORT_BUFFER | Buffer too short
TLV_ERROR_TAG_NOT_FOUND | Tag not found


X-CUBE-ALIRO: tlv_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
tlv_t Struct Reference
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » TLV UTILITIES » TLV_Utilities_Exported_Types

Structure representing a TLV (Tag-Length-Value) element. More...

#include <tlv.h>

Data Fields

uint8_t | tag
uint8_t * | value
uint32_t | length

Detailed Description

Structure representing a TLV (Tag-Length-Value) element.

Field Documentation

◆ length

uint32_t length

Length of value data

◆ tag

uint8_t tag

Tag identifier

◆ value

uint8_t* value

Pointer to value data

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: TLV_Utilities_Exported_Functions

Functions
TLV_Utilities_Exported_Functions
ALIRO APPLICATION » NFC MANAGER » TRANSPORT LAYER WRAPPER » TLV UTILITIES
Collaboration diagram for TLV_Utilities_Exported_Functions:

Functions

tlvStatus_t | getOneTlv (uint8_t **tlvBuf, uint32_t *tlvLength, tlv_t *tlv)
Extracts one TLV element from a buffer. More...
tlvStatus_t | appendTLV (uint8_t **inputBuffer, uint32_t *inputBufferLen, const tlv_t *tlv)
Appends a TLV element to a buffer. More...

Detailed Description

Function Documentation

◆ appendTLV()

tlvStatus_t appendTLV | ( | uint8_t ** | inputBuffer,
 |  | uint32_t * | inputBufferLen,
 |  | const tlv_t * | tlv
 | ) |  |

Appends a TLV element to a buffer.

Parameters
inputBuffer | Pointer to the buffer pointer.
inputBufferLen | Pointer to the buffer length.
tlv | Pointer to the TLV structure to append.
Returns
Status code.

◆ getOneTlv()

tlvStatus_t getOneTlv | ( | uint8_t ** | tlvBuf,
 |  | uint32_t * | tlvLength,
 |  | tlv_t * | tlv
 | ) |  |

Extracts one TLV element from a buffer.

Parameters
tlvBuf | Pointer to the buffer pointer.
tlvLength | Pointer to the buffer length.
tlv | Pointer to the TLV structure to fill.
Returns
Status code.


X-CUBE-ALIRO: NFCBLE

Modules
NFCBLE
ALIRO APPLICATION
Collaboration diagram for NFCBLE:

Modules

Aliro_app_Exported_Types
Aliro_app_Exported_Variables
Aliro_app_Exported_Constants
Aliro_app_Exported_Macros
Aliro_app_Exported_Functions
App_build_info_Exported_Constants
App_build_info_Exported_Types
App_build_info_Exported_Variables
App_Version_Exported_Constants
Log_module_u5_Exported_Types
Log_module_u5_Exported_Macros

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_app_Exported_Types

Data Structures | Typedefs | Enumerations
Aliro_app_Exported_Types
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Aliro_app_Exported_Types:

Data Structures

struct | _statItem
struct | _alirosvc_param
struct | statItem_t
Structure for managing timestamps and statistics. More...
struct | alirosvc_param_t
Aliro service parameters. More...

Typedefs

typedef enum _verblevel | verblevel_t
typedef enum _timeStampsPos | timeStampsPos_t
typedef struct _statItem | statItem_t
typedef struct _alirosvc_param | alirosvc_param_t

Enumerations

enum _verblevel {
VERB_NULL =0 , VERB_ALWAYS =1 , VERB_CRITICAL =2 , VERB_ERROR =3 ,
VERB_NORMAL =4 , VERB_VERBOSE =5 , VERB_INFO =6
}
enum _timeStampsPos {
SELECT_APP_POS , END_SELECT_APP_POS , AUTH0_POS , END_AUTH0_POS ,
LOADCERT_POS , END_LOADCERT_POS , AUTH1_POS , END_AUTH1_POS ,
CONTROL_FLOW_POS , END_CONTROL_FLOW_POS , EXCHANGE_POS , END_EXCHANGE_POS ,
STEPUP_POS , END_STEPUP_POS , DOOR_IS_OPENED_POS , DOOR_IS_CLOSED_POS ,
DOOR_IS_DISARMED_POS , DON_T_KNOW_POS , DERIVE_PERSISTENT_KEYS_POS , END_DERIVE_PERSISTENT_KEYS_POS ,
ELAPSED_TIME_POS , NUM_TIMESTAMPS
}

Detailed Description

Enumeration Type Documentation

◆ _timeStampsPos

enum _timeStampsPos
Enumerator
SELECT_APP_POS | Application selection
END_SELECT_APP_POS | End of application selection
AUTH0_POS | Start authentication 0
END_AUTH0_POS | End authentication 0
LOADCERT_POS | Certificate loading
END_LOADCERT_POS | End certificate loading
AUTH1_POS | Start authentication 1
END_AUTH1_POS | End authentication 1
CONTROL_FLOW_POS | Control flow
END_CONTROL_FLOW_POS | End control flow
EXCHANGE_POS | Data exchange
END_EXCHANGE_POS | End data exchange
STEPUP_POS | Step-up
END_STEPUP_POS | End step-up
DOOR_IS_OPENED_POS | Door opened
DOOR_IS_CLOSED_POS | Door closed
DOOR_IS_DISARMED_POS | Door disarmed
DON_T_KNOW_POS | Unknown state
DERIVE_PERSISTENT_KEYS_POS | Derivation of persistent keys
END_DERIVE_PERSISTENT_KEYS_POS | End derivation of persistent keys
ELAPSED_TIME_POS | Elapsed time
NUM_TIMESTAMPS | Total number of timestamps (do not change)

◆ _verblevel

enum _verblevel
Enumerator
VERB_NULL | No output
VERB_ALWAYS | Always output
VERB_CRITICAL | Critical output
VERB_ERROR | Error output
VERB_NORMAL | Normal output
VERB_VERBOSE | Verbose output
VERB_INFO | Informational output
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: _statItem Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_statItem Struct Reference
ALIRO APPLICATION » NFCBLE » Aliro_app_Exported_Types

Data Fields

timeStampsPos_t | pos
char | title [10]
uint8_t | toPrint
uint32_t | ts

Field Documentation

◆ pos

timeStampsPos_t pos

Timestamp position

◆ title

char title[10]

Title

◆ toPrint

uint8_t toPrint

Print flag

◆ ts

uint32_t ts

Timestamp value

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: _alirosvc_param Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
_alirosvc_param Struct Reference
ALIRO APPLICATION » NFCBLE » Aliro_app_Exported_Types

Data Fields

uint8_t | proposedSPSM [2]
uint8_t | protVerSupportedLen
uint8_t | supportedProtocolVersion [4]
uint8_t | selectedProtocolVersion [2]
uint8_t | featuresSupportedLen
uint8_t | featuresSupported [1]

Field Documentation

◆ featuresSupported

uint8_t featuresSupported[1]

Supported features

◆ featuresSupportedLen

uint8_t featuresSupportedLen

Supported features length

◆ proposedSPSM

uint8_t proposedSPSM[2]

Proposed SPSM

◆ protVerSupportedLen

uint8_t protVerSupportedLen

Supported protocol version length

◆ selectedProtocolVersion

uint8_t selectedProtocolVersion[2]

Selected protocol version

◆ supportedProtocolVersion

uint8_t supportedProtocolVersion[4]

Supported protocol versions

Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: statItem_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
statItem_t Struct Reference
ALIRO APPLICATION » NFCBLE » Aliro_app_Exported_Types

Structure for managing timestamps and statistics. More...

#include <app_aliro.h>

Detailed Description

Structure for managing timestamps and statistics.


X-CUBE-ALIRO: alirosvc_param_t Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
alirosvc_param_t Struct Reference
ALIRO APPLICATION » NFCBLE » Aliro_app_Exported_Types

Aliro service parameters. More...

#include <app_aliro.h>

Detailed Description

Aliro service parameters.


X-CUBE-ALIRO: Aliro_app_Exported_Variables

Variables
Aliro_app_Exported_Variables
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Aliro_app_Exported_Variables:

Variables

uint32_t | xProtocolVersionSupported
Aliro protocol versions supported.
verblevel_t | nVerbosityLevel
Current verbosity level. More...
ACWG_SessionContext_t | context_nfc
NFC session context.
ACWG_SessionContext_t | context_ble
NFC session context.

Detailed Description

Variable Documentation

◆ nVerbosityLevel

verblevel_t nVerbosityLevel
extern

Current verbosity level.

Current verbosity level.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_app_Exported_Constants

Macros
Aliro_app_Exported_Constants
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Aliro_app_Exported_Constants:

Macros

#define | VERBOSITY_SET nVerbosityLevel
#define | ALIRO_MEASURE_PERFORMANCE 0
#define | ALIRO_CERTIFICATION_TEST 1
#define | BLE_RKE_ALIRO_FLOW_SUPPORTED 0x40
#define | BLE_UWB_ALIRO_FLOW_SUPPORTED 0x80
#define | BLE_ALIRO_FLOWS_SUPPORTED (BLE_UWB_ALIRO_FLOW_SUPPORTED | BLE_RKE_ALIRO_FLOW_SUPPORTED)
#define | ALIRO_RTC_SET_STATUS_IAR 0x00F4
#define | ALIRO_RTC_SET_STATUS_GOOD 0x34F4
#define | TIMEOUT_PREPARE_RANGING_DEFAULT 20000 /** Default timeout (ms) for prepare ranging operation. */
#define | TIMEOUT_EXECUTE_RANGING_DEFAULT 70000 /** Default timeout (ms) for execute ranging operation. */
#define | TIMEOUT_SUSPEND_RANGING_DEFAULT 10000 /** Default timeout (ms) for suspend ranging operation. */
#define | TIMEOUT_RESUME_RANGING_DEFAULT 20000 /** Default timeout (ms) for resume ranging operation. */
#define | TIMEOUT_DOOR_OPERATION_DEFAULT 20000 /** Default timeout (ms) for door operation. */
#define | CLEAR_SCREEN_COMMAND "\033[2J\r\n"
#define | TEXT_COLOR_1 "\033[0;32m"
#define | TEXT_COLOR_GREEN "\033[0;32m"
#define | TEXT_COLOR_2 "\033[0;33m"
#define | TEXT_COLOR_YELLOW "\033[0;33m"
#define | TEXT_COLOR_3 "\033[0;31m"
#define | TEXT_COLOR_RED "\033[0;31m"
#define | TEXT_COLOR_4 "\033[0;36m"
#define | TEXT_COLOR_CYAN "\033[0;36m"
#define | TEXT_COLOR_BLU "\033[0;34m"
#define | TEXT_COLOR_VIOLET "\033[0;35m"
#define | TEXT_COLOR_GRAY "\033[0;37m"
#define | TEXT_COLOR_NOIR "\033[0;30m"
#define | TEXT_COLOR_DEFAULT "\033[0;39m"
#define | TEXT_BACKGROUND_COLOR_BLACK "\033[40m"
#define | TEXT_BACKGROUND_COLOR_RED "\033[41m"
#define | TEXT_BACKGROUND_COLOR_GREEN "\033[42m"
#define | TEXT_BACKGROUND_COLOR_YELLOW "\033[43m"
#define | TEXT_BACKGROUND_COLOR_BLUE "\033[44m"
#define | TEXT_BACKGROUND_COLOR_PURPLE "\033[45m"
#define | TEXT_BACKGROUND_COLOR_CYAN "\033[46m"
#define | TEXT_BACKGROUND_COLOR_WHITE "\033[47m"
#define | TEXT_TEST_COLOR "\033[7;34m"
#define | TEXT_RESET "\033[0m"
#define | TEXT_BOLD "\033[1m"
#define | TEXT_UNDERSCORE "\033[4m"
#define | TEXT_BLINK "\033[5m"
#define | TEXT_REVERSE "\033[7m"
#define | TEXT_CONCEALED "\033[8m"
#define | TEXT_COLOR_ESCAPE_CHAR '\033'
#define | VERB_STATISTICS VERB_INFO
#define | VERB_STATISTICS_REPORT VERB_CRITICAL
#define | VERB_STATE_TITLE VERB_NORMAL
#define | VERB_FN_NAME VERB_VERBOSE
#define | VERB_TERMINAL VERB_NORMAL

Detailed Description

Macro Definition Documentation

◆ ALIRO_CERTIFICATION_TEST

#define ALIRO_CERTIFICATION_TEST 1

Enable certification test

◆ ALIRO_MEASURE_PERFORMANCE

#define ALIRO_MEASURE_PERFORMANCE 0

Enable performance measurement

◆ ALIRO_RTC_SET_STATUS_GOOD

#define ALIRO_RTC_SET_STATUS_GOOD 0x34F4

RTC good status

◆ ALIRO_RTC_SET_STATUS_IAR

#define ALIRO_RTC_SET_STATUS_IAR 0x00F4

RTC IAR status

◆ BLE_ALIRO_FLOWS_SUPPORTED

#define BLE_ALIRO_FLOWS_SUPPORTED (BLE_UWB_ALIRO_FLOW_SUPPORTED | BLE_RKE_ALIRO_FLOW_SUPPORTED)

Macro for supported Aliro flows

◆ BLE_RKE_ALIRO_FLOW_SUPPORTED

#define BLE_RKE_ALIRO_FLOW_SUPPORTED 0x40

Bit 6: BLE-only Aliro flow supported

◆ BLE_UWB_ALIRO_FLOW_SUPPORTED

#define BLE_UWB_ALIRO_FLOW_SUPPORTED 0x80

Bit 7: BLE + UWB Aliro flow supported

◆ VERBOSITY_SET

#define VERBOSITY_SET nVerbosityLevel

Macro to get the current verbosity level

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_app_Exported_Macros

Macros
Aliro_app_Exported_Macros
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Aliro_app_Exported_Macros:

Macros

#define | RESET_TIME_STAMP()
#define | PRINT_TIME_STAMP(pos)
#define | TIME_STAMP_REPORT()
#define | countof(_A_) (sizeof(_A_) / sizeof(*(_A_)))
#define | PLATFORM_LOG(VERBOSITY, ...) do{if((uint8_t)VERBOSITY <= (uint8_t)nVerbosityLevel)LOG_INFO_APP(__VA_ARGS__);}while(0)
#define | DELAY_CONDITIONAL(D) do{if( nVerbosityLevel > VERB_VERBOSE)HAL_Delay(D);}while(0)
#define | HIGH_BYTE(A) ((A&0xFF00)>>8)
#define | LOW_BYTE(A) (A&0x00FF)
#define | HEX(C) (((C>='0') && (C<='9'))?(C-'0'):((C>='A') && (C<='F'))?(C-'A'+0xA):(0))
#define | GET_IAR_YEAR_DEC(D) ((HEX(D[7])*1000 + HEX(D[8])*100 + HEX(D[9])*10 + HEX(D[10])*1) - 2000)
#define | GET_IAR_YEAR(D) (GET_IAR_YEAR_DEC(D)%10 + (GET_IAR_YEAR_DEC(D)/10)*16 - 0x30)
#define | GET_IAR_DATE(D) (HEX(D[4])*16 + HEX(D[5])*1)
#define | GET_IAR_HOURS(T) (HEX(T[0])*16 + HEX(T[1])*1)
#define | GET_IAR_MINUTES(T) (HEX(T[3])*16 + HEX(T[4])*1)
#define | GET_IAR_SECONDS(T) (HEX(T[6])*16 + HEX(T[7])*1)
#define | GET_IAR_MONTH(D)
#define | TRANSACTION_SUCCESS_OPEN() AliroPort_TRANSACTION_SUCCESS_OPEN()
#define | TRANSACTION_SUCCESS_CLOSE() AliroPort_TRANSACTION_SUCCESS_CLOSE()
#define | TRANSACTION_FAILURE() AliroPort_TRANSACTION_FAILURE()

Detailed Description

Macro Definition Documentation

◆ countof

#define countof ( _A_ ) (sizeof(_A_) / sizeof(*(_A_)))

Macro to count array elements

◆ GET_IAR_MONTH

#define GET_IAR_MONTH ( D )
Value:
(\
(D[0]==JAN[0] && D[1] == JAN[1] && D[2] == JAN[2])?0x1:\
(D[0]==FEB[0] && D[1] == FEB[1] && D[2] == FEB[2])?0x2:\
(D[0]==MAR[0] && D[1] == MAR[1] && D[2] == MAR[2])?0x3:\
(D[0]==APR[0] && D[1] == APR[1] && D[2] == APR[2])?0x4:\
(D[0]==MAY[0] && D[1] == MAY[1] && D[2] == MAY[2])?0x5:\
(D[0]==JUN[0] && D[1] == JUN[1] && D[2] == JUN[2])?0x6:\
(D[0]==JUL[0] && D[1] == JUL[1] && D[2] == JUL[2])?0x7:\
(D[0]==AUG[0] && D[1] == AUG[1] && D[2] == AUG[2])?0x8:\
(D[0]==SEP[0] && D[1] == SEP[1] && D[2] == SEP[2])?0x9:\
(D[0]==OCT[0] && D[1] == OCT[1] && D[2] == OCT[2])?0x10:\
(D[0]==NOV[0] && D[1] == NOV[1] && D[2] == NOV[2])?0x11:\
(D[0]==DEC[0] && D[1] == DEC[1] && D[2] == DEC[2])?0x12:\
1)
JAN
static const char JAN[]
Month name constants for RTC operations.
Definition: app_aliro.c:160
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Aliro_app_Exported_Functions

Functions
Aliro_app_Exported_Functions
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Aliro_app_Exported_Functions:

Functions

uint32_t | GetTimeStamp (void)
Returns the current timestamp. More...
uint32_t | PrintTimeStamp (char *pstr)
Prints the timestamp associated with a string. More...
void | GetTimeDate (struct tm *timeDate)
Gets the current date and time. More...
void | ShowTimeDate (void)
Shows current date and time. More...
void | ResetAllSavedTimeStamps (void)
Resets all saved timestamps.
statItem_t * | SearchPos (timeStampsPos_t pos)
Searches for the position of a timestamp. More...
void | SaveTimeStamp (timeStampsPos_t pos)
Saves the timestamp in a specific position. More...
void | PrintTimeStampReport (void)
Prints the timestamp report.
void | ResetTimeStamp (void)
Resets the current timestamp.
void | PrintBufferHex (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format. More...
void | PrintBufferHexAlways (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Always prints a buffer in hexadecimal format. More...
void | PrintErrorString (char *errstr, ACWG_Status_t retval)
Prints an error string. More...
uint16_t | UsartGetChar (uint8_t *buf)
Receives a character from USART. More...
uint16_t | UsartGetCharBlocking (uint8_t *buf)
Receives a character from USART in blocking mode. More...
bool | aliro_init ()
Initializes the Aliro module. More...
void | aliro_process ()
Executes the main Aliro process. More...
__weak void | AliroPort_TRANSACTION_SUCCESS_OPEN (void)
Hook for successful transaction - Door open. More...
__weak void | AliroPort_TRANSACTION_SUCCESS_CLOSE (void)
Hook for successful transaction - Door close. More...
__weak void | AliroPort_TRANSACTION_FAILURE (void)
Hook for transaction failure. More...
void | AliroPort_Delay (uint32_t Delay)
Delay porting for Aliro. More...
void | AliroPort_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
Writes the state of a GPIO pin. More...
HAL_StatusTypeDef | AliroPort_UART_Transmit (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Transmits data via UART. More...
HAL_StatusTypeDef | AliroPort_UART_Receive (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t *Size, uint32_t Timeout)
Receives data via UART. More...
void | Button1_isr (void)
Interrupt Service Routine for button 1. More...
void | board_reset ()
Board reset. More...
uint8_t | isValidSPSM (uint16_t selected)
Checks if the selected SPSM is valid. More...
uint16_t | get_dynamic_spsm (uint8_t old_spsm)
Gets dynamic SPSM. More...
void | fillAdvBuffer (uint8_t *advbuf, uint8_t *psize)
Fills the advertising buffer. More...
uint8_t | AliroSvcParamGetInitLen (uint8_t *pLen)
Gets the initial length of Aliro service parameters. More...
uint8_t | AliroSvcParamGetInitBuf (uint8_t **DataBuf)
Gets the initial buffer of Aliro service parameters. More...
uint8_t | AliroSvcVerifyProtVer (uint16_t selectedProtocolVersion_16)
Verifies the Aliro protocol version. More...
uint16_t | AliroGetSavedSelectedProtocolVersion ()
Gets the saved selected protocol version. More...
void | AliroBLE_Init_complete_cb ()
BLE Aliro initialization complete callback.
void | AliroBleDisconnection_complete_cb ()
BLE Aliro disconnection complete callback.
void | AliroBleCocDisconnection_complete_cb ()
BLE CoC Aliro disconnection complete callback.
void | AliroFilltechs2Find (uint16_t *techs2find)
Fills techs2find for Aliro. More...
void | Set_timeout_prepare_ranging (uint32_t timeout_ms)
Set the timeout for the prepare ranging operation. More...
void | Set_timeout_execute_ranging (uint32_t timeout_ms)
Set the timeout for the execute ranging operation. More...
void | Set_timeout_suspend_ranging (uint32_t timeout_ms)
Set the timeout for the suspend ranging operation. More...
void | Set_timeout_resume_ranging (uint32_t timeout_ms)
Set the timeout for the resume ranging operation. More...
void | Set_timeout_door_operation (uint32_t timeout_ms)
Set the timeout for the door operation. More...

Detailed Description

Function Documentation

◆ aliro_init()

bool aliro_init ( )

Initializes the Aliro module.

Returns
true if initialization is successful, false otherwise.

Initializes the Aliro module.

This function performs various initialization tasks for the Aliro application, including RTC setup, performance measurement configuration, GPIO pin settings, NFC context initialization, and logging of application and security library versions.

Returns
true if initialization is successful, false otherwise.

◆ aliro_process()

void aliro_process ( )

Executes the main Aliro process.

Executes the main Aliro process.

This function handles the main processing tasks for the Aliro application, including NFC, BLE, and UWB processing, as well as handling extra processes such as UART input.

◆ AliroFilltechs2Find()

void AliroFilltechs2Find ( uint16_t * techs2find )

Fills techs2find for Aliro.

Parameters
techs2find Pointer to techs2find.

Fills techs2find for Aliro.

This function sets the bits in the provided pointer to indicate which NFC technologies should be searched for during the discovery process. The selection of technologies is determined by compile-time feature flags.

Parameters
[out] techs2find Pointer to a variable where the discovered technologies bitmask will be stored.
Note
The actual technologies included depend on the enabled RFAL feature macros.

◆ AliroGetSavedSelectedProtocolVersion()

uint16_t AliroGetSavedSelectedProtocolVersion ( )

Gets the saved selected protocol version.

Returns
Selected version.

◆ AliroPort_Delay()

void AliroPort_Delay ( uint32_t Delay )

Delay porting for Aliro.

Parameters
Delay Delay time in ms.

Delay porting for Aliro.

Parameters
Delay Delay time in milliseconds.

◆ AliroPort_GPIO_WritePin()

void AliroPort_GPIO_WritePin | ( | GPIO_TypeDef * | GPIOx,
 |  | uint16_t | GPIO_Pin,
 |  | GPIO_PinState | PinState
 | ) |  |

Writes the state of a GPIO pin.

Parameters
GPIOx | Pointer to GPIO.
GPIO_Pin | Pin to write.
PinState | State to set.

Writes the state of a GPIO pin.

Parameters
GPIOx | GPIO port.
GPIO_Pin | GPIO pin number.
PinState | Pin state to set.

◆ AliroPort_TRANSACTION_FAILURE()

__weak void AliroPort_TRANSACTION_FAILURE ( void )

Hook for transaction failure.

Hook for transaction failure.

◆ AliroPort_TRANSACTION_SUCCESS_CLOSE()

__weak void AliroPort_TRANSACTION_SUCCESS_CLOSE ( void )

Hook for successful transaction - Door close.

Hook for successful transaction - Door close.

◆ AliroPort_TRANSACTION_SUCCESS_OPEN()

__weak void AliroPort_TRANSACTION_SUCCESS_OPEN ( void )

Hook for successful transaction - Door open.

Hook for successful transaction - Door open.

◆ AliroPort_UART_Receive()

HAL_StatusTypeDef AliroPort_UART_Receive | ( | UART_HandleTypeDef * | huart,
 |  | uint8_t * | pData,
 |  | uint16_t * | Size,
 |  | uint32_t | Timeout
 | ) |  |

Receives data via UART.

Parameters
huart | UART handle.
pData | Data buffer.
Size | Pointer to data size.
Timeout | Operation timeout.
Returns
HAL status.

Receives data via UART.

Parameters
huart | UART handle.
pData | Pointer to data buffer.
Size | Pointer to number of bytes received.
Timeout | Timeout value.
Returns
HAL status.

◆ AliroPort_UART_Transmit()

HAL_StatusTypeDef AliroPort_UART_Transmit | ( | UART_HandleTypeDef * | huart,
 |  | const uint8_t * | pData,
 |  | uint16_t | Size,
 |  | uint32_t | Timeout
 | ) |  |

Transmits data via UART.

Parameters
huart | UART handle.
pData | Data to transmit.
Size | Data size.
Timeout | Operation timeout.
Returns
HAL status.

Transmits data via UART.

Parameters
huart | UART handle.
pData | Pointer to data buffer.
Size | Number of bytes to transmit.
Timeout | Timeout value.
Returns
HAL status.

◆ AliroSvcParamGetInitBuf()

uint8_t AliroSvcParamGetInitBuf ( uint8_t ** DataBuf )

Gets the initial buffer of Aliro service parameters.

Parameters
DataBuf Pointer to data buffer.
Returns
Buffer length.

◆ AliroSvcParamGetInitLen()

uint8_t AliroSvcParamGetInitLen ( uint8_t * pLen )

Gets the initial length of Aliro service parameters.

Parameters
pLen Pointer to length.
Returns
Length.

◆ AliroSvcVerifyProtVer()

uint8_t AliroSvcVerifyProtVer ( uint16_t selectedProtocolVersion_16 )

Verifies the Aliro protocol version.

Parameters
selectedProtocolVersion_16 Selected version.
Returns
1 if valid, 0 otherwise.

◆ board_reset()

void board_reset ( )

Board reset.

Board reset.

This function introduces a delay of 2000 milliseconds (2 seconds) before triggering a system reset using HAL_NVIC_SystemReset().

◆ Button1_isr()

void Button1_isr ( void )

Interrupt Service Routine for button 1.

Interrupt Service Routine for button 1.

◆ fillAdvBuffer()

void fillAdvBuffer | ( | uint8_t * | advbuf,
 |  | uint8_t * | psize
 | ) |  |

Fills the advertising buffer.

Parameters
advbuf | Advertising buffer.
psize | Pointer to size.

◆ get_dynamic_spsm()

uint16_t get_dynamic_spsm ( uint8_t old_spsm )

Gets dynamic SPSM.

Parameters
old_spsm Previous SPSM.
Returns
Dynamic SPSM.

◆ GetTimeDate()

void GetTimeDate ( struct tm * timeDate )

Gets the current date and time.

Parameters
timeDate Pointer to struct tm to store the date and time.

Gets the current date and time.

Parameters
timeDate Pointer to struct tm to store the time and date.

◆ GetTimeStamp()

uint32_t GetTimeStamp ( void )

Returns the current timestamp.

Returns
Timestamp value.

◆ isValidSPSM()

uint8_t isValidSPSM ( uint16_t selected )

Checks if the selected SPSM is valid.

Parameters
selected Selected SPSM.
Returns
1 if valid, 0 otherwise.

◆ PrintBufferHex()

void PrintBufferHex | ( | const char * | pstr,
 |  | const uint8_t * | pBuf,
 |  | const uint32_t | nSize
 | ) |  |

Prints a buffer in hexadecimal format.

Parameters
pstr | Descriptive string.
pBuf | Buffer to print.
nSize | Buffer size.

Prints a buffer in hexadecimal format.

Parameters
pstr | Description string to print before the buffer.
pBuf | Pointer to the buffer to print.
nSize | Size of the buffer.

◆ PrintBufferHexAlways()

void PrintBufferHexAlways | ( | const char * | pstr,
 |  | const uint8_t * | pBuf,
 |  | const uint32_t | nSize
 | ) |  |

Always prints a buffer in hexadecimal format.

Parameters
pstr | Descriptive string.
pBuf | Buffer to print.
nSize | Buffer size.

Always prints a buffer in hexadecimal format.

Parameters
pstr | Description string to print before the buffer.
pBuf | Pointer to the buffer to print.
nSize | Size of the buffer.

◆ PrintErrorString()

void PrintErrorString | ( | char * | errstr,
 |  | ACWG_Status_t | retval
 | ) |  |

Prints an error string.

Parameters
errstr | Error string.
retval | Return code.

Prints an error string.

Parameters
errstr | Error string to print.
retval | ACWG status code.

◆ PrintTimeStamp()

uint32_t PrintTimeStamp ( char * pstr )

Prints the timestamp associated with a string.

Parameters
pstr Descriptive string.
Returns
Printed timestamp value.

◆ SaveTimeStamp()

void SaveTimeStamp ( timeStampsPos_t pos )

Saves the timestamp in a specific position.

Parameters
pos Timestamp position.

◆ SearchPos()

statItem_t * SearchPos ( timeStampsPos_t pos )

Searches for the position of a timestamp.

Parameters
pos Position to search.
Returns
Pointer to the found statItem_t structure.

◆ Set_timeout_door_operation()

void Set_timeout_door_operation ( uint32_t timeout_ms )

Set the timeout for the door operation.

Parameters
timeout_ms Timeout value in milliseconds.

◆ Set_timeout_execute_ranging()

void Set_timeout_execute_ranging ( uint32_t timeout_ms )

Set the timeout for the execute ranging operation.

Parameters
timeout_ms Timeout value in milliseconds.

◆ Set_timeout_prepare_ranging()

void Set_timeout_prepare_ranging ( uint32_t timeout_ms )

Set the timeout for the prepare ranging operation.

Parameters
timeout_ms Timeout value in milliseconds.

◆ Set_timeout_resume_ranging()

void Set_timeout_resume_ranging ( uint32_t timeout_ms )

Set the timeout for the resume ranging operation.

Parameters
timeout_ms Timeout value in milliseconds.

◆ Set_timeout_suspend_ranging()

void Set_timeout_suspend_ranging ( uint32_t timeout_ms )

Set the timeout for the suspend ranging operation.

Parameters
timeout_ms Timeout value in milliseconds.

◆ ShowTimeDate()

void ShowTimeDate ( void )

Shows current date and time.

Shows current date and time.

◆ UsartGetChar()

uint16_t UsartGetChar ( uint8_t * buf )

Receives a character from USART.

Parameters
buf Buffer to store the character.
Returns
Number of received characters.

Receives a character from USART.

This function attempts to receive a character from the USART interface without blocking. If no character is available, it returns immediately.

Parameters
[out] buf Pointer to the buffer where the received character will be stored.
Returns
Number of characters received (0 if none or on error).

◆ UsartGetCharBlocking()

uint16_t UsartGetCharBlocking ( uint8_t * buf )

Receives a character from USART in blocking mode.

Parameters
buf Buffer to store the character.
Returns
Number of received characters.

Receives a character from USART in blocking mode.

This function attempts to receive a character from the USART interface, blocking until a character is received or a timeout occurs.

Parameters
[out] buf Pointer to the buffer where the received character will be stored.
Returns
Number of characters received (0 if none or on error).
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: App_build_info_Exported_Constants

Macros
App_build_info_Exported_Constants
ALIRO APPLICATION » NFCBLE
Collaboration diagram for App_build_info_Exported_Constants:

Macros

#define ABI_VERSION 1
Current version of app_build_info.

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: App_build_info_Exported_Types

Data Structures | Typedefs
App_build_info_Exported_Types
ALIRO APPLICATION » NFCBLE
Collaboration diagram for App_build_info_Exported_Types:

Data Structures

struct app_build_info_s
Various info about the firmware build. More...

Typedefs

typedef struct app_build_info_s app_build_info_t
Various info about the firmware build. More...

Detailed Description

Typedef Documentation

◆ app_build_info_t

typedef struct app_build_info_s app_build_info_t

Various info about the firmware build.

The build info are put at a specific address in flash (e.g. 0x0200), so that we can easily recover it with an external application which would read the flash.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: app_build_info_s Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Fields
app_build_info_s Struct Reference
ALIRO APPLICATION » NFCBLE » App_build_info_Exported_Types

Various info about the firmware build. More...

#include <app_build_info.h>

Data Fields

uint8_t | magic_cookie [4]
A magic cookie that external application could easily read: 'B', 'F', 'W', 'I'.
uint8_t | build_info_version
Version of this structure, e.g. MBI_VERSION.
uint8_t | app_major
Major version number of the firmware.
uint8_t | app_minor
Minor version number of the firmware.
uint8_t | app_subminor
Subminor version number of the firmware.
char | date [12]
Build date, e.g. "Jan 1 1970".
char | time [12]
Build time, e.g. "01:00:00".
uint8_t | aliro_spec_major
Major version number of the Aliro spec.
uint8_t | aliro_spec_minor
Minor version number of the Aliro spec.
uint8_t | aliro_spec_subminor
Subminor version number of the Aliro spec.
uint8_t | acwg_ver_major
uint8_t | acwg_ver_minor
uint8_t | acwg_ver_subminor
char | fw_description [MBI_FW_DESCRIPTION_LEN]
Name of the firmware.

Detailed Description

Various info about the firmware build.

The build info are put at a specific address in flash (e.g. 0x0200), so that we can easily recover it with an external application which would read the flash.


X-CUBE-ALIRO: App_build_info_Exported_Variables

Variables
App_build_info_Exported_Variables
ALIRO APPLICATION » NFCBLE
Collaboration diagram for App_build_info_Exported_Variables:

Variables

const app_build_info_t app_build_info
Global build information for the Aliro application. More...

Detailed Description

Variable Documentation

◆ app_build_info

const app_build_info_t app_build_info
extern

Global build information for the Aliro application.

This structure contains metadata about the firmware build, including version numbers, build date/time, specification versions, and a description string.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: App_Version_Exported_Constants

Macros
App_Version_Exported_Constants
ALIRO APPLICATION » NFCBLE
Collaboration diagram for App_Version_Exported_Constants:

Macros

#define | APP_VERSION_MAJ 0
#define | APP_VERSION_MIN 9
#define | APP_VERSION_SUBMIN 3
#define | ALIRO_SPEC_VERSION_MAJ 0
#define | ALIRO_SPEC_VERSION_MIN 9
#define | ALIRO_SPEC_VERSION_SUBMIN 5
#define | APP_ACWG_VERSION_MAJ 0
#define | APP_ACWG_VERSION_MIN 3
#define | APP_ACWG_VERSION_SUBMIN 4

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Log_module_u5_Exported_Types

Typedefs
Log_module_u5_Exported_Types
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Log_module_u5_Exported_Types:

Typedefs

typedef uint8_t | Log_Verbose_Level_t
typedef uint8_t | Log_Region_t
typedef uint8_t | Log_Verbose_Level_t
typedef uint8_t | Log_Region_t

Detailed Description

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Log_module_u5_Exported_Macros

Macros
Log_module_u5_Exported_Macros
ALIRO APPLICATION » NFCBLE
Collaboration diagram for Log_module_u5_Exported_Macros:

Macros

#define | LOG_INFO_APP(...) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)
Macro for logging information messages in the application. More...
#define | LOG_INFO_APP(...) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)
Macro for logging information messages in the application. More...

Detailed Description

Macro Definition Documentation

◆ LOG_INFO_APP [1/2]

#define LOG_INFO_APP ( ... ) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)

Macro for logging information messages in the application.

Parameters
... Arguments to be printed using DBG_PRINTF.

◆ LOG_INFO_APP [2/2]

#define LOG_INFO_APP ( ... ) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)

Macro for logging information messages in the application.

Parameters
... Arguments to be printed using DBG_PRINTF.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Data Structures

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Structures
Here are the data structures with brief descriptions:
C _access_mngr_data |
C _alirosvc_param |
C _statItem |
C _tlwrapper_SM_ble |
C _tlwrapper_SM_nfc |
C access_mngr_data_t | Structure for access manager data
C ACWG_build_info_s | Various info about the firmware build
C ACWG_Keyslot | Structure for keyslot storage
C ACWG_PersistentKeys | Structure for persistent keys storage
C ACWG_SessionContext | Session context for ACWG Security operations
C ACWG_SessionContextInit | Initialization parameters for an ACWG session context
C ACWG_UWB_Context | UWB (Ultra-Wideband) context for ACWG session
C alirosvc_param_t | Aliro service parameters
C app_build_info_s | Various info about the firmware build
C attribute_st | Typedef for the attribute
C AttributeOID_st | Structure used to keep Name Attribute OIDs
C cert_public_key_t | Typedef for the structure keeping the Ellipitc Curve Public Key
C devices_s |
C devices_t | Structure representing a provisioned device
C ECDSAsign_st | Typedef for the structure keeping the ECDSA Signature
C EllipticCurveOID_st | Structure used to keep named Elliptic Curve OIDs
C extension_st | Typedef for the extension
C ExtensionOID_st | Structure used to keep Name Attribute OIDs
C internal_certificate | Internal structure used to keep the values parsed from the x509
C provstruct_s |
C provstruct_t | Structure representing the provisioning data
C SignatureAlgorithmOID_st | Structure used to keep SignatureAlgorithm OIDs
C statItem_t | Structure for managing timestamps and statistics
C tlv_t | Structure representing a TLV (Tag-Length-Value) element
C tlw_SM_ble_t | Structure for BLE state machine context in TLWrapper
C tlw_SM_nfc_t | Structure for NFC state machine context in TLWrapper
C validity_st | Typedef for the structure keeping the validity


X-CUBE-ALIRO: Data Structure Index

  • Data Structures
  • Data Structure Index
  • Data Fields
Data Structure Index
A | C | D | E | I | P | S | T | V | _
A
access_mngr_data_t
ACWG_build_info_s
ACWG_Keyslot
ACWG_PersistentKeys
ACWG_SessionContext
ACWG_SessionContextInit
ACWG_UWB_Context
alirosvc_param_t
app_build_info_s
attribute_st
AttributeOID_st
C
cert_public_key_t
D
devices_s
devices_t
E
ECDSAsign_st
EllipticCurveOID_st
extension_st
ExtensionOID_st
I
internal_certificate
P
provstruct_s
provstruct_t
S
SignatureAlgorithmOID_st
statItem_t
T
tlv_t
tlw_SM_ble_t
tlw_SM_nfc_t
V
validity_st
_
_access_mngr_data
_alirosvc_param
_statItem
_tlwrapper_SM_ble
_tlwrapper_SM_nfc
Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Data Fields

  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • x
  • y
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:

- a -

  • aliro_spec_major : ACWG_build_info_s, app_build_info_s
  • aliro_spec_minor : ACWG_build_info_s, app_build_info_s
  • aliro_spec_subminor : ACWG_build_info_s, app_build_info_s
  • app_major : app_build_info_s
  • app_minor : app_build_info_s
  • app_subminor : app_build_info_s
  • authData : ACWG_SessionContext
  • authPolicy : ACWG_SessionContextInit

- b -

  • b1VendorSpecificExtension : provstruct_s
  • b1VendorSpecificExtensionLen : provstruct_s
  • bleDeviceCounter : ACWG_SessionContext
  • bleReaderCounter : ACWG_SessionContext
  • bleSK : ACWG_SessionContext
  • bleSKDevice : ACWG_SessionContext
  • bleSKReader : ACWG_SessionContext
  • build_info_version : ACWG_build_info_s, app_build_info_s

- c -

  • certificate_data : provstruct_s
  • certificate_len : provstruct_s
  • Channel_Bitmask : ACWG_UWB_Context
  • cmdParams : ACWG_SessionContextInit
  • critical : extension_st
  • cryptogramSK : ACWG_SessionContext

- d -

  • date : ACWG_build_info_s, app_build_info_s
  • days : validity_st
  • devices : provstruct_s

- e -

  • EllipticCurve : internal_certificate
  • endpoint_Keyslot : devices_s
  • endpoint_PrivK : devices_s
  • endpoint_PubK : devices_s
  • endpointEPub : ACWG_SessionContext
  • endpointExt : ACWG_SessionContext
  • endpointExtSize : ACWG_SessionContext
  • endpointPropTLV : ACWG_SessionContext
  • endpointPropTLVSize : ACWG_SessionContext
  • endpointPub : ACWG_SessionContext
  • endpointPubK : ACWG_PersistentKeys
  • expDeviceCounter : ACWG_SessionContext
  • expReaderCounter : ACWG_SessionContext
  • expSKDevice : ACWG_SessionContext
  • expSKReader : ACWG_SessionContext
  • expTransProtVer : ACWG_SessionContextInit
  • extAKIkeyIdentifier : internal_certificate
  • extAKIkeyIdentifierSize : internal_certificate
  • extensions : internal_certificate
  • extensionsFlags : internal_certificate
  • extensionsSize : internal_certificate

- f -

  • featuresSupported : _alirosvc_param
  • featuresSupportedLen : _alirosvc_param
  • fsize : cert_public_key_t
  • fw_description : ACWG_build_info_s, app_build_info_s

- g -

  • group_resolving_key : provstruct_s

- h -

  • HOP_Mode_Key : ACWG_UWB_Context
  • Hopping_Configuration_Bitmask : ACWG_UWB_Context
  • hours : validity_st

- i -

  • info : ACWG_SessionContext
  • init : ACWG_SessionContext
  • interface : ACWG_SessionContextInit
  • issuer : internal_certificate
  • issuerSize : internal_certificate
  • isValid : provstruct_s
  • isValidReserved : provstruct_s

- k -

  • kdh : ACWG_SessionContext
  • kPersistent : ACWG_PersistentKeys, ACWG_SessionContext

- l -

  • len : AttributeOID_st, EllipticCurveOID_st, ExtensionOID_st, SignatureAlgorithmOID_st
  • length : tlv_t
  • lockActionRequest : ACWG_SessionContext
  • lockStatus : ACWG_SessionContextInit

- m -

  • MAC_Mode : ACWG_UWB_Context
  • magic_cookie : ACWG_build_info_s, app_build_info_s
  • minutes : validity_st
  • month : validity_st

- n -

  • name : devices_s
  • NotVerifyKey : ACWG_SessionContextInit
  • Number_Chaps_per_Slot : ACWG_UWB_Context
  • Number_Responders_Nodes : ACWG_UWB_Context
  • Number_Slots_per_Round : ACWG_UWB_Context
  • numDevices : provstruct_s

- o -

  • oid : AttributeOID_st, EllipticCurveOID_st, ExtensionOID_st, SignatureAlgorithmOID_st

- p -

  • pos : _statItem
  • pPubKey_point_representation_id : internal_certificate
  • pR : ECDSAsign_st
  • proposedSPSM : _alirosvc_param
  • protVerSupportedLen : _alirosvc_param
  • pS : ECDSAsign_st
  • PubKey : internal_certificate
  • publicKey : ACWG_Keyslot
  • Pulse_Shape_Combo : ACWG_UWB_Context
  • pX : cert_public_key_t
  • pY : cert_public_key_t

- r -

  • RAN_Multiplier : ACWG_UWB_Context
  • readerEPub : ACWG_SessionContext
  • readerExt : ACWG_SessionContextInit
  • readerExtSize : ACWG_SessionContextInit
  • readerID : ACWG_SessionContextInit, provstruct_s
  • readerIssuerPubK : provstruct_s
  • readerPubK : provstruct_s
  • RESERVED0 : ACWG_SessionContextInit
  • RESERVED1 : ACWG_SessionContextInit
  • RESERVED2 : ACWG_SessionContextInit
  • RESERVED3 : ACWG_SessionContextInit
  • reservedPairingKeys : provstruct_s
  • rSize : ECDSAsign_st

- s -

  • salt : ACWG_SessionContext
  • seconds : validity_st
  • selectedProtocolVersion : _alirosvc_param
  • serialNumber : internal_certificate
  • serialNumberSize : internal_certificate
  • Sign : internal_certificate
  • signalingBitmap : ACWG_SessionContext
  • signature : internal_certificate
  • SignatureAlgorithm : internal_certificate
  • slot : ACWG_Keyslot
  • Slot_Bitmask : ACWG_UWB_Context
  • sSize : ECDSAsign_st
  • stateBeforeStepUp : ACWG_SessionContext
  • staticPrivateKey : provstruct_s
  • Status : ACWG_UWB_Context
  • stepUpDeviceCounter : ACWG_SessionContext
  • stepUpReaderCounter : ACWG_SessionContext
  • stepUpSK : ACWG_SessionContext
  • stepUpSKDevice : ACWG_SessionContext
  • stepUpSKReader : ACWG_SessionContext
  • str : attribute_st
  • strFormat : attribute_st
  • strSize : attribute_st
  • struct_size : provstruct_s
  • STS_Index0 : ACWG_UWB_Context
  • subject : internal_certificate
  • subjectSize : internal_certificate
  • supportedProtocolVersion : _alirosvc_param
  • SYNC_Code_Index : ACWG_UWB_Context
  • SYNC_Code_Index_Bitmask : ACWG_UWB_Context

- t -

  • tag : tlv_t
  • tbs : internal_certificate
  • tbsSize : internal_certificate
  • time : ACWG_build_info_s, app_build_info_s
  • title : _statItem
  • toPrint : _statItem
  • transId : ACWG_SessionContext
  • transState : ACWG_SessionContext
  • ts : _statItem
  • type : attribute_st, AttributeOID_st, EllipticCurveOID_st, extension_st, ExtensionOID_st, SignatureAlgorithmOID_st

- u -

  • uRSK : ACWG_SessionContext
  • useExchange : ACWG_SessionContextInit
  • useKeyslot : ACWG_SessionContextInit
  • useLoadCert : ACWG_SessionContextInit
  • useStepUp : ACWG_SessionContextInit
  • UWB_Configuration_Identifier : ACWG_UWB_Context
  • uwb_ctx : ACWG_SessionContext
  • UWB_Session_Identifier : ACWG_UWB_Context
  • UWB_Time0 : ACWG_UWB_Context

- v -

  • validity : internal_certificate
  • validitySize : internal_certificate
  • value : extension_st, tlv_t
  • valueSize : extension_st
  • Vendor_Specific1 : ACWG_UWB_Context
  • Vendor_Specific1_len : ACWG_UWB_Context
  • Vendor_Specific2 : ACWG_UWB_Context
  • Vendor_Specific2_len : ACWG_UWB_Context
  • Vendor_Specific3 : ACWG_UWB_Context
  • Vendor_Specific3_len : ACWG_UWB_Context
  • Vendor_Specific4 : ACWG_UWB_Context
  • Vendor_Specific4_len : ACWG_UWB_Context
  • ver_major : ACWG_build_info_s
  • ver_minor : ACWG_build_info_s
  • ver_subminor : ACWG_build_info_s

- x -

  • x509Version : internal_certificate

- y -

  • year : validity_st


X-CUBE-ALIRO: Data Fields - Variables

  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • x
  • y

- a -

  • aliro_spec_major : ACWG_build_info_s, app_build_info_s
  • aliro_spec_minor : ACWG_build_info_s, app_build_info_s
  • aliro_spec_subminor : ACWG_build_info_s, app_build_info_s
  • app_major : app_build_info_s
  • app_minor : app_build_info_s
  • app_subminor : app_build_info_s
  • authData : ACWG_SessionContext
  • authPolicy : ACWG_SessionContextInit

- b -

  • b1VendorSpecificExtension : provstruct_s
  • b1VendorSpecificExtensionLen : provstruct_s
  • bleDeviceCounter : ACWG_SessionContext
  • bleReaderCounter : ACWG_SessionContext
  • bleSK : ACWG_SessionContext
  • bleSKDevice : ACWG_SessionContext
  • bleSKReader : ACWG_SessionContext
  • build_info_version : ACWG_build_info_s, app_build_info_s

- c -

  • certificate_data : provstruct_s
  • certificate_len : provstruct_s
  • Channel_Bitmask : ACWG_UWB_Context
  • cmdParams : ACWG_SessionContextInit
  • critical : extension_st
  • cryptogramSK : ACWG_SessionContext

- d -

  • date : ACWG_build_info_s, app_build_info_s
  • days : validity_st
  • devices : provstruct_s

- e -

  • EllipticCurve : internal_certificate
  • endpoint_Keyslot : devices_s
  • endpoint_PrivK : devices_s
  • endpoint_PubK : devices_s
  • endpointEPub : ACWG_SessionContext
  • endpointExt : ACWG_SessionContext
  • endpointExtSize : ACWG_SessionContext
  • endpointPropTLV : ACWG_SessionContext
  • endpointPropTLVSize : ACWG_SessionContext
  • endpointPub : ACWG_SessionContext
  • endpointPubK : ACWG_PersistentKeys
  • expDeviceCounter : ACWG_SessionContext
  • expReaderCounter : ACWG_SessionContext
  • expSKDevice : ACWG_SessionContext
  • expSKReader : ACWG_SessionContext
  • expTransProtVer : ACWG_SessionContextInit
  • extAKIkeyIdentifier : internal_certificate
  • extAKIkeyIdentifierSize : internal_certificate
  • extensions : internal_certificate
  • extensionsFlags : internal_certificate
  • extensionsSize : internal_certificate

- f -

  • featuresSupported : _alirosvc_param
  • featuresSupportedLen : _alirosvc_param
  • fsize : cert_public_key_t
  • fw_description : ACWG_build_info_s, app_build_info_s

- g -

  • group_resolving_key : provstruct_s

- h -

  • HOP_Mode_Key : ACWG_UWB_Context
  • Hopping_Configuration_Bitmask : ACWG_UWB_Context
  • hours : validity_st

- i -

  • info : ACWG_SessionContext
  • init : ACWG_SessionContext
  • interface : ACWG_SessionContextInit
  • issuer : internal_certificate
  • issuerSize : internal_certificate
  • isValid : provstruct_s
  • isValidReserved : provstruct_s

- k -

  • kdh : ACWG_SessionContext
  • kPersistent : ACWG_PersistentKeys, ACWG_SessionContext

- l -

  • len : AttributeOID_st, EllipticCurveOID_st, ExtensionOID_st, SignatureAlgorithmOID_st
  • length : tlv_t
  • lockActionRequest : ACWG_SessionContext
  • lockStatus : ACWG_SessionContextInit

- m -

  • MAC_Mode : ACWG_UWB_Context
  • magic_cookie : ACWG_build_info_s, app_build_info_s
  • minutes : validity_st
  • month : validity_st

- n -

  • name : devices_s
  • NotVerifyKey : ACWG_SessionContextInit
  • Number_Chaps_per_Slot : ACWG_UWB_Context
  • Number_Responders_Nodes : ACWG_UWB_Context
  • Number_Slots_per_Round : ACWG_UWB_Context
  • numDevices : provstruct_s

- o -

  • oid : AttributeOID_st, EllipticCurveOID_st, ExtensionOID_st, SignatureAlgorithmOID_st

- p -

  • pos : _statItem
  • pPubKey_point_representation_id : internal_certificate
  • pR : ECDSAsign_st
  • proposedSPSM : _alirosvc_param
  • protVerSupportedLen : _alirosvc_param
  • pS : ECDSAsign_st
  • PubKey : internal_certificate
  • publicKey : ACWG_Keyslot
  • Pulse_Shape_Combo : ACWG_UWB_Context
  • pX : cert_public_key_t
  • pY : cert_public_key_t

- r -

  • RAN_Multiplier : ACWG_UWB_Context
  • readerEPub : ACWG_SessionContext
  • readerExt : ACWG_SessionContextInit
  • readerExtSize : ACWG_SessionContextInit
  • readerID : ACWG_SessionContextInit, provstruct_s
  • readerIssuerPubK : provstruct_s
  • readerPubK : provstruct_s
  • RESERVED0 : ACWG_SessionContextInit
  • RESERVED1 : ACWG_SessionContextInit
  • RESERVED2 : ACWG_SessionContextInit
  • RESERVED3 : ACWG_SessionContextInit
  • reservedPairingKeys : provstruct_s
  • rSize : ECDSAsign_st

- s -

  • salt : ACWG_SessionContext
  • seconds : validity_st
  • selectedProtocolVersion : _alirosvc_param
  • serialNumber : internal_certificate
  • serialNumberSize : internal_certificate
  • Sign : internal_certificate
  • signalingBitmap : ACWG_SessionContext
  • signature : internal_certificate
  • SignatureAlgorithm : internal_certificate
  • slot : ACWG_Keyslot
  • Slot_Bitmask : ACWG_UWB_Context
  • sSize : ECDSAsign_st
  • stateBeforeStepUp : ACWG_SessionContext
  • staticPrivateKey : provstruct_s
  • Status : ACWG_UWB_Context
  • stepUpDeviceCounter : ACWG_SessionContext
  • stepUpReaderCounter : ACWG_SessionContext
  • stepUpSK : ACWG_SessionContext
  • stepUpSKDevice : ACWG_SessionContext
  • stepUpSKReader : ACWG_SessionContext
  • str : attribute_st
  • strFormat : attribute_st
  • strSize : attribute_st
  • struct_size : provstruct_s
  • STS_Index0 : ACWG_UWB_Context
  • subject : internal_certificate
  • subjectSize : internal_certificate
  • supportedProtocolVersion : _alirosvc_param
  • SYNC_Code_Index : ACWG_UWB_Context
  • SYNC_Code_Index_Bitmask : ACWG_UWB_Context

- t -

  • tag : tlv_t
  • tbs : internal_certificate
  • tbsSize : internal_certificate
  • time : ACWG_build_info_s, app_build_info_s
  • title : _statItem
  • toPrint : _statItem
  • transId : ACWG_SessionContext
  • transState : ACWG_SessionContext
  • ts : _statItem
  • type : attribute_st, AttributeOID_st, EllipticCurveOID_st, extension_st, ExtensionOID_st, SignatureAlgorithmOID_st

- u -

  • uRSK : ACWG_SessionContext
  • useExchange : ACWG_SessionContextInit
  • useKeyslot : ACWG_SessionContextInit
  • useLoadCert : ACWG_SessionContextInit
  • useStepUp : ACWG_SessionContextInit
  • UWB_Configuration_Identifier : ACWG_UWB_Context
  • uwb_ctx : ACWG_SessionContext
  • UWB_Session_Identifier : ACWG_UWB_Context
  • UWB_Time0 : ACWG_UWB_Context

- v -

  • validity : internal_certificate
  • validitySize : internal_certificate
  • value : extension_st, tlv_t
  • valueSize : extension_st
  • Vendor_Specific1 : ACWG_UWB_Context
  • Vendor_Specific1_len : ACWG_UWB_Context
  • Vendor_Specific2 : ACWG_UWB_Context
  • Vendor_Specific2_len : ACWG_UWB_Context
  • Vendor_Specific3 : ACWG_UWB_Context
  • Vendor_Specific3_len : ACWG_UWB_Context
  • Vendor_Specific4 : ACWG_UWB_Context
  • Vendor_Specific4_len : ACWG_UWB_Context
  • ver_major : ACWG_build_info_s
  • ver_minor : ACWG_build_info_s
  • ver_subminor : ACWG_build_info_s

- x -

  • x509Version : internal_certificate

- y -

  • year : validity_st


X-CUBE-ALIRO: File List

  • File List
  • Globals
File List
Here is a list of all documented files with brief descriptions:
[detail level 12345]
▼ Middlewares |
▼ ST |
▼ ACWG_Security |
▼ inc |
ACWG_build_info.h | : Header for ACWG build information. This file contains public declarations for library build info
ACWG_Security.h | : Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security module
ACWG_version.h | : Header for ACWG_version.c file. This file defines version for the ACWG Security Middleware
▼ Projects |
▼ Common |
▼ Aliro |
▼ Inc |
app_aliro.h | : Header for app_aliro.c file. This file contains the public declarations for the Aliro demo
app_build_info.h | : Header for app_build_info.c file. This file contains the firmware build information structure
app_nfc.h | : Header for app_nfc.c file. This file contains the public NFC API and common NFC definitions for the Aliro application
app_version.h | : Header for app_version.c file. This file defines application and specification version macros used by the Aliro firmware
certificate.h | X509 certificate Parser
certificate_crypto.h | Crypto functionalities for x509 verification
certificate_subparsing.h | Helper for the x509 certificate Parser
custom_uwb.h | : Header for custom_uwb.c file. This file contains the public declarations for the custom UWB functions
flash_mng.h | : Header for flash_mng.c file. This file declares the Flash management API used by the Aliro application (erase/write helpers)
log_module_u3.h |
log_module_u5.h | : Header for log_module_u5.c file. Provides logging macros and prototypes for the U5 platform
provisioning.h | : Header for provisioning module. This file contains the common defines and structures for provisioning
provisioning_info.h | : Provisioning information and configuration defines for the application
sm_crypto.h | : Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations
sm_crypto_mcu.h | : Header for sm_crypto_mcu.c file. This file provides the interface for SM cryptographic operations on MCU platforms
sm_crypto_stsafe.h | : Header for sm_crypto_stsafe.c file. This file provides the interface for SM cryptographic operations using STSAFE
stepup_mgr.h | : Header for stepup_mgr.c file. This file declares the interface for the step-up manager functionality
tlv.h | : Header for TLV (Tag-Length-Value) utilities. This file contains type definitions and function prototypes for TLV operations
tlwrapper.h | : Header for tlwrapper.c file. This file contains the type definitions and function prototypes for the tlwrapper module
User_provisioning.h |
▼ Src |
app_aliro.c | : Aliro application main logic and command processing
app_nfc.c | : Aliro NFC application main logic
flash_mng.c | : Flash management functions
provisioning.c | : Provisioning management functions
sm_crypto_mcu.c | : MCU cryptographic functions using hardware accelerators
_doxygen_X-CUBE-ALIRO-MainPage.h | This file contains definitions needed only for Doxygen documents


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares Directory Reference

  • File List
  • Globals
  • Middlewares
Middlewares Directory Reference
Directory dependency graph for Middlewares:


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST Directory Reference

  • File List
  • Globals
  • Middlewares
  • ST
ST Directory Reference
Directory dependency graph for ST:


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security Directory Reference

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
ACWG_Security Directory Reference
Directory dependency graph for ACWG_Security:

Directories

directory inc


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc Directory Reference

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
inc Directory Reference
Directory dependency graph for inc:

Files

file | ACWG_build_info.h [code]
: Header for ACWG build information. This file contains public declarations for library build info.
file | ACWG_Security.h [code]
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security module.
file | ACWG_version.h [code]
: Header for ACWG_version.c file. This file defines version for the ACWG Security Middleware.


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_build_info.h File Reference

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
Data Structures | Macros | Typedefs
ACWG_build_info.h File Reference

: Header for ACWG build information. This file contains public declarations for library build info. More...

#include <stdint.h>
Include dependency graph for ACWG_build_info.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct ACWG_build_info_s
Various info about the firmware build. More...

Macros

#define | ACWG_BI_FW_DESCRIPTION_LEN 24
#define | ACWG_BI_VERSION 1
Length of the firmware description string in the build info structure.
#define | ACWG_ALIRO_SPEC_VERSION_MAJ 0
Version of the ACWG build info structure.
#define | ACWG_ALIRO_SPEC_VERSION_MIN 9
Major version number of the Aliro specification.
#define | ACWG_ALIRO_SPEC_VERSION_SUBMIN 5
Minor version number of the Aliro specification.

Typedefs

typedef struct ACWG_build_info_s ACWG_build_info_t
Various info about the firmware build. More...

Detailed Description

: Header for ACWG build information. This file contains public declarations for library build info.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_Security.h File Reference

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
Data Structures | Macros | Typedefs | Enumerations | Functions
ACWG_Security.h File Reference

: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security module. More...

#include <stdint.h>
#include <sm_crypto.h>
#include "acwg_build_info.h"
#include "acwg_version.h"
Include dependency graph for ACWG_Security.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | ACWG_SessionContextInit
Initialization parameters for an ACWG session context. More...
struct | ACWG_UWB_Context
UWB (Ultra-Wideband) context for ACWG session. More...
struct | ACWG_SessionContext
Session context for ACWG Security operations. More...
struct | ACWG_PersistentKeys
Structure for persistent keys storage. More...
struct | ACWG_Keyslot
Structure for keyslot storage. More...

Macros

#define | AUTH_EXP_TRANS_PROT_VERSION ((uint16_t)0x0100)
#define | AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES ((uint32_t)64)
Maximum length in bytes for endpoint property TLV.
#define | AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES ((uint32_t)8)
Maximum length in bytes for private mailbox data subset. More...
#define | AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
Length in bytes of a public key.
#define | AUTH_TRANS_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a transaction ID.
#define | AUTH_READER_GROUP_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a reader group ID.
#define | AUTH_READER_GROUP_SUB_ID_LEN_BYTES ((uint32_t)16)
Length in bytes of a reader group sub ID.
#define | AUTH_KEYSLOT_LEN_BYTES ((uint32_t)8)
Length in bytes of a keyslot.
#define | AUTH_CRYPTOGRAM_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of a cryptogram session key.
#define | AUTH_CRYPTOGRAM_LEN_BYTES ((uint32_t)64)
Length in bytes of a cryptogram.
#define | AUTH_MAX_PAYLOAD_LEN_BYTES ((uint32_t)256)
Maximum payload length in bytes.
#define | AUTH_PERSISTENT_KEY_LEN_BYTES ((uint32_t)32)
Length in bytes of a persistent key.
#define | AUTH_EXCH_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of an exchange session key.
#define | AUTH_STEPUP_SK_LEN_BYTES ((uint32_t)32)
Length in bytes of a step-up session key.
#define | AUTH_BLESK_LEN_BYTES ((uint32_t)32)
Length in bytes of a BLE session key.
#define | AUTH_URSK_LEN_BYTES ((uint32_t)32)
Length in bytes of a uRSK key.
#define | AUTH_READER_EXT_MAX_LEN_BYTES ((uint32_t)128)
Maximum length in bytes for reader extension.
#define | AUTH_ENDPOINT_EXT_MAX_LEN_BYTES ((uint32_t)128)
Maximum length in bytes for endpoint extension.
#define | AUTH_MAX_PERSISTENT_KEYS_STORED ((uint32_t)2)
Maximum number of persistent keys stored.
#define | AUTH_MAX_KEYSLOTS_STORED ((uint32_t)2)
Maximum number of keyslots stored.
#define | AUTH_CRED_SIG_TIME_LEN_BYTES ((uint32_t)20)
Length in bytes of credential signature time.
#define | AUTH_REVOC_SIG_TIME_LEN_BYTES ((uint32_t)20)
Length in bytes of revocation signature time.
#define | AUTH_SIGNALING_BITMAP_LEN_BYTES ((uint32_t)2)
Length in bytes of signaling bitmap.
#define | AUTH_SALT_TYPE_BYTES_LEN ((uint32_t)12)
Length in bytes of salt type.
#define | AUTH_SALT_MAX_LEN_BYTES
Maximum length in bytes for salt. More...
#define | AUTH_INFO_LEN_BYTES ((uint32_t)AUTH_PUBKEY_LEN_BYTES)
Length in bytes of info.
#define | AUTH1_CMD_PARAM ((uint8_t)1)
Command parameter for AUTH1 (endpoint public key expected in auth1 response).
#define | AUTH1_AUTH_DATA_LEN_BYTES
Length in bytes of AUTH1 authentication data. More...
#define | CMD_PARAMS_EXP_FAST_MASK ((uint8_t)0x1)
Mask for expected fast command parameters.
#define | KDH_LEN_BYTES ((uint32_t)32)
Length in bytes of KDH.
#define | UWB_CONFIGURATION_IDENTIFIER_ID ((uint8_t) 0)
UWB configuration identifier attribute ID.
#define | PULSE_SHAPE_COMBO_ID ((uint8_t) 1)
Pulse shape combo attribute ID.
#define | UWB_SESSION_IDENTIFIER_ID ((uint8_t) 2)
UWB session identifier attribute ID.
#define | CHANNEL_BITMASK_ID ((uint8_t) 3)
Channel bitmask attribute ID.
#define | RAN_MULTIPLIER_ID ((uint8_t) 4)
RAN multiplier attribute ID.
#define | SLOT_BITMASK_ID ((uint8_t) 5)
Slot bitmask attribute ID.
#define | SYNC_CODE_INDEX_BITMASK_ID ((uint8_t) 6)
Sync code index bitmask attribute ID.
#define | SYNC_CODE_INDEX_ID ((uint8_t) 7)
Sync code index attribute ID.
#define | HOPPING_CONFIGURATION_BITMASK_ID ((uint8_t) 8)
Hopping configuration bitmask attribute ID.
#define | NUMBER_CHAPS_PER_SLOT_ID ((uint8_t) 9)
Number of chaps per slot attribute ID.
#define | NUMBER_RESPONDERS_NODES_ID ((uint8_t) 10)
Number of responder nodes attribute ID.
#define | NUMBER_SLOTS_PER_ROUND_ID ((uint8_t) 11)
Number of slots per round attribute ID.
#define | STS_INDEX0_ID ((uint8_t) 12)
STS index0 attribute ID.
#define | UWB_TIME0_ID ((uint8_t) 13)
UWB time0 attribute ID.
#define | HOP_MODE_KEY_ID ((uint8_t) 14)
Hop mode key attribute ID.
#define | MAC_MODE_ID ((uint8_t) 15)
MAC mode attribute ID.
#define | VENDOR_SPECIFIC_ID ((uint8_t) 16)
Vendor specific attribute ID.
#define | STATUS_ID ((uint8_t) 17)
Status attribute ID.
#define | UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES ((uint8_t)2)
Length in bytes of UWB configuration identifier (2 x m).
#define | UWB_SESSION_IDENTIFIER_LEN_BYTES ((uint8_t)4)
Length in bytes of UWB session identifier.
#define | SYNC_CODE_INDEX_BITMASK_LEN_BYTES ((uint8_t)4)
Length in bytes of sync code index bitmask.
#define | STS_INDEX0_LEN_BYTES ((uint8_t)4)
Length in bytes of STS index0.
#define | UWB_TIME0_LEN_BYTES ((uint8_t)8)
Length in bytes of UWB time0.
#define | HOP_MODE_KEY_LEN_BYTES ((uint8_t)4)
Length in bytes of hop mode key.
#define | VENDOR_SPECIFIC_LEN_BYTES1 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 1 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES2 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 2 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES3 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 3 (3 + Attribute Value Len).
#define | VENDOR_SPECIFIC_LEN_BYTES4 ((uint8_t)3 + 5)
Length in bytes of vendor specific field 4 (3 + Attribute Value Len).

Typedefs

typedef enum ACWG_Status | ACWG_Status_t
Status codes for ACWG Security operations.
typedef enum transactionState | transactionState_t
Transaction state machine for ACWG Security.
typedef struct ACWG_SessionContextInit | ACWG_SessionContextInit_t
Initialization parameters for an ACWG session context.
typedef struct ACWG_UWB_Context | ACWG_UWB_Context_t
UWB (Ultra-Wideband) context for ACWG session.
typedef struct ACWG_SessionContext | ACWG_SessionContext_t
Session context for ACWG Security operations.
typedef struct ACWG_PersistentKeys | persistentKeys_t
Structure for persistent keys storage.
typedef struct ACWG_Keyslot | keyslot_t
Structure for keyslot storage.

Enumerations

enum ACWG_Status {
ACWG_OK = 0x764E8BAC , ACWG_Error_Generic = 0x0abedead , ACWG_Error_FastTransFailed , ACWG_Error_Parsing ,
ACWG_Error_ShortBuf , ACWG_Error_Crypto_KeyGen , ACWG_Error_Crypto_TransIDGen , ACWG_Error_Crypto_ECDH ,
ACWG_Error_Crypto_Derivation , ACWG_Error_Crypto_EncryptDecrypt , ACWG_Error_Crypto_Hash , ACWG_Error_Crypto_SigGen ,
ACWG_Error_Crypto_SigVerif , ACWG_Error_HW , ACWG_Error_WrongState , ACWG_Error_KeyslotNotFound ,
ACWG_Error_Parsing_NoKeyslot , ACWG_Error_Parsing_NoPublicKey
}
Status codes for ACWG Security operations. More...
enum transactionState {
invalid = 0 , selectDone , auth0StdDone , auth0FastDone ,
auth1Done , inStepUp , failed
}
Transaction state machine for ACWG Security. More...

Functions

const ACWG_build_info_t * | ACWG_SecurityGetVersion (void)
ACWG_Status_t | ACWG_initSessionContext (ACWG_SessionContext_t *context)
Initializes the ACWG session context. More...
ACWG_Status_t | ACWG_selectDone (ACWG_SessionContext_t *context)
Processes the SELECT command completion. More...
ACWG_Status_t | ACWG_prepareEphemeralKeypairAndTransactionId (ACWG_SessionContext_t *context)
Prepares an ephemeral keypair and generates a transaction ID for the session. More...
ACWG_Status_t | ACWG_generateAUTH0CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH0 command payload. More...
ACWG_Status_t | ACWG_processAUTH0ResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH0 response payload. More...
ACWG_Status_t | ACWG_generateLOADCERTCommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the LOADCERT command payload. More...
ACWG_Status_t | ACWG_generateAUTH1CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH1 command payload. More...
ACWG_Status_t | ACWG_computeKDHandVolatileKeys (ACWG_SessionContext_t *context)
Computes the KDH and volatile keys for the session. More...
ACWG_Status_t | ACWG_derivePersistentKeys (ACWG_SessionContext_t *context)
Derives persistent keys for the session. More...
ACWG_Status_t | ACWG_processAUTH1ResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH1 response payload. More...
ACWG_Status_t | ACWG_generateExchangeCommandPayload (ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Exchange command payload. More...
ACWG_Status_t | ACWG_processExchangeResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Processes the Exchange response payload. More...
ACWG_Status_t | ACWG_initBLEEncryptedSession (ACWG_SessionContext_t *context, uint8_t *versions, uint32_t versionsSize)
Initializes a BLE encrypted session. More...
ACWG_Status_t | ACWG_encryptBle (ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Encrypts data for BLE communication. More...
ACWG_Status_t | ACWG_decryptBle (ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Decrypts data received over BLE communication. More...
ACWG_Status_t | ACWG_generateEnvelopeCommandPayload (ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Envelope command payload. More...
ACWG_Status_t | ACWG_getGetResponsePayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Gets the response payload for a GET command. More...
ACWG_Status_t | ACWG_enterStepUp (ACWG_SessionContext_t *context)
Enters the step-up phase in the session context. More...
ACWG_Status_t | ACWG_exitStepUp (ACWG_SessionContext_t *context)
Exits the step-up phase in the session context. More...
ACWG_Status_t | ACWG_generateM1CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M1 command payload. More...
ACWG_Status_t | ACWG_processM2Payload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M2 payload. More...
ACWG_Status_t | ACWG_generateM3CommandPayload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M3 command payload. More...
ACWG_Status_t | ACWG_processM4Payload (ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M4 payload. More...
void | PrintBufferHex (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format if enabled. More...

Detailed Description

: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security module.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_version.h File Reference

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
Macros
ACWG_version.h File Reference

: Header for ACWG_version.c file. This file defines version for the ACWG Security Middleware. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define | ACWG_VERSION_MAJ 0
Major version number of the ACWG Security Middleware.
#define | ACWG_VERSION_MIN 3
Minor version number of the ACWG Security Middleware.
#define | ACWG_VERSION_SUBMIN 4
Sub-minor version number of the ACWG Security Middleware.

Detailed Description

: Header for ACWG_version.c file. This file defines version for the ACWG Security Middleware.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects Directory Reference

  • File List
  • Globals
  • Projects
Projects Directory Reference
Directory dependency graph for Projects:


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common Directory Reference

  • File List
  • Globals
  • Projects
  • Common
Common Directory Reference
Directory dependency graph for Common:


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro Directory Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
Aliro Directory Reference
Directory dependency graph for Aliro:

Directories

directory | Inc
directory | Src


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc Directory Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Inc Directory Reference
Directory dependency graph for Inc:

Files

file | app_aliro.h [code]
: Header for app_aliro.c file. This file contains the public declarations for the Aliro demo.
file | app_build_info.h [code]
: Header for app_build_info.c file. This file contains the firmware build information structure.
file | app_nfc.h [code]
: Header for app_nfc.c file. This file contains the public NFC API and common NFC definitions for the Aliro application.
file | app_version.h [code]
: Header for app_version.c file. This file defines application and specification version macros used by the Aliro firmware.
file | certificate.h [code]
x509 certificate Parser
file | certificate_crypto.h [code]
Crypto functionalities for x509 verification.
file | certificate_subparsing.h [code]
Helper for the x509 certificate Parser.
file | custom_uwb.h [code]
: Header for custom_uwb.c file. This file contains the public declarations for the custom UWB functions.
file | flash_mng.h [code]
: Header for flash_mng.c file. This file declares the Flash management API used by the Aliro application (erase/write helpers).
file | log_module_u3.h [code]
file | log_module_u5.h [code]
: Header for log_module_u5.c file. Provides logging macros and prototypes for the U5 platform.
file | provisioning.h [code]
: Header for provisioning module. This file contains the common defines and structures for provisioning.
file | provisioning_info.h [code]
: Provisioning information and configuration defines for the application.
file | sm_crypto.h [code]
: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations.
file | sm_crypto_mcu.h [code]
: Header for sm_crypto_mcu.c file. This file provides the interface for SM cryptographic operations on MCU platforms.
file | sm_crypto_stsafe.h [code]
: Header for sm_crypto_stsafe.c file. This file provides the interface for SM cryptographic operations using STSAFE.
file | stepup_mgr.h [code]
: Header for stepup_mgr.c file. This file declares the interface for the step-up manager functionality.
file | tlv.h [code]
: Header for TLV (Tag-Length-Value) utilities. This file contains type definitions and function prototypes for TLV operations.
file | tlwrapper.h [code]
: Header for tlwrapper.c file. This file contains the type definitions and function prototypes for the tlwrapper module.
file | User_provisioning.h [code]


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_aliro.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
app_aliro.h File Reference

: Header for app_aliro.c file. This file contains the public declarations for the Aliro demo. More...

#include <stdint.h>
#include <stdbool.h>
#include <time.h>
#include "st_errno.h"
#include "ACWG_Security.h"
#include "provisioning.h"
Include dependency graph for app_aliro.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | _statItem
struct | _alirosvc_param

Macros

#define | VERBOSITY_SET nVerbosityLevel
#define | ALIRO_MEASURE_PERFORMANCE 0
#define | ALIRO_CERTIFICATION_TEST 1
#define | BLE_RKE_ALIRO_FLOW_SUPPORTED 0x40
#define | BLE_UWB_ALIRO_FLOW_SUPPORTED 0x80
#define | BLE_ALIRO_FLOWS_SUPPORTED (BLE_UWB_ALIRO_FLOW_SUPPORTED | BLE_RKE_ALIRO_FLOW_SUPPORTED)
#define | ALIRO_RTC_SET_STATUS_IAR 0x00F4
#define | ALIRO_RTC_SET_STATUS_GOOD 0x34F4
#define | TIMEOUT_PREPARE_RANGING_DEFAULT 20000 /** Default timeout (ms) for prepare ranging operation. */
#define | TIMEOUT_EXECUTE_RANGING_DEFAULT 70000 /** Default timeout (ms) for execute ranging operation. */
#define | TIMEOUT_SUSPEND_RANGING_DEFAULT 10000 /** Default timeout (ms) for suspend ranging operation. */
#define | TIMEOUT_RESUME_RANGING_DEFAULT 20000 /** Default timeout (ms) for resume ranging operation. */
#define | TIMEOUT_DOOR_OPERATION_DEFAULT 20000 /** Default timeout (ms) for door operation. */
#define | CLEAR_SCREEN_COMMAND "\033[2J\r\n"
#define | TEXT_COLOR_1 "\033[0;32m"
#define | TEXT_COLOR_GREEN "\033[0;32m"
#define | TEXT_COLOR_2 "\033[0;33m"
#define | TEXT_COLOR_YELLOW "\033[0;33m"
#define | TEXT_COLOR_3 "\033[0;31m"
#define | TEXT_COLOR_RED "\033[0;31m"
#define | TEXT_COLOR_4 "\033[0;36m"
#define | TEXT_COLOR_CYAN "\033[0;36m"
#define | TEXT_COLOR_BLU "\033[0;34m"
#define | TEXT_COLOR_VIOLET "\033[0;35m"
#define | TEXT_COLOR_GRAY "\033[0;37m"
#define | TEXT_COLOR_NOIR "\033[0;30m"
#define | TEXT_COLOR_DEFAULT "\033[0;39m"
#define | TEXT_BACKGROUND_COLOR_BLACK "\033[40m"
#define | TEXT_BACKGROUND_COLOR_RED "\033[41m"
#define | TEXT_BACKGROUND_COLOR_GREEN "\033[42m"
#define | TEXT_BACKGROUND_COLOR_YELLOW "\033[43m"
#define | TEXT_BACKGROUND_COLOR_BLUE "\033[44m"
#define | TEXT_BACKGROUND_COLOR_PURPLE "\033[45m"
#define | TEXT_BACKGROUND_COLOR_CYAN "\033[46m"
#define | TEXT_BACKGROUND_COLOR_WHITE "\033[47m"
#define | TEXT_TEST_COLOR "\033[7;34m"
#define | TEXT_RESET "\033[0m"
#define | TEXT_BOLD "\033[1m"
#define | TEXT_UNDERSCORE "\033[4m"
#define | TEXT_BLINK "\033[5m"
#define | TEXT_REVERSE "\033[7m"
#define | TEXT_CONCEALED "\033[8m"
#define | TEXT_COLOR_ESCAPE_CHAR '\033'
#define | VERB_STATISTICS VERB_INFO
#define | VERB_STATISTICS_REPORT VERB_CRITICAL
#define | VERB_STATE_TITLE VERB_NORMAL
#define | VERB_FN_NAME VERB_VERBOSE
#define | VERB_TERMINAL VERB_NORMAL
#define | RESET_TIME_STAMP()
#define | PRINT_TIME_STAMP(pos)
#define | TIME_STAMP_REPORT()
#define | countof(_A_) (sizeof(_A_) / sizeof(*(_A_)))
#define | PLATFORM_LOG(VERBOSITY, ...) do{if((uint8_t)VERBOSITY <= (uint8_t)nVerbosityLevel)LOG_INFO_APP(__VA_ARGS__);}while(0)
#define | DELAY_CONDITIONAL(D) do{if( nVerbosityLevel > VERB_VERBOSE)HAL_Delay(D);}while(0)
#define | HIGH_BYTE(A) ((A&0xFF00)>>8)
#define | LOW_BYTE(A) (A&0x00FF)
#define | HEX(C) (((C>='0') && (C<='9'))?(C-'0'):((C>='A') && (C<='F'))?(C-'A'+0xA):(0))
#define | GET_IAR_YEAR_DEC(D) ((HEX(D[7])*1000 + HEX(D[8])*100 + HEX(D[9])*10 + HEX(D[10])*1) - 2000)
#define | GET_IAR_YEAR(D) (GET_IAR_YEAR_DEC(D)%10 + (GET_IAR_YEAR_DEC(D)/10)*16 - 0x30)
#define | GET_IAR_DATE(D) (HEX(D[4])*16 + HEX(D[5])*1)
#define | GET_IAR_HOURS(T) (HEX(T[0])*16 + HEX(T[1])*1)
#define | GET_IAR_MINUTES(T) (HEX(T[3])*16 + HEX(T[4])*1)
#define | GET_IAR_SECONDS(T) (HEX(T[6])*16 + HEX(T[7])*1)
#define | GET_IAR_MONTH(D)
#define | TRANSACTION_SUCCESS_OPEN() AliroPort_TRANSACTION_SUCCESS_OPEN()
#define | TRANSACTION_SUCCESS_CLOSE() AliroPort_TRANSACTION_SUCCESS_CLOSE()
#define | TRANSACTION_FAILURE() AliroPort_TRANSACTION_FAILURE()

Typedefs

typedef enum _verblevel | verblevel_t
typedef enum _timeStampsPos | timeStampsPos_t
typedef struct _statItem | statItem_t
typedef struct _alirosvc_param | alirosvc_param_t

Enumerations

enum _verblevel {
VERB_NULL =0 , VERB_ALWAYS =1 , VERB_CRITICAL =2 , VERB_ERROR =3 ,
VERB_NORMAL =4 , VERB_VERBOSE =5 , VERB_INFO =6
}
enum _timeStampsPos {
SELECT_APP_POS , END_SELECT_APP_POS , AUTH0_POS , END_AUTH0_POS ,
LOADCERT_POS , END_LOADCERT_POS , AUTH1_POS , END_AUTH1_POS ,
CONTROL_FLOW_POS , END_CONTROL_FLOW_POS , EXCHANGE_POS , END_EXCHANGE_POS ,
STEPUP_POS , END_STEPUP_POS , DOOR_IS_OPENED_POS , DOOR_IS_CLOSED_POS ,
DOOR_IS_DISARMED_POS , DON_T_KNOW_POS , DERIVE_PERSISTENT_KEYS_POS , END_DERIVE_PERSISTENT_KEYS_POS ,
ELAPSED_TIME_POS , NUM_TIMESTAMPS
}

Functions

uint32_t | GetTimeStamp (void)
Returns the current timestamp. More...
uint32_t | PrintTimeStamp (char *pstr)
Prints the timestamp associated with a string. More...
void | GetTimeDate (struct tm *timeDate)
Gets the current date and time. More...
void | ShowTimeDate (void)
Shows current date and time. More...
void | ResetAllSavedTimeStamps (void)
Resets all saved timestamps.
statItem_t * | SearchPos (timeStampsPos_t pos)
Searches for the position of a timestamp. More...
void | SaveTimeStamp (timeStampsPos_t pos)
Saves the timestamp in a specific position. More...
void | PrintTimeStampReport (void)
Prints the timestamp report.
void | ResetTimeStamp (void)
Resets the current timestamp.
void | PrintBufferHex (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format. More...
void | PrintBufferHexAlways (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Always prints a buffer in hexadecimal format. More...
void | PrintErrorString (char *errstr, ACWG_Status_t retval)
Prints an error string. More...
uint16_t | UsartGetChar (uint8_t *buf)
Receives a character from USART. More...
uint16_t | UsartGetCharBlocking (uint8_t *buf)
Receives a character from USART in blocking mode. More...
bool | aliro_init ()
Initializes the Aliro module. More...
void | aliro_process ()
Executes the main Aliro process. More...
__weak void | AliroPort_TRANSACTION_SUCCESS_OPEN (void)
Hook for successful transaction - Door open. More...
__weak void | AliroPort_TRANSACTION_SUCCESS_CLOSE (void)
Hook for successful transaction - Door close. More...
__weak void | AliroPort_TRANSACTION_FAILURE (void)
Hook for transaction failure. More...
void | AliroPort_Delay (uint32_t Delay)
Delay porting for Aliro. More...
void | AliroPort_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
Writes the state of a GPIO pin. More...
HAL_StatusTypeDef | AliroPort_UART_Transmit (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Transmits data via UART. More...
HAL_StatusTypeDef | AliroPort_UART_Receive (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t *Size, uint32_t Timeout)
Receives data via UART. More...
void | Button1_isr (void)
Interrupt Service Routine for button 1. More...
void | board_reset ()
Board reset. More...
uint8_t | isValidSPSM (uint16_t selected)
Checks if the selected SPSM is valid. More...
uint16_t | get_dynamic_spsm (uint8_t old_spsm)
Gets dynamic SPSM. More...
void | fillAdvBuffer (uint8_t *advbuf, uint8_t *psize)
Fills the advertising buffer. More...
uint8_t | AliroSvcParamGetInitLen (uint8_t *pLen)
Gets the initial length of Aliro service parameters. More...
uint8_t | AliroSvcParamGetInitBuf (uint8_t **DataBuf)
Gets the initial buffer of Aliro service parameters. More...
uint8_t | AliroSvcVerifyProtVer (uint16_t selectedProtocolVersion_16)
Verifies the Aliro protocol version. More...
uint16_t | AliroGetSavedSelectedProtocolVersion ()
Gets the saved selected protocol version. More...
void | AliroBLE_Init_complete_cb ()
BLE Aliro initialization complete callback.
void | AliroBleDisconnection_complete_cb ()
BLE Aliro disconnection complete callback.
void | AliroBleCocDisconnection_complete_cb ()
BLE CoC Aliro disconnection complete callback.
void | AliroFilltechs2Find (uint16_t *techs2find)
Fills techs2find for Aliro. More...
void | Set_timeout_prepare_ranging (uint32_t timeout_ms)
Set the timeout for the prepare ranging operation. More...
void | Set_timeout_execute_ranging (uint32_t timeout_ms)
Set the timeout for the execute ranging operation. More...
void | Set_timeout_suspend_ranging (uint32_t timeout_ms)
Set the timeout for the suspend ranging operation. More...
void | Set_timeout_resume_ranging (uint32_t timeout_ms)
Set the timeout for the resume ranging operation. More...
void | Set_timeout_door_operation (uint32_t timeout_ms)
Set the timeout for the door operation. More...

Variables

uint32_t | xProtocolVersionSupported
Aliro protocol versions supported.
verblevel_t | nVerbosityLevel
Current verbosity level. More...
ACWG_SessionContext_t | context_nfc
NFC session context.
ACWG_SessionContext_t | context_ble
NFC session context.

Detailed Description

: Header for app_aliro.c file. This file contains the public declarations for the Aliro demo.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_build_info.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Macros | Typedefs | Variables
app_build_info.h File Reference

: Header for app_build_info.c file. This file contains the firmware build information structure. More...

#include <stdint.h>
Include dependency graph for app_build_info.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct app_build_info_s
Various info about the firmware build. More...

Macros

#define | ABI_VERSION 1
Current version of app_build_info.
#define | MBI_FW_DESCRIPTION_LEN 24

Typedefs

typedef struct app_build_info_s app_build_info_t
Various info about the firmware build. More...

Variables

const app_build_info_t app_build_info
Global build information for the Aliro application. More...

Detailed Description

: Header for app_build_info.c file. This file contains the firmware build information structure.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_nfc.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Functions
app_nfc.h File Reference

: Header for app_nfc.c file. This file contains the public NFC API and common NFC definitions for the Aliro application. More...

#include <stdint.h>
#include <stdbool.h>
#include "st_errno.h"
#include "ACWG_Security.h"
Include dependency graph for app_nfc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool | AliroNfcIni (ACWG_SessionContext_t *context)
Initializes the NFC module for Aliro. More...
void | AliroNfcCycle (ACWG_SessionContext_t *context)
Executes the main NFC cycle for Aliro. More...
void | AliroNfcStop (void)
Stops the NFC module for Aliro. More...
uint16_t | AliroNfcGetDiscoverTechs2Find (void)
Gets the technologies to find during NFC discovery. More...
uint16_t | AliroNfcGetDiscoverTotalDuration (void)
Gets the total duration for NFC discovery. More...
void | AliroNfcHwInit (void)
Initializes the NFC hardware for Aliro. More...

Detailed Description

: Header for app_nfc.c file. This file contains the public NFC API and common NFC definitions for the Aliro application.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_version.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Macros
app_version.h File Reference

: Header for app_version.c file. This file defines application and specification version macros used by the Aliro firmware. More...

#include "provisioning_info.h"
Include dependency graph for app_version.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define | APP_VERSION_MAJ 0
#define | APP_VERSION_MIN 9
#define | APP_VERSION_SUBMIN 3
#define | ALIRO_SPEC_VERSION_MAJ 0
#define | ALIRO_SPEC_VERSION_MIN 9
#define | ALIRO_SPEC_VERSION_SUBMIN 5
#define | APP_ACWG_VERSION_MAJ 0
#define | APP_ACWG_VERSION_MIN 3
#define | APP_ACWG_VERSION_SUBMIN 4

Detailed Description

: Header for app_version.c file. This file defines application and specification version macros used by the Aliro firmware.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Typedefs | Enumerations | Functions
certificate.h File Reference

x509 certificate Parser More...

#include <stdint.h>
Include dependency graph for certificate.h:

Go to the source code of this file.

Data Structures

struct | validity_st
typedef for the structure keeping the validity More...
struct | cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key More...
struct | ECDSAsign_st
typedef for the structure keeping the ECDSA Signature More...
struct | internal_certificate
internal structure used to keep the values parsed from the x509 More...

Typedefs

typedef struct validity_st | cert_validity_t
typedef for the structure keeping the validity
typedef struct cert_public_key_t | cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key
typedef struct ECDSAsign_st | cert_signature_t
typedef for the structure keeping the ECDSA Signature
typedef struct internal_certificate | certificate_t
typedef for the certificate_t

Enumerations

enum certificate_status_t {
CERT_OK = 0x00 , CERT_INVALID_PARAMETER = 0x01 , CERT_UNEXPECTED_SEQUENCE , CERT_UNEXPECTED_BITSTRING ,
CERT_INVALID_SIGNATURE , CERT_INVALID_CERTIFICATE , CERT_CA_NOT_MATCHING , CERT_UNSUPPORTED_FEATURE ,
CERT_BAD_SIZE
}
response codes enumeration More...
enum certificate_signature_algorithms_t {
CERT_SIG_ECDSA_SHA1 = 0 , CERT_SIG_ECDSA_SHA224 , CERT_SIG_ECDSA_SHA256 , CERT_SIG_ECDSA_SHA384 ,
CERT_SIG_ECDSA_SHA512
}
Definitions of available signature algorithms. More...
enum certificate_elliptic_curves_t {
CERT_EC_P256 = 0 , CERT_EC_P384 , CERT_EC_P521 , CERT_EC_bp256r1 ,
CERT_EC_bp256t1 , CERT_EC_bp384r1 , CERT_EC_bp384t1 , CERT_EC_bp512r1 ,
CERT_EC_bp512t1
}
Definitions of supported Elliptic Curve Names. More...

Functions

void | certificate_init (certificate_t *cert)
Initialize a certificate (certificate_t) to an empty one. More...
certificate_status_t | certificate_parse (const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse an x509 certificate. More...
certificate_status_t | certificate_find_tbs_and_signature (const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse the top of x509 certificate to find the tbs and the signature. More...
void | certificate_parse_tbs (certificate_t *certificate)
Parse the tbs part of a certificate. More...
certificate_status_t | certificate_is_valid (const certificate_t *certificate, const cert_validity_t *currentTime)
Check that an imported x509 certificate is valid. More...
certificate_status_t | certificate_is_CA (const certificate_t *cert)
Check whether a certificate is marked as belonging to a CA. More...
certificate_status_t | certificate_is_parent (const certificate_t *parent, const certificate_t *child, const cert_validity_t *currentTime)
Check whether "parent" issued "child". More...
void | certificate_copy (certificate_t *copiedCert, const certificate_t *originalCert)
Copy a certificate (certificate_t) into another structure. More...
certificate_status_t | certificate_parse_chain (uint8_t *rootCA, uint8_t *certChain, uint16_t certChainSize, certificate_t *leafCert)
Iterate over the certificate chain in argument and check each child/parent pairs. More...

Detailed Description

x509 certificate Parser

Author
STMicroelectronics - CS application team
Attention

© COPYRIGHT 2022 STMicroelectronics

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate_crypto.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Functions
certificate_crypto.h File Reference

Crypto functionalities for x509 verification. More...

Go to the source code of this file.

Functions

certificate_status_t | certificate_verify_signature (const uint8_t *signing_public_key, uint32_t signing_public_key_size, const certificate_t *certificate)
Verify the signature of a certificate with a public key. More...
certificate_status_t | certificate_verify_child_signature (const certificate_t *parent, const certificate_t *child)
Check whether "parent" signed "child". More...

Detailed Description

Crypto functionalities for x509 verification.

Author
STMicroelectronics - CS application team
Attention

© COPYRIGHT 2022 STMicroelectronics

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate_subparsing.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Macros | Typedefs | Enumerations | Functions
certificate_subparsing.h File Reference

Helper for the x509 certificate Parser. More...

Go to the source code of this file.

Data Structures

struct | SignatureAlgorithmOID_st
Structure used to keep SignatureAlgorithm OIDs. More...
struct | AttributeOID_st
Structure used to keep Name Attribute OIDs. More...
struct | EllipticCurveOID_st
Structure used to keep named Elliptic Curve OIDs. More...
struct | attribute_st
typedef for the attribute More...
struct | ExtensionOID_st
Structure used to keep Name Attribute OIDs. More...
struct | extension_st
typedef for the extension More...

Macros

#define IS_VALID_TAG(tag)
Macro which checks if a TAG is valid (known) More...

Typedefs

typedef struct attribute_st | cert_attribute_t
typedef for the attribute
typedef struct extension_st | cert_extension_t
typedef for the extension

Enumerations

enum certificate_tag_t {
TAG_BOOLEAN = 0x01 , TAG_INTEGER , TAG_BITSTRING , TAG_OCTETSTRING ,
TAG_NULL , TAG_OBJECT_IDENTIFIER , TAG_ObjectDescriptor , TAG_ENUMERATED = 0x0A ,
TAG_UTF8String = 0x0C , TAG_PrintableString = 0x13 , TAG_IA5String = 0x16 , TAG_UTCTime ,
TAG_GeneralizedTime , TAG_SEQUENCE = 0x30 , TAG_SET , TAG_OPTION_0 = 0x80 ,
TAG_OPTION_1 , TAG_OPTION_2 , TAG_OPTION_3 , TAG_x509VERSION = 0xA0 ,
TAG_issuerUniqueID , TAG_subjectUniqueID , TAG_extensions
}
Definitions of X509 TAGs. More...
enum certificate_name_attributes_t {
ATTR_CN = 3 , ATTR_SN = 5 , ATTR_C = 6 , ATTR_LN = 7 ,
ATTR_SOPN = 8 , ATTR_ON = 10 , ATTR_OUN = 11 , ATTR_UID = 45 ,
ATTR_DN = 49
}
Definitions of supported Name Attributes. More...
enum certificate_extensions_type_t { EXTENSION_KU = 15 , EXTENSION_BC = 19 , EXTENSION_AKI = 35 , EXTENSION_EKU = 37 }
Definitions of supported Extensions types. More...

Functions

int32_t | certificate_identify_ASN1_TLV (const uint8_t *asn1, int32_t *parsed, int32_t *size, const uint8_t **value, uint32_t *max_size)
Identify the ASN.1 TLV. More...
int32_t | certificate_identify_attribute (const uint8_t *oid, int32_t size)
Identify the Name Attribute from its OID. More...
void | certificate_parse_ECDSA_signature (const uint8_t *signature, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECDSA signature. More...
void | certificate_parse_X509_version (const uint8_t *x509VersionField, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse the x509 Version of a certificate. More...
void | certificate_parse_signature_algorithm (const uint8_t *SA, uint32_t *singatureAlgorithm, const uint8_t **next_thing, uint32_t *max_size)
Parse a SignatureAlgorithm (or signature of a tbsCertificate) More...
void | certificate_parse_ECC_public_key (const uint8_t *EccPK, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECC public Key from a certificate. More...
void | certificate_parse_integer (const uint8_t *integer, const uint8_t **outp, uint32_t *outSize, const uint8_t **next_thing, uint32_t *max_size)
Parse an ASN.1 INTEGER. More...
void | certificate_parse_validity (const uint8_t *p, cert_validity_t *notBefore_st, cert_validity_t *notAfter_st, const uint8_t **next_thing, uint32_t *max_size)
Parse the validity of a certificate. More...
void | certificate_parse_relative_distinguished_name (const uint8_t *p, const uint8_t **nextRDN, const uint8_t **attribute, uint32_t *max_size)
Parse an RelativeDistinguishedName. More...
void | certificate_parse_attribute (const uint8_t *p, cert_attribute_t *attribute_st, const uint8_t **next_thing, uint32_t *max_size)
Parse a Name Attribute. More...
int32_t | certificate_date_compare (const cert_validity_t *D1, const cert_validity_t *D2)
Compare two cert_validity_t structures. More...
int32_t | certificate_count_attributes (const uint8_t *p)
Count the number of Attributes within a NAME. More...
int32_t | certificate_case_insensitive_compare (const uint8_t *p1, const uint8_t *p2, int32_t size)
String Comparison (case insensitive and for utf8) More...
int32_t | certificate_case_identify_extension (const uint8_t *oid, int32_t size)
Identify the Extension from its OID. More...
void | certificate_parse_extension (const uint8_t *ext, certificate_t *certificate, cert_extension_t *ext_st, uint32_t *max_size)
Parse an x509 Extension. More...
int32_t | certificate_get_small_integer (const uint8_t *value, int32_t size)
Reads the value of an INTEGER and returns it as a int32_t. More...

Detailed Description

Helper for the x509 certificate Parser.

Author
STMicroelectronics - CS application team
Attention

© COPYRIGHT 2022 STMicroelectronics

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/custom_uwb.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Functions
custom_uwb.h File Reference

: Header for custom_uwb.c file. This file contains the public declarations for the custom UWB functions. More...

#include "ACWG_Security.h"
Include dependency graph for custom_uwb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void | Initiate_uwb_ctx (ACWG_SessionContext_t *ctx)
Initialize UWB session. Uses for UWB Context and ranging session initialization. More...
void | Handle_uwb_Time_Sync (ACWG_SessionContext_t *ctx)
Handle UWB time synchronization frame. Uses to process and apply time sync information for the current UWB session. More...
void | Fill_uwb_M1 (ACWG_SessionContext_t *ctx)
Fill outbound M1 message fields. Uses to fill UWB M1 message fields: The first three fields depends of the UWB capabilities. More...
void | Handle_uwb_M2 (ACWG_SessionContext_t *ctx)
Handle inbound M2 message fields. Uses to handle UWB M2 message fields: The first three fields is linked to the same in M1 and represents the device selection, then the follow fields are session parameters/mask available by device: More...
void | Fill_uwb_M3 (ACWG_SessionContext_t *ctx)
Fill outbound M3 message fields. Uses to fill UWB M3 message fields: The follow fields are session parameters set by the Reader based on M2 content:
More...
void | Handle_uwb_M4 (ACWG_SessionContext_t *ctx)
Handle inbound M4 message fields. Uses to handle UWB M4 message fields. The follow fields are session parameters set by the device based on M3 content: More...
void | Prepare_ranging_init (ACWG_SessionContext_t *ctx)
Prepare the ranging initialization step. Called only once after M1/M2/M3/M4 exchange. More...
void | Prepare_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Prepare the ranging loop step. Called repeatedly in the prepare ranging loop until timeout expires. Uses to setup uwb ranging parameters before starting ranging. More...
void | Execute_ranging_init (ACWG_SessionContext_t *ctx)
Execute the ranging initialization step. Called only one time after prepare ranging steps. Uses to start the UWB ranging . More...
void | Execute_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Execute the ranging loop step. Called repeatedly in the execute ranging loop until timeout expires. Uses to perform UWB ranging acquisition and evaluate ranging results. Exiting this loop the Handle_lock_actuation function is called. More...
void | Close_ranging_init (ACWG_SessionContext_t *ctx)
Close the ranging initialization step. Called only one time after Handle_lock_actuation. Uses to stop and deinit UWB ranging session. More...
void | Close_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Close the ranging loop step. Called repeatedly in the close ranging loop until timeout expires. More...
void | Suspend_ranging_init (ACWG_SessionContext_t *ctx)
Suspend the ranging initialization step. Called only one time after suspend response or suspend event in ranging session. Uses to stop UWB ranging session. More...
void | Suspend_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Suspend the ranging loop step. Called repeatedly in the suspend ranging loop until timeout expires. More...
void | Resume_ranging_init (ACWG_SessionContext_t *ctx)
Resume the ranging initialization step. Called only one time after resume response in ranging session. Uses to set new Time0 and SlotIndex0 in UWB ranging session. More...
void | Resume_ranging_loop (ACWG_SessionContext_t *ctx, uint32_t *timeout)
Resume the ranging loop step. Called repeatedly in the resume ranging loop until timeout expires. After exiting this loop the Execute_ranging_init function is called. More...
uint8_t | Handle_distance_result (ACWG_SessionContext_t *ctx)
Handle and evaluate distance results. Called only one time during preparing Reader Status Exchange frame. Uses to notify if distance allowed to open the lock. More...
void | Handle_lock_actuation (ACWG_SessionContext_t *ctx)
Trigger lock actuation based on session state. Called only one time after Execute_ranging_loop. Uses to actuate the lock based on distance result evaluation. More...
void | UWB_HW_init (void)
Initialize UWB hardware. Uses for UWB hardware initialization, called only one time at startup.
void | UWB_HW_loop (void)
Run periodic UWB hardware tasks. Uses for periodic UWB hardware tasks, called repeatedly in main loop.

Detailed Description

: Header for custom_uwb.c file. This file contains the public declarations for the custom UWB functions.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/flash_mng.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Typedefs | Enumerations | Functions
flash_mng.h File Reference

: Header for flash_mng.c file. This file declares the Flash management API used by the Aliro application (erase/write helpers). More...

#include "app_nfc.h"
#include "main.h"
Include dependency graph for flash_mng.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum _flashOpStatus flashOpStatus_e

Enumerations

enum _flashOpStatus { FLASH_OP_OK , FLASH_OP_BUSY , FLASH_OP_ERROR }

Functions

flashOpStatus_e | WriteToFlash (void *data, uint32_t nBytes, uint32_t nAddress)
Writes data to flash memory. More...
flashOpStatus_e | EraseWriteToFlash (void *data, uint32_t nBytes, uint32_t nAddress)
Erases the flash sector and writes data to it. More...
flashOpStatus_e | EraseFlash (uint32_t nAddress, uint32_t nBytes)
Erases a region of flash memory. More...

Detailed Description

: Header for flash_mng.c file. This file declares the Flash management API used by the Aliro application (erase/write helpers).

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/log_module_u3.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
log_module_u3.h
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _LOG_MODULE_U5_H_
21#define _LOG_MODULE_U5_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include <stdint.h>
29#include <stdbool.h>
30#include "st_errno.h"
31
40/* Exported types ------------------------------------------------------------*/
41
42typedef uint8_t Log_Verbose_Level_t;
43typedef uint8_t Log_Region_t;
44
52/* Exported macro ------------------------------------------------------------*/
53
59#define LOG_INFO_APP(...) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* _LOG_MODULE_U5_H_ */
73/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/log_module_u5.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Macros | Typedefs
log_module_u5.h File Reference

: Header for log_module_u5.c file. Provides logging macros and prototypes for the U5 platform. More...

#include <stdint.h>
#include <stdbool.h>
#include "st_errno.h"
Include dependency graph for log_module_u5.h:

Go to the source code of this file.

Macros

#define LOG_INFO_APP(...) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)
Macro for logging information messages in the application. More...

Typedefs

typedef uint8_t | Log_Verbose_Level_t
typedef uint8_t | Log_Region_t

Detailed Description

: Header for log_module_u5.c file. Provides logging macros and prototypes for the U5 platform.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/provisioning.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Macros | Typedefs | Functions
provisioning.h File Reference

: Header for provisioning module. This file contains the common defines and structures for provisioning. More...

#include "ACWG_Security.h"
#include "stdbool.h"
#include "provisioning_info.h"
Include dependency graph for provisioning.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | devices_s
struct | provstruct_s

Macros

#define | PRIVATE_KEY_SIZE_BYTES ((uint32_t)32)
Size of private key in bytes.
#define | AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
Length of authentication public key in bytes.
#define | GROUP_RESOLVING_KEY_SIZE_BYTES ((uint32_t)16)
Size of group resolving key in bytes.
#define | DEVICE_NAME_SIZE_BYTES ((uint32_t)16)
Size of device name in bytes.
#define | B1_VENDOR_SPEC_EXT_SIZE_BYTES ((uint32_t)64)
Size of vendor specific extension in bytes.
#define | RESERVED_PAIRING_KEYS_SIZE_BYTES ((uint32_t)32)
Size of buffer in bytes reserved for future use .
#define | CERTIFICATE_SIZE ((uint32_t)400)
Size of certificate data in bytes.
#define | NUM_PROV_DEVICES 5
Maximum number of provisioned devices.

Typedefs

typedef struct devices_s | devices_t
typedef struct provstruct_s | provstruct_t

Functions

void | showJsonStatus ()
Shows the status of the JSON provisioning data.
void | showProvisioningStatus ()
Shows the status of the provisioning data.
void | saveProvisioningToFlash (uint32_t profile_num)
Saves the provisioning data to flash memory. More...
provstruct_t * getProvisioningFromFlash ()
Retrieves the provisioning data from flash memory. More...
void | loadProvisionFromJson (uint32_t jsonAddress, provstruct_t *provstruct)
Loads provisioning data from a JSON address. More...
void | convertProvisioningFromJson (uint32_t jsonAddress)
Converts provisioning data from JSON format. More...
void | convertDefaultProvisioningFromJson ()
Converts default provisioning data from JSON format.
void | printDeviceJson ()
Prints the device JSON data.
void | printScriptJson ()
Prints the script JSON data.
void | saveRDPubKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader public key to flash memory. More...
void | saveRDPrvKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader private key to flash memory. More...
void | saveRDidenToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader identity to flash memory. More...
void | saveRDgrrkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader group resolving key to flash memory. More...
void | saveCredIsPkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the credential issuer public key to flash memory. More...
void | saveAccessCredentialPuBK (uint8_t *pkey, const uint8_t ksize, uint8_t nSlot, uint8_t *pkeyname)
Saves the access credential public key. More...
uint8_t | is_zeros (uint8_t *pBuf, uint32_t nSize)
Checks if a buffer contains only zeros. More...
uint8_t | ProvisioningCheckEndpointPubK (uint8_t *endp_PubK)
Checks the endpoint public key for provisioning. More...
uint8_t | ProvisioningGetEndpointPubKFromKeyslot (uint8_t *endp_PubK, uint8_t *endp_Keyslot, uint8_t *slotFound)
Gets the endpoint public key from a keyslot. More...
void | hexStrToHex (char *p, uint32_t len, uint8_t *hexp)
Converts a hex string to a hex buffer. More...

Detailed Description

: Header for provisioning module. This file contains the common defines and structures for provisioning.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/provisioning_info.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Macros
provisioning_info.h File Reference

: Provisioning information and configuration defines for the application. More...

#include "User_provisioning.h"
Include dependency graph for provisioning_info.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define | ALIRO_APP_NAME "TruELock"
Application name string.
#define | DEFAULT_CMD_PARAMS_VALUE 0
Default command parameters value (0 = Standard, 1 = Fast).
#define | NFC_PROP_BUF_CONTENT { 0 }
Default NFC property buffer content.
#define | BLE_ADV_DISABLE 0
Disable BLE advertising (0 = enabled).
#define | ALIRO_NFC_TOTAL_DURATION 1000U
Total duration for NFC operations in milliseconds.
#define | TEST_HARNESS_SIMULATION 0
Enable test harness simulation (0 = disabled).
#define | ALIRO_PROT_VER_DEFAULT ( AUTH_EXP_TRANS_PROT_VERSION )
#define | ALIRO_PROT_VER xProtocolVersionSupported
Defines the default Aliro protocol versions supported for authentication and transport. More...
#define | ALIRO_MAIN_PROT_VER (ALIRO_PROT_VER & 0xffff)
Main protocol version (lower 16 bits).
#define | ALIRO_HAS_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)?(1):(0))
Check if secondary protocol version is present.
#define | ALIRO_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)>>16)
Secondary protocol version (upper 16 bits).
#define | DEVICE_PROVISIONING_STRUCT_IS_VALID 0xA5A55A5A
Magic value indicating a valid device provisioning structure.
#define | EXPIRY_TIME_STAMP_DEFAULT_VALUE 0x76100fe0
Default expiry timestamp value.
#define | DISPLAY_SPLASH()
Macro to display splash screen.
#define | LOAD_NFC_PROP()
Macro to load NFC properties.
#define | DET_NFC_PROP()
Macro to detect NFC properties.
#define | INIT_NFC_PROP()
Macro to initialize NFC properties.
#define | UWB_SESSION_ID_DEFAULT getUwbSessionId()
Default UWB session ID value.

Detailed Description

: Provisioning information and configuration defines for the application.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Macros | Enumerations | Functions
sm_crypto.h File Reference

: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations. More...

#include <stdint.h>
Include dependency graph for sm_crypto.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define | RAW_PRIV_KEY_BYTE_SIZE ((uint32_t)32)
Size of raw private key in bytes.
#define | SHA256_BYTE_SIZE ((uint32_t)32)
Size of SHA-256 hash in bytes.
#define | ECDSA_256_SIG_BYTE_SIZE ((uint32_t)64)
Size of ECDSA-256 signature in bytes.

Enumerations

enum SM_Crypto_Error_t { SM_Crypto_OK = 0 , SM_Crypto_Error , SM_Crypto_HW_Error }
Error codes for SM cryptographic operations. More...

Functions

SM_Crypto_Error_t | SM_init (void)
Initializes the cryptographic module. More...
SM_Crypto_Error_t | SM_genRandomBytes (uint8_t *bytes, uint32_t size)
Generates random bytes. More...
SM_Crypto_Error_t | SM_genKeypair (uint8_t *pub)
Generates a keypair and returns the public key. More...
SM_Crypto_Error_t | SM_KDFRFC5869 (const uint8_t *pZ, uint32_t ZSize, const uint8_t *pSalt, uint32_t saltSize, const uint8_t *pFixedInfo, uint32_t fixedInfoSize, uint32_t L, uint8_t *pOutput)
Key Derivation Function RFC5869. More...
SM_Crypto_Error_t | SM_sha1 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-1 hash. More...
SM_Crypto_Error_t | SM_sha256 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-256 hash. More...
SM_Crypto_Error_t | SM_sha256_start (void)
Starts SHA-256 computation. More...
SM_Crypto_Error_t | SM_sha256_update (const uint8_t *input, uint32_t inputSize)
Updates SHA-256 computation with new data. More...
SM_Crypto_Error_t | SM_sha256_finish (uint8_t *hash, const uint8_t *input, uint32_t inputSize)
Finishes SHA-256 computation and returns the hash. More...
SM_Crypto_Error_t | SM_sign (const uint8_t *tbs, uint32_t tbsSize, uint8_t *signature)
Signs data using ECDSA. More...
SM_Crypto_Error_t | SM_Ecdh (const uint8_t *pPublicKey, uint8_t *pSharedSecret)
Performs ECDH key agreement. More...
SM_Crypto_Error_t | SM_deriveKdh (const uint8_t *pZ, const uint8_t *info, uint32_t infoSize, uint8_t *pKdh)
Derives KDH key. More...
SM_Crypto_Error_t | SM_aes256GcmDecrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pPayload, const uint32_t payloadSize, uint8_t *pPlaintext, const uint8_t *pTag)
Decrypts data using AES-256 GCM. More...
SM_Crypto_Error_t | SM_aes256GcmEncrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pInput, const uint32_t inputSize, uint8_t *pOutput, uint32_t *pOutputSize)
Encrypts data using AES-256 GCM. More...
SM_Crypto_Error_t | SM_verify (const uint8_t *pPublicKey, const uint8_t *tbs, const uint32_t tbsSize, const uint8_t *signature)
Verifies a signature using ECDSA. More...
SM_Crypto_Error_t | SM_getCertificate (uint8_t *certificate, uint32_t *certificateSize)
Gets the certificate. More...

Detailed Description

: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto_mcu.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Macros | Functions
sm_crypto_mcu.h File Reference

: Header for sm_crypto_mcu.c file. This file provides the interface for SM cryptographic operations on MCU platforms. More...

#include "sm_crypto.h"
Include dependency graph for sm_crypto_mcu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_FIXED_INFO_SIZE ((uint32_t)256)
Maximum size for fixed info buffer in bytes.

Functions

SM_Crypto_Error_t SM_initCryptoMCU (RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp)
Initializes cryptographic hardware modules for MCU. More...

Detailed Description

: Header for sm_crypto_mcu.c file. This file provides the interface for SM cryptographic operations on MCU platforms.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto_stsafe.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Functions
sm_crypto_stsafe.h File Reference

: Header for sm_crypto_stsafe.c file. This file provides the interface for SM cryptographic operations using STSAFE. More...

#include "sm_crypto.h"
#include "stselib.h"
Include dependency graph for sm_crypto_stsafe.h:

Go to the source code of this file.

Functions

SM_Crypto_Error_t SM_initCryptoStSafe (uint8_t *pairingdone)
Initializes cryptographic operations using STSAFE. More...

Detailed Description

: Header for sm_crypto_stsafe.c file. This file provides the interface for SM cryptographic operations using STSAFE.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/stepup_mgr.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Functions
stepup_mgr.h File Reference

: Header for stepup_mgr.c file. This file declares the interface for the step-up manager functionality. More...

#include "ACWG_Security.h"
#include "stdbool.h"
Include dependency graph for stepup_mgr.h:

Go to the source code of this file.

Functions

uint8_t | stepup_request (ACWG_SessionContext_t *acwgctx, uint8_t *stringAccElem, uint32_t AccElemLen, uint8_t *stringRevElem, uint32_t RevElemLen, uint8_t *buf, uint32_t *len)
Requests a step-up operation. More...
uint8_t | stepup_pushdata (uint8_t *buf, uint32_t len)
Pushes step-up data to the buffer. More...
uint8_t | stepup_process (ACWG_SessionContext_t *acwgctx)
Processes the step-up operation. More...
uint8_t | stepup_CheckEndpointPubK (uint8_t *endp_PubK)
Checks the endpoint public key for step-up. More...

Detailed Description

: Header for stepup_mgr.c file. This file declares the interface for the step-up manager functionality.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/tlv.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Enumerations | Functions
tlv.h File Reference

: Header for TLV (Tag-Length-Value) utilities. This file contains type definitions and function prototypes for TLV operations. More...

#include <stdint.h>
Include dependency graph for tlv.h:

Go to the source code of this file.

Data Structures

struct tlv_t
Structure representing a TLV (Tag-Length-Value) element. More...

Enumerations

enum tlvStatus_t {
TLV_SUCCESS , TLV_ERROR_SHORT_PAYLOAD , TLV_ERROR_INVALID_LENGTH , TLV_ERROR_SHORT_BUFFER ,
TLV_ERROR_TAG_NOT_FOUND
}
Status codes for TLV operations. More...

Functions

tlvStatus_t | getOneTlv (uint8_t **tlvBuf, uint32_t *tlvLength, tlv_t *tlv)
Extracts one TLV element from a buffer. More...
tlvStatus_t | appendTLV (uint8_t **inputBuffer, uint32_t *inputBufferLen, const tlv_t *tlv)
Appends a TLV element to a buffer. More...

Detailed Description

: Header for TLV (Tag-Length-Value) utilities. This file contains type definitions and function prototypes for TLV operations.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/tlwrapper.h File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
Data Structures | Typedefs | Enumerations | Functions | Variables
tlwrapper.h File Reference

: Header for tlwrapper.c file. This file contains the type definitions and function prototypes for the tlwrapper module. More...

#include "ACWG_Security.h"
#include "stdbool.h"
#include "custom_uwb.h"
Include dependency graph for tlwrapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | _tlwrapper_SM_nfc
struct | _tlwrapper_SM_ble
struct | _access_mngr_data

Typedefs

typedef enum _tlw_error | tlw_error_e
typedef enum _tlw_state_nfc | tlw_state_nfc_e
typedef enum _tlw_state_ble | tlw_state_ble_e
typedef struct _tlwrapper_SM_nfc | tlw_SM_nfc_t
typedef enum _General_Error_Attribute_ID | General_Error_Attribute_ID_e
typedef struct _tlwrapper_SM_ble | tlw_SM_ble_t
typedef struct _access_mngr_data | access_mngr_data_t

Enumerations

enum _tlw_error {
TLW_ERROR_NONE = 0 , TLW_NEW_OUTPUT , TLW_NO_PREPARE_NEEDED , TLW_ERROR_FAST ,
TLW_NEED_GET_RESPONSE , TLW_NEED_AUTH1 , TLW_NEED_LOAD_CERT , TLW_BUSY ,
TLW_FAIL_GENERATE , TLW_FAIL_PROCESS , TLW_FAIL_GENERIC , TLW_FAIL_TIMEOUT ,
TLW_END
}
enum _tlw_state_nfc {
TLW_STATE_NFC_PREPARE_SELECT = 0 , TLW_STATE_NFC_PROCESS_SELECT , TLW_STATE_NFC_PREPARE_AUTH0 , TLW_STATE_NFC_PROCESS_AUTH0 ,
TLW_STATE_NFC_PREPARE_LOAD_CERT , TLW_STATE_NFC_PROCESS_LOAD_CERT , TLW_STATE_NFC_PREPARE_AUTH1 , TLW_STATE_NFC_PROCESS_AUTH1 ,
TLW_STATE_NFC_PREPARE_AUTH1_CHAINED , TLW_STATE_NFC_PROCESS_AUTH1_CHAINED , TLW_STATE_NFC_PREPARE_SELECT_STEPUP , TLW_STATE_NFC_PROCESS_SELECT_STEPUP ,
TLW_STATE_NFC_PREPARE_STEPUP , TLW_STATE_NFC_PROCESS_STEPUP , TLW_STATE_NFC_PREPARE_GET_RESPONSE , TLW_STATE_NFC_PREPARE_EXCHANGE ,
TLW_STATE_NFC_PROCESS_EXCHANGE , TLW_STATE_NFC_PREPARE_CONTROL_FLOW , TLW_STATE_NFC_PROCESS_CONTROL_FLOW , TLW_STATE_NFC_PREPARE_READER_STATUS_EXCHANGE ,
TLW_STATE_NFC_PROCESS_READER_STATUS_EXCHANGE , TLW_STATE_NFC_ERROR , TLW_STATE_NFC_END
}
enum _tlw_state_ble {
TLW_STATE_BLE_PREPARE_SELECT = 0 , TLW_STATE_BLE_PROCESS_SELECT , TLW_STATE_BLE_PREPARE_AUTH0 , TLW_STATE_BLE_PROCESS_AUTH0 ,
TLW_STATE_BLE_PREPARE_LOAD_CERT , TLW_STATE_BLE_PROCESS_LOAD_CERT , TLW_STATE_BLE_PREPARE_AUTH1 , TLW_STATE_BLE_PROCESS_AUTH1 ,
TLW_STATE_BLE_PREPARE_STEPUP , TLW_STATE_BLE_PROCESS_STEPUP , TLW_STATE_BLE_PREPARE_GET_RESPONSE , TLW_STATE_BLE_PREPARE_EXCHANGE ,
TLW_STATE_BLE_PROCESS_EXCHANGE , TLW_STATE_BLE_PREPARE_AP_COMPLETED , TLW_STATE_BLE_PROCESS_AP_COMPLETED , TLW_STATE_BLE_PROCESS_TIME_SYNC ,
TLW_STATE_BLE_PROCESS_INITIATE_RANGING_SESSION , TLW_STATE_BLE_PREPARE_M1 , TLW_STATE_BLE_PROCESS_M2 , TLW_STATE_BLE_PREPARE_M3 ,
TLW_STATE_BLE_PROCESS_M4 , TLW_STATE_BLE_PREPARE_SUSPEND_RQU , TLW_STATE_BLE_PROCESS_SUSPEND_RSP , TLW_STATE_BLE_PREPARE_SUSPEND_RSP ,
TLW_STATE_BLE_PROCESS_SUSPEND , TLW_STATE_BLE_PREPARE_EVENT_RANGING_SUSPENDED , TLW_STATE_BLE_PROCESS_EVENT_RANGING_SUSPENDED , TLW_STATE_BLE_PROCESS_EVENT_RANGING_RESUME ,
TLW_STATE_BLE_PROCESS_RESUME_RSP , TLW_STATE_BLE_PREPARE_RANGING , TLW_STATE_BLE_EXECUTE_RANGING , TLW_STATE_BLE_HANDLE_SUSPEND ,
TLW_STATE_BLE_HANDLE_RESUME , TLW_STATE_BLE_PREPARE_RESUME_RQU , TLW_STATE_BLE_HANDLE_DOOR_LOCK_OPERATION , TLW_STATE_BLE_PREPARE_READER_STATUS_EXCHANGE ,
TLW_STATE_BLE_PROCESS_READER_STATUS_EXCHANGE , TLW_STATE_BLE_PREPARE_NOTIFICATION_EVENT_ERR , TLW_STATE_BLE_ERROR , TLW_STATE_BLE_END
}
enum _General_Error_Attribute_ID { GENERAL_UNKNOWN_ERROR = 0U , GENERAL_RESOURCE_UNAVAILABLE = 1U , GENERAL_WRONG_PARAMETERS = 2U , GENERAL_URSK_UNAVAILABLE = 3U }

Functions

tlw_error_e | tlw_init_nfc (ACWG_SessionContext_t *ctx)
Initializes the NFC state machine. More...
tlw_error_e | tlw_reload_nfc (ACWG_SessionContext_t *ctx)
Reloads the NFC state machine. More...
tlw_error_e | tlw_prepare_nfc (void)
Prepares the NFC state machine for operation. More...
tlw_error_e | tlw_process_nfc (void)
Processes the NFC state machine. More...
tlw_error_e | tlw_init_ble (ACWG_SessionContext_t *ctx)
Initializes the BLE state machine. More...
tlw_error_e | tlw_reload_ble (ACWG_SessionContext_t *ctx)
Reloads the BLE state machine. More...
tlw_error_e | tlw_prepare_ble (void)
Prepares the BLE state machine for operation. More...
tlw_error_e | tlw_process_ble (void)
Processes the BLE state machine. More...
tlw_error_e | tlw_ble_receivedData (uint8_t *data, uint8_t *len, uint8_t(*sendData_fn)(uint8_t *, uint16_t))
Handles received BLE data and sends response. More...
tlw_error_e | tlw_ble_SM_step (void)
Steps the BLE state machine. More...
uint32_t | getUwbSessionId (void)
Gets the current UWB session ID. More...
uint8_t | tlw_CheckEndpointKey (ACWG_SessionContext_t *ctx)
Checks the endpoint public key. More...
uint8_t * | tlw_GetLastEndpointKey (void)
Gets the last endpoint public key. More...
void | tlw_SetAccessElementString (uint8_t *AccElmStr)
Sets the access element string. More...
uint8_t * | tlw_GetAccessElementString (void)
Gets the access element string. More...

Variables

tlw_SM_nfc_t | nfc_SM
Global NFC state machine context.
tlw_SM_ble_t | ble_SM
Global BLE state machine context.
access_mngr_data_t | access_mngr_data
Global access manager data.

Detailed Description

: Header for tlwrapper.c file. This file contains the type definitions and function prototypes for the tlwrapper module.

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/User_provisioning.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
User_provisioning.h
1
27/* Provisioning without Certificate*/
28// reader_id_User:8f9633dd856d2a156f2aee573deb11e5
29// reader_sub_id_User:43815ef53299c92e95b052138133ed39
30#define READER_ID_2 {0x8f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}
31
37// reader_public_key_User:045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f
38#define READER_PUB_KEY_2 {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}
39
45// reader_private_key_User:cb64a58a5fae052d458b3bce2599a20a665987b537b157cc3cc42e1d9c652409
46#define READER_PRIVATE_KEY_2 {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}
47
53#define READER_ISSUER_PUB_KEY_2 { 0 }
54
60#define READER_ISSUER_PRIVATE_KEY_2 { 0 }
61
67#define READER_CERTIFICATE_2 { 0 }
68
74#define GROUP_RESOLVING_KEY_2 GROUP_RESOLVING_KEY
75
81#define ENDPOINT_KEYSLOT_2 ENDPOINT_KEYSLOT
82
88#define ENDPOINT_PUBLIC_KEY_2 ENDPOINT_PUBLIC_KEY
89
95#define ENDPOINT_PRIVATE_KEY_2 ENDPOINT_PRIVATE_KEY
96
102#define ENDPOINT_NAME_2 "User"
103
109#define B1_VENDOR_SPECIFIC_EXTENSION_2 B1_VENDOR_SPECIFIC_EXTENSION
110
116#define B1_VENDOR_SPECIFIC_EXTENSION_LEN_2 B1_VENDOR_SPECIFIC_EXTENSION_LEN
117
118
124/* Provisioning with Certificate*/
125// reader_id_cert_User:9f9633dd856d2a156f2aee573deb11e5
126// reader_sub_id_cert_User:43815ef53299c92e95b052138133ed39
127#define READER_ID {0x9f, 0x96, 0x33, 0xdd, 0x85, 0x6d, 0x2a, 0x15, 0x6f, 0x2a, 0xee, 0x57, 0x3d, 0xeb, 0x11, 0xe5, 0x43, 0x81, 0x5e, 0xf5, 0x32, 0x99, 0xc9, 0x2e, 0x95, 0xb0, 0x52, 0x13, 0x81, 0x33, 0xed, 0x39}
128
134// reader_public_key_cert_User:045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f
135#define READER_PUB_KEY {0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f}
136
142// reader_private_key_cert_User:cb64a58a5fae052d458b3bce2599a20a665987b537b157cc3cc42e1d9c652409
143#define READER_PRIVATE_KEY {0xcb, 0x64, 0xa5, 0x8a, 0x5f, 0xae, 0x05, 0x2d, 0x45, 0x8b, 0x3b, 0xce, 0x25, 0x99, 0xa2, 0x0a, 0x66, 0x59, 0x87, 0xb5, 0x37, 0xb1, 0x57, 0xcc, 0x3c, 0xc4, 0x2e, 0x1d, 0x9c, 0x65, 0x24, 0x09}
144
150// reader_issuer_public_key_cert_User:04fbc3fdac291606a0a986862004bbe5c6188ce64098f4a65b7a6595fc31f416259141a972b916e6321dbeee22b77eec5929d80779c99f8ebe5c2588f24b24de68
151#define READER_ISSUER_PUB_KEY {0xfb, 0xc3, 0xfd, 0xac, 0x29, 0x16, 0x06, 0xa0, 0xa9, 0x86, 0x86, 0x20, 0x04, 0xbb, 0xe5, 0xc6, 0x18, 0x8c, 0xe6, 0x40, 0x98, 0xf4, 0xa6, 0x5b, 0x7a, 0x65, 0x95, 0xfc, 0x31, 0xf4, 0x16, 0x25, 0x91, 0x41, 0xa9, 0x72, 0xb9, 0x16, 0xe6, 0x32, 0x1d, 0xbe, 0xee, 0x22, 0xb7, 0x7e, 0xec, 0x59, 0x29, 0xd8, 0x07, 0x79, 0xc9, 0x9f, 0x8e, 0xbe, 0x5c, 0x25, 0x88, 0xf2, 0x4b, 0x24, 0xde, 0x68}
152
158// reader_issuer_private_key_cert_User:31222ec2125a2921671e471ae67b8796668e37c0167c72bf540e4c5393599f85
159#define READER_ISSUER_PRIVATE_KEY {0x31, 0x22, 0x2e, 0xc2, 0x12, 0x5a, 0x29, 0x21, 0x67, 0x1e, 0x47, 0x1a, 0xe6, 0x7b, 0x87, 0x96, 0x66, 0x8e, 0x37, 0xc0, 0x16, 0x7c, 0x72, 0xbf, 0x54, 0x0e, 0x4c, 0x53, 0x93, 0x59, 0x9f, 0x85}
160
166// reader_certificate_cert_User:3081e8040200003081e18014269e0680731d796703576be42b668a7dfe9c1e29811253544d6963726f656c656374726f6e696373820d3235313231363135343034395a830d3330313231363135343034395a840844656d6f6c6f636b854200045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f8649003046022100f1e0b84ad64aa078a039cc1be850a9d1534d52a26d6a5e137e0a710f59f12b49022100d089e452ee102cb5813eaded8625cc4b54b69835ec2e4c59c12e2a4a495dddaf
167#define READER_CERTIFICATE {0x30, 0x81, 0xe8, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0xe1, 0x80, 0x14, 0x26, 0x9e, 0x06, 0x80, 0x73, 0x1d, 0x79, 0x67, 0x03, 0x57, 0x6b, 0xe4, 0x2b, 0x66, 0x8a, 0x7d, 0xfe, 0x9c, 0x1e, 0x29, 0x81, 0x12, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x08, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xf1, 0xe0, 0xb8, 0x4a, 0xd6, 0x4a, 0xa0, 0x78, 0xa0, 0x39, 0xcc, 0x1b, 0xe8, 0x50, 0xa9, 0xd1, 0x53, 0x4d, 0x52, 0xa2, 0x6d, 0x6a, 0x5e, 0x13, 0x7e, 0x0a, 0x71, 0x0f, 0x59, 0xf1, 0x2b, 0x49, 0x02, 0x21, 0x00, 0xd0, 0x89, 0xe4, 0x52, 0xee, 0x10, 0x2c, 0xb5, 0x81, 0x3e, 0xad, 0xed, 0x86, 0x25, 0xcc, 0x4b, 0x54, 0xb6, 0x98, 0x35, 0xec, 0x2e, 0x4c, 0x59, 0xc1, 0x2e, 0x2a, 0x4a, 0x49, 0x5d, 0xdd, 0xaf}
168
174// reader_certificate_cert_long_User:3082010b0402000030820103801412c2a20661964981c92cd242e6d06d2ce8053b4f811f53544d6963726f656c656374726f6e69637353544d6963726f656c65637472820d3235313231363135343034395a830d3330313231363135343034395a841f44656d6f6c6f636b44656d6f6c6f636b44656d6f6c6f636b44656d6f6c6f63854200045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f864700304402206aef6a6cf112f97c16c1e844f65ef3913cbe388b4e9ee8795fbc08f240f5337702205da03ad102a63e1095da5692a463db8d18866b07e5580f6ef0f28c5153ac3400
175#define READER_LONG_CERTIFICATE {0x30, 0x82, 0x01, 0x0b, 0x04, 0x02, 0x00, 0x00, 0x30, 0x82, 0x01, 0x03, 0x80, 0x14, 0x12, 0xc2, 0xa2, 0x06, 0x61, 0x96, 0x49, 0x81, 0xc9, 0x2c, 0xd2, 0x42, 0xe6, 0xd0, 0x6d, 0x2c, 0xe8, 0x05, 0x3b, 0x4f, 0x81, 0x1f, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x73, 0x53, 0x54, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x82, 0x0d, 0x32, 0x35, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x83, 0x0d, 0x33, 0x30, 0x31, 0x32, 0x31, 0x36, 0x31, 0x35, 0x34, 0x30, 0x34, 0x39, 0x5a, 0x84, 0x1f, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x6d, 0x6f, 0x6c, 0x6f, 0x63, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x6a, 0xef, 0x6a, 0x6c, 0xf1, 0x12, 0xf9, 0x7c, 0x16, 0xc1, 0xe8, 0x44, 0xf6, 0x5e, 0xf3, 0x91, 0x3c, 0xbe, 0x38, 0x8b, 0x4e, 0x9e, 0xe8, 0x79, 0x5f, 0xbc, 0x08, 0xf2, 0x40, 0xf5, 0x33, 0x77, 0x02, 0x20, 0x5d, 0xa0, 0x3a, 0xd1, 0x02, 0xa6, 0x3e, 0x10, 0x95, 0xda, 0x56, 0x92, 0xa4, 0x63, 0xdb, 0x8d, 0x18, 0x86, 0x6b, 0x07, 0xe5, 0x58, 0x0f, 0x6e, 0xf0, 0xf2, 0x8c, 0x51, 0x53, 0xac, 0x34, 0x00}
176
182// reader_certificate_cert_short_User:3081940402000030818d854200045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f8647003044022004060b7ec96115558aaa21686b8a5cd76c3cf0ef0214ef3d93189b789624c48f022031664dc32677ff6eba89126ebd212f903dc0dc8a4c837ebb306e062ba2231be2
183#define READER_SHORT_CERTIFICATE {0x30, 0x81, 0x94, 0x04, 0x02, 0x00, 0x00, 0x30, 0x81, 0x8d, 0x85, 0x42, 0x00, 0x04, 0x5b, 0xc2, 0x0b, 0x28, 0x53, 0xe1, 0x1f, 0xcb, 0x08, 0x61, 0x92, 0xd8, 0xa5, 0xd5, 0xb7, 0x82, 0x9b, 0x13, 0xd1, 0x43, 0xb0, 0xda, 0x2d, 0xe6, 0x8e, 0x1b, 0xc9, 0x4f, 0x8b, 0x01, 0x60, 0x27, 0xa8, 0x85, 0x4e, 0xae, 0x02, 0x26, 0xd4, 0x20, 0x5e, 0x8f, 0x71, 0x0d, 0x16, 0x8d, 0xa2, 0xf5, 0x7d, 0x3f, 0xa2, 0x15, 0x0b, 0x64, 0x33, 0x8d, 0x21, 0x2c, 0xe0, 0x15, 0xe2, 0x00, 0x51, 0x3f, 0x86, 0x47, 0x00, 0x30, 0x44, 0x02, 0x20, 0x04, 0x06, 0x0b, 0x7e, 0xc9, 0x61, 0x15, 0x55, 0x8a, 0xaa, 0x21, 0x68, 0x6b, 0x8a, 0x5c, 0xd7, 0x6c, 0x3c, 0xf0, 0xef, 0x02, 0x14, 0xef, 0x3d, 0x93, 0x18, 0x9b, 0x78, 0x96, 0x24, 0xc4, 0x8f, 0x02, 0x20, 0x31, 0x66, 0x4d, 0xc3, 0x26, 0x77, 0xff, 0x6e, 0xba, 0x89, 0x12, 0x6e, 0xbd, 0x21, 0x2f, 0x90, 0x3d, 0xc0, 0xdc, 0x8a, 0x4c, 0x83, 0x7e, 0xbb, 0x30, 0x6e, 0x06, 0x2b, 0xa2, 0x23, 0x1b, 0xe2}
184
190// group_resolving_key_User:0375ed63685570f6b2168eab7296ec01
191#define GROUP_RESOLVING_KEY {0x03, 0x75, 0xed, 0x63, 0x68, 0x55, 0x70, 0xf6, 0xb2, 0x16, 0x8e, 0xab, 0x72, 0x96, 0xec, 0x01}
192
198// endpoint_key_slot_cert_Alice_User:54b54e27d515ac4c
199#define ENDPOINT_KEYSLOT {0x54, 0xb5, 0x4e, 0x27, 0xd5, 0x15, 0xac, 0x4c}
200
206// endpoint_public_key_cert_Alice_User:04773f9aa84ac9705161c490a2dba0b4a19a3d2a78705a801cff924e26357e4213191db83789a25916e4accea1fd6f09239b4cf2dd0d05b33b72d8a3a642e30866
207#define ENDPOINT_PUBLIC_KEY {0x77, 0x3f, 0x9a, 0xa8, 0x4a, 0xc9, 0x70, 0x51, 0x61, 0xc4, 0x90, 0xa2, 0xdb, 0xa0, 0xb4, 0xa1, 0x9a, 0x3d, 0x2a, 0x78, 0x70, 0x5a, 0x80, 0x1c, 0xff, 0x92, 0x4e, 0x26, 0x35, 0x7e, 0x42, 0x13, 0x19, 0x1d, 0xb8, 0x37, 0x89, 0xa2, 0x59, 0x16, 0xe4, 0xac, 0xce, 0xa1, 0xfd, 0x6f, 0x09, 0x23, 0x9b, 0x4c, 0xf2, 0xdd, 0x0d, 0x05, 0xb3, 0x3b, 0x72, 0xd8, 0xa3, 0xa6, 0x42, 0xe3, 0x08, 0x66}
208
214// endpoint_private_key_cert_Alice_User:db1d6524990aecce49c3c5c79ee41361b01b49302eac1cc5f9decd0d1058d14e
215#define ENDPOINT_PRIVATE_KEY {0xdb, 0x1d, 0x65, 0x24, 0x99, 0x0a, 0xec, 0xce, 0x49, 0xc3, 0xc5, 0xc7, 0x9e, 0xe4, 0x13, 0x61, 0xb0, 0x1b, 0x49, 0x30, 0x2e, 0xac, 0x1c, 0xc5, 0xf9, 0xde, 0xcd, 0x0d, 0x10, 0x58, 0xd1, 0x4e}
216
222#define ENDPOINT_NAME "User_cert"
223
229#define B1_VENDOR_SPECIFIC_EXTENSION "ST Rooms"
230
236#define B1_VENDOR_SPECIFIC_EXTENSION_LEN 8
237
238
244#define CREDENTIAL_ISSUER_PUB_KEY_2 { 0x7B, 0xA3, 0x19, 0x38, 0x49, 0x2E, 0x3F, 0x5E, 0x97, 0xBC, 0x91, 0x80, 0x6B, 0x58, 0x35, 0xB5, 0xD9, 0xE4, 0x26, 0x60, 0x91, 0x39, 0x00, 0x67, 0x11, 0xE5, 0xFB, 0x7A, 0x67, 0x0E, 0xE4, 0xE1, 0x2F, 0xC9, 0xF2, 0x53, 0x96, 0xC0, 0x13, 0xCC, 0x20, 0x16, 0x60, 0x29, 0xD7, 0x61, 0xA1, 0x05, 0xDE, 0xA5, 0xE0, 0x71, 0xE8, 0x4A, 0x9E, 0x49, 0x99, 0x20, 0x52, 0x4C, 0xE2, 0x30, 0x11, 0x37 }
245
251#define CREDENTIAL_ISSUER_PRIVATE_KEY_2 { 0 }
252
257/* Test Harness configuration
258{
259 "test_parameters": {
260 "dut_reader_public_key": "045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f",
261 "dut_reader_group_identifier": "8f9633dd856d2a156f2aee573deb11e5",
262 "dut_reader_issuer_public_key": "04fbc3fdac291606a0a986862004bbe5c6188ce64098f4a65b7a6595fc31f416259141a972b916e6321dbeee22b77eec5929d80779c99f8ebe5c2588f24b24de68",
263 "dut_reader_issuer_group_identifier": "9f9633dd856d2a156f2aee573deb11e5",
264 "dut_reader_group_sub_identifier": "43815ef53299c92e95b052138133ed39",
265 "dut_reader_group_resolving_key": "0375ed63685570f6b2168eab7296ec01",
266 "th_access_credential_private_key": "db1d6524990aecce49c3c5c79ee41361b01b49302eac1cc5f9decd0d1058d14e",
267 "th_access_credential_public_key": "04773f9aa84ac9705161c490a2dba0b4a19a3d2a78705a801cff924e26357e4213191db83789a25916e4accea1fd6f09239b4cf2dd0d05b33b72d8a3a642e30866",
268 "th_reader_private_key": "8aefdff8d5b47aa9a3edbac7a345ed2221021512fd55abde3b8ee0f208952693",
269 "th_reader_public_key": "043928f322019d4757893bde6a0fe5e13e3e537b9ca0f549c0bd2f40f79060252a0a4f291192157a95cb6eb202759428c00cd834998c5d0eab192ee8873c5d34ee",
270 "th_reader_group_identifier": "00113344667799AA00113344667799AA",
271 "th_reader_sub_group_identifier": "113344667799AA00113344667799AA00",
272 "th_reader_certificate": "308201523081f9a003020102020101300a06082a8648ce3d0403023011310f300d06035504030c06697373756572301e170d3230303130313030303030305a170d3439303130313030303030305a30123110300e06035504030c077375626a6563743059301306072a8648ce3d020106082a8648ce3d030107034200043928f322019d4757893bde6a0fe5e13e3e537b9ca0f549c0bd2f40f79060252a0a4f291192157a95cb6eb202759428c00cd834998c5d0eab192ee8873c5d34eea341303f301f0603551d230418301680143fb5efecb9f0a8b253e4b6788dc15a5913f7c763300c0603551d130101ff04023000300e0603551d0f0101ff040403020780300a06082a8648ce3d04030203480030450220296b57afcb0f1f86e7c3e76b16f82ea0737e8105d5c5e03f3333e6ef9193c80d022100909083e76eaaf0430c7639159b00620d0c6a40fdb6e11ec52ed5bdd3dfb1706f",
273 "th_reader_group_resolving_key": "0375ed63685570f6b2168eab7296ec01",
274 "th_reader_spsm": "0080"
275 }
276}
277*/
278
279/* Reader provisioning
280{
281 "MaxDevices": 8,
282 "reader_identifier": "8f9633dd856d2a156f2aee573deb11e543815ef53299c92e95b052138133ed39",
283 "reader_PrivK": "cb64a58a5fae052d458b3bce2599a20a665987b537b157cc3cc42e1d9c652409",
284 "reader_PubK": "045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f",
285 "issuer_Private": "31222ec2125a2921671e471ae67b8796668e37c0167c72bf540e4c5393599f85",
286 "issuer_Public": "04fbc3fdac291606a0a986862004bbe5c6188ce64098f4a65b7a6595fc31f416259141a972b916e6321dbeee22b77eec5929d80779c99f8ebe5c2588f24b24de68",
287 "certificate_data": "3081e8040200003081e18014269e0680731d796703576be42b668a7dfe9c1e29811253544d6963726f656c656374726f6e696373820d3235313231363135343034395a830d3330313231363135343034395a840844656d6f6c6f636b854200045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f8649003046022100f1e0b84ad64aa078a039cc1be850a9d1534d52a26d6a5e137e0a710f59f12b49022100d089e452ee102cb5813eaded8625cc4b54b69835ec2e4c59c12e2a4a495dddaf",
288 "b1VendorSpecificExtension": "ST Rooms",
289 "Devices": [
290 {
291 "Name": "Alice",
292 "endpoint_Keyslot": "54b54e27d515ac4c",
293 "endpoint_PubK": "04773f9aa84ac9705161c490a2dba0b4a19a3d2a78705a801cff924e26357e4213191db83789a25916e4accea1fd6f09239b4cf2dd0d05b33b72d8a3a642e30866",
294 "endpoint_PrivK": "db1d6524990aecce49c3c5c79ee41361b01b49302eac1cc5f9decd0d1058d14e"
295 }
296 ]
297}
298*/
299
300/* Terminal command for provisioning
301// setRDiden-8f9633dd856d2a156f2aee573deb11e543815ef53299c92e95b052138133ed39
302// setRDprvk-cb64a58a5fae052d458b3bce2599a20a665987b537b157cc3cc42e1d9c652409
303// setRDpubk-045bc20b2853e11fcb086192d8a5d5b7829b13d143b0da2de68e1bc94f8b016027a8854eae0226d4205e8f710d168da2f57d3fa2150b64338d212ce015e200513f
304// setDEVpbk-04773f9aa84ac9705161c490a2dba0b4a19a3d2a78705a801cff924e26357e4213191db83789a25916e4accea1fd6f09239b4cf2dd0d05b33b72d8a3a642e30866
305// setRDgrrk-0375ed63685570f6b2168eab7296ec01
306// setRisspk-04fbc3fdac291606a0a986862004bbe5c6188ce64098f4a65b7a6595fc31f416259141a972b916e6321dbeee22b77eec5929d80779c99f8ebe5c2588f24b24de68
307*/
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src Directory Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Src Directory Reference
Directory dependency graph for Src:

Files

file | app_aliro.c
: Aliro application main logic and command processing
file | app_nfc.c
: Aliro NFC application main logic
file | flash_mng.c
: Flash management functions
file | provisioning.c
: Provisioning management functions
file | sm_crypto_mcu.c
: MCU cryptographic functions using hardware accelerators


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src/app_aliro.c File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Macros | Functions | Variables
app_aliro.c File Reference

: Aliro application main logic and command processing More...

#include "app_aliro.h"
#include "tlwrapper.h"
#include "app_nfc.h"
#include "provisioning.h"
#include "logger.h"
#include "rfal_nfc.h"
#include "ACWG_Security.h"
#include "sm_crypto_mcu.h"
#include "qcbor/UsefulBuf.h"
#include "qcbor/qcbor_decode.h"
#include "qcbor/qcbor_spiffy_decode.h"
#include "t_cose/t_cose_sign1_verify.h"
#include "acwg_build_info.h"
#include "app_build_info.h"
#include "app_version.h"
#include <time.h>
Include dependency graph for app_aliro.c:

Macros

#define | FIRMWARE_NAME "Aliro_nfc"
#define | MIN_DYNAMIC_SPSM_VALUE 0x80
Minimum value for dynamic SPSM.
#define | MAX_DYNAMIC_SPSM_VALUE 0xFF
Maximum value for dynamic SPSM.
#define | GET_SPSM_LOOP_NBR 10
Number of loops for SPSM search.
#define | __byteswap32(_u32val)
Macro to swap bytes in a 32-bit unsigned integer. More...
#define | PRINT_ERROR(S) PLATFORM_LOG(VERB_FN_NAME, "%s%s\r\n", errstr, S)
Macro to print an error message.
#define | CREATE_CASE(S) case S:PRINT_ERROR(#S);break;
Macro to create a case statement for error printing.

Functions

void | ProcessUartInput (void)
Processes UART input data. More...
HAL_StatusTypeDef | AliroPort_UART_Transmit (UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Transmits data over UART. More...
HAL_StatusTypeDef | AliroPort_UART_Receive (UART_HandleTypeDef *huart, uint8_t *pData, uint16_t *Size, uint32_t Timeout)
Receives data over UART. More...
void | AliroPort_Delay (uint32_t Delay)
Delays execution for a specified time. More...
void | AliroPort_NVIC_SystemReset (void)
Triggers a system reset using NVIC.
__weak void | AliroPort_TRANSACTION_SUCCESS_OPEN (void)
Hook for TRANSACTION_SUCCESS_OPEN. More...
__weak void | AliroPort_TRANSACTION_SUCCESS_CLOSE (void)
Hook for TRANSACTION_SUCCESS_CLOSE. More...
__weak void | AliroPort_TRANSACTION_FAILURE (void)
Hook for TRANSACTION_FAILURE. More...
void | AliroPort_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
Writes a value to a GPIO pin. More...
void | Aliro_SerialCmdExecute (uint8_t *pRxBuffer, uint16_t iRxBufferSize)
Executes a serial command received over UART. More...
void | SetVerbosityLevel (uint8_t c)
Sets the verbosity level for logging. More...
uint8_t | DaysInMonth (uint16_t year, uint8_t month)
Returns the number of days in a given month and year. More...
void | GetCompilerDateTime (struct tm *timeDate)
void | GetTimeDate (struct tm *timeDate)
Retrieves the current time and date from the RTC. More...
void | ShowTimeDate (void)
Displays the current date and time from RTC. More...
bool | CryptoInit ()
Initializes cryptographic modules and checks provisioning. More...
uint16_t | UsartGetCharBlocking (uint8_t *buf)
Receives a character from the USART interface in blocking mode. More...
uint16_t | UsartGetChar (uint8_t *buf)
Receives a character from the USART interface in non-blocking mode. More...
void | SecondMillis_CallBack_TimeStamp (char *Data, uint16_t SizeMax, uint16_t *TimeStampSize)
Generates a timestamp string in the format "[seconds.milliseconds] ". More...
void | PrintErrorString (char *errstr, ACWG_Status_t retval)
Prints an error string corresponding to the given ACWG status code. More...
void | PrintBufferHexAlways (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format, always using info verbosity level. More...
void | PrintBufferHex (const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format if enabled. More...
void | Button1_isr (void)
Interrupt service routine for Button 1. Resets the system after a delay. More...
void | Alirost25r200Isr (void)
Interrupt service routine for the ST25R200 peripheral.
bool | aliro_init ()
Initializes the Aliro application. More...
void | aliro_process ()
Main processing loop for the Aliro application. More...
uint16_t | AliroGetSavedSelectedProtocolVersion ()
Gets the saved selected protocol version. More...
ReturnCode | demoPropNfcInitialize (void)
Initializes the proprietary NFC functionality for the demo application. More...
ReturnCode | demoPropNfcTechnologyDetection (void)
Demonstrates detection of proprietary NFC technology. More...
void | AliroFilltechs2Find (uint16_t *techs2find)
Fills the NFC technologies to be discovered. More...
void | parseRDpubkCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses and processes the Reader Public Key (RDpubk) command from the input buffer. More...
void | parseRDprvkCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses and processes the RDprvk command from the input buffer. More...
void | parseRDidenCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses the RDiden command from the input buffer and saves the Reader identifier to flash. More...
void | parseRDgrrkCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses the RDgrrk command from the input buffer and saves the Group Resolving Key to flash. More...
void | parseCredIsPkCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses the Credential Issuer Public Key (CRispk) command from the input buffer and saves it to flash. More...
void | parseEchoCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses and logs an echo command. More...
void | parseDEVpbkCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
Parses and processes a DEVpbk command from the input buffer. More...
void | parseAccElemCommand (char *cmdBuffer, uint8_t *processBuffer, uint32_t size)
void | board_reset ()
Resets the board after a delay. More...
void | Set_timeout_prepare_ranging (uint32_t timeout_ms)
Set the timeout for the prepare ranging operation. More...
void | Set_timeout_execute_ranging (uint32_t timeout_ms)
Set the timeout for the execute ranging operation. More...
void | Set_timeout_suspend_ranging (uint32_t timeout_ms)
Set the timeout for the suspend ranging operation. More...
void | Set_timeout_resume_ranging (uint32_t timeout_ms)
Set the timeout for the resume ranging operation. More...
void | Set_timeout_door_operation (uint32_t timeout_ms)
Set the timeout for the door operation. More...

Variables

const app_build_info_t | app_build_info
Global build information for the Aliro application. More...
static const char | JAN [] = "Jan"
Month name constants for RTC operations.
static const char | FEB [] = "Feb"
static const char | MAR [] = "Mar"
static const char | APR [] = "Apr"
static const char | MAY [] = "May"
static const char | JUN [] = "Jun"
static const char | JUL [] = "Jul"
static const char | AUG [] = "Aug"
static const char | SEP [] = "Sep"
static const char | OCT [] = "Oct"
static const char | NOV [] = "Nov"
static const char | DEC [] = "Dec"
statItem_t statItems []
uint8_t | resp []
uint8_t | PRINT_BUFFERS_HEX = 1
Enable/disable printing of exchanged buffers in hex format.
uint8_t | BYTE_INDEX_IN_PRINT = 0
Index for printing bytes in buffer output.
CRYP_HandleTypeDef | hcryp
External handle for CRYP hardware.
HASH_HandleTypeDef | hhash
External handle for HASH hardware.
PKA_HandleTypeDef | hpka
External handle for PKA hardware.
RNG_HandleTypeDef | hrng
External handle for RNG hardware.
UART_HandleTypeDef | H_ALIRO_UART
External declaration of the UART handle for Aliro application. More...
uint32_t | xProtocolVersionSupported = ALIRO_PROT_VER_DEFAULT
Aliro protocol versions supported.
uint8_t | advflags [] = { 0x02, 0x01, 0x06 }
Advertising flags for BLE.
uint8_t | aliroadvheader [] = { 0x1B, 0x16, 0xF2, 0xFF, BLE_ALIRO_FLOWS_SUPPORTED }
Aliro advertising header for BLE.
uint8_t | txpower [] = { 0xEB }
BLE transmit power value.
uint32_t | expirytimestamp = EXPIRY_TIME_STAMP_DEFAULT_VALUE
Default expiry timestamp value.
alirosvc_param_t alirosvc_param
Aliro service parameters. More...
bool | isAliroRunning = false
Indicates if Aliro is currently running.
ACWG_SessionContext_t | context_nfc
NFC session context.
ACWG_SessionContext_t | context_ble
NFC session context.
verblevel_t | nVerbosityLevel = VERB_VERBOSE
Verbosity level for logging. More...
uint8_t | ble_inhibit = 0
BLE inhibit flag.
uint8_t | globalCommProtectCnt = 0
Global communication protection counter.
uint8_t | UartChars [128+1] = {0}
UART character buffer.
uint16_t | UartChars_len = 0
Length of UART character buffer.
uint32_t | nTimeStampOffset = 0
Timestamp offset value.
int32_t | nTimeStampDeltaOffset = 0
Delta offset for timestamp calculations.
uint8_t | spsmDataBuf [2+1+((1+1) *2)+2] = {0}
Buffer for SPSM data.
uint16_t | savedselectedProtocolVersion_16 =0
Saved selected protocol version (16-bit).
static EXTI_HandleTypeDef | hst25_exti
EXTI handle for ST25.
static uint8_t | NFC_PROP_BUF [] = NFC_PROP_BUF_CONTENT
NFC proprietary buffer.
uint32_t | timeoutPrepareRanging = TIMEOUT_PREPARE_RANGING_DEFAULT
uint32_t | timeoutExecuteRanging = TIMEOUT_EXECUTE_RANGING_DEFAULT
uint32_t | timeoutSuspendRanging = TIMEOUT_SUSPEND_RANGING_DEFAULT
uint32_t | timeoutResumeRanging = TIMEOUT_RESUME_RANGING_DEFAULT
uint32_t | timeoutDoorOperation = TIMEOUT_DOOR_OPERATION_DEFAULT

Detailed Description

: Aliro application main logic and command processing

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ __byteswap32

#define __byteswap32 ( _u32val )
Value:
(\
((((uint32_t) (_u32val))<<24)&0xFF000000)| \
((((uint32_t) (_u32val))<<8 )&0x00FF0000)| \
((((uint32_t) (_u32val))>>8 )&0x0000FF00)| \
((((uint32_t) (_u32val))>>24)&0x000000FF)\
)

Macro to swap bytes in a 32-bit unsigned integer.

Function Documentation

◆ Aliro_SerialCmdExecute()

void Aliro_SerialCmdExecute | ( | uint8_t * | pRxBuffer,
 |  | uint16_t | iRxBufferSize
 | ) |  |

Executes a serial command received over UART.

Parameters
pRxBuffer | Pointer to received buffer.
iRxBufferSize | Size of received buffer.

◆ CryptoInit()

bool CryptoInit ( )

Initializes cryptographic modules and checks provisioning.

Returns
true if initialization is successful, false otherwise.

◆ DaysInMonth()

uint8_t DaysInMonth | ( | uint16_t | year,
 |  | uint8_t | month
 | ) |  |

Returns the number of days in a given month and year.

Parameters
year | Year value.
month | Month value.
Returns
Number of days in the month.

◆ demoPropNfcInitialize()

ReturnCode demoPropNfcInitialize ( void )

Initializes the proprietary NFC functionality for the demo application.

This function performs necessary initialization steps for the proprietary NFC features by marking the NFC_PROP_BUF as unused and calling the INIT_NFC_PROP macro.

Returns
ERR_NONE on successful initialization.

◆ demoPropNfcTechnologyDetection()

ReturnCode demoPropNfcTechnologyDetection ( void )

Demonstrates detection of proprietary NFC technology.

This function triggers the detection process for proprietary NFC technology by calling DET_NFC_PROP(). It always returns ERR_TIMEOUT.

Returns
ReturnCode Returns ERR_TIMEOUT after attempting detection.

◆ GetCompilerDateTime()

void GetCompilerDateTime ( struct tm * timeDate )

Initialize RTC and set the Time and Date

◆ parseAccElemCommand()

void parseAccElemCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |
Parameters
cmdBuffer | Pointer to the command string buffer.
processBuffer | Pointer to the buffer containing the data to process.
size | Size of the process buffer in bytes.

◆ parseCredIsPkCommand()

void parseCredIsPkCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses the Credential Issuer Public Key (CRispk) command from the input buffer and saves it to flash.

This function processes the input buffer to extract a Credential Issuer public key in hexadecimal format, converts it to binary, and saves it to flash memory if the size is correct.

Parameters
cmdBuffer | Pointer to the command buffer containing the command string.
processBuffer | Pointer to the buffer containing the data to be processed.
size | Size of the data in the process buffer.

The function expects the Credential Issuer public key to be provided as a 64-byte value in hexadecimal format (128 characters). If the size does not match the expected value, an error message is logged.

◆ parseDEVpbkCommand()

void parseDEVpbkCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses and processes a DEVpbk command from the input buffer.

This function advances the process buffer past the command string, checks for the expected '04' prefix, and verifies the size of the remaining data. If the data is valid, it converts the hex string to a binary public key and saves it to flash. Logs are generated for each step and error condition.

Parameters
cmdBuffer | Pointer to the command string buffer.
processBuffer | Pointer to the buffer containing the data to process.
size | Size of the process buffer in bytes.

◆ parseEchoCommand()

void parseEchoCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses and logs an echo command.

This function takes a command buffer and a process buffer, appends a null terminator at the specified size, and logs the received echo command along with the current time and date.

Parameters
cmdBuffer | Pointer to the command buffer containing the command string.
processBuffer | Pointer to the buffer to be processed and logged.
size | The size of the process buffer to be considered for logging.

◆ parseRDgrrkCommand()

void parseRDgrrkCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses the RDgrrk command from the input buffer and saves the Group Resolving Key to flash.

This function processes the input command buffer, extracts the Group Resolving Key in hexadecimal format, converts it to binary, and saves it to flash memory if the size is correct.

Parameters
cmdBuffer | Pointer to the command buffer containing the command string.
processBuffer | Pointer to the buffer containing the data to be processed.
size | Size of the data in the process buffer.

The function expects the Group Resolving Key to be provided as a 16-byte value in hexadecimal format (32 characters). If the size does not match the expected value, an error message is logged.

◆ parseRDidenCommand()

void parseRDidenCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses the RDiden command from the input buffer and saves the Reader identifier to flash.

This function processes the input command buffer, extracts the Reader identifier in hexadecimal format, converts it to binary, and saves it to flash memory if the size is correct.

Parameters
cmdBuffer | Pointer to the command buffer containing the command string.
processBuffer | Pointer to the buffer containing the data to be processed.
size | Size of the data in the process buffer.

The function expects the Reader identifier to be provided as a 32-byte value in hexadecimal format (64 characters). If the size does not match the expected value, an error message is logged.

◆ parseRDprvkCommand()

void parseRDprvkCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses and processes the RDprvk command from the input buffer.

This function advances the processBuffer pointer past the command string, checks if the remaining buffer size matches the expected length for a 32-byte private key in hexadecimal format (64 characters), and if so, converts the hex string to binary and saves it to flash memory.

Parameters
cmdBuffer | Pointer to the command string.
processBuffer | Pointer to the buffer containing the command and data.
size | Size of the processBuffer in bytes.

◆ parseRDpubkCommand()

void parseRDpubkCommand | ( | char * | cmdBuffer,
 |  | uint8_t * | processBuffer,
 |  | uint32_t | size
 | ) |  |

Parses and processes the Reader Public Key (RDpubk) command from the input buffer.

This function checks if the input buffer contains a valid RDpubk command, which should start with "04" followed by a 64-byte public key in hexadecimal format (128 hex characters). If the format is correct, the public key is converted from hex string to binary and saved to flash memory.

Parameters
cmdBuffer | Pointer to the command buffer (null-terminated string).
processBuffer | Pointer to the buffer containing the data to be processed.
size | Size of the processBuffer in bytes.
Note
The function expects the processBuffer to start with "04" followed by the public key in hex format. If the format or size is incorrect, appropriate log messages are generated.

◆ ProcessUartInput()

void ProcessUartInput ( void )

Processes UART input data.

Processes UART input commands.

This function reads a single character command from the UART input buffer and performs actions based on the received command. It supports setting verbosity levels and displaying system status information.

◆ SecondMillis_CallBack_TimeStamp()

void SecondMillis_CallBack_TimeStamp | ( | char * | Data,
 |  | uint16_t | SizeMax,
 |  | uint16_t * | TimeStampSize
 | ) |  |

Generates a timestamp string in the format "[seconds.milliseconds] ".

This function creates a timestamp based on the current tick value returned by HAL_GetTick(). The timestamp is formatted as "[%d.%03d] ", where d is the number of seconds and %03d is the number of milliseconds. The formatted string is stored in the provided Data buffer.

Parameters
[out] | Data | Pointer to the buffer where the timestamp string will be stored.
[in] | SizeMax | Maximum size of the Data buffer.
[out] | TimeStampSize | Pointer to a variable where the size of the generated timestamp string will be stored.
Note
If the formatted string fits in the buffer, TimeStampSize will be set to its length; otherwise, it will be zero.

◆ SetVerbosityLevel()

void SetVerbosityLevel ( uint8_t c )

Sets the verbosity level for logging.

Parameters
c Character representing verbosity level.

Variable Documentation

◆ alirosvc_param

alirosvc_param_t alirosvc_param
Initial value:
=
{
.proposedSPSM = {0x00,0x8f},
.supportedProtocolVersion = {HIGH_BYTE(ALIRO_PROT_VER_DEFAULT), LOW_BYTE(ALIRO_PROT_VER_DEFAULT)},
.featuresSupported = {0x00}
}

Aliro service parameters.

◆ H_ALIRO_UART

UART_HandleTypeDef H_ALIRO_UART
extern

External declaration of the UART handle for Aliro application.

This handle is used to interface with the UART peripheral in the Aliro application. It should be defined and initialized elsewhere in the project.

◆ resp

uint8_t resp[]
Initial value:
= {
0xa2, 0x01, 0xa2, 0x01, 0xa1, 0x67, 0x61, 0x6c, 0x69, 0x72, 0x6f, 0x2d, 0x61, 0x81, 0xd8, 0x18, 0x58, 0x43, 0xa4, 0x01, 0x00, 0x02, 0x58, 0x20, 0x27, 0x0e, 0xcc, 0x9f, 0x16, 0xff, 0xf3, 0x70, 0x43, 0x5c, 0x8d, 0x37, 0xeb, 0xa9, 0xa4, 0x7b, 0x7a, 0x42, 0xfa, 0xf8, 0xbc, 0xeb, 0x87, 0x47, 0xff, 0x53, 0xa2, 0x16, 0x6f, 0xde, 0x0b, 0x02, 0x03, 0x6b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
0x79, 0x34, 0x30, 0x34, 0x04, 0xa2, 0x00, 0x01, 0x01, 0x4a, 0x69, 0x64, 0x67, 0x6f, 0x65, 0x73, 0x68, 0x65, 0x72, 0x65, 0x02, 0x84, 0x43, 0xa1, 0x01, 0x26, 0xa1, 0x18, 0x21, 0x59, 0x01, 0x9a, 0x30, 0x82, 0x01, 0x96, 0x30, 0x82, 0x01, 0x3b, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x14, 0x26, 0x9e, 0xf0, 0x1c, 0xe2, 0x83, 0xaf, 0xa8, 0x17, 0x67, 0x92, 0x32, 0x2a, 0x2f, 0xf4, 0x02, 0x5e, 0x68,
0xe4, 0xe8, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x25, 0x31, 0x23, 0x30, 0x21, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1a, 0x41, 0x6c, 0x69, 0x72, 0x6f, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x43, 0x41, 0x30, 0x20, 0x17, 0x0d, 0x32, 0x34, 0x30, 0x31, 0x30, 0x31, 0x31, 0x37,
0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x32, 0x31, 0x30, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x25, 0x31, 0x23, 0x30, 0x21, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1a, 0x41, 0x6c, 0x69, 0x72, 0x6f, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x20, 0x43, 0x41, 0x30, 0x59, 0x30, 0x13,
0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04, 0x2b, 0xf2, 0xb4, 0xce, 0x3a, 0xe9, 0xbe, 0x65, 0x10, 0x84, 0x59, 0x35, 0x24, 0x9d, 0x40, 0x4e, 0x6d, 0xb6, 0xfc, 0x54, 0x47, 0x39, 0x3b, 0x36, 0xc3, 0x5d, 0xd3, 0xa5, 0xc4, 0x99, 0x33, 0x50, 0x4f, 0xec, 0x86, 0xbe, 0x64, 0x41, 0x34, 0xb9, 0x26, 0xa6,
0xd8, 0x8e, 0x4e, 0x49, 0xfc, 0x41, 0xff, 0x6a, 0xcb, 0xc8, 0xf6, 0xd0, 0x69, 0x86, 0x14, 0x93, 0xdb, 0xb4, 0x34, 0x1d, 0x21, 0x16, 0xa3, 0x47, 0x30, 0x45, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0x86, 0x30, 0x1f, 0x06,
0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xf6, 0xb4, 0x04, 0xc2, 0x39, 0xbd, 0xbe, 0x48, 0x72, 0x42, 0x94, 0x9c, 0xb3, 0x4d, 0x38, 0xfa, 0x14, 0x72, 0x73, 0xbf, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30, 0x46, 0x02, 0x21, 0x00, 0xfb, 0xe1, 0x42, 0x2d, 0x18, 0xb4, 0xde, 0xbc, 0x16, 0x66, 0x37, 0xfe, 0xd3, 0x00, 0xab,
0xb3, 0xcb, 0xea, 0xbf, 0xf5, 0x16, 0xf8, 0xcb, 0xb4, 0x25, 0xac, 0xc7, 0x1b, 0x77, 0x29, 0xb7, 0xf7, 0x02, 0x21, 0x00, 0xa1, 0x91, 0x20, 0x69, 0x18, 0xa1, 0xbe, 0x3e, 0xaf, 0xa5, 0xd2, 0xad, 0x51, 0x4b, 0x58, 0xd0, 0xb5, 0x8d, 0x28, 0xc8, 0x83, 0x6b, 0x0b, 0xc8, 0x1b, 0x88, 0x73, 0x31, 0x10, 0xa4, 0x5c, 0x35, 0x58, 0xe1, 0xd8, 0x18, 0x58, 0xdd, 0xa7, 0x01, 0x63, 0x31, 0x2e, 0x30, 0x02,
0x67, 0x53, 0x48, 0x41, 0x2d, 0x32, 0x35, 0x36, 0x03, 0xa1, 0x67, 0x61, 0x6c, 0x69, 0x72, 0x6f, 0x2d, 0x61, 0xa1, 0x00, 0x58, 0x20, 0xad, 0x4a, 0x6d, 0x3b, 0x1f, 0x5d, 0x3f, 0x5a, 0x22, 0x91, 0xe4, 0x4f, 0xb5, 0x42, 0xe0, 0x85, 0xd4, 0xfb, 0xad, 0x0f, 0xb5, 0x3e, 0xbe, 0xe6, 0xad, 0x99, 0x75, 0x6a, 0xaa, 0x64, 0x5c, 0x44, 0x04, 0xa1, 0x01, 0xa4, 0x01, 0x02, 0x20, 0x01, 0x21, 0x58, 0x20,
0xc1, 0xe3, 0x67, 0x66, 0xa9, 0xbd, 0x99, 0x03, 0xe5, 0x01, 0x45, 0x72, 0x19, 0x2a, 0xe6, 0x18, 0x46, 0x80, 0x37, 0x38, 0x4d, 0x92, 0x56, 0x73, 0xa2, 0x7a, 0xa7, 0x9e, 0xf8, 0x14, 0x39, 0xda, 0x22, 0x58, 0x20, 0xfa, 0xec, 0x23, 0x9c, 0x87, 0x51, 0x09, 0x06, 0x49, 0x6b, 0xfe, 0x18, 0xd8, 0xf7, 0xe0, 0xb3, 0x87, 0x42, 0x79, 0xd5, 0xf8, 0x1a, 0x20, 0x3e, 0xdf, 0x91, 0x56, 0x0b, 0x18, 0xe3,
0x76, 0xd3, 0x05, 0x67, 0x61, 0x6c, 0x69, 0x72, 0x6f, 0x2d, 0x61, 0x06, 0xa3, 0x01, 0xc0, 0x74, 0x32, 0x30, 0x32, 0x34, 0x2d, 0x30, 0x36, 0x2d, 0x30, 0x31, 0x54, 0x31, 0x37, 0x3a, 0x31, 0x33, 0x3a, 0x33, 0x30, 0x5a, 0x02, 0xc0, 0x74, 0x32, 0x30, 0x32, 0x34, 0x2d, 0x30, 0x36, 0x2d, 0x30, 0x31, 0x54, 0x31, 0x37, 0x3a, 0x31, 0x33, 0x3a, 0x33, 0x30, 0x5a, 0x03, 0xc0, 0x74, 0x32, 0x30, 0x32,
0x35, 0x2d, 0x30, 0x36, 0x2d, 0x30, 0x31, 0x54, 0x31, 0x37, 0x3a, 0x31, 0x33, 0x3a, 0x33, 0x30, 0x5a, 0x07, 0xf4, 0x58, 0x40, 0xbc, 0xe2, 0x01, 0x8e, 0xaa, 0xa3, 0x7b, 0xb8, 0xcd, 0x49, 0x62, 0xf3, 0xd2, 0xf4, 0xea, 0x4e, 0xae, 0x20, 0xdc, 0xfd, 0xcf, 0x54, 0x61, 0x47, 0x3f, 0xf2, 0xeb, 0x13, 0x4c, 0x92, 0x3c, 0xe3, 0xd6, 0x6f, 0x99, 0xbd, 0xd8, 0xa6, 0xca, 0xc5, 0xa4, 0x31, 0x9f, 0xa7,
0x89, 0x87, 0xe7, 0x33, 0x4c, 0x85, 0x67, 0x23, 0x29, 0x38, 0xc0, 0x41, 0xa8, 0x42, 0xdf, 0x80, 0x82, 0x10, 0x5c, 0xd8, 0x05, 0x67, 0x61, 0x6c, 0x69, 0x72, 0x6f, 0x2d, 0x61
}

◆ statItems

statItem_t statItems[]
Initial value:
=
{
{ SELECT_APP_POS, "START ", 1 , 0 },
{ END_SELECT_APP_POS, "SELECT ", 1 , 0 },
{ AUTH0_POS, "PRE AUTH0", 1 , 0 },
{ END_AUTH0_POS, "AUTH0 ", 1 , 0 },
{ LOADCERT_POS, "PRE LOAD ", 1 , 0 },
{ END_LOADCERT_POS, "LOADCERT ", 1 , 0 },
{ AUTH1_POS, "PRE AUTH1", 1 , 0 },
{ END_AUTH1_POS, "AUTH1 ", 1 , 0 },
{ CONTROL_FLOW_POS, "PRE CFLOW", 1 , 0 },
{ END_CONTROL_FLOW_POS, "CFLOW ", 1 , 0 },
{ EXCHANGE_POS, "PRE EXCH ", 1 , 0 },
{ END_EXCHANGE_POS, "EXCH ", 1 , 0 },
{ STEPUP_POS, "PRE STUP ", 1 , 0 },
{ END_STEPUP_POS, "STUP ", 1 , 0 },
{ DOOR_IS_OPENED_POS, "DOOR OP ", 1 , 0 },
{ DOOR_IS_CLOSED_POS, "DOOR CL ", 0 , 0 },
{ DOOR_IS_DISARMED_POS, "DOOR DIS ", 0 , 0 },
{ DON_T_KNOW_POS, "DONT KNOW", 0 , 0 },
{ DERIVE_PERSISTENT_KEYS_POS, "PERS KEYS", 1 , 0 },
{ END_DERIVE_PERSISTENT_KEYS_POS, "PERS KEYS", 1 , 0 },
{ ELAPSED_TIME_POS, "ELAPSED ", 1 , 0 },
}
END_STEPUP_POS
@ END_STEPUP_POS
Definition: app_aliro.h:97
END_SELECT_APP_POS
@ END_SELECT_APP_POS
Definition: app_aliro.h:85
END_LOADCERT_POS
@ END_LOADCERT_POS
Definition: app_aliro.h:89
DERIVE_PERSISTENT_KEYS_POS
@ DERIVE_PERSISTENT_KEYS_POS
Definition: app_aliro.h:103
END_EXCHANGE_POS
@ END_EXCHANGE_POS
Definition: app_aliro.h:95
DOOR_IS_CLOSED_POS
@ DOOR_IS_CLOSED_POS
Definition: app_aliro.h:99
AUTH1_POS
@ AUTH1_POS
Definition: app_aliro.h:90
END_CONTROL_FLOW_POS
@ END_CONTROL_FLOW_POS
Definition: app_aliro.h:93
SELECT_APP_POS
@ SELECT_APP_POS
Definition: app_aliro.h:84
DOOR_IS_OPENED_POS
@ DOOR_IS_OPENED_POS
Definition: app_aliro.h:98
CONTROL_FLOW_POS
@ CONTROL_FLOW_POS
Definition: app_aliro.h:92
EXCHANGE_POS
@ EXCHANGE_POS
Definition: app_aliro.h:94
STEPUP_POS
@ STEPUP_POS
Definition: app_aliro.h:96
AUTH0_POS
@ AUTH0_POS
Definition: app_aliro.h:86
END_AUTH0_POS
@ END_AUTH0_POS
Definition: app_aliro.h:87
DOOR_IS_DISARMED_POS
@ DOOR_IS_DISARMED_POS
Definition: app_aliro.h:100
ELAPSED_TIME_POS
@ ELAPSED_TIME_POS
Definition: app_aliro.h:106
DON_T_KNOW_POS
@ DON_T_KNOW_POS
Definition: app_aliro.h:101
END_AUTH1_POS
@ END_AUTH1_POS
Definition: app_aliro.h:91
END_DERIVE_PERSISTENT_KEYS_POS
@ END_DERIVE_PERSISTENT_KEYS_POS
Definition: app_aliro.h:104
LOADCERT_POS
@ LOADCERT_POS
Definition: app_aliro.h:88
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src/app_nfc.c File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Macros | Functions | Variables
app_nfc.c File Reference

: Aliro NFC application main logic More...

#include "app_nfc.h"
#include "../ST25R200/utils.h"
#include "rfal_nfc.h"
#include "rfal_t2t.h"
#include <string.h>
#include "provisioning.h"
#include "app_aliro.h"
#include "tlwrapper.h"
Include dependency graph for app_nfc.c:

Macros

#define | DEMO_ST_NOTINIT 0
Demo State: Not initialized or stopped. More...
#define | DEMO_ST_START_DISCOVERY 1
Demo State: Start NFC device discovery. More...
#define | DEMO_ST_DISCOVERY 2
Demo State: Discovery in progress. More...
#define | TEST_NFCV_TAG 0
#define | DEMO_NFCV_BLOCK_LEN 4
#define | DEMO_NFCV_USE_SELECT_MODE false
#define | DEMO_NFCV_WRITE_TAG false
#define | DEMO_LM_SEL_RES 0x20U
#define | DEMO_LM_NFCID2_BYTE1 0x02U
#define | DEMO_LM_SC_BYTE1 0x12U
#define | DEMO_LM_SC_BYTE2 0xFCU
#define | DEMO_LM_PAD0 0x00U
#define | BIT8 128
#define | BIT7 64
#define | BIT6 32
#define | BIT5 16
#define | BIT4 8
#define | BIT3 4
#define | BIT2 2
#define | BIT1 1
#define | PLATFORM_LED_AP2P_PORT PLATFORM_LED_F_PORT
#define | PLATFORM_LED_AP2P_PIN PLATFORM_LED_F_PIN
#define | CANNOT_CONTINUE() (!((err == ERR_NONE) && (secondLastValue == 0x90 && lastValue == 0x00)))

Functions

static void | demoAPDU (ACWG_SessionContext_t *context)
Demo APDUs Exchange. More...
static void | demoNotif (rfalNfcState st)
Demo Notification. More...
ReturnCode | demoTransceiveBlocking (uint8_t *txBuf, uint16_t txBufSize, uint8_t **rxData, uint16_t **rcvLen, uint32_t fwt)
Demo Blocking Transceive. More...
uint16_t | AliroNfcGetDiscoverTechs2Find (void)
Returns the RFAL NFC Discovery Parameter: Tech2Find. More...
uint16_t | AliroNfcGetDiscoverTotalDuration (void)
Returns the RFAL NFC Discovery Parameter: Total Duration. More...
bool | AliroNfcIni (ACWG_SessionContext_t *context)
Demo Ini. More...
char * | hex2Str (unsigned char *data, size_t dataLen)
Converts a byte array to a hexadecimal string. More...
void | demoT2t (void)
Reads a block from a Type 2 Tag and logs the result.
void | CheckAppCmds (void)
Checks and processes application commands related to NFC wakeup.
void | AliroNfcCycle (ACWG_SessionContext_t *context)
Demo Cycle. More...
void | AliroNfcStop (void)
Demo Stop. More...
uint8_t | VerifyEndpointPubKey (ACWG_SessionContext_t *context)
Verifies the endpoint public key in the session context. More...
void | AliroNfcHwInit (void)
Initializes the NFC hardware and configures interrupts. More...
int32_t | BSP_NFC0XCOMM_SendRecv (const uint8_t *const pTxData, uint8_t *const pRxData, uint16_t Length)
SPI Read and Write byte(s) to device. More...
__weak ReturnCode | demoPropNfcInitialize (void)
__weak ReturnCode | demoPropNfcTechnologyDetection (void)

Variables

static uint8_t | NFCID3 [] = {0x01, 0xFE, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A}
static uint8_t | GB [] = {0x46, 0x66, 0x6d, 0x01, 0x01, 0x11, 0x02, 0x02, 0x07, 0x80, 0x03, 0x02, 0x00, 0x03, 0x04, 0x01, 0x32, 0x07, 0x01, 0x03}
static rfalNfcDiscoverParam | discParam
static uint8_t | state = DEMO_ST_NOTINIT
static bool | multiSel

Detailed Description

: Aliro NFC application main logic

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ DEMO_LM_NFCID2_BYTE1

#define DEMO_LM_NFCID2_BYTE1 0x02U

NFC-F SENSF_RES configured for Type 3 Tag Platform

◆ DEMO_LM_PAD0

#define DEMO_LM_PAD0 0x00U

NFC-F PAD0

◆ DEMO_LM_SC_BYTE1

#define DEMO_LM_SC_BYTE1 0x12U

NFC-F System Code byte 1

◆ DEMO_LM_SC_BYTE2

#define DEMO_LM_SC_BYTE2 0xFCU

NFC-F System Code byte 2

◆ DEMO_LM_SEL_RES

#define DEMO_LM_SEL_RES 0x20U

NFC-A SEL_RES configured for Type 4A Tag Platform

◆ DEMO_NFCV_BLOCK_LEN

#define DEMO_NFCV_BLOCK_LEN 4

NFCV Block len

◆ DEMO_NFCV_USE_SELECT_MODE

#define DEMO_NFCV_USE_SELECT_MODE false

NFCV demonstrate select mode

◆ DEMO_NFCV_WRITE_TAG

#define DEMO_NFCV_WRITE_TAG false

NFCV demonstrate Write Single Block

◆ DEMO_ST_DISCOVERY

#define DEMO_ST_DISCOVERY 2

Demo State: Discovery in progress.

Demo State: Discovery

◆ DEMO_ST_NOTINIT

#define DEMO_ST_NOTINIT 0

Demo State: Not initialized or stopped.

Demo State: Not initialized | Stopped

◆ DEMO_ST_START_DISCOVERY

#define DEMO_ST_START_DISCOVERY 1

Demo State: Start NFC device discovery.

Demo State: Start Discovery

Function Documentation

◆ BSP_NFC0XCOMM_SendRecv()

int32_t BSP_NFC0XCOMM_SendRecv | ( | const uint8_t *const | pTxData,
 |  | uint8_t *const | pRxData,
 |  | uint16_t | Length
 | ) |  |

SPI Read and Write byte(s) to device.

Parameters
[in] | pTxData | : Pointer to data buffer to write
[out] | pRxData | : Pointer to data buffer for read data
[in] | Length | : number of bytes to write
Returns
BSP status

◆ demoAPDU()

void demoAPDU ( ACWG_SessionContext_t * context )
static

Demo APDUs Exchange.

Example how to exchange a set of predefined APDUs with PICC. The NDEF application will be selected and then CC will be selected and read.

Exchanges a set of predefined APDUs with PICC. Selects the NDEF application and reads the Capability Container.

Parameters
context Pointer to the session context.

◆ demoNotif()

static void demoNotif ( rfalNfcState st )
static

Demo Notification.

This function receives the event notifications from RFAL

Notification callback for NFC state changes.

Receives event notifications from RFAL and handles state transitions.

Parameters
st The current NFC state.

◆ demoTransceiveBlocking()

ReturnCode demoTransceiveBlocking | ( | uint8_t * | txBuf,
 |  | uint16_t | txBufSize,
 |  | uint8_t ** | rxData,
 |  | uint16_t ** | rcvLen,
 |  | uint32_t | fwt
 | ) |  |

Demo Blocking Transceive.

Helper function to send data in a blocking manner via the rfalNfc module

Warning
A protocol transceive handles long timeouts (several seconds), transmission errors and retransmissions which may lead to a long period of time where the MCU/CPU is blocked in this method. This is a demo implementation, for a non-blocking usage example please refer to the Examples available with RFAL
Parameters
[in] | txBuf | : data to be transmitted
[in] | txBufSize | : size of the data to be transmited
[out] | rxData | : location where the received data has been placed
[out] | rcvLen | : number of data bytes received
[in] | fwt | : FWT to be used (only for RF frame interface, otherwise use RFAL_FWT_NONE)
Returns
ERR_PARAM : Invalid parameters
ERR_TIMEOUT : Timeout error
ERR_FRAMING : Framing error detected
ERR_PROTO : Protocol error detected
ERR_NONE : No error, activation successful

Helper function to send data in a blocking manner via the rfalNfc module.

Parameters
txBuf | Data to be transmitted.
txBufSize | Size of the data to be transmitted.
rxData | Location where the received data has been placed.
rcvLen | Number of data bytes received.
fwt | FWT to be used.
Returns
ReturnCode indicating the result of the operation.

◆ hex2Str()

char * hex2Str | ( | unsigned char * | data,
 |  | size_t | dataLen
 | ) |  |

Converts a byte array to a hexadecimal string.

Parameters
data | Pointer to the data array.
dataLen | Length of the data array.
Returns
Pointer to the static output string.

◆ VerifyEndpointPubKey()

uint8_t VerifyEndpointPubKey ( ACWG_SessionContext_t * context )

Verifies the endpoint public key in the session context.

Parameters
context Pointer to the session context.
Returns
1 if verification is successful, 0 otherwise.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src/flash_mng.c File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Functions
flash_mng.c File Reference

: Flash management functions More...

#include "flash_mng.h"
Include dependency graph for flash_mng.c:

Functions

static uint32_t | GetPage (uint32_t Addr)
Gets the page of a given address. More...
flashOpStatus_e | EraseFlash (uint32_t nAddress, uint32_t nBytes)
Erases a region of flash memory. More...
flashOpStatus_e | EraseWriteToFlash (void *datapointer, uint32_t nBytes, uint32_t nAddress)
Erases the flash sector and writes data to it. More...
flashOpStatus_e | WriteToFlash (void *datapointer, uint32_t nBytes, uint32_t nAddress)
Writes data to flash memory. More...

Detailed Description

: Flash management functions

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Function Documentation

◆ GetPage()

static uint32_t GetPage ( uint32_t Addr )
static

Gets the page of a given address.

Parameters
Addr Address of the FLASH Memory
Return values
The page of a given address
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src/provisioning.c File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Macros | Functions | Variables
provisioning.c File Reference

: Provisioning management functions More...

#include "provisioning.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "flash_mng.h"
#include "logger.h"
#include "app_aliro.h"
#include "rfal_platform.h"
#include "provisioning_info.h"
#include "sm_crypto.h"
Include dependency graph for provisioning.c:

Macros

#define | AUTH_CERTIFICATE_MAX_LEN_BYTES ((uint32_t)420)
Maximum allowed length (in bytes) for an authentication certificate. More...
#define | PROVISIONING_JSON_INVALIDATE_STR "invalidate"
String literal used to represent the "invalidate" action in provisioning JSON operations.
#define | PROVISIONING_JSON_INVALIDATE_ADDRESS (PROVISIONING_JSON_START_ADDRESS + 0x2000 - 16)
Address in flash memory where the provisioning JSON invalidate string is stored. More...
#define | PROVISIONING_JSON_INVALIDATE_LEN (strlen(PROVISIONING_JSON_INVALIDATE_STR))
Length of the provisioning JSON invalidate string.
#define | COMPUTE_SHA1(IN, LEN, OUT) SM_sha1(IN, LEN, OUT)
Computes the SHA-1 hash of the input data. More...
#define | READER_CERTIF_BUF (getProvisioningFromFlash()->certificate_data)
Macro to access the certificate data buffer from the provisioning structure stored in flash memory. More...
#define | READER_CERTIF_LEN (getProvisioningFromFlash()->certificate_len)
Macro that retrieves the length of the reader's certificate from provisioning data stored in flash memory. More...
#define | READER_PUB_KEY_BUF (getProvisioningFromFlash()->readerPubK)
Macro to access the reader's public key buffer from provisioning data stored in flash memory. More...
#define | PROVISIONING_LOG(...) do{HAL_Delay(2);LOG_INFO_APP(__VA_ARGS__);}while(0)
Logs provisioning-related information using the application logging mechanism. More...

Functions

void | hexStrToHex (char *p, uint32_t len, uint8_t *hexp)
Converts a hex string to a hex buffer. More...
char * | strnstr (const char *s, const char *find, size_t slen)
void | printHex (char *pstr, uint8_t *pBuf, uint32_t nSize)
Prints a buffer in hexadecimal format. More...
uint32_t | extractJsonData (char *Str, char *startStr, char *stopStr, char **extStr)
Extracts data from a JSON string between start and stop markers. More...
bool | isValidFlashJson (uint32_t jsonAddress)
Checks if the JSON data in flash is valid. More...
bool | isValidProvisioning (provstruct_t *prov)
Checks if the provisioning structure is valid. More...
void | showJsonStatus ()
Shows the status of the JSON provisioning data.
void | showProvisioningStatus ()
Shows the status of the provisioning data.
void | saveProvisioningToFlash (uint32_t profile_num)
Saves the provisioning data to flash memory. More...
provstruct_t * getProvisioningFromFlash ()
Retrieves the provisioning data from flash memory. More...
void | convertDefaultProvisioningFromJson ()
Converts default provisioning data from JSON format.
void | loadProvisionFromJson (uint32_t jsonAddress, provstruct_t *provstruct)
Loads provisioning data from a JSON address. More...
void | convertProvisioningFromJson (uint32_t jsonAddress)
Converts provisioning data from JSON format. More...
void | sprintfHex (char *str, uint8_t *buff, uint32_t len)
Converts a buffer to a hexadecimal string. More...
void | printfHex0x (char *titl_str, uint8_t *buff, uint32_t len)
Print a buffer as a C array #define. More...
void | printDeviceJson ()
Prints the device JSON data.
uint8_t | ProvisioningCheckEndpointPubK (uint8_t *endp_PubK)
Checks the endpoint public key for provisioning. More...
bool | CheckReaderPubK (void)
Checks the reader public key. More...
void | saveRDPubKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader public key to flash memory. More...
void | saveAccessCredentialPuBK (uint8_t *pkey, const uint8_t ksize, uint8_t nSlot, uint8_t *pkeyname)
Saves the last access credential public key to the provisioning flash memory. More...
void | saveRDPrvKToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the reader device's private key to flash memory. More...
void | saveRDidenToFlash (const uint8_t *prid, const uint8_t ksize)
Saves the reader identifier to flash memory. More...
void | saveRDgrrkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the group resolving key to flash memory. More...
void | saveCredIsPkToFlash (const uint8_t *pkey, const uint8_t ksize)
Saves the credential issuer's public key to flash memory. More...
uint8_t | is_zeros (uint8_t *pBuf, uint32_t nSize)
Checks if all bytes in a buffer are zero. More...
uint8_t | ProvisioningGetEndpointPubKFromKeyslot (uint8_t *endp_PubK, uint8_t *endp_Keyslot, uint8_t *slotFound)
Retrieves the public key of an endpoint from a keyslot. More...

Variables

uint32_t | JSON_MAX_LEN = 1200
Maximum allowed length for JSON strings.
bool | confirm_conversion = false
Flag indicating whether the conversion has been confirmed.

Detailed Description

: Provisioning management functions

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ AUTH_CERTIFICATE_MAX_LEN_BYTES

#define AUTH_CERTIFICATE_MAX_LEN_BYTES ((uint32_t)420)

Maximum allowed length (in bytes) for an authentication certificate.

This macro defines the upper limit for the size of authentication certificates used in the provisioning process. The value is set to 420 bytes.

◆ COMPUTE_SHA1

#define COMPUTE_SHA1 | ( | IN,
 |  | LEN,
 |  | OUT
 | ) | SM_sha1(IN, LEN, OUT)

Computes the SHA-1 hash of the input data.

This macro wraps the SM_sha1 function to compute the SHA-1 digest of the provided input buffer.

Parameters
IN | Pointer to the input data buffer.
LEN | Length of the input data in bytes.
OUT | Pointer to the output buffer where the SHA-1 hash (20 bytes) will be stored.

◆ PROVISIONING_JSON_INVALIDATE_ADDRESS

#define PROVISIONING_JSON_INVALIDATE_ADDRESS (PROVISIONING_JSON_START_ADDRESS + 0x2000 - 16)

Address in flash memory where the provisioning JSON invalidate string is stored.

This macro calculates the address by adding an offset to the start address of the provisioning JSON. The offset is determined by subtracting 16 bytes from the total size of the provisioning JSON area (0x2000 bytes).

◆ PROVISIONING_LOG

#define PROVISIONING_LOG ( ... ) do{HAL_Delay(2);LOG_INFO_APP(__VA_ARGS__);}while(0)

Logs provisioning-related information using the application logging mechanism.

This macro wraps the LOG_INFO_APP function to provide a standardized way to log messages related to provisioning. It accepts a variable number of arguments, allowing formatted logging similar to printf.

Usage: PROVISIONING_LOG("Provisioning started for device: %s", device_id);

Parameters
... Variable arguments to be passed to LOG_INFO_APP.

◆ READER_CERTIF_BUF

#define READER_CERTIF_BUF (getProvisioningFromFlash()->certificate_data)

Macro to access the certificate data buffer from the provisioning structure stored in flash memory.

This macro retrieves the pointer to the certificate data by calling the function getProvisioningFromFlash() and accessing its certificate_data member. It is typically used to obtain the reader's certificate for authentication or secure communication purposes.

◆ READER_CERTIF_LEN

#define READER_CERTIF_LEN (getProvisioningFromFlash()->certificate_len)

Macro that retrieves the length of the reader's certificate from provisioning data stored in flash memory.

This macro accesses the certificate length field (certificate_len) from the structure returned by getProvisioningFromFlash(). It is used to determine the size of the reader's certificate for provisioning purposes.

◆ READER_PUB_KEY_BUF

#define READER_PUB_KEY_BUF (getProvisioningFromFlash()->readerPubK)

Macro to access the reader's public key buffer from provisioning data stored in flash memory.

This macro retrieves the pointer to the reader's public key by calling getProvisioningFromFlash() and accessing its member 'readerPubK'. It is typically used for cryptographic operations involving the reader's public key.

Function Documentation

◆ CheckReaderPubK()

bool CheckReaderPubK ( void )

Checks the reader public key.

Returns
true if valid, false otherwise.

◆ extractJsonData()

uint32_t extractJsonData | ( | char * | Str,
 |  | char * | startStr,
 |  | char * | stopStr,
 |  | char ** | extStr
 | ) |  |

Extracts data from a JSON string between start and stop markers.

Parameters
Str | Input string.
startStr | Start marker string.
stopStr | Stop marker string.
extStr | Pointer to extracted string.
Returns
Length of extracted data.

◆ isValidFlashJson()

bool isValidFlashJson ( uint32_t jsonAddress )

Checks if the JSON data in flash is valid.

Parameters
jsonAddress Address of the JSON data.
Returns
true if valid, false otherwise.

◆ isValidProvisioning()

bool isValidProvisioning ( provstruct_t * prov )

Checks if the provisioning structure is valid.

Parameters
prov Pointer to provisioning structure.
Returns
true if valid, false otherwise.

◆ printfHex0x()

void printfHex0x | ( | char * | titl_str,
 |  | uint8_t * | buff,
 |  | uint32_t | len
 | ) |  |

Print a buffer as a C array #define.

Parameters
titl_str | Name of the array.
buff | Input buffer.
len | Length of input buffer.

◆ printHex()

void printHex | ( | char * | pstr,
 |  | uint8_t * | pBuf,
 |  | uint32_t | nSize
 | ) |  |

Prints a buffer in hexadecimal format.

Parameters
pstr | Descriptive string.
pBuf | Buffer to print.
nSize | Size of the buffer.

◆ sprintfHex()

void sprintfHex | ( | char * | str,
 |  | uint8_t * | buff,
 |  | uint32_t | len
 | ) |  |

Converts a buffer to a hexadecimal string.

Parameters
str | Output string buffer.
buff | Input buffer.
len | Length of input buffer.

◆ strnstr()

char * strnstr | ( | const char * | s,
 |  | const char * | find,
 |  | size_t | slen
 | ) |  |

Find the first occurrence of find in s, where the search is limited to the first slen characters of s.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src/sm_crypto_mcu.c File Reference

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Src
Macros | Functions | Variables
sm_crypto_mcu.c File Reference

: MCU cryptographic functions using hardware accelerators More...

#include "sm_crypto_mcu.h"
#include <string.h>
#include <stdlib.h>
#include "provisioning.h"
Include dependency graph for sm_crypto_mcu.c:

Macros

#define | USE_MCU_HW_RNG
#define | USE_MCU_HW_ASYM
#define | HASH_TIMEOUT ((uint32_t)5)
#define | KDH_INFO_MAX_LEN_BYTES ((uint32_t)32)
#define | SHA256_BYTE_SIZE ((uint32_t)32)
#define | PKA_TIMEOUT ((uint32_t)3000)
#define | PRIVATE_KEY_SIZE_BYTES ((uint32_t)32)
#define | MODULUS_SIZE_BYTES PRIVATE_KEY_SIZE_BYTES
#define | MODULUS_SIZE_WORDS ((MODULUS_SIZE_BYTES + 3)/4)
#define | SECP256R1_ORDER_LEN_BITS ((uint32_t)256)
#define | SECP256R1_A_SIGN ((uint32_t)1)
#define | STATIC_PRIVATE_KEY (getProvisioningFromFlash()->staticPrivateKey)
#define | GET_UINT32_BE(n, b, i)

Functions

SM_Crypto_Error_t | SM_initCryptoMCU (RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp)
Initializes MCU cryptographic hardware modules. More...
SM_Crypto_Error_t | SM_genRandomBytes (uint8_t *bytes, uint32_t size)
Generates random bytes using MCU hardware RNG. More...
static uint32_t | NumberOfWords (uint32_t NumberOfBytes)
static SM_Crypto_Error_t | GeneratePrivateKey (uint8_t *pPrivateKey)
static SM_Crypto_Error_t | GeneratePublicKey (const uint8_t *pPrivateKey, uint8_t *pPublicKey)
SM_Crypto_Error_t | SM_Ecdh (const uint8_t *pPublicKey, uint8_t *pSharedSecret)
Performs ECDH key agreement using MCU hardware. More...
SM_Crypto_Error_t | SM_sign (const uint8_t *digest, uint32_t digestSize, uint8_t *signature)
Signs a digest using MCU hardware. More...
SM_Crypto_Error_t | SM_genKeypair (uint8_t *pub)
Generates a keypair using MCU hardware. More...
SM_Crypto_Error_t | SM_verify (const uint8_t *pPublicKey, const uint8_t *digest, const uint32_t digestSize, const uint8_t *signature)
Verifies a signature using MCU hardware. More...
SM_Crypto_Error_t | SM_getCertificate (uint8_t *certificate, uint32_t *certificateSize)
Gets the certificate from MCU hardware. More...
static SM_Crypto_Error_t | KDFKeyExpansionRound (const uint8_t *pKDK, const uint8_t *prev, const uint8_t *pFixedInfo, uint32_t fixedInfoSize, uint8_t counter, uint8_t *output)
SM_Crypto_Error_t | SM_sha1 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-1 hash using MCU hardware. More...
SM_Crypto_Error_t | SM_sha256 (uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-256 hash using MCU hardware. More...
SM_Crypto_Error_t | SM_sha256_start (void)
Starts SHA-256 computation using MCU hardware. More...
SM_Crypto_Error_t | SM_sha256_update (const uint8_t *input, uint32_t inputSize)
Updates SHA-256 computation with new data using MCU hardware. More...
SM_Crypto_Error_t | SM_sha256_finish (uint8_t *hash, const uint8_t *input, uint32_t inputSize)
Finishes SHA-256 computation and returns the hash using MCU hardware. More...
SM_Crypto_Error_t | KDFRandomnessExtraction (const uint8_t *Z, uint32_t ZSize, const uint8_t *salt, uint32_t saltSize, uint8_t *output)
Performs randomness extraction for KDF. More...
SM_Crypto_Error_t | SM_KDFRFC5869 (const uint8_t *pZ, uint32_t ZSize, const uint8_t *pSalt, uint32_t saltSize, const uint8_t *pFixedInfo, uint32_t fixedInfoSize, uint32_t L, uint8_t *pOutput)
Key Derivation Function RFC5869 using MCU hardware. More...
SM_Crypto_Error_t | SM_deriveKdh (const uint8_t *pZ, const uint8_t *info, uint32_t infoSize, uint8_t *pKdh)
Derives KDH key using MCU hardware. More...
SM_Crypto_Error_t | SM_aes256GcmDecrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pPayload, const uint32_t payloadSize, uint8_t *pPlaintext, const uint8_t *pTag)
Decrypts data using AES-256 GCM with MCU hardware. More...
SM_Crypto_Error_t | SM_aes256GcmEncrypt (const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pInput, const uint32_t inputSize, uint8_t *pOutput, uint32_t *pOutputSize)
Encrypts data using AES-256 GCM with MCU hardware. More...

Variables

static HASH_HandleTypeDef * | HHash = NULL
static CRYP_HandleTypeDef * | HCryp = NULL
static RNG_HandleTypeDef * | HRng = NULL
static PKA_HandleTypeDef * | HPka = NULL
static const uint8_t | SECP256R1_Prime []
static const uint8_t | SECP256R1_AbsA []
static const uint8_t | SECP256R1_B []
static const uint8_t | SECP256R1_Gx []
static const uint8_t | SECP256R1_Gy []
static const uint8_t | SECP256R1_Order []
static const uint8_t | SECP256R1_OrderMinus1 []
uint8_t | ephemeralPrivateKey [] = {0x3c, 0xf, 0x74, 0x11, 0x4c, 0xd2, 0xa0, 0x21, 0xe8, 0x6, 0x6e, 0xfb, 0xaa, 0x31, 0xdb, 0xb9, 0x7e, 0xf0, 0x5, 0x42, 0x72, 0x19, 0x26, 0x6, 0xfd, 0x96, 0x63, 0x3a, 0x4, 0xf6, 0x62, 0x14}

Detailed Description

: MCU cryptographic functions using hardware accelerators

Attention

Copyright (c) 2025 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ GET_UINT32_BE

#define GET_UINT32_BE | ( | n,
 |  | b,
 |  | i
 | ) |
Value:
do { \
(n) = ( (uint32_t) (b)[(i) ] << 24 ) \
| ( (uint32_t) (b)[(i) + 1] << 16 ) \
| ( (uint32_t) (b)[(i) + 2] << 8 ) \
| ( (uint32_t) (b)[(i) + 3] ); \
} while( 0 )

Function Documentation

◆ KDFRandomnessExtraction()

SM_Crypto_Error_t KDFRandomnessExtraction | ( | const uint8_t * | Z,
 |  | uint32_t | ZSize,
 |  | const uint8_t * | salt,
 |  | uint32_t | saltSize,
 |  | uint8_t * | output
 | ) |  |

Performs randomness extraction for KDF.

Parameters
Z | Pointer to input keying material.
ZSize | Size of input keying material.
salt | Pointer to salt.
saltSize | Size of salt.
output | Pointer to output buffer.
Returns
SM_Crypto_Error_t error code.

Variable Documentation

◆ SECP256R1_AbsA

const uint8_t SECP256R1_AbsA[]
static
Initial value:
=
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03 }

◆ SECP256R1_B

const uint8_t SECP256R1_B[]
static
Initial value:
=
{ 0x5a, 0xc6, 0x35, 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, 0x76,
0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, 0xf6, 0x3b,
0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b }

◆ SECP256R1_Gx

const uint8_t SECP256R1_Gx[]
static
Initial value:
=
{ 0x6b, 0x17, 0xd1, 0xf2, 0xe1, 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, 0xe5, 0x63,
0xa4, 0x40, 0xf2, 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, 0xf4,
0xa1, 0x39, 0x45, 0xd8, 0x98, 0xc2, 0x96 }

◆ SECP256R1_Gy

const uint8_t SECP256R1_Gy[]
static
Initial value:
=
{ 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, 0x7f, 0x9b, 0x8e, 0xe7, 0xeb, 0x4a, 0x7c,
0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33, 0x57, 0x6b, 0x31, 0x5e, 0xce, 0xcb,
0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5 }

◆ SECP256R1_Order

const uint8_t SECP256R1_Order[]
static
Initial value:
=
{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, 0xf3,
0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51 }

◆ SECP256R1_OrderMinus1

const uint8_t SECP256R1_OrderMinus1[]
static
Initial value:
=
{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, 0xf3,
0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x50 }

◆ SECP256R1_Prime

const uint8_t SECP256R1_Prime[]
static
Initial value:
=
{ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: _doxygen_X-CUBE-ALIRO-MainPage.h File Reference

  • File List
  • Globals
_doxygen_X-CUBE-ALIRO-MainPage.h File Reference

This file contains definitions needed only for Doxygen documents. More...

Go to the source code of this file.

Detailed Description

This file contains definitions needed only for Doxygen documents.

Author
System Lab
Version
V1.0.0
Date
September-2025
Attention

© Copyright (c) 2025 STMicroelectronics International N.V. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:

  1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software without specific written permission.
  4. This software, including modifications and/or derivative works of this software, must execute solely and exclusively on microcontroller or microprocessor devices manufactured by or for STMicroelectronics.
  5. Redistribution and use of this software other than as permitted under this license is void and will automatically terminate your rights under this license.

THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- _ -

  • __byteswap32 : app_aliro.c
  • _flashOpStatus : flash_mng.h
  • _timeStampsPos : app_aliro.h
  • _tlw_error : tlwrapper.h
  • _verblevel : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- a -

  • ABI_VERSION : app_build_info.h
  • access_mngr_data : tlwrapper.h
  • ACWG_ALIRO_SPEC_VERSION_MAJ : ACWG_build_info.h
  • ACWG_ALIRO_SPEC_VERSION_MIN : ACWG_build_info.h
  • ACWG_ALIRO_SPEC_VERSION_SUBMIN : ACWG_build_info.h
  • ACWG_BI_VERSION : ACWG_build_info.h
  • ACWG_build_info_t : ACWG_build_info.h
  • ACWG_computeKDHandVolatileKeys() : ACWG_Security.h
  • ACWG_decryptBle() : ACWG_Security.h
  • ACWG_derivePersistentKeys() : ACWG_Security.h
  • ACWG_encryptBle() : ACWG_Security.h
  • ACWG_enterStepUp() : ACWG_Security.h
  • ACWG_Error_Crypto_Derivation : ACWG_Security.h
  • ACWG_Error_Crypto_ECDH : ACWG_Security.h
  • ACWG_Error_Crypto_EncryptDecrypt : ACWG_Security.h
  • ACWG_Error_Crypto_Hash : ACWG_Security.h
  • ACWG_Error_Crypto_KeyGen : ACWG_Security.h
  • ACWG_Error_Crypto_SigGen : ACWG_Security.h
  • ACWG_Error_Crypto_SigVerif : ACWG_Security.h
  • ACWG_Error_Crypto_TransIDGen : ACWG_Security.h
  • ACWG_Error_FastTransFailed : ACWG_Security.h
  • ACWG_Error_Generic : ACWG_Security.h
  • ACWG_Error_HW : ACWG_Security.h
  • ACWG_Error_KeyslotNotFound : ACWG_Security.h
  • ACWG_Error_Parsing : ACWG_Security.h
  • ACWG_Error_Parsing_NoKeyslot : ACWG_Security.h
  • ACWG_Error_Parsing_NoPublicKey : ACWG_Security.h
  • ACWG_Error_ShortBuf : ACWG_Security.h
  • ACWG_Error_WrongState : ACWG_Security.h
  • ACWG_exitStepUp() : ACWG_Security.h
  • ACWG_generateAUTH0CommandPayload() : ACWG_Security.h
  • ACWG_generateAUTH1CommandPayload() : ACWG_Security.h
  • ACWG_generateEnvelopeCommandPayload() : ACWG_Security.h
  • ACWG_generateExchangeCommandPayload() : ACWG_Security.h
  • ACWG_generateLOADCERTCommandPayload() : ACWG_Security.h
  • ACWG_generateM1CommandPayload() : ACWG_Security.h
  • ACWG_generateM3CommandPayload() : ACWG_Security.h
  • ACWG_getGetResponsePayload() : ACWG_Security.h
  • ACWG_initBLEEncryptedSession() : ACWG_Security.h
  • ACWG_initSessionContext() : ACWG_Security.h
  • ACWG_OK : ACWG_Security.h
  • ACWG_prepareEphemeralKeypairAndTransactionId() : ACWG_Security.h
  • ACWG_processAUTH0ResponsePayload() : ACWG_Security.h
  • ACWG_processAUTH1ResponsePayload() : ACWG_Security.h
  • ACWG_processExchangeResponsePayload() : ACWG_Security.h
  • ACWG_processM2Payload() : ACWG_Security.h
  • ACWG_processM4Payload() : ACWG_Security.h
  • ACWG_selectDone() : ACWG_Security.h
  • ACWG_SessionContext_t : ACWG_Security.h
  • ACWG_SessionContextInit_t : ACWG_Security.h
  • ACWG_Status : ACWG_Security.h
  • ACWG_Status_t : ACWG_Security.h
  • ACWG_UWB_Context_t : ACWG_Security.h
  • ACWG_VERSION_MAJ : ACWG_version.h
  • ACWG_VERSION_MIN : ACWG_version.h
  • ACWG_VERSION_SUBMIN : ACWG_version.h
  • advflags : app_aliro.c
  • ALIRO_APP_NAME : provisioning_info.h
  • ALIRO_CERTIFICATION_TEST : app_aliro.h
  • ALIRO_HAS_SEC_PROT_VER : provisioning_info.h
  • aliro_init() : app_aliro.h, app_aliro.c
  • ALIRO_MAIN_PROT_VER : provisioning_info.h
  • ALIRO_MEASURE_PERFORMANCE : app_aliro.h
  • ALIRO_NFC_TOTAL_DURATION : provisioning_info.h
  • aliro_process() : app_aliro.h, app_aliro.c
  • ALIRO_PROT_VER : provisioning_info.h
  • ALIRO_RTC_SET_STATUS_GOOD : app_aliro.h
  • ALIRO_RTC_SET_STATUS_IAR : app_aliro.h
  • ALIRO_SEC_PROT_VER : provisioning_info.h
  • Aliro_SerialCmdExecute() : app_aliro.c
  • aliroadvheader : app_aliro.c
  • AliroBLE_Init_complete_cb() : app_aliro.h
  • AliroBleCocDisconnection_complete_cb() : app_aliro.h
  • AliroBleDisconnection_complete_cb() : app_aliro.h
  • AliroFilltechs2Find() : app_aliro.h, app_aliro.c
  • AliroGetSavedSelectedProtocolVersion() : app_aliro.h, app_aliro.c
  • AliroNfcCycle() : app_nfc.h, app_nfc.c
  • AliroNfcGetDiscoverTechs2Find() : app_nfc.h, app_nfc.c
  • AliroNfcGetDiscoverTotalDuration() : app_nfc.h, app_nfc.c
  • AliroNfcHwInit() : app_nfc.h, app_nfc.c
  • AliroNfcIni() : app_nfc.h, app_nfc.c
  • AliroNfcStop() : app_nfc.h, app_nfc.c
  • AliroPort_Delay() : app_aliro.h, app_aliro.c
  • AliroPort_GPIO_WritePin() : app_aliro.h, app_aliro.c
  • AliroPort_NVIC_SystemReset() : app_aliro.c
  • AliroPort_TRANSACTION_FAILURE() : app_aliro.h, app_aliro.c
  • AliroPort_TRANSACTION_SUCCESS_CLOSE() : app_aliro.h, app_aliro.c
  • AliroPort_TRANSACTION_SUCCESS_OPEN() : app_aliro.h, app_aliro.c
  • AliroPort_UART_Receive() : app_aliro.h, app_aliro.c
  • AliroPort_UART_Transmit() : app_aliro.h, app_aliro.c
  • Alirost25r200Isr() : app_aliro.c
  • alirosvc_param : app_aliro.c
  • AliroSvcParamGetInitBuf() : app_aliro.h
  • AliroSvcParamGetInitLen() : app_aliro.h
  • AliroSvcVerifyProtVer() : app_aliro.h
  • app_build_info : app_build_info.h, app_aliro.c
  • app_build_info_t : app_build_info.h
  • appendTLV() : tlv.h
  • ATTR_C : certificate_subparsing.h
  • ATTR_CN : certificate_subparsing.h
  • ATTR_DN : certificate_subparsing.h
  • ATTR_LN : certificate_subparsing.h
  • ATTR_ON : certificate_subparsing.h
  • ATTR_OUN : certificate_subparsing.h
  • ATTR_SN : certificate_subparsing.h
  • ATTR_SOPN : certificate_subparsing.h
  • ATTR_UID : certificate_subparsing.h
  • AUTH0_POS : app_aliro.h
  • auth0FastDone : ACWG_Security.h
  • auth0StdDone : ACWG_Security.h
  • AUTH1_AUTH_DATA_LEN_BYTES : ACWG_Security.h
  • AUTH1_CMD_PARAM : ACWG_Security.h
  • AUTH1_POS : app_aliro.h
  • auth1Done : ACWG_Security.h
  • AUTH_BLESK_LEN_BYTES : ACWG_Security.h
  • AUTH_CERTIFICATE_MAX_LEN_BYTES : provisioning.c
  • AUTH_CRED_SIG_TIME_LEN_BYTES : ACWG_Security.h
  • AUTH_CRYPTOGRAM_LEN_BYTES : ACWG_Security.h
  • AUTH_CRYPTOGRAM_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_ENDPOINT_EXT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_EXCH_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_INFO_LEN_BYTES : ACWG_Security.h
  • AUTH_KEYSLOT_LEN_BYTES : ACWG_Security.h
  • AUTH_MAX_KEYSLOTS_STORED : ACWG_Security.h
  • AUTH_MAX_PAYLOAD_LEN_BYTES : ACWG_Security.h
  • AUTH_MAX_PERSISTENT_KEYS_STORED : ACWG_Security.h
  • AUTH_PERSISTENT_KEY_LEN_BYTES : ACWG_Security.h
  • AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_PUBKEY_LEN_BYTES : provisioning.h, ACWG_Security.h
  • AUTH_READER_EXT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_READER_GROUP_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_READER_GROUP_SUB_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_REVOC_SIG_TIME_LEN_BYTES : ACWG_Security.h
  • AUTH_SALT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_SALT_TYPE_BYTES_LEN : ACWG_Security.h
  • AUTH_SIGNALING_BITMAP_LEN_BYTES : ACWG_Security.h
  • AUTH_STEPUP_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_TRANS_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_URSK_LEN_BYTES : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- b -

  • B1_VENDOR_SPEC_EXT_SIZE_BYTES : provisioning.h
  • BLE_ADV_DISABLE : provisioning_info.h
  • BLE_ALIRO_FLOWS_SUPPORTED : app_aliro.h
  • ble_inhibit : app_aliro.c
  • BLE_RKE_ALIRO_FLOW_SUPPORTED : app_aliro.h
  • ble_SM : tlwrapper.h
  • BLE_UWB_ALIRO_FLOW_SUPPORTED : app_aliro.h
  • board_reset() : app_aliro.h, app_aliro.c
  • BSP_NFC0XCOMM_SendRecv() : app_nfc.c
  • Button1_isr() : app_aliro.h, app_aliro.c
  • BYTE_INDEX_IN_PRINT : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- c -

  • cert_attribute_t : certificate_subparsing.h
  • CERT_EC_bp256r1 : certificate.h
  • CERT_EC_bp256t1 : certificate.h
  • CERT_EC_bp384r1 : certificate.h
  • CERT_EC_bp384t1 : certificate.h
  • CERT_EC_bp512r1 : certificate.h
  • CERT_EC_bp512t1 : certificate.h
  • CERT_EC_P256 : certificate.h
  • CERT_EC_P384 : certificate.h
  • CERT_EC_P521 : certificate.h
  • cert_extension_t : certificate_subparsing.h
  • CERT_INVALID_PARAMETER : certificate.h
  • CERT_OK : certificate.h
  • cert_public_key_t : certificate.h
  • CERT_SIG_ECDSA_SHA1 : certificate.h
  • CERT_SIG_ECDSA_SHA224 : certificate.h
  • CERT_SIG_ECDSA_SHA256 : certificate.h
  • CERT_SIG_ECDSA_SHA384 : certificate.h
  • CERT_SIG_ECDSA_SHA512 : certificate.h
  • cert_signature_t : certificate.h
  • cert_validity_t : certificate.h
  • certificate_case_identify_extension() : certificate_subparsing.h
  • certificate_case_insensitive_compare() : certificate_subparsing.h
  • certificate_copy() : certificate.h
  • certificate_count_attributes() : certificate_subparsing.h
  • certificate_date_compare() : certificate_subparsing.h
  • certificate_elliptic_curves_t : certificate.h
  • certificate_extensions_type_t : certificate_subparsing.h
  • certificate_find_tbs_and_signature() : certificate.h
  • certificate_get_small_integer() : certificate_subparsing.h
  • certificate_identify_ASN1_TLV() : certificate_subparsing.h
  • certificate_identify_attribute() : certificate_subparsing.h
  • certificate_init() : certificate.h
  • certificate_is_CA() : certificate.h
  • certificate_is_parent() : certificate.h
  • certificate_is_valid() : certificate.h
  • certificate_name_attributes_t : certificate_subparsing.h
  • certificate_parse() : certificate.h
  • certificate_parse_attribute() : certificate_subparsing.h
  • certificate_parse_chain() : certificate.h
  • certificate_parse_ECC_public_key() : certificate_subparsing.h
  • certificate_parse_ECDSA_signature() : certificate_subparsing.h
  • certificate_parse_extension() : certificate_subparsing.h
  • certificate_parse_integer() : certificate_subparsing.h
  • certificate_parse_relative_distinguished_name() : certificate_subparsing.h
  • certificate_parse_signature_algorithm() : certificate_subparsing.h
  • certificate_parse_tbs() : certificate.h
  • certificate_parse_validity() : certificate_subparsing.h
  • certificate_parse_X509_version() : certificate_subparsing.h
  • certificate_signature_algorithms_t : certificate.h
  • CERTIFICATE_SIZE : provisioning.h
  • certificate_status_t : certificate.h
  • certificate_t : certificate.h
  • certificate_tag_t : certificate_subparsing.h
  • certificate_verify_child_signature() : certificate_crypto.h
  • certificate_verify_signature() : certificate_crypto.h
  • CHANNEL_BITMASK_ID : ACWG_Security.h
  • CheckAppCmds() : app_nfc.c
  • CheckReaderPubK() : provisioning.c
  • Close_ranging_init() : custom_uwb.h
  • Close_ranging_loop() : custom_uwb.h
  • CMD_PARAMS_EXP_FAST_MASK : ACWG_Security.h
  • COMPUTE_SHA1 : provisioning.c
  • confirm_conversion : provisioning.c
  • context_ble : app_aliro.h, app_aliro.c
  • context_nfc : app_aliro.h, app_aliro.c
  • CONTROL_FLOW_POS : app_aliro.h
  • convertDefaultProvisioningFromJson() : provisioning.h, provisioning.c
  • convertProvisioningFromJson() : provisioning.h, provisioning.c
  • countof : app_aliro.h
  • CREATE_CASE : app_aliro.c
  • CryptoInit() : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- d -

  • DaysInMonth() : app_aliro.c
  • DEFAULT_CMD_PARAMS_VALUE : provisioning_info.h
  • DEMO_LM_NFCID2_BYTE1 : app_nfc.c
  • DEMO_LM_PAD0 : app_nfc.c
  • DEMO_LM_SC_BYTE1 : app_nfc.c
  • DEMO_LM_SC_BYTE2 : app_nfc.c
  • DEMO_LM_SEL_RES : app_nfc.c
  • DEMO_NFCV_BLOCK_LEN : app_nfc.c
  • DEMO_NFCV_USE_SELECT_MODE : app_nfc.c
  • DEMO_NFCV_WRITE_TAG : app_nfc.c
  • DEMO_ST_DISCOVERY : app_nfc.c
  • DEMO_ST_NOTINIT : app_nfc.c
  • DEMO_ST_START_DISCOVERY : app_nfc.c
  • demoAPDU() : app_nfc.c
  • demoNotif() : app_nfc.c
  • demoPropNfcInitialize() : app_aliro.c
  • demoPropNfcTechnologyDetection() : app_aliro.c
  • demoT2t() : app_nfc.c
  • demoTransceiveBlocking() : app_nfc.c
  • DERIVE_PERSISTENT_KEYS_POS : app_aliro.h
  • DET_NFC_PROP : provisioning_info.h
  • DEVICE_NAME_SIZE_BYTES : provisioning.h
  • DEVICE_PROVISIONING_STRUCT_IS_VALID : provisioning_info.h
  • DISPLAY_SPLASH : provisioning_info.h
  • DON_T_KNOW_POS : app_aliro.h
  • DOOR_IS_CLOSED_POS : app_aliro.h
  • DOOR_IS_DISARMED_POS : app_aliro.h
  • DOOR_IS_OPENED_POS : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- e -

  • ECDSA_256_SIG_BYTE_SIZE : sm_crypto.h
  • ELAPSED_TIME_POS : app_aliro.h
  • END_AUTH0_POS : app_aliro.h
  • END_AUTH1_POS : app_aliro.h
  • END_CONTROL_FLOW_POS : app_aliro.h
  • END_DERIVE_PERSISTENT_KEYS_POS : app_aliro.h
  • END_EXCHANGE_POS : app_aliro.h
  • END_LOADCERT_POS : app_aliro.h
  • END_SELECT_APP_POS : app_aliro.h
  • END_STEPUP_POS : app_aliro.h
  • EraseFlash() : flash_mng.h, flash_mng.c
  • EraseWriteToFlash() : flash_mng.h, flash_mng.c
  • EXCHANGE_POS : app_aliro.h
  • Execute_ranging_init() : custom_uwb.h
  • Execute_ranging_loop() : custom_uwb.h
  • EXPIRY_TIME_STAMP_DEFAULT_VALUE : provisioning_info.h
  • expirytimestamp : app_aliro.c
  • EXTENSION_AKI : certificate_subparsing.h
  • EXTENSION_BC : certificate_subparsing.h
  • EXTENSION_EKU : certificate_subparsing.h
  • EXTENSION_KU : certificate_subparsing.h
  • extractJsonData() : provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- f -

  • failed : ACWG_Security.h
  • Fill_uwb_M1() : custom_uwb.h
  • Fill_uwb_M3() : custom_uwb.h
  • fillAdvBuffer() : app_aliro.h
  • FLASH_OP_BUSY : flash_mng.h
  • FLASH_OP_ERROR : flash_mng.h
  • FLASH_OP_OK : flash_mng.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- g -

  • get_dynamic_spsm() : app_aliro.h
  • GET_SPSM_LOOP_NBR : app_aliro.c
  • GetCompilerDateTime() : app_aliro.c
  • getOneTlv() : tlv.h
  • GetPage() : flash_mng.c
  • getProvisioningFromFlash() : provisioning.h, provisioning.c
  • GetTimeDate() : app_aliro.h, app_aliro.c
  • GetTimeStamp() : app_aliro.h
  • getUwbSessionId() : tlwrapper.h
  • globalCommProtectCnt : app_aliro.c
  • GROUP_RESOLVING_KEY_SIZE_BYTES : provisioning.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- h -

  • H_ALIRO_UART : app_aliro.c
  • Handle_distance_result() : custom_uwb.h
  • Handle_lock_actuation() : custom_uwb.h
  • Handle_uwb_M2() : custom_uwb.h
  • Handle_uwb_M4() : custom_uwb.h
  • Handle_uwb_Time_Sync() : custom_uwb.h
  • hcryp : app_aliro.c
  • hex2Str() : app_nfc.c
  • hexStrToHex() : provisioning.h, provisioning.c
  • hhash : app_aliro.c
  • HOP_MODE_KEY_ID : ACWG_Security.h
  • HOP_MODE_KEY_LEN_BYTES : ACWG_Security.h
  • HOPPING_CONFIGURATION_BITMASK_ID : ACWG_Security.h
  • hpka : app_aliro.c
  • hrng : app_aliro.c
  • hst25_exti : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- i -

  • INIT_NFC_PROP : provisioning_info.h
  • Initiate_uwb_ctx() : custom_uwb.h
  • inStepUp : ACWG_Security.h
  • invalid : ACWG_Security.h
  • IS_VALID_TAG : certificate_subparsing.h
  • is_zeros() : provisioning.h, provisioning.c
  • isAliroRunning : app_aliro.c
  • isValidFlashJson() : provisioning.c
  • isValidProvisioning() : provisioning.c
  • isValidSPSM() : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- j -

  • JAN : app_aliro.c
  • JSON_MAX_LEN : provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- k -

  • KDFRandomnessExtraction() : sm_crypto_mcu.c
  • KDH_LEN_BYTES : ACWG_Security.h
  • keyslot_t : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- l -

  • LOAD_NFC_PROP : provisioning_info.h
  • LOADCERT_POS : app_aliro.h
  • loadProvisionFromJson() : provisioning.h, provisioning.c
  • LOG_INFO_APP : log_module_u5.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- m -

  • MAC_MODE_ID : ACWG_Security.h
  • MAX_DYNAMIC_SPSM_VALUE : app_aliro.c
  • MAX_FIXED_INFO_SIZE : sm_crypto_mcu.h
  • MIN_DYNAMIC_SPSM_VALUE : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- n -

  • NFC_PROP_BUF : app_aliro.c
  • NFC_PROP_BUF_CONTENT : provisioning_info.h
  • nfc_SM : tlwrapper.h
  • nTimeStampDeltaOffset : app_aliro.c
  • nTimeStampOffset : app_aliro.c
  • NUM_PROV_DEVICES : provisioning.h
  • NUM_TIMESTAMPS : app_aliro.h
  • NUMBER_CHAPS_PER_SLOT_ID : ACWG_Security.h
  • NUMBER_RESPONDERS_NODES_ID : ACWG_Security.h
  • NUMBER_SLOTS_PER_ROUND_ID : ACWG_Security.h
  • nVerbosityLevel : app_aliro.h, app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- p -

  • parseAccElemCommand() : app_aliro.c
  • parseCredIsPkCommand() : app_aliro.c
  • parseDEVpbkCommand() : app_aliro.c
  • parseEchoCommand() : app_aliro.c
  • parseRDgrrkCommand() : app_aliro.c
  • parseRDidenCommand() : app_aliro.c
  • parseRDprvkCommand() : app_aliro.c
  • parseRDpubkCommand() : app_aliro.c
  • persistentKeys_t : ACWG_Security.h
  • Prepare_ranging_init() : custom_uwb.h
  • Prepare_ranging_loop() : custom_uwb.h
  • PRINT_BUFFERS_HEX : app_aliro.c
  • PRINT_ERROR : app_aliro.c
  • PrintBufferHex() : app_aliro.h, app_aliro.c, ACWG_Security.h
  • PrintBufferHexAlways() : app_aliro.h, app_aliro.c
  • printDeviceJson() : provisioning.h, provisioning.c
  • PrintErrorString() : app_aliro.h, app_aliro.c
  • printfHex0x() : provisioning.c
  • printHex() : provisioning.c
  • printScriptJson() : provisioning.h
  • PrintTimeStamp() : app_aliro.h
  • PrintTimeStampReport() : app_aliro.h
  • PRIVATE_KEY_SIZE_BYTES : provisioning.h
  • ProcessUartInput() : app_aliro.c
  • PROVISIONING_JSON_INVALIDATE_ADDRESS : provisioning.c
  • PROVISIONING_JSON_INVALIDATE_LEN : provisioning.c
  • PROVISIONING_JSON_INVALIDATE_STR : provisioning.c
  • PROVISIONING_LOG : provisioning.c
  • ProvisioningCheckEndpointPubK() : provisioning.h, provisioning.c
  • ProvisioningGetEndpointPubKFromKeyslot() : provisioning.h, provisioning.c
  • PULSE_SHAPE_COMBO_ID : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- r -

  • RAN_MULTIPLIER_ID : ACWG_Security.h
  • RAW_PRIV_KEY_BYTE_SIZE : sm_crypto.h
  • READER_CERTIF_BUF : provisioning.c
  • READER_CERTIF_LEN : provisioning.c
  • READER_PUB_KEY_BUF : provisioning.c
  • RESERVED_PAIRING_KEYS_SIZE_BYTES : provisioning.h
  • ResetAllSavedTimeStamps() : app_aliro.h
  • ResetTimeStamp() : app_aliro.h
  • Resume_ranging_init() : custom_uwb.h
  • Resume_ranging_loop() : custom_uwb.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- s -

  • saveAccessCredentialPuBK() : provisioning.h, provisioning.c
  • saveCredIsPkToFlash() : provisioning.h, provisioning.c
  • savedselectedProtocolVersion_16 : app_aliro.c
  • saveProvisioningToFlash() : provisioning.h, provisioning.c
  • saveRDgrrkToFlash() : provisioning.h, provisioning.c
  • saveRDidenToFlash() : provisioning.h, provisioning.c
  • saveRDPrvKToFlash() : provisioning.h, provisioning.c
  • saveRDPubKToFlash() : provisioning.h, provisioning.c
  • SaveTimeStamp() : app_aliro.h
  • SearchPos() : app_aliro.h
  • SecondMillis_CallBack_TimeStamp() : app_aliro.c
  • SELECT_APP_POS : app_aliro.h
  • selectDone : ACWG_Security.h
  • Set_timeout_door_operation() : app_aliro.h, app_aliro.c
  • Set_timeout_execute_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_prepare_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_resume_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_suspend_ranging() : app_aliro.h, app_aliro.c
  • SetVerbosityLevel() : app_aliro.c
  • SHA256_BYTE_SIZE : sm_crypto.h
  • showJsonStatus() : provisioning.h, provisioning.c
  • showProvisioningStatus() : provisioning.h, provisioning.c
  • ShowTimeDate() : app_aliro.h, app_aliro.c
  • SLOT_BITMASK_ID : ACWG_Security.h
  • SM_aes256GcmDecrypt() : sm_crypto.h, sm_crypto_mcu.c
  • SM_aes256GcmEncrypt() : sm_crypto.h, sm_crypto_mcu.c
  • SM_Crypto_Error : sm_crypto.h
  • SM_Crypto_Error_t : sm_crypto.h
  • SM_Crypto_HW_Error : sm_crypto.h
  • SM_Crypto_OK : sm_crypto.h
  • SM_deriveKdh() : sm_crypto.h, sm_crypto_mcu.c
  • SM_Ecdh() : sm_crypto.h, sm_crypto_mcu.c
  • SM_genKeypair() : sm_crypto.h, sm_crypto_mcu.c
  • SM_genRandomBytes() : sm_crypto.h, sm_crypto_mcu.c
  • SM_getCertificate() : sm_crypto.h, sm_crypto_mcu.c
  • SM_init() : sm_crypto.h
  • SM_initCryptoMCU() : sm_crypto_mcu.h, sm_crypto_mcu.c
  • SM_initCryptoStSafe() : sm_crypto_stsafe.h
  • SM_KDFRFC5869() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha1() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_finish() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_start() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_update() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sign() : sm_crypto.h, sm_crypto_mcu.c
  • SM_verify() : sm_crypto.h, sm_crypto_mcu.c
  • sprintfHex() : provisioning.c
  • spsmDataBuf : app_aliro.c
  • STATUS_ID : ACWG_Security.h
  • stepup_CheckEndpointPubK() : stepup_mgr.h
  • STEPUP_POS : app_aliro.h
  • stepup_process() : stepup_mgr.h
  • stepup_pushdata() : stepup_mgr.h
  • stepup_request() : stepup_mgr.h
  • strnstr() : provisioning.c
  • STS_INDEX0_ID : ACWG_Security.h
  • STS_INDEX0_LEN_BYTES : ACWG_Security.h
  • Suspend_ranging_init() : custom_uwb.h
  • Suspend_ranging_loop() : custom_uwb.h
  • SYNC_CODE_INDEX_BITMASK_ID : ACWG_Security.h
  • SYNC_CODE_INDEX_BITMASK_LEN_BYTES : ACWG_Security.h
  • SYNC_CODE_INDEX_ID : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- t -

  • TAG_BITSTRING : certificate_subparsing.h
  • TAG_BOOLEAN : certificate_subparsing.h
  • TAG_ENUMERATED : certificate_subparsing.h
  • TAG_extensions : certificate_subparsing.h
  • TAG_GeneralizedTime : certificate_subparsing.h
  • TAG_IA5String : certificate_subparsing.h
  • TAG_INTEGER : certificate_subparsing.h
  • TAG_issuerUniqueID : certificate_subparsing.h
  • TAG_NULL : certificate_subparsing.h
  • TAG_OBJECT_IDENTIFIER : certificate_subparsing.h
  • TAG_ObjectDescriptor : certificate_subparsing.h
  • TAG_OCTETSTRING : certificate_subparsing.h
  • TAG_OPTION_0 : certificate_subparsing.h
  • TAG_OPTION_1 : certificate_subparsing.h
  • TAG_OPTION_2 : certificate_subparsing.h
  • TAG_OPTION_3 : certificate_subparsing.h
  • TAG_PrintableString : certificate_subparsing.h
  • TAG_SEQUENCE : certificate_subparsing.h
  • TAG_SET : certificate_subparsing.h
  • TAG_subjectUniqueID : certificate_subparsing.h
  • TAG_UTCTime : certificate_subparsing.h
  • TAG_UTF8String : certificate_subparsing.h
  • TAG_x509VERSION : certificate_subparsing.h
  • TEST_HARNESS_SIMULATION : provisioning_info.h
  • TLV_ERROR_INVALID_LENGTH : tlv.h
  • TLV_ERROR_SHORT_BUFFER : tlv.h
  • TLV_ERROR_SHORT_PAYLOAD : tlv.h
  • TLV_ERROR_TAG_NOT_FOUND : tlv.h
  • TLV_SUCCESS : tlv.h
  • tlvStatus_t : tlv.h
  • tlw_ble_receivedData() : tlwrapper.h
  • tlw_ble_SM_step() : tlwrapper.h
  • TLW_BUSY : tlwrapper.h
  • tlw_CheckEndpointKey() : tlwrapper.h
  • TLW_END : tlwrapper.h
  • TLW_ERROR_FAST : tlwrapper.h
  • TLW_ERROR_NONE : tlwrapper.h
  • TLW_FAIL_GENERATE : tlwrapper.h
  • TLW_FAIL_GENERIC : tlwrapper.h
  • TLW_FAIL_PROCESS : tlwrapper.h
  • TLW_FAIL_TIMEOUT : tlwrapper.h
  • tlw_GetAccessElementString() : tlwrapper.h
  • tlw_GetLastEndpointKey() : tlwrapper.h
  • tlw_init_ble() : tlwrapper.h
  • tlw_init_nfc() : tlwrapper.h
  • TLW_NEED_AUTH1 : tlwrapper.h
  • TLW_NEED_GET_RESPONSE : tlwrapper.h
  • TLW_NEED_LOAD_CERT : tlwrapper.h
  • TLW_NEW_OUTPUT : tlwrapper.h
  • TLW_NO_PREPARE_NEEDED : tlwrapper.h
  • tlw_prepare_ble() : tlwrapper.h
  • tlw_prepare_nfc() : tlwrapper.h
  • tlw_process_ble() : tlwrapper.h
  • tlw_process_nfc() : tlwrapper.h
  • tlw_reload_ble() : tlwrapper.h
  • tlw_reload_nfc() : tlwrapper.h
  • tlw_SetAccessElementString() : tlwrapper.h
  • transactionState : ACWG_Security.h
  • transactionState_t : ACWG_Security.h
  • txpower : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- u -

  • UartChars : app_aliro.c
  • UartChars_len : app_aliro.c
  • UsartGetChar() : app_aliro.h, app_aliro.c
  • UsartGetCharBlocking() : app_aliro.h, app_aliro.c
  • UWB_CONFIGURATION_IDENTIFIER_ID : ACWG_Security.h
  • UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES : ACWG_Security.h
  • UWB_HW_init() : custom_uwb.h
  • UWB_HW_loop() : custom_uwb.h
  • UWB_SESSION_ID_DEFAULT : provisioning_info.h
  • UWB_SESSION_IDENTIFIER_ID : ACWG_Security.h
  • UWB_SESSION_IDENTIFIER_LEN_BYTES : ACWG_Security.h
  • UWB_TIME0_ID : ACWG_Security.h
  • UWB_TIME0_LEN_BYTES : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- v -

  • VENDOR_SPECIFIC_ID : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES1 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES2 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES3 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES4 : ACWG_Security.h
  • VERB_ALWAYS : app_aliro.h
  • VERB_CRITICAL : app_aliro.h
  • VERB_ERROR : app_aliro.h
  • VERB_INFO : app_aliro.h
  • VERB_NORMAL : app_aliro.h
  • VERB_NULL : app_aliro.h
  • VERB_VERBOSE : app_aliro.h
  • VERBOSITY_SET : app_aliro.h
  • VerifyEndpointPubKey() : app_nfc.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- w -

  • WriteToFlash() : flash_mng.h, flash_mng.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- x -

  • xProtocolVersionSupported : app_aliro.h, app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- a -

  • ACWG_computeKDHandVolatileKeys() : ACWG_Security.h
  • ACWG_decryptBle() : ACWG_Security.h
  • ACWG_derivePersistentKeys() : ACWG_Security.h
  • ACWG_encryptBle() : ACWG_Security.h
  • ACWG_enterStepUp() : ACWG_Security.h
  • ACWG_exitStepUp() : ACWG_Security.h
  • ACWG_generateAUTH0CommandPayload() : ACWG_Security.h
  • ACWG_generateAUTH1CommandPayload() : ACWG_Security.h
  • ACWG_generateEnvelopeCommandPayload() : ACWG_Security.h
  • ACWG_generateExchangeCommandPayload() : ACWG_Security.h
  • ACWG_generateLOADCERTCommandPayload() : ACWG_Security.h
  • ACWG_generateM1CommandPayload() : ACWG_Security.h
  • ACWG_generateM3CommandPayload() : ACWG_Security.h
  • ACWG_getGetResponsePayload() : ACWG_Security.h
  • ACWG_initBLEEncryptedSession() : ACWG_Security.h
  • ACWG_initSessionContext() : ACWG_Security.h
  • ACWG_prepareEphemeralKeypairAndTransactionId() : ACWG_Security.h
  • ACWG_processAUTH0ResponsePayload() : ACWG_Security.h
  • ACWG_processAUTH1ResponsePayload() : ACWG_Security.h
  • ACWG_processExchangeResponsePayload() : ACWG_Security.h
  • ACWG_processM2Payload() : ACWG_Security.h
  • ACWG_processM4Payload() : ACWG_Security.h
  • ACWG_selectDone() : ACWG_Security.h
  • aliro_init() : app_aliro.h, app_aliro.c
  • aliro_process() : app_aliro.h, app_aliro.c
  • Aliro_SerialCmdExecute() : app_aliro.c
  • AliroBLE_Init_complete_cb() : app_aliro.h
  • AliroBleCocDisconnection_complete_cb() : app_aliro.h
  • AliroBleDisconnection_complete_cb() : app_aliro.h
  • AliroFilltechs2Find() : app_aliro.h, app_aliro.c
  • AliroGetSavedSelectedProtocolVersion() : app_aliro.h, app_aliro.c
  • AliroNfcCycle() : app_nfc.h, app_nfc.c
  • AliroNfcGetDiscoverTechs2Find() : app_nfc.h, app_nfc.c
  • AliroNfcGetDiscoverTotalDuration() : app_nfc.h, app_nfc.c
  • AliroNfcHwInit() : app_nfc.h, app_nfc.c
  • AliroNfcIni() : app_nfc.h, app_nfc.c
  • AliroNfcStop() : app_nfc.h, app_nfc.c
  • AliroPort_Delay() : app_aliro.h, app_aliro.c
  • AliroPort_GPIO_WritePin() : app_aliro.h, app_aliro.c
  • AliroPort_NVIC_SystemReset() : app_aliro.c
  • AliroPort_TRANSACTION_FAILURE() : app_aliro.h, app_aliro.c
  • AliroPort_TRANSACTION_SUCCESS_CLOSE() : app_aliro.h, app_aliro.c
  • AliroPort_TRANSACTION_SUCCESS_OPEN() : app_aliro.h, app_aliro.c
  • AliroPort_UART_Receive() : app_aliro.h, app_aliro.c
  • AliroPort_UART_Transmit() : app_aliro.h, app_aliro.c
  • Alirost25r200Isr() : app_aliro.c
  • AliroSvcParamGetInitBuf() : app_aliro.h
  • AliroSvcParamGetInitLen() : app_aliro.h
  • AliroSvcVerifyProtVer() : app_aliro.h
  • appendTLV() : tlv.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- b -

  • board_reset() : app_aliro.h, app_aliro.c
  • BSP_NFC0XCOMM_SendRecv() : app_nfc.c
  • Button1_isr() : app_aliro.h, app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- c -

  • certificate_case_identify_extension() : certificate_subparsing.h
  • certificate_case_insensitive_compare() : certificate_subparsing.h
  • certificate_copy() : certificate.h
  • certificate_count_attributes() : certificate_subparsing.h
  • certificate_date_compare() : certificate_subparsing.h
  • certificate_find_tbs_and_signature() : certificate.h
  • certificate_get_small_integer() : certificate_subparsing.h
  • certificate_identify_ASN1_TLV() : certificate_subparsing.h
  • certificate_identify_attribute() : certificate_subparsing.h
  • certificate_init() : certificate.h
  • certificate_is_CA() : certificate.h
  • certificate_is_parent() : certificate.h
  • certificate_is_valid() : certificate.h
  • certificate_parse() : certificate.h
  • certificate_parse_attribute() : certificate_subparsing.h
  • certificate_parse_chain() : certificate.h
  • certificate_parse_ECC_public_key() : certificate_subparsing.h
  • certificate_parse_ECDSA_signature() : certificate_subparsing.h
  • certificate_parse_extension() : certificate_subparsing.h
  • certificate_parse_integer() : certificate_subparsing.h
  • certificate_parse_relative_distinguished_name() : certificate_subparsing.h
  • certificate_parse_signature_algorithm() : certificate_subparsing.h
  • certificate_parse_tbs() : certificate.h
  • certificate_parse_validity() : certificate_subparsing.h
  • certificate_parse_X509_version() : certificate_subparsing.h
  • certificate_verify_child_signature() : certificate_crypto.h
  • certificate_verify_signature() : certificate_crypto.h
  • CheckAppCmds() : app_nfc.c
  • CheckReaderPubK() : provisioning.c
  • Close_ranging_init() : custom_uwb.h
  • Close_ranging_loop() : custom_uwb.h
  • convertDefaultProvisioningFromJson() : provisioning.h, provisioning.c
  • convertProvisioningFromJson() : provisioning.h, provisioning.c
  • CryptoInit() : app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- d -

  • DaysInMonth() : app_aliro.c
  • demoAPDU() : app_nfc.c
  • demoNotif() : app_nfc.c
  • demoPropNfcInitialize() : app_aliro.c
  • demoPropNfcTechnologyDetection() : app_aliro.c
  • demoT2t() : app_nfc.c
  • demoTransceiveBlocking() : app_nfc.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- e -

  • EraseFlash() : flash_mng.h, flash_mng.c
  • EraseWriteToFlash() : flash_mng.h, flash_mng.c
  • Execute_ranging_init() : custom_uwb.h
  • Execute_ranging_loop() : custom_uwb.h
  • extractJsonData() : provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- f -

  • Fill_uwb_M1() : custom_uwb.h
  • Fill_uwb_M3() : custom_uwb.h
  • fillAdvBuffer() : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- g -

  • get_dynamic_spsm() : app_aliro.h
  • GetCompilerDateTime() : app_aliro.c
  • getOneTlv() : tlv.h
  • GetPage() : flash_mng.c
  • getProvisioningFromFlash() : provisioning.h, provisioning.c
  • GetTimeDate() : app_aliro.h, app_aliro.c
  • GetTimeStamp() : app_aliro.h
  • getUwbSessionId() : tlwrapper.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- h -

  • Handle_distance_result() : custom_uwb.h
  • Handle_lock_actuation() : custom_uwb.h
  • Handle_uwb_M2() : custom_uwb.h
  • Handle_uwb_M4() : custom_uwb.h
  • Handle_uwb_Time_Sync() : custom_uwb.h
  • hex2Str() : app_nfc.c
  • hexStrToHex() : provisioning.h, provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- i -

  • Initiate_uwb_ctx() : custom_uwb.h
  • is_zeros() : provisioning.h, provisioning.c
  • isValidFlashJson() : provisioning.c
  • isValidProvisioning() : provisioning.c
  • isValidSPSM() : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- k -

  • KDFRandomnessExtraction() : sm_crypto_mcu.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- l -

  • loadProvisionFromJson() : provisioning.h, provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- p -

  • parseAccElemCommand() : app_aliro.c
  • parseCredIsPkCommand() : app_aliro.c
  • parseDEVpbkCommand() : app_aliro.c
  • parseEchoCommand() : app_aliro.c
  • parseRDgrrkCommand() : app_aliro.c
  • parseRDidenCommand() : app_aliro.c
  • parseRDprvkCommand() : app_aliro.c
  • parseRDpubkCommand() : app_aliro.c
  • Prepare_ranging_init() : custom_uwb.h
  • Prepare_ranging_loop() : custom_uwb.h
  • PrintBufferHex() : app_aliro.h, app_aliro.c, ACWG_Security.h
  • PrintBufferHexAlways() : app_aliro.h, app_aliro.c
  • printDeviceJson() : provisioning.h, provisioning.c
  • PrintErrorString() : app_aliro.h, app_aliro.c
  • printfHex0x() : provisioning.c
  • printHex() : provisioning.c
  • printScriptJson() : provisioning.h
  • PrintTimeStamp() : app_aliro.h
  • PrintTimeStampReport() : app_aliro.h
  • ProcessUartInput() : app_aliro.c
  • ProvisioningCheckEndpointPubK() : provisioning.h, provisioning.c
  • ProvisioningGetEndpointPubKFromKeyslot() : provisioning.h, provisioning.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- r -

  • ResetAllSavedTimeStamps() : app_aliro.h
  • ResetTimeStamp() : app_aliro.h
  • Resume_ranging_init() : custom_uwb.h
  • Resume_ranging_loop() : custom_uwb.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- s -

  • saveAccessCredentialPuBK() : provisioning.h, provisioning.c
  • saveCredIsPkToFlash() : provisioning.h, provisioning.c
  • saveProvisioningToFlash() : provisioning.h, provisioning.c
  • saveRDgrrkToFlash() : provisioning.h, provisioning.c
  • saveRDidenToFlash() : provisioning.h, provisioning.c
  • saveRDPrvKToFlash() : provisioning.h, provisioning.c
  • saveRDPubKToFlash() : provisioning.h, provisioning.c
  • SaveTimeStamp() : app_aliro.h
  • SearchPos() : app_aliro.h
  • SecondMillis_CallBack_TimeStamp() : app_aliro.c
  • Set_timeout_door_operation() : app_aliro.h, app_aliro.c
  • Set_timeout_execute_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_prepare_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_resume_ranging() : app_aliro.h, app_aliro.c
  • Set_timeout_suspend_ranging() : app_aliro.h, app_aliro.c
  • SetVerbosityLevel() : app_aliro.c
  • showJsonStatus() : provisioning.h, provisioning.c
  • showProvisioningStatus() : provisioning.h, provisioning.c
  • ShowTimeDate() : app_aliro.h, app_aliro.c
  • SM_aes256GcmDecrypt() : sm_crypto.h, sm_crypto_mcu.c
  • SM_aes256GcmEncrypt() : sm_crypto.h, sm_crypto_mcu.c
  • SM_deriveKdh() : sm_crypto.h, sm_crypto_mcu.c
  • SM_Ecdh() : sm_crypto.h, sm_crypto_mcu.c
  • SM_genKeypair() : sm_crypto.h, sm_crypto_mcu.c
  • SM_genRandomBytes() : sm_crypto.h, sm_crypto_mcu.c
  • SM_getCertificate() : sm_crypto.h, sm_crypto_mcu.c
  • SM_init() : sm_crypto.h
  • SM_initCryptoMCU() : sm_crypto_mcu.h, sm_crypto_mcu.c
  • SM_initCryptoStSafe() : sm_crypto_stsafe.h
  • SM_KDFRFC5869() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha1() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_finish() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_start() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sha256_update() : sm_crypto.h, sm_crypto_mcu.c
  • SM_sign() : sm_crypto.h, sm_crypto_mcu.c
  • SM_verify() : sm_crypto.h, sm_crypto_mcu.c
  • sprintfHex() : provisioning.c
  • stepup_CheckEndpointPubK() : stepup_mgr.h
  • stepup_process() : stepup_mgr.h
  • stepup_pushdata() : stepup_mgr.h
  • stepup_request() : stepup_mgr.h
  • strnstr() : provisioning.c
  • Suspend_ranging_init() : custom_uwb.h
  • Suspend_ranging_loop() : custom_uwb.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- t -

  • tlw_ble_receivedData() : tlwrapper.h
  • tlw_ble_SM_step() : tlwrapper.h
  • tlw_CheckEndpointKey() : tlwrapper.h
  • tlw_GetAccessElementString() : tlwrapper.h
  • tlw_GetLastEndpointKey() : tlwrapper.h
  • tlw_init_ble() : tlwrapper.h
  • tlw_init_nfc() : tlwrapper.h
  • tlw_prepare_ble() : tlwrapper.h
  • tlw_prepare_nfc() : tlwrapper.h
  • tlw_process_ble() : tlwrapper.h
  • tlw_process_nfc() : tlwrapper.h
  • tlw_reload_ble() : tlwrapper.h
  • tlw_reload_nfc() : tlwrapper.h
  • tlw_SetAccessElementString() : tlwrapper.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- u -

  • UsartGetChar() : app_aliro.h, app_aliro.c
  • UsartGetCharBlocking() : app_aliro.h, app_aliro.c
  • UWB_HW_init() : custom_uwb.h
  • UWB_HW_loop() : custom_uwb.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- v -

  • VerifyEndpointPubKey() : app_nfc.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • k
  • l
  • p
  • r
  • s
  • t
  • u
  • v
  • w

- w -

  • WriteToFlash() : flash_mng.h, flash_mng.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • b
  • c
  • e
  • g
  • h
  • i
  • j
  • n
  • p
  • s
  • t
  • u
  • x

- a -

  • access_mngr_data : tlwrapper.h
  • advflags : app_aliro.c
  • aliroadvheader : app_aliro.c
  • alirosvc_param : app_aliro.c
  • app_build_info : app_build_info.h, app_aliro.c

- b -

  • ble_inhibit : app_aliro.c
  • ble_SM : tlwrapper.h
  • BYTE_INDEX_IN_PRINT : app_aliro.c

- c -

  • confirm_conversion : provisioning.c
  • context_ble : app_aliro.h, app_aliro.c
  • context_nfc : app_aliro.h, app_aliro.c

- e -

  • expirytimestamp : app_aliro.c

- g -

  • globalCommProtectCnt : app_aliro.c

- h -

  • H_ALIRO_UART : app_aliro.c
  • hcryp : app_aliro.c
  • hhash : app_aliro.c
  • hpka : app_aliro.c
  • hrng : app_aliro.c
  • hst25_exti : app_aliro.c

- i -

  • isAliroRunning : app_aliro.c

- j -

  • JAN : app_aliro.c
  • JSON_MAX_LEN : provisioning.c

- n -

  • NFC_PROP_BUF : app_aliro.c
  • nfc_SM : tlwrapper.h
  • nTimeStampDeltaOffset : app_aliro.c
  • nTimeStampOffset : app_aliro.c
  • nVerbosityLevel : app_aliro.h, app_aliro.c

- p -

  • PRINT_BUFFERS_HEX : app_aliro.c

- s -

  • savedselectedProtocolVersion_16 : app_aliro.c
  • spsmDataBuf : app_aliro.c

- t -

  • txpower : app_aliro.c

- u -

  • UartChars : app_aliro.c
  • UartChars_len : app_aliro.c

- x -

  • xProtocolVersionSupported : app_aliro.h, app_aliro.c


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • ACWG_build_info_t : ACWG_build_info.h
  • ACWG_SessionContext_t : ACWG_Security.h
  • ACWG_SessionContextInit_t : ACWG_Security.h
  • ACWG_Status_t : ACWG_Security.h
  • ACWG_UWB_Context_t : ACWG_Security.h
  • app_build_info_t : app_build_info.h
  • cert_attribute_t : certificate_subparsing.h
  • cert_extension_t : certificate_subparsing.h
  • cert_public_key_t : certificate.h
  • cert_signature_t : certificate.h
  • cert_validity_t : certificate.h
  • certificate_t : certificate.h
  • keyslot_t : ACWG_Security.h
  • persistentKeys_t : ACWG_Security.h
  • transactionState_t : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _flashOpStatus : flash_mng.h
  • _timeStampsPos : app_aliro.h
  • _tlw_error : tlwrapper.h
  • _verblevel : app_aliro.h
  • ACWG_Status : ACWG_Security.h
  • certificate_elliptic_curves_t : certificate.h
  • certificate_extensions_type_t : certificate_subparsing.h
  • certificate_name_attributes_t : certificate_subparsing.h
  • certificate_signature_algorithms_t : certificate.h
  • certificate_status_t : certificate.h
  • certificate_tag_t : certificate_subparsing.h
  • SM_Crypto_Error_t : sm_crypto.h
  • tlvStatus_t : tlv.h
  • transactionState : ACWG_Security.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • a
  • c
  • d
  • e
  • f
  • i
  • l
  • n
  • s
  • t
  • v

- a -

  • ACWG_Error_Crypto_Derivation : ACWG_Security.h
  • ACWG_Error_Crypto_ECDH : ACWG_Security.h
  • ACWG_Error_Crypto_EncryptDecrypt : ACWG_Security.h
  • ACWG_Error_Crypto_Hash : ACWG_Security.h
  • ACWG_Error_Crypto_KeyGen : ACWG_Security.h
  • ACWG_Error_Crypto_SigGen : ACWG_Security.h
  • ACWG_Error_Crypto_SigVerif : ACWG_Security.h
  • ACWG_Error_Crypto_TransIDGen : ACWG_Security.h
  • ACWG_Error_FastTransFailed : ACWG_Security.h
  • ACWG_Error_Generic : ACWG_Security.h
  • ACWG_Error_HW : ACWG_Security.h
  • ACWG_Error_KeyslotNotFound : ACWG_Security.h
  • ACWG_Error_Parsing : ACWG_Security.h
  • ACWG_Error_Parsing_NoKeyslot : ACWG_Security.h
  • ACWG_Error_Parsing_NoPublicKey : ACWG_Security.h
  • ACWG_Error_ShortBuf : ACWG_Security.h
  • ACWG_Error_WrongState : ACWG_Security.h
  • ACWG_OK : ACWG_Security.h
  • ATTR_C : certificate_subparsing.h
  • ATTR_CN : certificate_subparsing.h
  • ATTR_DN : certificate_subparsing.h
  • ATTR_LN : certificate_subparsing.h
  • ATTR_ON : certificate_subparsing.h
  • ATTR_OUN : certificate_subparsing.h
  • ATTR_SN : certificate_subparsing.h
  • ATTR_SOPN : certificate_subparsing.h
  • ATTR_UID : certificate_subparsing.h
  • AUTH0_POS : app_aliro.h
  • auth0FastDone : ACWG_Security.h
  • auth0StdDone : ACWG_Security.h
  • AUTH1_POS : app_aliro.h
  • auth1Done : ACWG_Security.h

- c -

  • CERT_EC_bp256r1 : certificate.h
  • CERT_EC_bp256t1 : certificate.h
  • CERT_EC_bp384r1 : certificate.h
  • CERT_EC_bp384t1 : certificate.h
  • CERT_EC_bp512r1 : certificate.h
  • CERT_EC_bp512t1 : certificate.h
  • CERT_EC_P256 : certificate.h
  • CERT_EC_P384 : certificate.h
  • CERT_EC_P521 : certificate.h
  • CERT_INVALID_PARAMETER : certificate.h
  • CERT_OK : certificate.h
  • CERT_SIG_ECDSA_SHA1 : certificate.h
  • CERT_SIG_ECDSA_SHA224 : certificate.h
  • CERT_SIG_ECDSA_SHA256 : certificate.h
  • CERT_SIG_ECDSA_SHA384 : certificate.h
  • CERT_SIG_ECDSA_SHA512 : certificate.h
  • CONTROL_FLOW_POS : app_aliro.h

- d -

  • DERIVE_PERSISTENT_KEYS_POS : app_aliro.h
  • DON_T_KNOW_POS : app_aliro.h
  • DOOR_IS_CLOSED_POS : app_aliro.h
  • DOOR_IS_DISARMED_POS : app_aliro.h
  • DOOR_IS_OPENED_POS : app_aliro.h

- e -

  • ELAPSED_TIME_POS : app_aliro.h
  • END_AUTH0_POS : app_aliro.h
  • END_AUTH1_POS : app_aliro.h
  • END_CONTROL_FLOW_POS : app_aliro.h
  • END_DERIVE_PERSISTENT_KEYS_POS : app_aliro.h
  • END_EXCHANGE_POS : app_aliro.h
  • END_LOADCERT_POS : app_aliro.h
  • END_SELECT_APP_POS : app_aliro.h
  • END_STEPUP_POS : app_aliro.h
  • EXCHANGE_POS : app_aliro.h
  • EXTENSION_AKI : certificate_subparsing.h
  • EXTENSION_BC : certificate_subparsing.h
  • EXTENSION_EKU : certificate_subparsing.h
  • EXTENSION_KU : certificate_subparsing.h

- f -

  • failed : ACWG_Security.h
  • FLASH_OP_BUSY : flash_mng.h
  • FLASH_OP_ERROR : flash_mng.h
  • FLASH_OP_OK : flash_mng.h

- i -

  • inStepUp : ACWG_Security.h
  • invalid : ACWG_Security.h

- l -

  • LOADCERT_POS : app_aliro.h

- n -

  • NUM_TIMESTAMPS : app_aliro.h

- s -

  • SELECT_APP_POS : app_aliro.h
  • selectDone : ACWG_Security.h
  • SM_Crypto_Error : sm_crypto.h
  • SM_Crypto_HW_Error : sm_crypto.h
  • SM_Crypto_OK : sm_crypto.h
  • STEPUP_POS : app_aliro.h

- t -

  • TAG_BITSTRING : certificate_subparsing.h
  • TAG_BOOLEAN : certificate_subparsing.h
  • TAG_ENUMERATED : certificate_subparsing.h
  • TAG_extensions : certificate_subparsing.h
  • TAG_GeneralizedTime : certificate_subparsing.h
  • TAG_IA5String : certificate_subparsing.h
  • TAG_INTEGER : certificate_subparsing.h
  • TAG_issuerUniqueID : certificate_subparsing.h
  • TAG_NULL : certificate_subparsing.h
  • TAG_OBJECT_IDENTIFIER : certificate_subparsing.h
  • TAG_ObjectDescriptor : certificate_subparsing.h
  • TAG_OCTETSTRING : certificate_subparsing.h
  • TAG_OPTION_0 : certificate_subparsing.h
  • TAG_OPTION_1 : certificate_subparsing.h
  • TAG_OPTION_2 : certificate_subparsing.h
  • TAG_OPTION_3 : certificate_subparsing.h
  • TAG_PrintableString : certificate_subparsing.h
  • TAG_SEQUENCE : certificate_subparsing.h
  • TAG_SET : certificate_subparsing.h
  • TAG_subjectUniqueID : certificate_subparsing.h
  • TAG_UTCTime : certificate_subparsing.h
  • TAG_UTF8String : certificate_subparsing.h
  • TAG_x509VERSION : certificate_subparsing.h
  • TLV_ERROR_INVALID_LENGTH : tlv.h
  • TLV_ERROR_SHORT_BUFFER : tlv.h
  • TLV_ERROR_SHORT_PAYLOAD : tlv.h
  • TLV_ERROR_TAG_NOT_FOUND : tlv.h
  • TLV_SUCCESS : tlv.h
  • TLW_BUSY : tlwrapper.h
  • TLW_END : tlwrapper.h
  • TLW_ERROR_FAST : tlwrapper.h
  • TLW_ERROR_NONE : tlwrapper.h
  • TLW_FAIL_GENERATE : tlwrapper.h
  • TLW_FAIL_GENERIC : tlwrapper.h
  • TLW_FAIL_PROCESS : tlwrapper.h
  • TLW_FAIL_TIMEOUT : tlwrapper.h
  • TLW_NEED_AUTH1 : tlwrapper.h
  • TLW_NEED_GET_RESPONSE : tlwrapper.h
  • TLW_NEED_LOAD_CERT : tlwrapper.h
  • TLW_NEW_OUTPUT : tlwrapper.h
  • TLW_NO_PREPARE_NEEDED : tlwrapper.h

- v -

  • VERB_ALWAYS : app_aliro.h
  • VERB_CRITICAL : app_aliro.h
  • VERB_ERROR : app_aliro.h
  • VERB_INFO : app_aliro.h
  • VERB_NORMAL : app_aliro.h
  • VERB_NULL : app_aliro.h
  • VERB_VERBOSE : app_aliro.h


X-CUBE-ALIRO: Globals

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Macros
  • _
  • a
  • b
  • c
  • d
  • e
  • g
  • h
  • i
  • k
  • l
  • m
  • n
  • p
  • r
  • s
  • t
  • u
  • v

- _ -

  • __byteswap32 : app_aliro.c

- a -

  • ABI_VERSION : app_build_info.h
  • ACWG_ALIRO_SPEC_VERSION_MAJ : ACWG_build_info.h
  • ACWG_ALIRO_SPEC_VERSION_MIN : ACWG_build_info.h
  • ACWG_ALIRO_SPEC_VERSION_SUBMIN : ACWG_build_info.h
  • ACWG_BI_VERSION : ACWG_build_info.h
  • ACWG_VERSION_MAJ : ACWG_version.h
  • ACWG_VERSION_MIN : ACWG_version.h
  • ACWG_VERSION_SUBMIN : ACWG_version.h
  • ALIRO_APP_NAME : provisioning_info.h
  • ALIRO_CERTIFICATION_TEST : app_aliro.h
  • ALIRO_HAS_SEC_PROT_VER : provisioning_info.h
  • ALIRO_MAIN_PROT_VER : provisioning_info.h
  • ALIRO_MEASURE_PERFORMANCE : app_aliro.h
  • ALIRO_NFC_TOTAL_DURATION : provisioning_info.h
  • ALIRO_PROT_VER : provisioning_info.h
  • ALIRO_RTC_SET_STATUS_GOOD : app_aliro.h
  • ALIRO_RTC_SET_STATUS_IAR : app_aliro.h
  • ALIRO_SEC_PROT_VER : provisioning_info.h
  • AUTH1_AUTH_DATA_LEN_BYTES : ACWG_Security.h
  • AUTH1_CMD_PARAM : ACWG_Security.h
  • AUTH_BLESK_LEN_BYTES : ACWG_Security.h
  • AUTH_CERTIFICATE_MAX_LEN_BYTES : provisioning.c
  • AUTH_CRED_SIG_TIME_LEN_BYTES : ACWG_Security.h
  • AUTH_CRYPTOGRAM_LEN_BYTES : ACWG_Security.h
  • AUTH_CRYPTOGRAM_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_ENDPOINT_EXT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_EXCH_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_INFO_LEN_BYTES : ACWG_Security.h
  • AUTH_KEYSLOT_LEN_BYTES : ACWG_Security.h
  • AUTH_MAX_KEYSLOTS_STORED : ACWG_Security.h
  • AUTH_MAX_PAYLOAD_LEN_BYTES : ACWG_Security.h
  • AUTH_MAX_PERSISTENT_KEYS_STORED : ACWG_Security.h
  • AUTH_PERSISTENT_KEY_LEN_BYTES : ACWG_Security.h
  • AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_PUBKEY_LEN_BYTES : provisioning.h, ACWG_Security.h
  • AUTH_READER_EXT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_READER_GROUP_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_READER_GROUP_SUB_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_REVOC_SIG_TIME_LEN_BYTES : ACWG_Security.h
  • AUTH_SALT_MAX_LEN_BYTES : ACWG_Security.h
  • AUTH_SALT_TYPE_BYTES_LEN : ACWG_Security.h
  • AUTH_SIGNALING_BITMAP_LEN_BYTES : ACWG_Security.h
  • AUTH_STEPUP_SK_LEN_BYTES : ACWG_Security.h
  • AUTH_TRANS_ID_LEN_BYTES : ACWG_Security.h
  • AUTH_URSK_LEN_BYTES : ACWG_Security.h

- b -

  • B1_VENDOR_SPEC_EXT_SIZE_BYTES : provisioning.h
  • BLE_ADV_DISABLE : provisioning_info.h
  • BLE_ALIRO_FLOWS_SUPPORTED : app_aliro.h
  • BLE_RKE_ALIRO_FLOW_SUPPORTED : app_aliro.h
  • BLE_UWB_ALIRO_FLOW_SUPPORTED : app_aliro.h

- c -

  • CERTIFICATE_SIZE : provisioning.h
  • CHANNEL_BITMASK_ID : ACWG_Security.h
  • CMD_PARAMS_EXP_FAST_MASK : ACWG_Security.h
  • COMPUTE_SHA1 : provisioning.c
  • countof : app_aliro.h
  • CREATE_CASE : app_aliro.c

- d -

  • DEFAULT_CMD_PARAMS_VALUE : provisioning_info.h
  • DEMO_LM_NFCID2_BYTE1 : app_nfc.c
  • DEMO_LM_PAD0 : app_nfc.c
  • DEMO_LM_SC_BYTE1 : app_nfc.c
  • DEMO_LM_SC_BYTE2 : app_nfc.c
  • DEMO_LM_SEL_RES : app_nfc.c
  • DEMO_NFCV_BLOCK_LEN : app_nfc.c
  • DEMO_NFCV_USE_SELECT_MODE : app_nfc.c
  • DEMO_NFCV_WRITE_TAG : app_nfc.c
  • DEMO_ST_DISCOVERY : app_nfc.c
  • DEMO_ST_NOTINIT : app_nfc.c
  • DEMO_ST_START_DISCOVERY : app_nfc.c
  • DET_NFC_PROP : provisioning_info.h
  • DEVICE_NAME_SIZE_BYTES : provisioning.h
  • DEVICE_PROVISIONING_STRUCT_IS_VALID : provisioning_info.h
  • DISPLAY_SPLASH : provisioning_info.h

- e -

  • ECDSA_256_SIG_BYTE_SIZE : sm_crypto.h
  • EXPIRY_TIME_STAMP_DEFAULT_VALUE : provisioning_info.h

- g -

  • GET_SPSM_LOOP_NBR : app_aliro.c
  • GROUP_RESOLVING_KEY_SIZE_BYTES : provisioning.h

- h -

  • HOP_MODE_KEY_ID : ACWG_Security.h
  • HOP_MODE_KEY_LEN_BYTES : ACWG_Security.h
  • HOPPING_CONFIGURATION_BITMASK_ID : ACWG_Security.h

- i -

  • INIT_NFC_PROP : provisioning_info.h
  • IS_VALID_TAG : certificate_subparsing.h

- k -

  • KDH_LEN_BYTES : ACWG_Security.h

- l -

  • LOAD_NFC_PROP : provisioning_info.h
  • LOG_INFO_APP : log_module_u5.h

- m -

  • MAC_MODE_ID : ACWG_Security.h
  • MAX_DYNAMIC_SPSM_VALUE : app_aliro.c
  • MAX_FIXED_INFO_SIZE : sm_crypto_mcu.h
  • MIN_DYNAMIC_SPSM_VALUE : app_aliro.c

- n -

  • NFC_PROP_BUF_CONTENT : provisioning_info.h
  • NUM_PROV_DEVICES : provisioning.h
  • NUMBER_CHAPS_PER_SLOT_ID : ACWG_Security.h
  • NUMBER_RESPONDERS_NODES_ID : ACWG_Security.h
  • NUMBER_SLOTS_PER_ROUND_ID : ACWG_Security.h

- p -

  • PRINT_ERROR : app_aliro.c
  • PRIVATE_KEY_SIZE_BYTES : provisioning.h
  • PROVISIONING_JSON_INVALIDATE_ADDRESS : provisioning.c
  • PROVISIONING_JSON_INVALIDATE_LEN : provisioning.c
  • PROVISIONING_JSON_INVALIDATE_STR : provisioning.c
  • PROVISIONING_LOG : provisioning.c
  • PULSE_SHAPE_COMBO_ID : ACWG_Security.h

- r -

  • RAN_MULTIPLIER_ID : ACWG_Security.h
  • RAW_PRIV_KEY_BYTE_SIZE : sm_crypto.h
  • READER_CERTIF_BUF : provisioning.c
  • READER_CERTIF_LEN : provisioning.c
  • READER_PUB_KEY_BUF : provisioning.c
  • RESERVED_PAIRING_KEYS_SIZE_BYTES : provisioning.h

- s -

  • SHA256_BYTE_SIZE : sm_crypto.h
  • SLOT_BITMASK_ID : ACWG_Security.h
  • STATUS_ID : ACWG_Security.h
  • STS_INDEX0_ID : ACWG_Security.h
  • STS_INDEX0_LEN_BYTES : ACWG_Security.h
  • SYNC_CODE_INDEX_BITMASK_ID : ACWG_Security.h
  • SYNC_CODE_INDEX_BITMASK_LEN_BYTES : ACWG_Security.h
  • SYNC_CODE_INDEX_ID : ACWG_Security.h

- t -

  • TEST_HARNESS_SIMULATION : provisioning_info.h

- u -

  • UWB_CONFIGURATION_IDENTIFIER_ID : ACWG_Security.h
  • UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES : ACWG_Security.h
  • UWB_SESSION_ID_DEFAULT : provisioning_info.h
  • UWB_SESSION_IDENTIFIER_ID : ACWG_Security.h
  • UWB_SESSION_IDENTIFIER_LEN_BYTES : ACWG_Security.h
  • UWB_TIME0_ID : ACWG_Security.h
  • UWB_TIME0_LEN_BYTES : ACWG_Security.h

- v -

  • VENDOR_SPECIFIC_ID : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES1 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES2 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES3 : ACWG_Security.h
  • VENDOR_SPECIFIC_LEN_BYTES4 : ACWG_Security.h
  • VERBOSITY_SET : app_aliro.h


X-CUBE-ALIRO: _doxygen_X-CUBE-ALIRO-MainPage.h Source File

  • File List
  • Globals
_doxygen_X-CUBE-ALIRO-MainPage.h
Go to the documentation of this file.
1
48/* Define to prevent recursive inclusion -------------------------------------*/
49#ifndef DOXYGEN_TEMPLATE_H_
50#define DOXYGEN_TEMPLATE_H_
51
52#ifdef __cplusplus
53 extern "C" {
54#endif
55
443#ifdef __cplusplus
444}
445#endif
446
447
448#endif /* DOXYGEN_TEMPLATE_H_ */
449/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
450
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_Security.h Source File

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
ACWG_Security.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _ACWG_Security_H_
21#define _ACWG_Security_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include <stdint.h>
33#include <sm_crypto.h>
34#include "acwg_build_info.h"
35#include "acwg_version.h"
36
40/* Exported constants --------------------------------------------------------*/
41#define AUTH_EXP_TRANS_PROT_VERSION ((uint16_t)0x0100)
42
46#define AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES ((uint32_t)64)
47
52#define AUTH_PRIV_MAILBOX_DATA_SUBSET_MAX_LEN_BYTES ((uint32_t)8) // Todo : update
53
57#define AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
58
62#define AUTH_TRANS_ID_LEN_BYTES ((uint32_t)16)
63
67#define AUTH_READER_GROUP_ID_LEN_BYTES ((uint32_t)16)
68
72#define AUTH_READER_GROUP_SUB_ID_LEN_BYTES ((uint32_t)16)
73
77#define AUTH_KEYSLOT_LEN_BYTES ((uint32_t)8)
78
82#define AUTH_CRYPTOGRAM_SK_LEN_BYTES ((uint32_t)32)
83
87#define AUTH_CRYPTOGRAM_LEN_BYTES ((uint32_t)64)
88
92#define AUTH_MAX_PAYLOAD_LEN_BYTES ((uint32_t)256)
93
97#define AUTH_PERSISTENT_KEY_LEN_BYTES ((uint32_t)32)
98
102#define AUTH_EXCH_SK_LEN_BYTES ((uint32_t)32)
103
107#define AUTH_STEPUP_SK_LEN_BYTES ((uint32_t)32)
108
112#define AUTH_BLESK_LEN_BYTES ((uint32_t)32)
113
117#define AUTH_URSK_LEN_BYTES ((uint32_t)32)
118
122#define AUTH_READER_EXT_MAX_LEN_BYTES ((uint32_t)128)
123
127#define AUTH_ENDPOINT_EXT_MAX_LEN_BYTES ((uint32_t)128)
128
132#define AUTH_MAX_PERSISTENT_KEYS_STORED ((uint32_t)2)
133
137#define AUTH_MAX_KEYSLOTS_STORED ((uint32_t)2)
138
142#define AUTH_CRED_SIG_TIME_LEN_BYTES ((uint32_t)20)
143
147#define AUTH_REVOC_SIG_TIME_LEN_BYTES ((uint32_t)20)
148
152#define AUTH_SIGNALING_BITMAP_LEN_BYTES ((uint32_t)2)
153
157#define AUTH_SALT_TYPE_BYTES_LEN ((uint32_t)12)
158
162#define AUTH_SALT_MAX_LEN_BYTES ((uint32_t)(\
163 (AUTH_PUBKEY_LEN_BYTES / 2) + \
164 AUTH_SALT_TYPE_BYTES_LEN + \
165 AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES + \
166 1 + \
167 1 + \
168 1 + \
169 2 + \
170 (AUTH_PUBKEY_LEN_BYTES / 2) + \
171 AUTH_TRANS_ID_LEN_BYTES + \
172 2 + \
173 AUTH_ENDPOINT_PROP_TLV_MAX_LEN_BYTES + \
174 2 + \
175 (AUTH_PUBKEY_LEN_BYTES / 2) \
176))
177
181#define AUTH_INFO_LEN_BYTES ((uint32_t)AUTH_PUBKEY_LEN_BYTES)
182
186#define AUTH1_CMD_PARAM ((uint8_t)1) // endpoint public key expected in auth1 response
187
191#define AUTH1_AUTH_DATA_LEN_BYTES (2 + AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES +\
192 2 + (AUTH_PUBKEY_LEN_BYTES / 2) +\
193 2 + (AUTH_PUBKEY_LEN_BYTES / 2) +\
194 2 + AUTH_TRANS_ID_LEN_BYTES +\
195 2 + 4)
196
200#define CMD_PARAMS_EXP_FAST_MASK ((uint8_t)0x1)
201
205#define KDH_LEN_BYTES ((uint32_t)32)
206
210#define UWB_CONFIGURATION_IDENTIFIER_ID ((uint8_t) 0)
211
215#define PULSE_SHAPE_COMBO_ID ((uint8_t) 1)
216
220#define UWB_SESSION_IDENTIFIER_ID ((uint8_t) 2)
221
225#define CHANNEL_BITMASK_ID ((uint8_t) 3)
226
230#define RAN_MULTIPLIER_ID ((uint8_t) 4)
231
235#define SLOT_BITMASK_ID ((uint8_t) 5)
236
240#define SYNC_CODE_INDEX_BITMASK_ID ((uint8_t) 6)
241
245#define SYNC_CODE_INDEX_ID ((uint8_t) 7)
246
250#define HOPPING_CONFIGURATION_BITMASK_ID ((uint8_t) 8)
251
255#define NUMBER_CHAPS_PER_SLOT_ID ((uint8_t) 9)
256
260#define NUMBER_RESPONDERS_NODES_ID ((uint8_t) 10)
261
265#define NUMBER_SLOTS_PER_ROUND_ID ((uint8_t) 11)
266
270#define STS_INDEX0_ID ((uint8_t) 12)
271
275#define UWB_TIME0_ID ((uint8_t) 13)
276
280#define HOP_MODE_KEY_ID ((uint8_t) 14)
281
285#define MAC_MODE_ID ((uint8_t) 15)
286
290#define VENDOR_SPECIFIC_ID ((uint8_t) 16)
291
295#define STATUS_ID ((uint8_t) 17)
296
300#define UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES ((uint8_t)2) // 2 x m
301
305#define UWB_SESSION_IDENTIFIER_LEN_BYTES ((uint8_t)4)
306
310#define SYNC_CODE_INDEX_BITMASK_LEN_BYTES ((uint8_t)4)
311
315#define STS_INDEX0_LEN_BYTES ((uint8_t)4)
316
320#define UWB_TIME0_LEN_BYTES ((uint8_t)8)
321
325#define HOP_MODE_KEY_LEN_BYTES ((uint8_t)4)
326
330#define VENDOR_SPECIFIC_LEN_BYTES1 ((uint8_t)3 + 5) // 3 + Attribute Value Len
331
335#define VENDOR_SPECIFIC_LEN_BYTES2 ((uint8_t)3 + 5) // 3 + Attribute Value Len
336
340#define VENDOR_SPECIFIC_LEN_BYTES3 ((uint8_t)3 + 5) // 3 + Attribute Value Len
341
345#define VENDOR_SPECIFIC_LEN_BYTES4 ((uint8_t)3 + 5) // 3 + Attribute Value Len
346
356/* Exported types ------------------------------------------------------------*/
360typedef enum ACWG_Status {
361 ACWG_OK = 0x764E8BAC,
362 ACWG_Error_Generic = 0x0abedead,
363 ACWG_Error_FastTransFailed,
364 ACWG_Error_Parsing,
365 ACWG_Error_ShortBuf,
366 ACWG_Error_Crypto_KeyGen,
367 ACWG_Error_Crypto_TransIDGen,
368 ACWG_Error_Crypto_ECDH,
369 ACWG_Error_Crypto_Derivation,
370 ACWG_Error_Crypto_EncryptDecrypt,
371 ACWG_Error_Crypto_Hash,
372 ACWG_Error_Crypto_SigGen,
373 ACWG_Error_Crypto_SigVerif,
374 ACWG_Error_HW,
375 ACWG_Error_WrongState,
376 ACWG_Error_KeyslotNotFound,
377 ACWG_Error_Parsing_NoKeyslot,
378 ACWG_Error_Parsing_NoPublicKey
379} ACWG_Status_t;
380
384typedef enum transactionState {
385 invalid = 0,
386 selectDone,
387 auth0StdDone,
388 auth0FastDone,
389 auth1Done,
390 inStepUp,
391 failed
392} transactionState_t;
393
397typedef struct ACWG_SessionContextInit {
398 uint8_t cmdParams;
399 uint8_t useKeyslot;
400 uint8_t useExchange;
401 uint8_t useLoadCert;
402 uint8_t useStepUp;
403 uint8_t RESERVED0;
404 uint8_t RESERVED1;
405 uint8_t RESERVED2;
406 uint8_t RESERVED3;
407 uint8_t NotVerifyKey;
408 uint8_t interface;
409 uint8_t authPolicy;
410 uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES];
411 uint16_t expTransProtVer;
412 uint8_t *readerExt;
413 uint32_t readerExtSize;
414 uint32_t lockStatus;
415} ACWG_SessionContextInit_t ;
416
420typedef struct ACWG_UWB_Context {
421 uint8_t UWB_Configuration_Identifier[UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES];
422 uint8_t Pulse_Shape_Combo;
423 uint8_t UWB_Session_Identifier[UWB_SESSION_IDENTIFIER_LEN_BYTES];
424 uint8_t Channel_Bitmask;
425 uint8_t RAN_Multiplier;
426 uint8_t Slot_Bitmask;
427 uint8_t SYNC_Code_Index_Bitmask[SYNC_CODE_INDEX_BITMASK_LEN_BYTES];
428 uint8_t SYNC_Code_Index;
429 uint8_t Hopping_Configuration_Bitmask;
430 uint8_t Number_Chaps_per_Slot;
431 uint8_t Number_Responders_Nodes;
432 uint8_t Number_Slots_per_Round;
433 uint8_t STS_Index0[STS_INDEX0_LEN_BYTES];
434 uint8_t UWB_Time0[UWB_TIME0_LEN_BYTES];
435 uint8_t HOP_Mode_Key[HOP_MODE_KEY_LEN_BYTES];
436 uint8_t MAC_Mode;
437 uint8_t Vendor_Specific1[VENDOR_SPECIFIC_LEN_BYTES1];
438 uint8_t Vendor_Specific2[VENDOR_SPECIFIC_LEN_BYTES2];
439 uint8_t Vendor_Specific3[VENDOR_SPECIFIC_LEN_BYTES3];
440 uint8_t Vendor_Specific4[VENDOR_SPECIFIC_LEN_BYTES4];
441 uint8_t Vendor_Specific1_len;
442 uint8_t Vendor_Specific2_len;
443 uint8_t Vendor_Specific3_len;
444 uint8_t Vendor_Specific4_len;
445 uint8_t Status;
446} ACWG_UWB_Context_t ;
447
451typedef struct ACWG_SessionContext {
452 ACWG_SessionContextInit_t init;
453 ACWG_UWB_Context_t uwb_ctx;
454 uint32_t expDeviceCounter;
455 uint32_t expReaderCounter;
456 uint32_t stepUpDeviceCounter;
457 uint32_t stepUpReaderCounter;
458 uint32_t bleDeviceCounter;
459 uint32_t bleReaderCounter;
460 uint8_t transId[AUTH_TRANS_ID_LEN_BYTES];
461 uint8_t readerEPub[AUTH_PUBKEY_LEN_BYTES];
462 uint8_t endpointEPub[AUTH_PUBKEY_LEN_BYTES];
463 uint8_t endpointPub[AUTH_PUBKEY_LEN_BYTES];
464 transactionState_t transState;
465 transactionState_t stateBeforeStepUp;
466 uint8_t cryptogramSK[AUTH_CRYPTOGRAM_SK_LEN_BYTES];
467 uint8_t expSKReader[AUTH_EXCH_SK_LEN_BYTES];
468 uint8_t expSKDevice[AUTH_EXCH_SK_LEN_BYTES];
469 uint8_t bleSK[AUTH_BLESK_LEN_BYTES];
470 uint8_t bleSKReader[AUTH_BLESK_LEN_BYTES];
471 uint8_t bleSKDevice[AUTH_BLESK_LEN_BYTES];
472 uint8_t uRSK[AUTH_URSK_LEN_BYTES];
473 uint8_t stepUpSK[AUTH_STEPUP_SK_LEN_BYTES];
474 uint8_t stepUpSKReader[AUTH_STEPUP_SK_LEN_BYTES];
475 uint8_t stepUpSKDevice[AUTH_STEPUP_SK_LEN_BYTES];
476 uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES];
477 uint8_t endpointExt[AUTH_ENDPOINT_EXT_MAX_LEN_BYTES];
478 uint32_t endpointExtSize;
479 uint8_t *endpointPropTLV;
480 uint32_t endpointPropTLVSize;
481 uint8_t authData[AUTH1_AUTH_DATA_LEN_BYTES];
482 uint8_t signalingBitmap[AUTH_SIGNALING_BITMAP_LEN_BYTES];
483 uint8_t kdh[KDH_LEN_BYTES];
484 uint32_t lockActionRequest;
485 uint8_t salt[AUTH_SALT_MAX_LEN_BYTES];
486 uint8_t info[AUTH_INFO_LEN_BYTES + AUTH_READER_EXT_MAX_LEN_BYTES + AUTH_ENDPOINT_EXT_MAX_LEN_BYTES];
487} ACWG_SessionContext_t;
488
492typedef struct ACWG_PersistentKeys {
493 uint8_t endpointPubK[AUTH_PUBKEY_LEN_BYTES];
494 uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES];
495} persistentKeys_t;
496
500typedef struct ACWG_Keyslot {
501 uint8_t slot[AUTH_KEYSLOT_LEN_BYTES];
502 uint8_t publicKey[AUTH_PUBKEY_LEN_BYTES];
503} keyslot_t;
504
513/* Exported variables ------------------------------------------------------------*/
514 const ACWG_build_info_t* ACWG_SecurityGetVersion(void);
523/* Exported functions ------------------------------------------------------- */
524
531 ACWG_Status_t ACWG_initSessionContext(ACWG_SessionContext_t *context);
532
539 ACWG_Status_t ACWG_selectDone(ACWG_SessionContext_t *context);
540
547 ACWG_Status_t ACWG_prepareEphemeralKeypairAndTransactionId(ACWG_SessionContext_t *context);
548
557 ACWG_Status_t ACWG_generateAUTH0CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize);
558
567 ACWG_Status_t ACWG_processAUTH0ResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize);
568
577 ACWG_Status_t ACWG_generateLOADCERTCommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize);
578
587 ACWG_Status_t ACWG_generateAUTH1CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize);
588
595 ACWG_Status_t ACWG_computeKDHandVolatileKeys(ACWG_SessionContext_t *context);
596
603 ACWG_Status_t ACWG_derivePersistentKeys(ACWG_SessionContext_t *context);
604
613 ACWG_Status_t ACWG_processAUTH1ResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize);
614
625 ACWG_Status_t ACWG_generateExchangeCommandPayload(ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize);
626
636 ACWG_Status_t ACWG_processExchangeResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize);
637
646 ACWG_Status_t ACWG_initBLEEncryptedSession(ACWG_SessionContext_t *context, uint8_t * versions, uint32_t versionsSize);
647
660 ACWG_Status_t ACWG_encryptBle(ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize);
661
674 ACWG_Status_t ACWG_decryptBle(ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize);
675
686 ACWG_Status_t ACWG_generateEnvelopeCommandPayload(ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize);
687
697 ACWG_Status_t ACWG_getGetResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize);
698
705 ACWG_Status_t ACWG_enterStepUp(ACWG_SessionContext_t *context);
706
713 ACWG_Status_t ACWG_exitStepUp(ACWG_SessionContext_t *context);
714
723 ACWG_Status_t ACWG_generateM1CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize);
724
733 ACWG_Status_t ACWG_processM2Payload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize);
734
743 ACWG_Status_t ACWG_generateM3CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize);
744
753 ACWG_Status_t ACWG_processM4Payload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize);
754
755extern void PrintBufferHex(const char *pstr, const uint8_t *pBuf, const uint32_t nSize);
764#ifdef __cplusplus
765}
766#endif
767
768#endif /* _ACWG_SECURITY_H_ */
769/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ACWG_build_info.h
: Header for ACWG build information. This file contains public declarations for library build info.
ACWG_version.h
: Header for ACWG_version.c file. This file defines version for the ACWG Security Middleware.
AUTH_READER_GROUP_SUB_ID_LEN_BYTES
#define AUTH_READER_GROUP_SUB_ID_LEN_BYTES
Length in bytes of a reader group sub ID.
Definition: ACWG_Security.h:72
AUTH_URSK_LEN_BYTES
#define AUTH_URSK_LEN_BYTES
Length in bytes of a uRSK key.
Definition: ACWG_Security.h:117
VENDOR_SPECIFIC_LEN_BYTES2
#define VENDOR_SPECIFIC_LEN_BYTES2
Length in bytes of vendor specific field 2 (3 + Attribute Value Len).
Definition: ACWG_Security.h:335
AUTH_KEYSLOT_LEN_BYTES
#define AUTH_KEYSLOT_LEN_BYTES
Length in bytes of a keyslot.
Definition: ACWG_Security.h:77
UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES
#define UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES
Length in bytes of UWB configuration identifier (2 x m).
Definition: ACWG_Security.h:300
UWB_SESSION_IDENTIFIER_LEN_BYTES
#define UWB_SESSION_IDENTIFIER_LEN_BYTES
Length in bytes of UWB session identifier.
Definition: ACWG_Security.h:305
AUTH_TRANS_ID_LEN_BYTES
#define AUTH_TRANS_ID_LEN_BYTES
Length in bytes of a transaction ID.
Definition: ACWG_Security.h:62
UWB_TIME0_LEN_BYTES
#define UWB_TIME0_LEN_BYTES
Length in bytes of UWB time0.
Definition: ACWG_Security.h:320
AUTH_READER_GROUP_ID_LEN_BYTES
#define AUTH_READER_GROUP_ID_LEN_BYTES
Length in bytes of a reader group ID.
Definition: ACWG_Security.h:67
HOP_MODE_KEY_LEN_BYTES
#define HOP_MODE_KEY_LEN_BYTES
Length in bytes of hop mode key.
Definition: ACWG_Security.h:325
AUTH_EXCH_SK_LEN_BYTES
#define AUTH_EXCH_SK_LEN_BYTES
Length in bytes of an exchange session key.
Definition: ACWG_Security.h:102
AUTH1_AUTH_DATA_LEN_BYTES
#define AUTH1_AUTH_DATA_LEN_BYTES
Length in bytes of AUTH1 authentication data.
Definition: ACWG_Security.h:191
KDH_LEN_BYTES
#define KDH_LEN_BYTES
Length in bytes of KDH.
Definition: ACWG_Security.h:205
STS_INDEX0_LEN_BYTES
#define STS_INDEX0_LEN_BYTES
Length in bytes of STS index0.
Definition: ACWG_Security.h:315
VENDOR_SPECIFIC_LEN_BYTES4
#define VENDOR_SPECIFIC_LEN_BYTES4
Length in bytes of vendor specific field 4 (3 + Attribute Value Len).
Definition: ACWG_Security.h:345
AUTH_ENDPOINT_EXT_MAX_LEN_BYTES
#define AUTH_ENDPOINT_EXT_MAX_LEN_BYTES
Maximum length in bytes for endpoint extension.
Definition: ACWG_Security.h:127
AUTH_CRYPTOGRAM_SK_LEN_BYTES
#define AUTH_CRYPTOGRAM_SK_LEN_BYTES
Length in bytes of a cryptogram session key.
Definition: ACWG_Security.h:82
AUTH_INFO_LEN_BYTES
#define AUTH_INFO_LEN_BYTES
Length in bytes of info.
Definition: ACWG_Security.h:181
VENDOR_SPECIFIC_LEN_BYTES1
#define VENDOR_SPECIFIC_LEN_BYTES1
Length in bytes of vendor specific field 1 (3 + Attribute Value Len).
Definition: ACWG_Security.h:330
AUTH_PUBKEY_LEN_BYTES
#define AUTH_PUBKEY_LEN_BYTES
Length in bytes of a public key.
Definition: ACWG_Security.h:57
AUTH_SALT_MAX_LEN_BYTES
#define AUTH_SALT_MAX_LEN_BYTES
Maximum length in bytes for salt.
Definition: ACWG_Security.h:162
SYNC_CODE_INDEX_BITMASK_LEN_BYTES
#define SYNC_CODE_INDEX_BITMASK_LEN_BYTES
Length in bytes of sync code index bitmask.
Definition: ACWG_Security.h:310
AUTH_BLESK_LEN_BYTES
#define AUTH_BLESK_LEN_BYTES
Length in bytes of a BLE session key.
Definition: ACWG_Security.h:112
AUTH_PERSISTENT_KEY_LEN_BYTES
#define AUTH_PERSISTENT_KEY_LEN_BYTES
Length in bytes of a persistent key.
Definition: ACWG_Security.h:97
AUTH_SIGNALING_BITMAP_LEN_BYTES
#define AUTH_SIGNALING_BITMAP_LEN_BYTES
Length in bytes of signaling bitmap.
Definition: ACWG_Security.h:152
AUTH_READER_EXT_MAX_LEN_BYTES
#define AUTH_READER_EXT_MAX_LEN_BYTES
Maximum length in bytes for reader extension.
Definition: ACWG_Security.h:122
AUTH_STEPUP_SK_LEN_BYTES
#define AUTH_STEPUP_SK_LEN_BYTES
Length in bytes of a step-up session key.
Definition: ACWG_Security.h:107
VENDOR_SPECIFIC_LEN_BYTES3
#define VENDOR_SPECIFIC_LEN_BYTES3
Length in bytes of vendor specific field 3 (3 + Attribute Value Len).
Definition: ACWG_Security.h:340
ACWG_computeKDHandVolatileKeys
ACWG_Status_t ACWG_computeKDHandVolatileKeys(ACWG_SessionContext_t *context)
Computes the KDH and volatile keys for the session.
PrintBufferHex
void PrintBufferHex(const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format if enabled.
Definition: app_aliro.c:1127
ACWG_processM2Payload
ACWG_Status_t ACWG_processM2Payload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M2 payload.
ACWG_generateLOADCERTCommandPayload
ACWG_Status_t ACWG_generateLOADCERTCommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the LOADCERT command payload.
ACWG_initBLEEncryptedSession
ACWG_Status_t ACWG_initBLEEncryptedSession(ACWG_SessionContext_t *context, uint8_t *versions, uint32_t versionsSize)
Initializes a BLE encrypted session.
ACWG_selectDone
ACWG_Status_t ACWG_selectDone(ACWG_SessionContext_t *context)
Processes the SELECT command completion.
ACWG_processAUTH1ResponsePayload
ACWG_Status_t ACWG_processAUTH1ResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH1 response payload.
ACWG_getGetResponsePayload
ACWG_Status_t ACWG_getGetResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Gets the response payload for a GET command.
ACWG_encryptBle
ACWG_Status_t ACWG_encryptBle(ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Encrypts data for BLE communication.
ACWG_generateEnvelopeCommandPayload
ACWG_Status_t ACWG_generateEnvelopeCommandPayload(ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Envelope command payload.
ACWG_initSessionContext
ACWG_Status_t ACWG_initSessionContext(ACWG_SessionContext_t *context)
Initializes the ACWG session context.
ACWG_processExchangeResponsePayload
ACWG_Status_t ACWG_processExchangeResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize, uint32_t *outputSize)
Processes the Exchange response payload.
ACWG_processM4Payload
ACWG_Status_t ACWG_processM4Payload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the M4 payload.
ACWG_generateAUTH1CommandPayload
ACWG_Status_t ACWG_generateAUTH1CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH1 command payload.
ACWG_processAUTH0ResponsePayload
ACWG_Status_t ACWG_processAUTH0ResponsePayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t payloadSize)
Processes the AUTH0 response payload.
ACWG_generateAUTH0CommandPayload
ACWG_Status_t ACWG_generateAUTH0CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the AUTH0 command payload.
ACWG_generateM1CommandPayload
ACWG_Status_t ACWG_generateM1CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M1 command payload.
ACWG_derivePersistentKeys
ACWG_Status_t ACWG_derivePersistentKeys(ACWG_SessionContext_t *context)
Derives persistent keys for the session.
ACWG_generateExchangeCommandPayload
ACWG_Status_t ACWG_generateExchangeCommandPayload(ACWG_SessionContext_t *context, uint8_t *input, uint32_t inputSize, uint8_t *payload, uint32_t *payloadSize)
Generates the Exchange command payload.
ACWG_prepareEphemeralKeypairAndTransactionId
ACWG_Status_t ACWG_prepareEphemeralKeypairAndTransactionId(ACWG_SessionContext_t *context)
Prepares an ephemeral keypair and generates a transaction ID for the session.
ACWG_enterStepUp
ACWG_Status_t ACWG_enterStepUp(ACWG_SessionContext_t *context)
Enters the step-up phase in the session context.
ACWG_exitStepUp
ACWG_Status_t ACWG_exitStepUp(ACWG_SessionContext_t *context)
Exits the step-up phase in the session context.
ACWG_decryptBle
ACWG_Status_t ACWG_decryptBle(ACWG_SessionContext_t *context, uint8_t protocolHeader, uint8_t msgID, uint8_t *input, uint32_t inputSize, uint8_t *output, uint32_t *outputSize)
Decrypts data received over BLE communication.
ACWG_generateM3CommandPayload
ACWG_Status_t ACWG_generateM3CommandPayload(ACWG_SessionContext_t *context, uint8_t *payload, uint32_t *payloadSize)
Generates the M3 command payload.
ACWG_SessionContext_t
struct ACWG_SessionContext ACWG_SessionContext_t
Session context for ACWG Security operations.
ACWG_SessionContextInit_t
struct ACWG_SessionContextInit ACWG_SessionContextInit_t
Initialization parameters for an ACWG session context.
ACWG_Status
ACWG_Status
Status codes for ACWG Security operations.
Definition: ACWG_Security.h:360
ACWG_Status_t
enum ACWG_Status ACWG_Status_t
Status codes for ACWG Security operations.
persistentKeys_t
struct ACWG_PersistentKeys persistentKeys_t
Structure for persistent keys storage.
keyslot_t
struct ACWG_Keyslot keyslot_t
Structure for keyslot storage.
transactionState_t
enum transactionState transactionState_t
Transaction state machine for ACWG Security.
transactionState
transactionState
Transaction state machine for ACWG Security.
Definition: ACWG_Security.h:384
ACWG_UWB_Context_t
struct ACWG_UWB_Context ACWG_UWB_Context_t
UWB (Ultra-Wideband) context for ACWG session.
ACWG_OK
@ ACWG_OK
Definition: ACWG_Security.h:361
ACWG_Error_Crypto_Derivation
@ ACWG_Error_Crypto_Derivation
Definition: ACWG_Security.h:369
ACWG_Error_WrongState
@ ACWG_Error_WrongState
Definition: ACWG_Security.h:375
ACWG_Error_Crypto_Hash
@ ACWG_Error_Crypto_Hash
Definition: ACWG_Security.h:371
ACWG_Error_ShortBuf
@ ACWG_Error_ShortBuf
Definition: ACWG_Security.h:365
ACWG_Error_Generic
@ ACWG_Error_Generic
Definition: ACWG_Security.h:362
ACWG_Error_HW
@ ACWG_Error_HW
Definition: ACWG_Security.h:374
ACWG_Error_Parsing_NoKeyslot
@ ACWG_Error_Parsing_NoKeyslot
Definition: ACWG_Security.h:377
ACWG_Error_Crypto_SigGen
@ ACWG_Error_Crypto_SigGen
Definition: ACWG_Security.h:372
ACWG_Error_Parsing_NoPublicKey
@ ACWG_Error_Parsing_NoPublicKey
Definition: ACWG_Security.h:378
ACWG_Error_Crypto_TransIDGen
@ ACWG_Error_Crypto_TransIDGen
Definition: ACWG_Security.h:367
ACWG_Error_Crypto_KeyGen
@ ACWG_Error_Crypto_KeyGen
Definition: ACWG_Security.h:366
ACWG_Error_Crypto_ECDH
@ ACWG_Error_Crypto_ECDH
Definition: ACWG_Security.h:368
ACWG_Error_FastTransFailed
@ ACWG_Error_FastTransFailed
Definition: ACWG_Security.h:363
ACWG_Error_KeyslotNotFound
@ ACWG_Error_KeyslotNotFound
Definition: ACWG_Security.h:376
ACWG_Error_Crypto_EncryptDecrypt
@ ACWG_Error_Crypto_EncryptDecrypt
Definition: ACWG_Security.h:370
ACWG_Error_Crypto_SigVerif
@ ACWG_Error_Crypto_SigVerif
Definition: ACWG_Security.h:373
ACWG_Error_Parsing
@ ACWG_Error_Parsing
Definition: ACWG_Security.h:364
inStepUp
@ inStepUp
Definition: ACWG_Security.h:390
selectDone
@ selectDone
Definition: ACWG_Security.h:386
auth1Done
@ auth1Done
Definition: ACWG_Security.h:389
failed
@ failed
Definition: ACWG_Security.h:391
auth0StdDone
@ auth0StdDone
Definition: ACWG_Security.h:387
invalid
@ invalid
Definition: ACWG_Security.h:385
auth0FastDone
@ auth0FastDone
Definition: ACWG_Security.h:388
sm_crypto.h
: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations.
ACWG_Keyslot
Structure for keyslot storage.
Definition: ACWG_Security.h:500
ACWG_Keyslot::publicKey
uint8_t publicKey[AUTH_PUBKEY_LEN_BYTES]
Definition: ACWG_Security.h:502
ACWG_Keyslot::slot
uint8_t slot[AUTH_KEYSLOT_LEN_BYTES]
Definition: ACWG_Security.h:501
ACWG_PersistentKeys
Structure for persistent keys storage.
Definition: ACWG_Security.h:492
ACWG_PersistentKeys::kPersistent
uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES]
Definition: ACWG_Security.h:494
ACWG_PersistentKeys::endpointPubK
uint8_t endpointPubK[AUTH_PUBKEY_LEN_BYTES]
Definition: ACWG_Security.h:493
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
ACWG_SessionContext::stepUpReaderCounter
uint32_t stepUpReaderCounter
Definition: ACWG_Security.h:457
ACWG_SessionContext::authData
uint8_t authData[AUTH1_AUTH_DATA_LEN_BYTES]
Definition: ACWG_Security.h:481
ACWG_SessionContext::stateBeforeStepUp
transactionState_t stateBeforeStepUp
Definition: ACWG_Security.h:465
ACWG_SessionContext::kPersistent
uint8_t kPersistent[AUTH_PERSISTENT_KEY_LEN_BYTES]
Definition: ACWG_Security.h:476
ACWG_SessionContext::stepUpSKDevice
uint8_t stepUpSKDevice[AUTH_STEPUP_SK_LEN_BYTES]
Definition: ACWG_Security.h:475
ACWG_SessionContext::uRSK
uint8_t uRSK[AUTH_URSK_LEN_BYTES]
Definition: ACWG_Security.h:472
ACWG_SessionContext::stepUpDeviceCounter
uint32_t stepUpDeviceCounter
Definition: ACWG_Security.h:456
ACWG_SessionContext::endpointExtSize
uint32_t endpointExtSize
Definition: ACWG_Security.h:478
ACWG_SessionContext::bleDeviceCounter
uint32_t bleDeviceCounter
Definition: ACWG_Security.h:458
ACWG_SessionContext::endpointPub
uint8_t endpointPub[AUTH_PUBKEY_LEN_BYTES]
Definition: ACWG_Security.h:463
ACWG_SessionContext::bleSKReader
uint8_t bleSKReader[AUTH_BLESK_LEN_BYTES]
Definition: ACWG_Security.h:470
ACWG_SessionContext::bleSKDevice
uint8_t bleSKDevice[AUTH_BLESK_LEN_BYTES]
Definition: ACWG_Security.h:471
ACWG_SessionContext::lockActionRequest
uint32_t lockActionRequest
Definition: ACWG_Security.h:484
ACWG_SessionContext::stepUpSKReader
uint8_t stepUpSKReader[AUTH_STEPUP_SK_LEN_BYTES]
Definition: ACWG_Security.h:474
ACWG_SessionContext::expSKReader
uint8_t expSKReader[AUTH_EXCH_SK_LEN_BYTES]
Definition: ACWG_Security.h:467
ACWG_SessionContext::uwb_ctx
ACWG_UWB_Context_t uwb_ctx
Definition: ACWG_Security.h:453
ACWG_SessionContext::endpointExt
uint8_t endpointExt[AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]
Definition: ACWG_Security.h:477
ACWG_SessionContext::transState
transactionState_t transState
Definition: ACWG_Security.h:464
ACWG_SessionContext::kdh
uint8_t kdh[KDH_LEN_BYTES]
Definition: ACWG_Security.h:483
ACWG_SessionContext::endpointEPub
uint8_t endpointEPub[AUTH_PUBKEY_LEN_BYTES]
Definition: ACWG_Security.h:462
ACWG_SessionContext::bleSK
uint8_t bleSK[AUTH_BLESK_LEN_BYTES]
Definition: ACWG_Security.h:469
ACWG_SessionContext::endpointPropTLVSize
uint32_t endpointPropTLVSize
Definition: ACWG_Security.h:480
ACWG_SessionContext::transId
uint8_t transId[AUTH_TRANS_ID_LEN_BYTES]
Definition: ACWG_Security.h:460
ACWG_SessionContext::endpointPropTLV
uint8_t * endpointPropTLV
Definition: ACWG_Security.h:479
ACWG_SessionContext::expReaderCounter
uint32_t expReaderCounter
Definition: ACWG_Security.h:455
ACWG_SessionContext::stepUpSK
uint8_t stepUpSK[AUTH_STEPUP_SK_LEN_BYTES]
Definition: ACWG_Security.h:473
ACWG_SessionContext::cryptogramSK
uint8_t cryptogramSK[AUTH_CRYPTOGRAM_SK_LEN_BYTES]
Definition: ACWG_Security.h:466
ACWG_SessionContext::bleReaderCounter
uint32_t bleReaderCounter
Definition: ACWG_Security.h:459
ACWG_SessionContext::info
uint8_t info[AUTH_INFO_LEN_BYTES+AUTH_READER_EXT_MAX_LEN_BYTES+AUTH_ENDPOINT_EXT_MAX_LEN_BYTES]
Definition: ACWG_Security.h:486
ACWG_SessionContext::init
ACWG_SessionContextInit_t init
Definition: ACWG_Security.h:452
ACWG_SessionContext::expDeviceCounter
uint32_t expDeviceCounter
Definition: ACWG_Security.h:454
ACWG_SessionContext::readerEPub
uint8_t readerEPub[AUTH_PUBKEY_LEN_BYTES]
Definition: ACWG_Security.h:461
ACWG_SessionContext::signalingBitmap
uint8_t signalingBitmap[AUTH_SIGNALING_BITMAP_LEN_BYTES]
Definition: ACWG_Security.h:482
ACWG_SessionContext::salt
uint8_t salt[AUTH_SALT_MAX_LEN_BYTES]
Definition: ACWG_Security.h:485
ACWG_SessionContext::expSKDevice
uint8_t expSKDevice[AUTH_EXCH_SK_LEN_BYTES]
Definition: ACWG_Security.h:468
ACWG_SessionContextInit
Initialization parameters for an ACWG session context.
Definition: ACWG_Security.h:397
ACWG_SessionContextInit::RESERVED3
uint8_t RESERVED3
Definition: ACWG_Security.h:406
ACWG_SessionContextInit::useExchange
uint8_t useExchange
Definition: ACWG_Security.h:400
ACWG_SessionContextInit::readerExt
uint8_t * readerExt
Definition: ACWG_Security.h:412
ACWG_SessionContextInit::authPolicy
uint8_t authPolicy
Definition: ACWG_Security.h:409
ACWG_SessionContextInit::useStepUp
uint8_t useStepUp
Definition: ACWG_Security.h:402
ACWG_SessionContextInit::cmdParams
uint8_t cmdParams
Definition: ACWG_Security.h:398
ACWG_SessionContextInit::readerID
uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]
Definition: ACWG_Security.h:410
ACWG_SessionContextInit::useLoadCert
uint8_t useLoadCert
Definition: ACWG_Security.h:401
ACWG_SessionContextInit::RESERVED0
uint8_t RESERVED0
Definition: ACWG_Security.h:403
ACWG_SessionContextInit::RESERVED1
uint8_t RESERVED1
Definition: ACWG_Security.h:404
ACWG_SessionContextInit::lockStatus
uint32_t lockStatus
Definition: ACWG_Security.h:414
ACWG_SessionContextInit::readerExtSize
uint32_t readerExtSize
Definition: ACWG_Security.h:413
ACWG_SessionContextInit::NotVerifyKey
uint8_t NotVerifyKey
Definition: ACWG_Security.h:407
ACWG_SessionContextInit::expTransProtVer
uint16_t expTransProtVer
Definition: ACWG_Security.h:411
ACWG_SessionContextInit::useKeyslot
uint8_t useKeyslot
Definition: ACWG_Security.h:399
ACWG_SessionContextInit::RESERVED2
uint8_t RESERVED2
Definition: ACWG_Security.h:405
ACWG_SessionContextInit::interface
uint8_t interface
Definition: ACWG_Security.h:408
ACWG_UWB_Context
UWB (Ultra-Wideband) context for ACWG session.
Definition: ACWG_Security.h:420
ACWG_UWB_Context::Number_Slots_per_Round
uint8_t Number_Slots_per_Round
Definition: ACWG_Security.h:432
ACWG_UWB_Context::MAC_Mode
uint8_t MAC_Mode
Definition: ACWG_Security.h:436
ACWG_UWB_Context::Vendor_Specific3
uint8_t Vendor_Specific3[VENDOR_SPECIFIC_LEN_BYTES3]
Definition: ACWG_Security.h:439
ACWG_UWB_Context::Vendor_Specific4
uint8_t Vendor_Specific4[VENDOR_SPECIFIC_LEN_BYTES4]
Definition: ACWG_Security.h:440
ACWG_UWB_Context::Number_Responders_Nodes
uint8_t Number_Responders_Nodes
Definition: ACWG_Security.h:431
ACWG_UWB_Context::Hopping_Configuration_Bitmask
uint8_t Hopping_Configuration_Bitmask
Definition: ACWG_Security.h:429
ACWG_UWB_Context::HOP_Mode_Key
uint8_t HOP_Mode_Key[HOP_MODE_KEY_LEN_BYTES]
Definition: ACWG_Security.h:435
ACWG_UWB_Context::Vendor_Specific1_len
uint8_t Vendor_Specific1_len
Definition: ACWG_Security.h:441
ACWG_UWB_Context::Number_Chaps_per_Slot
uint8_t Number_Chaps_per_Slot
Definition: ACWG_Security.h:430
ACWG_UWB_Context::Status
uint8_t Status
Definition: ACWG_Security.h:445
ACWG_UWB_Context::Vendor_Specific2
uint8_t Vendor_Specific2[VENDOR_SPECIFIC_LEN_BYTES2]
Definition: ACWG_Security.h:438
ACWG_UWB_Context::Pulse_Shape_Combo
uint8_t Pulse_Shape_Combo
Definition: ACWG_Security.h:422
ACWG_UWB_Context::UWB_Configuration_Identifier
uint8_t UWB_Configuration_Identifier[UWB_CONFIGURATION_IDENTIFIER_LEN_BYTES]
Definition: ACWG_Security.h:421
ACWG_UWB_Context::SYNC_Code_Index
uint8_t SYNC_Code_Index
Definition: ACWG_Security.h:428
ACWG_UWB_Context::Vendor_Specific1
uint8_t Vendor_Specific1[VENDOR_SPECIFIC_LEN_BYTES1]
Definition: ACWG_Security.h:437
ACWG_UWB_Context::Vendor_Specific4_len
uint8_t Vendor_Specific4_len
Definition: ACWG_Security.h:444
ACWG_UWB_Context::RAN_Multiplier
uint8_t RAN_Multiplier
Definition: ACWG_Security.h:425
ACWG_UWB_Context::STS_Index0
uint8_t STS_Index0[STS_INDEX0_LEN_BYTES]
Definition: ACWG_Security.h:433
ACWG_UWB_Context::UWB_Time0
uint8_t UWB_Time0[UWB_TIME0_LEN_BYTES]
Definition: ACWG_Security.h:434
ACWG_UWB_Context::Channel_Bitmask
uint8_t Channel_Bitmask
Definition: ACWG_Security.h:424
ACWG_UWB_Context::SYNC_Code_Index_Bitmask
uint8_t SYNC_Code_Index_Bitmask[SYNC_CODE_INDEX_BITMASK_LEN_BYTES]
Definition: ACWG_Security.h:427
ACWG_UWB_Context::Slot_Bitmask
uint8_t Slot_Bitmask
Definition: ACWG_Security.h:426
ACWG_UWB_Context::Vendor_Specific2_len
uint8_t Vendor_Specific2_len
Definition: ACWG_Security.h:442
ACWG_UWB_Context::UWB_Session_Identifier
uint8_t UWB_Session_Identifier[UWB_SESSION_IDENTIFIER_LEN_BYTES]
Definition: ACWG_Security.h:423
ACWG_UWB_Context::Vendor_Specific3_len
uint8_t Vendor_Specific3_len
Definition: ACWG_Security.h:443
ACWG_build_info_s
Various info about the firmware build.
Definition: ACWG_build_info.h:76
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_build_info.h Source File

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
ACWG_build_info.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _ACWG_BUILD_INFO_H_
21#define _ACWG_BUILD_INFO_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include <stdint.h>
33
37/* Exported constants --------------------------------------------------------*/
38#define ACWG_BI_FW_DESCRIPTION_LEN 24
43#define ACWG_BI_VERSION 1
48#define ACWG_ALIRO_SPEC_VERSION_MAJ 0
53#define ACWG_ALIRO_SPEC_VERSION_MIN 9
58#define ACWG_ALIRO_SPEC_VERSION_SUBMIN 5
69/* Exported types ------------------------------------------------------------*/
76typedef struct ACWG_build_info_s {
77 uint8_t magic_cookie[4];
78 uint8_t build_info_version;
79 uint8_t ver_major;
80 uint8_t ver_minor;
81 uint8_t ver_subminor;
82 // char revision[32]; //!< git version at the build time, based on hash
83 char date[12];
84 char time[12];
85 uint8_t aliro_spec_major;
86 uint8_t aliro_spec_minor;
87 uint8_t aliro_spec_subminor;
88 char fw_description[ACWG_BI_FW_DESCRIPTION_LEN];
89}ACWG_build_info_t;
98#ifdef __cplusplus
99}
100#endif
101
102#endif /* _ACWG_BUILD_INFO_H_ */
ACWG_build_info_t
struct ACWG_build_info_s ACWG_build_info_t
Various info about the firmware build.
ACWG_build_info_s
Various info about the firmware build.
Definition: ACWG_build_info.h:76
ACWG_build_info_s::date
char date[12]
Build date, e.g. "Jan 1 1970".
Definition: ACWG_build_info.h:83
ACWG_build_info_s::aliro_spec_minor
uint8_t aliro_spec_minor
Minor version number of the Aliro spec.
Definition: ACWG_build_info.h:86
ACWG_build_info_s::fw_description
char fw_description[ACWG_BI_FW_DESCRIPTION_LEN]
Name of the firmware.
Definition: ACWG_build_info.h:88
ACWG_build_info_s::ver_subminor
uint8_t ver_subminor
Subminor version number of the acwg.
Definition: ACWG_build_info.h:81
ACWG_build_info_s::aliro_spec_major
uint8_t aliro_spec_major
Major version number of the Aliro spec.
Definition: ACWG_build_info.h:85
ACWG_build_info_s::ver_major
uint8_t ver_major
Major version number of the acwg.
Definition: ACWG_build_info.h:79
ACWG_build_info_s::magic_cookie
uint8_t magic_cookie[4]
A magic cookie that external application could easily read: 'A', 'C', 'W', 'G'.
Definition: ACWG_build_info.h:77
ACWG_build_info_s::aliro_spec_subminor
uint8_t aliro_spec_subminor
Subminor version number of the Aliro spec.
Definition: ACWG_build_info.h:87
ACWG_build_info_s::build_info_version
uint8_t build_info_version
Version of this structure, e.g. MBI_VERSION.
Definition: ACWG_build_info.h:78
ACWG_build_info_s::ver_minor
uint8_t ver_minor
Minor version number of the acwg.
Definition: ACWG_build_info.h:80
ACWG_build_info_s::time
char time[12]
Build time, e.g. "01:00:00".
Definition: ACWG_build_info.h:84
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc/ACWG_version.h Source File

  • File List
  • Globals
  • Middlewares
  • ST
  • ACWG_Security
  • inc
ACWG_version.h
Go to the documentation of this file.
1
18/* Define to prevent recursive inclusion -------------------------------------*/
19
20#ifndef _ACWG_VERSION_H_
21#define _ACWG_VERSION_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34/* Exported constants --------------------------------------------------------*/
35
40#define ACWG_VERSION_MAJ 0
41
46#define ACWG_VERSION_MIN 3
47
52#define ACWG_VERSION_SUBMIN 4
53
54
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* _ACWG_VERSION_H_ */
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_aliro.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
app_aliro.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _APP_ALIRO_H_
21#define _APP_ALIRO_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include <stdint.h>
33#include <stdbool.h>
34#include <time.h>
35#include "st_errno.h"
36#include "ACWG_Security.h"
37#include "provisioning.h"
38#if defined(STM32U545xx) || defined(STM32U585xx)
39#include "stm32u5xx_hal.h"
40#include "stm32u5xx_nucleo.h"
41#include "log_module_u5.h"
42void Log_Module_Print(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, ...);
43#endif //defined(STM32U545xx) || defined(STM32U585xx)
44#if defined(STM32U385xx)
45#include "stm32u3xx_hal.h"
46#include "stm32u3xx_nucleo.h"
47#include "log_module_u3.h"
48void Log_Module_Print(Log_Verbose_Level_t VerboseLevel, Log_Region_t Region, const char * Text, ...);
49#endif //defined(STM32U385xx)
50#if defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
51#include "stm32wbaxx_hal.h"
52#include "stm32wbaxx_nucleo.h"
53#include "log_module.h"
54#endif //defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
55
60/* Exported types ------------------------------------------------------------*/
61
66typedef enum _verblevel
67{
68 VERB_NULL=0,
69 VERB_ALWAYS=1,
70 VERB_CRITICAL=2,
71 VERB_ERROR=3,
72 VERB_NORMAL=4,
73 VERB_VERBOSE=5,
74 VERB_INFO=6
75}verblevel_t;
76
77
82typedef enum _timeStampsPos
83{
84 SELECT_APP_POS,
85 END_SELECT_APP_POS,
86 AUTH0_POS,
87 END_AUTH0_POS,
88 LOADCERT_POS,
89 END_LOADCERT_POS,
90 AUTH1_POS,
91 END_AUTH1_POS,
92 CONTROL_FLOW_POS,
93 END_CONTROL_FLOW_POS,
94 EXCHANGE_POS,
95 END_EXCHANGE_POS,
96 STEPUP_POS,
97 END_STEPUP_POS,
98 DOOR_IS_OPENED_POS,
99 DOOR_IS_CLOSED_POS,
100 DOOR_IS_DISARMED_POS,
101 DON_T_KNOW_POS,
103 DERIVE_PERSISTENT_KEYS_POS,
104 END_DERIVE_PERSISTENT_KEYS_POS,
106 ELAPSED_TIME_POS,
108 NUM_TIMESTAMPS
109}timeStampsPos_t;
110
111
116typedef struct _statItem
117{
118 timeStampsPos_t pos;
119 char title[10];
120 uint8_t toPrint;
121 uint32_t ts;
122}statItem_t;
123
124
129typedef struct _alirosvc_param
130{
131 uint8_t proposedSPSM[2];
132 uint8_t protVerSupportedLen;
133 uint8_t supportedProtocolVersion[4];
134 uint8_t selectedProtocolVersion[2];
135 uint8_t featuresSupportedLen;
136 uint8_t featuresSupported[1];
137}
138 alirosvc_param_t;
139
148/* Exported variables ------------------------------------------------------------*/
149
153extern uint32_t xProtocolVersionSupported;
154
158extern verblevel_t nVerbosityLevel;
159
163extern ACWG_SessionContext_t context_nfc;
164
168extern ACWG_SessionContext_t context_ble;
169
178/* Exported constants --------------------------------------------------------*/
179#define VERBOSITY_SET nVerbosityLevel
180#define ALIRO_MEASURE_PERFORMANCE 0
181#define ALIRO_CERTIFICATION_TEST 1
183//0x40 --> Bit 6: Bluetooth LE-Only Aliro flow supported.
184//0x80 --> Bit 7: Bluetooth LE + UWB Aliro flow supported.
185#define BLE_RKE_ALIRO_FLOW_SUPPORTED 0x40
186#define BLE_UWB_ALIRO_FLOW_SUPPORTED 0x80
188#define BLE_ALIRO_FLOWS_SUPPORTED (BLE_UWB_ALIRO_FLOW_SUPPORTED | BLE_RKE_ALIRO_FLOW_SUPPORTED)
190#define ALIRO_RTC_SET_STATUS_IAR 0x00F4
191#define ALIRO_RTC_SET_STATUS_GOOD 0x34F4
193#define TIMEOUT_PREPARE_RANGING_DEFAULT 20000
194#define TIMEOUT_EXECUTE_RANGING_DEFAULT 70000
195#define TIMEOUT_SUSPEND_RANGING_DEFAULT 10000
196#define TIMEOUT_RESUME_RANGING_DEFAULT 20000
197#define TIMEOUT_DOOR_OPERATION_DEFAULT 20000
199#if defined (ST25R200)
200#define X_NUCLEO_NFC_NAME "X-NUCLEO-NFC09A1/NFC10A1"
201#endif //defined (ST25R200)
202
203#if defined (ST25R500)
204#define X_NUCLEO_NFC_NAME "X-NUCLEO-NFC12A1"
205#endif //defined (ST25R200)
206
207#if USE_GEN2
208
209 #define ALIRO_BLE 1
210
211 #define H_ALIRO_UART huart1
212 #define HH_ALIRO_UART &H_ALIRO_UART
213 #define H_TIM htim2
214
215 extern RTC_HandleTypeDef hrtc;
216
217 #define ALIRO_HRTC hrtc
218 #define ALIRO_RTC_BKP_TIME RTC_BKP_DR10
219
220 #define LD3_Pin GPIO_PIN_0
221 #define LD3_GPIO_Port GPIOE
222 #define LD2_Pin GPIO_PIN_1
223 #define LD2_GPIO_Port GPIOE
224
225 //sector 125
226 #define PROVISIONING_SECTOR 253
227 #define PROVISIONING_START_ADDRESS (0x08000000+PROVISIONING_SECTOR*0x2000) //0x081fa000
228
229 //sector 124
230 #define PROVISIONING_JSON_SECTOR 252
231 #define PROVISIONING_JSON_START_ADDRESS (0x08000000+PROVISIONING_JSON_SECTOR*0x2000) //0x081f8000
232#else //USE_GEN2
233
234 #if defined(STM32WBA52xx)||defined(STM32WBA55xx)
235
236 #define ALIRO_BLE 1
237
238 #define H_ALIRO_UART huart1
239 #define HH_ALIRO_UART &H_ALIRO_UART
240 #define H_TIM htim2
241 extern RTC_HandleTypeDef hrtc;
242
243 #define ALIRO_HRTC hrtc
244 #define ALIRO_RTC_BKP_TIME RTC_BKP_DR10
245
246 #define LD3_Pin GPIO_PIN_8
247 #define LD3_GPIO_Port GPIOB
248 #define LD2_Pin GPIO_PIN_9
249 #define LD2_GPIO_Port GPIOA
250
251 //sector 125
252 #define PROVISIONING_SECTOR 123
253 #define PROVISIONING_START_ADDRESS (0x08000000+PROVISIONING_SECTOR*0x2000) //0x080fa000
254
255 //sector 124
256 #define PROVISIONING_JSON_SECTOR 122
257 #define PROVISIONING_JSON_START_ADDRESS (0x08000000+PROVISIONING_JSON_SECTOR*0x2000) //0x080f8000
258 #endif //defined(STM32WBA52xx)||defined(STM32WBA55xx)
259
260
261 #ifdef STM32WBA65xx
262
263 #define ALIRO_BLE 1
264
265 #define H_ALIRO_UART huart1
266 #define HH_ALIRO_UART &H_ALIRO_UART
267 #define H_TIM htim2
268 extern RTC_HandleTypeDef hrtc;
269
270 #define ALIRO_HRTC hrtc
271 #define ALIRO_RTC_BKP_TIME RTC_BKP_DR10
272
273 #define LD3_Pin GPIO_PIN_0
274 #define LD3_GPIO_Port GPIOE
275 #define LD2_Pin GPIO_PIN_1
276 #define LD2_GPIO_Port GPIOE
277
278 //sector 125
279 #define PROVISIONING_SECTOR 253
280 #define PROVISIONING_START_ADDRESS (0x08000000+PROVISIONING_SECTOR*0x2000) //0x081fa000
281
282 //sector 124
283 #define PROVISIONING_JSON_SECTOR 252
284 #define PROVISIONING_JSON_START_ADDRESS (0x08000000+PROVISIONING_JSON_SECTOR*0x2000) //0x081f8000
285 #endif //STM32WBA65xx
286
287
288
289 #if defined(STM32U545xx) || defined(STM32U585xx) || defined(STM32U385xx)
290 extern EXTI_HandleTypeDef H_EXTI_13;
291 extern UART_HandleTypeDef huart1;
292 #define HH_ALIRO_UART &huart1
293 #define H_ALIRO_UART huart1
294 #define H_TIM htim2
295
296 #define LD3_Pin GPIO_PIN_8
297 #define LD3_GPIO_Port GPIOB
298 #define LD2_Pin GPIO_PIN_4
299 #define LD2_GPIO_Port GPIOC
300
301 //sector 125
302 #define PROVISIONING_SECTOR 63
303 #define PROVISIONING_START_ADDRESS (0x08000000+PROVISIONING_SECTOR*0x2000) //0x081fa000
304
305 //sector 124
306 #define PROVISIONING_JSON_SECTOR 62
307 #define PROVISIONING_JSON_START_ADDRESS (0x08000000+PROVISIONING_JSON_SECTOR*0x2000) //0x081f8000
308 #endif //defined(STM32U545xx) || defined(STM32U585xx) || defined(STM32U385xx)
309
310#endif //USE_GEN2
311
312#if defined ALIRO_HRTC
313#define USE_RTC 1
314#endif //defined ALIRO_HRTC
315
316#define CLEAR_SCREEN_COMMAND "\033[2J\r\n"
317#define TEXT_COLOR_1 "\033[0;32m" //green
318#define TEXT_COLOR_GREEN "\033[0;32m" //green
319#define TEXT_COLOR_2 "\033[0;33m"
320#define TEXT_COLOR_YELLOW "\033[0;33m"
321#define TEXT_COLOR_3 "\033[0;31m"
322#define TEXT_COLOR_RED "\033[0;31m"
323#define TEXT_COLOR_4 "\033[0;36m"
324#define TEXT_COLOR_CYAN "\033[0;36m"
325#define TEXT_COLOR_BLU "\033[0;34m"
326#define TEXT_COLOR_VIOLET "\033[0;35m"
327#define TEXT_COLOR_GRAY "\033[0;37m"
328#define TEXT_COLOR_NOIR "\033[0;30m"
329#define TEXT_COLOR_DEFAULT "\033[0;39m"
330
331//Background
332#define TEXT_BACKGROUND_COLOR_BLACK "\033[40m"
333#define TEXT_BACKGROUND_COLOR_RED "\033[41m"
334#define TEXT_BACKGROUND_COLOR_GREEN "\033[42m"
335#define TEXT_BACKGROUND_COLOR_YELLOW "\033[43m"
336#define TEXT_BACKGROUND_COLOR_BLUE "\033[44m"
337#define TEXT_BACKGROUND_COLOR_PURPLE "\033[45m"
338#define TEXT_BACKGROUND_COLOR_CYAN "\033[46m"
339#define TEXT_BACKGROUND_COLOR_WHITE "\033[47m"
340
341#define TEXT_TEST_COLOR "\033[7;34m"
342
343#define TEXT_RESET "\033[0m"
344#define TEXT_BOLD "\033[1m" //used to make ligth color
345#define TEXT_UNDERSCORE "\033[4m"
346#define TEXT_BLINK "\033[5m"
347#define TEXT_REVERSE "\033[7m"
348#define TEXT_CONCEALED "\033[8m"
349
350#define TEXT_COLOR_ESCAPE_CHAR '\033'
351
352#define VERB_STATISTICS VERB_INFO
353#define VERB_STATISTICS_REPORT VERB_CRITICAL
354#define VERB_STATE_TITLE VERB_NORMAL
355#define VERB_FN_NAME VERB_VERBOSE
356#define VERB_TERMINAL VERB_NORMAL
357
366/* Exported macro ------------------------------------------------------------*/
367#if ALIRO_MEASURE_PERFORMANCE
368#define RESET_TIME_STAMP() do{ ResetTimeStamp();ResetAllSavedTimeStamps(); }while(0)
369#define PRINT_TIME_STAMP(pos) do{ SaveTimeStamp(pos);/*PrintTimeStamp(label);*/ }while(0)
370#define TIME_STAMP_REPORT() do{ PrintTimeStampReport(); }while(0)
371#else //ALIRO_MEASURE_PERFORMANCE
372#define RESET_TIME_STAMP()
373#define PRINT_TIME_STAMP(pos)
374#define TIME_STAMP_REPORT()
375#endif //ALIRO_MEASURE_PERFORMANCE
376
377#define countof(_A_) (sizeof(_A_) / sizeof(*(_A_)))
379#define PLATFORM_LOG(VERBOSITY, ...) do{if((uint8_t)VERBOSITY <= (uint8_t)nVerbosityLevel)LOG_INFO_APP(__VA_ARGS__);}while(0)
380#define DELAY_CONDITIONAL(D) do{if( nVerbosityLevel > VERB_VERBOSE)HAL_Delay(D);}while(0)
381
382#define HIGH_BYTE(A) ((A&0xFF00)>>8)
383#define LOW_BYTE(A) (A&0x00FF)
384
385#define HEX(C) (((C>='0') && (C<='9'))?(C-'0'):((C>='A') && (C<='F'))?(C-'A'+0xA):(0))
386
387#define GET_IAR_YEAR_DEC(D) ((HEX(D[7])*1000 + HEX(D[8])*100 + HEX(D[9])*10 + HEX(D[10])*1) - 2000)
388#define GET_IAR_YEAR(D) (GET_IAR_YEAR_DEC(D)%10 + (GET_IAR_YEAR_DEC(D)/10)*16 - 0x30)
389#define GET_IAR_DATE(D) (HEX(D[4])*16 + HEX(D[5])*1)
390#define GET_IAR_HOURS(T) (HEX(T[0])*16 + HEX(T[1])*1)
391#define GET_IAR_MINUTES(T) (HEX(T[3])*16 + HEX(T[4])*1)
392#define GET_IAR_SECONDS(T) (HEX(T[6])*16 + HEX(T[7])*1)
393#define GET_IAR_MONTH(D) (\
394 (D[0]==JAN[0] && D[1] == JAN[1] && D[2] == JAN[2])?0x1:\
395 (D[0]==FEB[0] && D[1] == FEB[1] && D[2] == FEB[2])?0x2:\
396 (D[0]==MAR[0] && D[1] == MAR[1] && D[2] == MAR[2])?0x3:\
397 (D[0]==APR[0] && D[1] == APR[1] && D[2] == APR[2])?0x4:\
398 (D[0]==MAY[0] && D[1] == MAY[1] && D[2] == MAY[2])?0x5:\
399 (D[0]==JUN[0] && D[1] == JUN[1] && D[2] == JUN[2])?0x6:\
400 (D[0]==JUL[0] && D[1] == JUL[1] && D[2] == JUL[2])?0x7:\
401 (D[0]==AUG[0] && D[1] == AUG[1] && D[2] == AUG[2])?0x8:\
402 (D[0]==SEP[0] && D[1] == SEP[1] && D[2] == SEP[2])?0x9:\
403 (D[0]==OCT[0] && D[1] == OCT[1] && D[2] == OCT[2])?0x10:\
404 (D[0]==NOV[0] && D[1] == NOV[1] && D[2] == NOV[2])?0x11:\
405 (D[0]==DEC[0] && D[1] == DEC[1] && D[2] == DEC[2])?0x12:\
406 1)
407
408#define TRANSACTION_SUCCESS_OPEN() AliroPort_TRANSACTION_SUCCESS_OPEN()
409#define TRANSACTION_SUCCESS_CLOSE() AliroPort_TRANSACTION_SUCCESS_CLOSE()
410#define TRANSACTION_FAILURE() AliroPort_TRANSACTION_FAILURE()
411
420/* Exported functions ------------------------------------------------------- */
421
426uint32_t GetTimeStamp(void);
427
433uint32_t PrintTimeStamp(char *pstr);
434
435
440 void GetTimeDate(struct tm *timeDate);
441
445void ShowTimeDate(void);
446
447#if defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
452void SetRtcSettingStatus(uint32_t nStatus);
453#endif //defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
454
455
459void ResetAllSavedTimeStamps(void);
460
466 statItem_t *SearchPos(timeStampsPos_t pos);
467
472void SaveTimeStamp(timeStampsPos_t pos);
473
477void PrintTimeStampReport(void);
478
482void ResetTimeStamp(void);
483
490void PrintBufferHex(const char *pstr, const uint8_t *pBuf, const uint32_t nSize);
491
498void PrintBufferHexAlways(const char *pstr, const uint8_t *pBuf, const uint32_t nSize);
499
505void PrintErrorString(char*errstr, ACWG_Status_t retval);
506
512uint16_t UsartGetChar(uint8_t *buf);
513
519uint16_t UsartGetCharBlocking(uint8_t *buf);
520
525bool aliro_init();
526
530void aliro_process();
531
535__weak void AliroPort_TRANSACTION_SUCCESS_OPEN(void);
536
540__weak void AliroPort_TRANSACTION_SUCCESS_CLOSE(void);
541
545__weak void AliroPort_TRANSACTION_FAILURE(void);
546
551void AliroPort_Delay(uint32_t Delay);
552
559void AliroPort_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
560
569HAL_StatusTypeDef AliroPort_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout);
570
579HAL_StatusTypeDef AliroPort_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t *Size, uint32_t Timeout);
580
584void Button1_isr( void );
585
589void board_reset();
590
596uint8_t isValidSPSM(uint16_t selected);
597
603uint16_t get_dynamic_spsm(uint8_t old_spsm);
604
610void fillAdvBuffer(uint8_t *advbuf, uint8_t *psize);
611
617uint8_t AliroSvcParamGetInitLen(uint8_t *pLen);
618
624uint8_t AliroSvcParamGetInitBuf(uint8_t **DataBuf);
625
631uint8_t AliroSvcVerifyProtVer(uint16_t selectedProtocolVersion_16);
632
637uint16_t AliroGetSavedSelectedProtocolVersion();
638
642void AliroBLE_Init_complete_cb();
643
647void AliroBleDisconnection_complete_cb();
648
652void AliroBleCocDisconnection_complete_cb();
653
658void AliroFilltechs2Find(uint16_t *techs2find);
659
665 void Set_timeout_prepare_ranging(uint32_t timeout_ms);
666
672 void Set_timeout_execute_ranging(uint32_t timeout_ms);
673
679 void Set_timeout_suspend_ranging(uint32_t timeout_ms);
680
686 void Set_timeout_resume_ranging(uint32_t timeout_ms);
687
693void Set_timeout_door_operation(uint32_t timeout_ms);
694
703#ifdef __cplusplus
704}
705#endif
706
707#endif /* _APP_ALIRO_H_ */
708/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
ACWG_Status_t
enum ACWG_Status ACWG_Status_t
Status codes for ACWG Security operations.
AliroBleCocDisconnection_complete_cb
void AliroBleCocDisconnection_complete_cb()
BLE CoC Aliro disconnection complete callback.
Button1_isr
void Button1_isr(void)
Interrupt Service Routine for button 1.
Definition: app_aliro.c:1155
UsartGetChar
uint16_t UsartGetChar(uint8_t *buf)
Receives a character from USART.
Definition: app_aliro.c:868
SearchPos
statItem_t * SearchPos(timeStampsPos_t pos)
Searches for the position of a timestamp.
AliroBLE_Init_complete_cb
void AliroBLE_Init_complete_cb()
BLE Aliro initialization complete callback.
PrintBufferHex
void PrintBufferHex(const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Prints a buffer in hexadecimal format.
Definition: app_aliro.c:1127
ShowTimeDate
void ShowTimeDate(void)
Shows current date and time.
Definition: app_aliro.c:742
UsartGetCharBlocking
uint16_t UsartGetCharBlocking(uint8_t *buf)
Receives a character from USART in blocking mode.
Definition: app_aliro.c:849
Set_timeout_execute_ranging
void Set_timeout_execute_ranging(uint32_t timeout_ms)
Set the timeout for the execute ranging operation.
Definition: app_aliro.c:3302
isValidSPSM
uint8_t isValidSPSM(uint16_t selected)
Checks if the selected SPSM is valid.
Set_timeout_suspend_ranging
void Set_timeout_suspend_ranging(uint32_t timeout_ms)
Set the timeout for the suspend ranging operation.
Definition: app_aliro.c:3307
AliroPort_UART_Transmit
HAL_StatusTypeDef AliroPort_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
Transmits data via UART.
Definition: app_aliro.c:486
AliroPort_TRANSACTION_SUCCESS_OPEN
__weak void AliroPort_TRANSACTION_SUCCESS_OPEN(void)
Hook for successful transaction - Door open.
Definition: app_aliro.c:550
Set_timeout_door_operation
void Set_timeout_door_operation(uint32_t timeout_ms)
Set the timeout for the door operation.
Definition: app_aliro.c:3317
AliroPort_GPIO_WritePin
void AliroPort_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
Writes the state of a GPIO pin.
Definition: app_aliro.c:597
AliroSvcVerifyProtVer
uint8_t AliroSvcVerifyProtVer(uint16_t selectedProtocolVersion_16)
Verifies the Aliro protocol version.
AliroBleDisconnection_complete_cb
void AliroBleDisconnection_complete_cb()
BLE Aliro disconnection complete callback.
GetTimeStamp
uint32_t GetTimeStamp(void)
Returns the current timestamp.
SaveTimeStamp
void SaveTimeStamp(timeStampsPos_t pos)
Saves the timestamp in a specific position.
fillAdvBuffer
void fillAdvBuffer(uint8_t *advbuf, uint8_t *psize)
Fills the advertising buffer.
ResetAllSavedTimeStamps
void ResetAllSavedTimeStamps(void)
Resets all saved timestamps.
PrintTimeStampReport
void PrintTimeStampReport(void)
Prints the timestamp report.
aliro_process
void aliro_process()
Executes the main Aliro process.
Definition: app_aliro.c:1377
board_reset
void board_reset()
Board reset.
Definition: app_aliro.c:2400
PrintErrorString
void PrintErrorString(char *errstr, ACWG_Status_t retval)
Prints an error string.
Definition: app_aliro.c:1080
Set_timeout_prepare_ranging
void Set_timeout_prepare_ranging(uint32_t timeout_ms)
Set the timeout for the prepare ranging operation.
Definition: app_aliro.c:3297
PrintTimeStamp
uint32_t PrintTimeStamp(char *pstr)
Prints the timestamp associated with a string.
get_dynamic_spsm
uint16_t get_dynamic_spsm(uint8_t old_spsm)
Gets dynamic SPSM.
PrintBufferHexAlways
void PrintBufferHexAlways(const char *pstr, const uint8_t *pBuf, const uint32_t nSize)
Always prints a buffer in hexadecimal format.
Definition: app_aliro.c:1113
AliroGetSavedSelectedProtocolVersion
uint16_t AliroGetSavedSelectedProtocolVersion()
Gets the saved selected protocol version.
Definition: app_aliro.c:1887
GetTimeDate
void GetTimeDate(struct tm *timeDate)
Gets the current date and time.
Definition: app_aliro.c:718
AliroPort_Delay
void AliroPort_Delay(uint32_t Delay)
Delay porting for Aliro.
Definition: app_aliro.c:533
Set_timeout_resume_ranging
void Set_timeout_resume_ranging(uint32_t timeout_ms)
Set the timeout for the resume ranging operation.
Definition: app_aliro.c:3312
AliroPort_TRANSACTION_SUCCESS_CLOSE
__weak void AliroPort_TRANSACTION_SUCCESS_CLOSE(void)
Hook for successful transaction - Door close.
Definition: app_aliro.c:576
AliroFilltechs2Find
void AliroFilltechs2Find(uint16_t *techs2find)
Fills techs2find for Aliro.
Definition: app_aliro.c:1935
AliroSvcParamGetInitLen
uint8_t AliroSvcParamGetInitLen(uint8_t *pLen)
Gets the initial length of Aliro service parameters.
ResetTimeStamp
void ResetTimeStamp(void)
Resets the current timestamp.
aliro_init
bool aliro_init()
Initializes the Aliro module.
Definition: app_aliro.c:1180
AliroPort_UART_Receive
HAL_StatusTypeDef AliroPort_UART_Receive(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t *Size, uint32_t Timeout)
Receives data via UART.
Definition: app_aliro.c:500
AliroPort_TRANSACTION_FAILURE
__weak void AliroPort_TRANSACTION_FAILURE(void)
Hook for transaction failure.
Definition: app_aliro.c:585
AliroSvcParamGetInitBuf
uint8_t AliroSvcParamGetInitBuf(uint8_t **DataBuf)
Gets the initial buffer of Aliro service parameters.
_timeStampsPos
_timeStampsPos
Definition: app_aliro.h:83
_verblevel
_verblevel
Definition: app_aliro.h:67
END_STEPUP_POS
@ END_STEPUP_POS
Definition: app_aliro.h:97
END_SELECT_APP_POS
@ END_SELECT_APP_POS
Definition: app_aliro.h:85
END_LOADCERT_POS
@ END_LOADCERT_POS
Definition: app_aliro.h:89
DERIVE_PERSISTENT_KEYS_POS
@ DERIVE_PERSISTENT_KEYS_POS
Definition: app_aliro.h:103
END_EXCHANGE_POS
@ END_EXCHANGE_POS
Definition: app_aliro.h:95
DOOR_IS_CLOSED_POS
@ DOOR_IS_CLOSED_POS
Definition: app_aliro.h:99
AUTH1_POS
@ AUTH1_POS
Definition: app_aliro.h:90
END_CONTROL_FLOW_POS
@ END_CONTROL_FLOW_POS
Definition: app_aliro.h:93
SELECT_APP_POS
@ SELECT_APP_POS
Definition: app_aliro.h:84
DOOR_IS_OPENED_POS
@ DOOR_IS_OPENED_POS
Definition: app_aliro.h:98
CONTROL_FLOW_POS
@ CONTROL_FLOW_POS
Definition: app_aliro.h:92
EXCHANGE_POS
@ EXCHANGE_POS
Definition: app_aliro.h:94
STEPUP_POS
@ STEPUP_POS
Definition: app_aliro.h:96
AUTH0_POS
@ AUTH0_POS
Definition: app_aliro.h:86
END_AUTH0_POS
@ END_AUTH0_POS
Definition: app_aliro.h:87
DOOR_IS_DISARMED_POS
@ DOOR_IS_DISARMED_POS
Definition: app_aliro.h:100
ELAPSED_TIME_POS
@ ELAPSED_TIME_POS
Definition: app_aliro.h:106
DON_T_KNOW_POS
@ DON_T_KNOW_POS
Definition: app_aliro.h:101
END_AUTH1_POS
@ END_AUTH1_POS
Definition: app_aliro.h:91
NUM_TIMESTAMPS
@ NUM_TIMESTAMPS
Definition: app_aliro.h:108
END_DERIVE_PERSISTENT_KEYS_POS
@ END_DERIVE_PERSISTENT_KEYS_POS
Definition: app_aliro.h:104
LOADCERT_POS
@ LOADCERT_POS
Definition: app_aliro.h:88
VERB_NORMAL
@ VERB_NORMAL
Definition: app_aliro.h:72
VERB_INFO
@ VERB_INFO
Definition: app_aliro.h:74
VERB_VERBOSE
@ VERB_VERBOSE
Definition: app_aliro.h:73
VERB_CRITICAL
@ VERB_CRITICAL
Definition: app_aliro.h:70
VERB_ALWAYS
@ VERB_ALWAYS
Definition: app_aliro.h:69
VERB_ERROR
@ VERB_ERROR
Definition: app_aliro.h:71
VERB_NULL
@ VERB_NULL
Definition: app_aliro.h:68
xProtocolVersionSupported
uint32_t xProtocolVersionSupported
Aliro protocol versions supported.
Definition: app_aliro.c:293
context_ble
ACWG_SessionContext_t context_ble
NFC session context.
Definition: app_aliro.c:338
context_nfc
ACWG_SessionContext_t context_nfc
NFC session context.
Definition: app_aliro.c:333
nVerbosityLevel
verblevel_t nVerbosityLevel
Current verbosity level.
Definition: app_aliro.c:343
log_module_u5.h
: Header for log_module_u5.c file. Provides logging macros and prototypes for the U5 platform.
provisioning.h
: Header for provisioning module. This file contains the common defines and structures for provisioni...
_alirosvc_param
Definition: app_aliro.h:130
_alirosvc_param::protVerSupportedLen
uint8_t protVerSupportedLen
Definition: app_aliro.h:132
_alirosvc_param::selectedProtocolVersion
uint8_t selectedProtocolVersion[2]
Definition: app_aliro.h:134
_alirosvc_param::proposedSPSM
uint8_t proposedSPSM[2]
Definition: app_aliro.h:131
_alirosvc_param::featuresSupportedLen
uint8_t featuresSupportedLen
Definition: app_aliro.h:135
_alirosvc_param::featuresSupported
uint8_t featuresSupported[1]
Definition: app_aliro.h:136
_alirosvc_param::supportedProtocolVersion
uint8_t supportedProtocolVersion[4]
Definition: app_aliro.h:133
_statItem
Definition: app_aliro.h:117
_statItem::pos
timeStampsPos_t pos
Definition: app_aliro.h:118
_statItem::ts
uint32_t ts
Definition: app_aliro.h:121
_statItem::title
char title[10]
Definition: app_aliro.h:119
_statItem::toPrint
uint8_t toPrint
Definition: app_aliro.h:120
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
alirosvc_param_t
Aliro service parameters.
statItem_t
Structure for managing timestamps and statistics.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_build_info.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
app_build_info.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _APP_BUILD_INFO_H_
21#define _APP_BUILD_INFO_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include <stdint.h>
33
37/* Exported constants --------------------------------------------------------*/
41#define ABI_VERSION 1
49/* Exported types ------------------------------------------------------------*/
56typedef struct app_build_info_s {
57 uint8_t magic_cookie[4];
58 uint8_t build_info_version;
59 uint8_t app_major;
60 uint8_t app_minor;
61 uint8_t app_subminor;
62 // char revision[32]; //!< git version at the build time, based on hash
63 char date[12];
64 char time[12];
65
66 uint8_t aliro_spec_major;
67 uint8_t aliro_spec_minor;
68 uint8_t aliro_spec_subminor;
69 uint8_t acwg_ver_major;
70 uint8_t acwg_ver_minor;
71 uint8_t acwg_ver_subminor;
72 #define MBI_FW_DESCRIPTION_LEN 24
73 char fw_description[MBI_FW_DESCRIPTION_LEN];
74}app_build_info_t;
82// The symbol 'build_info' is defined by the linker script. See file arm-gcc-link.ld
83// Alternatively, we could use:
84// #define build_info (*(struct buildinfo*)(0x08000200))
85
86/* Exported variables ------------------------------------------------------------*/
87extern const app_build_info_t app_build_info;
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* _APP_BUILD_INFO_H_ */
app_build_info_t
struct app_build_info_s app_build_info_t
Various info about the firmware build.
app_build_info
const app_build_info_t app_build_info
Global build information for the Aliro application.
Definition: app_aliro.c:124
app_build_info_s
Various info about the firmware build.
Definition: app_build_info.h:56
app_build_info_s::date
char date[12]
Build date, e.g. "Jan 1 1970".
Definition: app_build_info.h:63
app_build_info_s::aliro_spec_minor
uint8_t aliro_spec_minor
Minor version number of the Aliro spec.
Definition: app_build_info.h:67
app_build_info_s::app_subminor
uint8_t app_subminor
Subminor version number of the firmware.
Definition: app_build_info.h:61
app_build_info_s::aliro_spec_major
uint8_t aliro_spec_major
Major version number of the Aliro spec.
Definition: app_build_info.h:66
app_build_info_s::magic_cookie
uint8_t magic_cookie[4]
A magic cookie that external application could easily read: 'B', 'F', 'W', 'I'.
Definition: app_build_info.h:57
app_build_info_s::aliro_spec_subminor
uint8_t aliro_spec_subminor
Subminor version number of the Aliro spec.
Definition: app_build_info.h:68
app_build_info_s::app_major
uint8_t app_major
Major version number of the firmware.
Definition: app_build_info.h:59
app_build_info_s::build_info_version
uint8_t build_info_version
Version of this structure, e.g. MBI_VERSION.
Definition: app_build_info.h:58
app_build_info_s::app_minor
uint8_t app_minor
Minor version number of the firmware.
Definition: app_build_info.h:60
app_build_info_s::fw_description
char fw_description[MBI_FW_DESCRIPTION_LEN]
Name of the firmware.
Definition: app_build_info.h:73
app_build_info_s::time
char time[12]
Build time, e.g. "01:00:00".
Definition: app_build_info.h:64
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_nfc.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
app_nfc.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _APP_NFC_H_
21#define _APP_NFC_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ----------------------------------------------------------------- */
32#include <stdint.h>
33#include <stdbool.h>
34#include "st_errno.h"
35#include "ACWG_Security.h"
36
37
42/* Exported types ------------------------------------------------------------*/
49/* Exported constants --------------------------------------------------------*/
56/* Exported macro ------------------------------------------------------------*/
63/* Exported functions ------------------------------------------------------- */
64
70bool AliroNfcIni( ACWG_SessionContext_t *context );
71
76void AliroNfcCycle( ACWG_SessionContext_t *context );
77
81void AliroNfcStop( void );
82
87uint16_t AliroNfcGetDiscoverTechs2Find( void );
88
93uint16_t AliroNfcGetDiscoverTotalDuration( void );
94
98void AliroNfcHwInit( void );
103#ifdef __cplusplus
104}
105#endif
106
107#endif /* _APP_NFC_H_ */
108/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
AliroNfcIni
bool AliroNfcIni(ACWG_SessionContext_t *context)
Initializes the NFC module for Aliro.
Definition: app_nfc.c:245
AliroNfcStop
void AliroNfcStop(void)
Stops the NFC module for Aliro.
Definition: app_nfc.c:626
AliroNfcGetDiscoverTotalDuration
uint16_t AliroNfcGetDiscoverTotalDuration(void)
Gets the total duration for NFC discovery.
Definition: app_nfc.c:223
AliroNfcHwInit
void AliroNfcHwInit(void)
Initializes the NFC hardware for Aliro.
Definition: app_nfc.c:949
AliroNfcCycle
void AliroNfcCycle(ACWG_SessionContext_t *context)
Executes the main NFC cycle for Aliro.
Definition: app_nfc.c:383
AliroNfcGetDiscoverTechs2Find
uint16_t AliroNfcGetDiscoverTechs2Find(void)
Gets the technologies to find during NFC discovery.
Definition: app_nfc.c:209
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/app_version.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
app_version.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _APP_VERSION_H_
21#define _APP_VERSION_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include "provisioning_info.h"
33
37/* Exported constants --------------------------------------------------------*/
38#define APP_VERSION_MAJ 0
39#define APP_VERSION_MIN 9
40#define APP_VERSION_SUBMIN 3
41// #define APP_VERSION "0.1.0"
42// #define SW_VERSION "FW VERSION TBD"
43
44#define ALIRO_SPEC_VERSION_MAJ 0
45#define ALIRO_SPEC_VERSION_MIN 9
46#define ALIRO_SPEC_VERSION_SUBMIN 5
47#define APP_ACWG_VERSION_MAJ 0
48#define APP_ACWG_VERSION_MIN 3
49#define APP_ACWG_VERSION_SUBMIN 4
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* _APP_VERSION_H_ */
provisioning_info.h
: Provisioning information and configuration defines for the application.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
certificate.h
Go to the documentation of this file.
1
18#ifndef CERTIFICATE_H
19#define CERTIFICATE_H
20
21#include <stdint.h>
22
33typedef enum {
34 CERT_OK = 0x00,
35 CERT_INVALID_PARAMETER = 0x01,
36 CERT_UNEXPECTED_SEQUENCE,
37 CERT_UNEXPECTED_BITSTRING,
38 CERT_INVALID_SIGNATURE,
39 CERT_INVALID_CERTIFICATE,
40 CERT_CA_NOT_MATCHING,
41 CERT_UNSUPPORTED_FEATURE,
42 CERT_BAD_SIZE,
43}certificate_status_t;
44
46typedef enum {
47 CERT_SIG_ECDSA_SHA1 = 0,
48 CERT_SIG_ECDSA_SHA224,
49 CERT_SIG_ECDSA_SHA256,
50 CERT_SIG_ECDSA_SHA384,
51 CERT_SIG_ECDSA_SHA512,
52}certificate_signature_algorithms_t;
53
55typedef enum {
56 CERT_EC_P256 = 0,
57 CERT_EC_P384,
58 CERT_EC_P521,
59 CERT_EC_bp256r1,
60 CERT_EC_bp256t1,
61 CERT_EC_bp384r1,
62 CERT_EC_bp384t1,
63 CERT_EC_bp512r1,
64 CERT_EC_bp512t1,
65}certificate_elliptic_curves_t;
66
67
69typedef struct validity_st {
70 uint8_t seconds;
71 uint8_t minutes;
72 uint8_t hours;
73 uint8_t days;
74 uint8_t month;
75 uint32_t year;
76} cert_validity_t;
77
79typedef struct cert_public_key_t
80{
81 const uint8_t *pX;
82 const uint8_t *pY;
83 uint32_t fsize;
84} cert_public_key_t;
85
87typedef struct ECDSAsign_st
88{
89 const uint8_t *pR;
90 uint32_t rSize;
91 const uint8_t *pS;
92 uint32_t sSize;
93} cert_signature_t;
94
96struct internal_certificate {
97 const uint8_t *pPubKey_point_representation_id;
98 const uint8_t *tbs;
99 uint32_t tbsSize;
100 uint32_t x509Version;
101 const uint8_t *serialNumber;
102 uint32_t serialNumberSize;
103 uint32_t signature;
104 const uint8_t *issuer;
105 uint32_t issuerSize;
106 const uint8_t *validity;
107 uint32_t validitySize;
108 const uint8_t *subject;
109 uint32_t subjectSize;
110 uint32_t EllipticCurve;
111 cert_public_key_t PubKey;
112 const uint8_t *extensions;
113 uint32_t extensionsSize;
114 uint32_t extensionsFlags;
135 const uint8_t *extAKIkeyIdentifier;
136 uint32_t extAKIkeyIdentifierSize;
137 uint32_t SignatureAlgorithm;
138 cert_signature_t Sign;
139};
140
142typedef struct internal_certificate certificate_t;
143
144
145/* Exported Functions */
146
153void certificate_init(certificate_t *cert);
154
165 certificate_status_t certificate_parse(const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next);
166
167
178 certificate_status_t certificate_find_tbs_and_signature(const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next);
179
184void certificate_parse_tbs(certificate_t *certificate);
185
193 certificate_status_t certificate_is_valid(const certificate_t *certificate, const cert_validity_t *currentTime);
194
200 certificate_status_t certificate_is_CA(const certificate_t *cert);
201
212 certificate_status_t certificate_is_parent(const certificate_t *parent, const certificate_t *child, const cert_validity_t *currentTime);
213
220void certificate_copy(certificate_t *copiedCert, const certificate_t *originalCert);
221
230 certificate_status_t certificate_parse_chain(
231 uint8_t *rootCA,
232 uint8_t *certChain,
233 uint16_t certChainSize,
234 certificate_t *leafCert);
235
238#endif /* CERTIFICATE_H */
certificate_signature_algorithms_t
certificate_signature_algorithms_t
Definitions of available signature algorithms.
Definition: certificate.h:46
certificate_elliptic_curves_t
certificate_elliptic_curves_t
Definitions of supported Elliptic Curve Names.
Definition: certificate.h:55
certificate_parse
certificate_status_t certificate_parse(const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse an x509 certificate.
certificate_parse_tbs
void certificate_parse_tbs(certificate_t *certificate)
Parse the tbs part of a certificate.
certificate_init
void certificate_init(certificate_t *cert)
Initialize a certificate (certificate_t) to an empty one.
certificate_status_t
certificate_status_t
response codes enumeration
Definition: certificate.h:33
cert_public_key_t
struct cert_public_key_t cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key
cert_signature_t
struct ECDSAsign_st cert_signature_t
typedef for the structure keeping the ECDSA Signature
certificate_is_parent
certificate_status_t certificate_is_parent(const certificate_t *parent, const certificate_t *child, const cert_validity_t *currentTime)
Check whether "parent" issued "child".
certificate_find_tbs_and_signature
certificate_status_t certificate_find_tbs_and_signature(const uint8_t *cert, uint32_t max_size, certificate_t *certificate, const uint8_t **next)
Parse the top of x509 certificate to find the tbs and the signature.
certificate_copy
void certificate_copy(certificate_t *copiedCert, const certificate_t *originalCert)
Copy a certificate (certificate_t) into another structure.
certificate_parse_chain
certificate_status_t certificate_parse_chain(uint8_t *rootCA, uint8_t *certChain, uint16_t certChainSize, certificate_t *leafCert)
Iterate over the certificate chain in argument and check each child/parent pairs.
cert_validity_t
struct validity_st cert_validity_t
typedef for the structure keeping the validity
certificate_is_valid
certificate_status_t certificate_is_valid(const certificate_t *certificate, const cert_validity_t *currentTime)
Check that an imported x509 certificate is valid.
certificate_is_CA
certificate_status_t certificate_is_CA(const certificate_t *cert)
Check whether a certificate is marked as belonging to a CA.
CERT_SIG_ECDSA_SHA1
@ CERT_SIG_ECDSA_SHA1
Definition: certificate.h:47
CERT_SIG_ECDSA_SHA384
@ CERT_SIG_ECDSA_SHA384
Definition: certificate.h:50
CERT_SIG_ECDSA_SHA256
@ CERT_SIG_ECDSA_SHA256
Definition: certificate.h:49
CERT_SIG_ECDSA_SHA512
@ CERT_SIG_ECDSA_SHA512
Definition: certificate.h:51
CERT_SIG_ECDSA_SHA224
@ CERT_SIG_ECDSA_SHA224
Definition: certificate.h:48
CERT_EC_bp384r1
@ CERT_EC_bp384r1
Definition: certificate.h:61
CERT_EC_P384
@ CERT_EC_P384
Definition: certificate.h:57
CERT_EC_P521
@ CERT_EC_P521
Definition: certificate.h:58
CERT_EC_bp384t1
@ CERT_EC_bp384t1
Definition: certificate.h:62
CERT_EC_bp512r1
@ CERT_EC_bp512r1
Definition: certificate.h:63
CERT_EC_bp512t1
@ CERT_EC_bp512t1
Definition: certificate.h:64
CERT_EC_P256
@ CERT_EC_P256
Definition: certificate.h:56
CERT_EC_bp256r1
@ CERT_EC_bp256r1
Definition: certificate.h:59
CERT_EC_bp256t1
@ CERT_EC_bp256t1
Definition: certificate.h:60
CERT_INVALID_PARAMETER
@ CERT_INVALID_PARAMETER
Definition: certificate.h:35
CERT_OK
@ CERT_OK
Definition: certificate.h:34
ECDSAsign_st
typedef for the structure keeping the ECDSA Signature
Definition: certificate.h:88
ECDSAsign_st::sSize
uint32_t sSize
Definition: certificate.h:92
ECDSAsign_st::pR
const uint8_t * pR
Definition: certificate.h:89
ECDSAsign_st::pS
const uint8_t * pS
Definition: certificate.h:91
ECDSAsign_st::rSize
uint32_t rSize
Definition: certificate.h:90
cert_public_key_t
typedef for the structure keeping the Ellipitc Curve Public Key
Definition: certificate.h:80
cert_public_key_t::pX
const uint8_t * pX
Definition: certificate.h:81
cert_public_key_t::fsize
uint32_t fsize
Definition: certificate.h:83
cert_public_key_t::pY
const uint8_t * pY
Definition: certificate.h:82
internal_certificate
internal structure used to keep the values parsed from the x509
Definition: certificate.h:96
internal_certificate::issuerSize
uint32_t issuerSize
Definition: certificate.h:105
internal_certificate::serialNumber
const uint8_t * serialNumber
Definition: certificate.h:101
internal_certificate::x509Version
uint32_t x509Version
Definition: certificate.h:100
internal_certificate::SignatureAlgorithm
uint32_t SignatureAlgorithm
Definition: certificate.h:137
internal_certificate::extensions
const uint8_t * extensions
Definition: certificate.h:112
internal_certificate::tbsSize
uint32_t tbsSize
Definition: certificate.h:99
internal_certificate::pPubKey_point_representation_id
const uint8_t * pPubKey_point_representation_id
Definition: certificate.h:97
internal_certificate::subjectSize
uint32_t subjectSize
Definition: certificate.h:109
internal_certificate::issuer
const uint8_t * issuer
Definition: certificate.h:104
internal_certificate::extensionsFlags
uint32_t extensionsFlags
Definition: certificate.h:114
internal_certificate::Sign
cert_signature_t Sign
Definition: certificate.h:138
internal_certificate::extensionsSize
uint32_t extensionsSize
Definition: certificate.h:113
internal_certificate::tbs
const uint8_t * tbs
Definition: certificate.h:98
internal_certificate::serialNumberSize
uint32_t serialNumberSize
Definition: certificate.h:102
internal_certificate::PubKey
cert_public_key_t PubKey
Definition: certificate.h:111
internal_certificate::extAKIkeyIdentifierSize
uint32_t extAKIkeyIdentifierSize
Definition: certificate.h:136
internal_certificate::validity
const uint8_t * validity
Definition: certificate.h:106
internal_certificate::subject
const uint8_t * subject
Definition: certificate.h:108
internal_certificate::extAKIkeyIdentifier
const uint8_t * extAKIkeyIdentifier
Definition: certificate.h:135
internal_certificate::signature
uint32_t signature
Definition: certificate.h:103
internal_certificate::EllipticCurve
uint32_t EllipticCurve
Definition: certificate.h:110
internal_certificate::validitySize
uint32_t validitySize
Definition: certificate.h:107
validity_st
typedef for the structure keeping the validity
Definition: certificate.h:69
validity_st::hours
uint8_t hours
Definition: certificate.h:72
validity_st::month
uint8_t month
Definition: certificate.h:74
validity_st::seconds
uint8_t seconds
Definition: certificate.h:70
validity_st::minutes
uint8_t minutes
Definition: certificate.h:71
validity_st::days
uint8_t days
Definition: certificate.h:73
validity_st::year
uint32_t year
Definition: certificate.h:75
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate_crypto.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
certificate_crypto.h
Go to the documentation of this file.
1
18#ifndef CERTIFICATE_CRYPTO_H
19#define CERTIFICATE_CRYPTO_H
20
34 certificate_status_t certificate_verify_signature(const uint8_t* signing_public_key, uint32_t signing_public_key_size, const certificate_t* certificate);
35
36 #if 0
48 certificate_status_t certificate_verify_signature(
49 const certificate_t *cert,
50 const uint8_t *digest,
51 int32_t digestSize,
52 const uint8_t *signatureR,
53 int32_t signatureRsize,
54 const uint8_t *signatureS,
55 int32_t signatureSsize);
56#endif
63 certificate_status_t certificate_verify_child_signature(
64 const certificate_t *parent,
65 const certificate_t *child);
66
69#endif /* CERTIFICATE_CRYPTO_H */
certificate_status_t
certificate_status_t
response codes enumeration
Definition: certificate.h:33
certificate_verify_child_signature
certificate_status_t certificate_verify_child_signature(const certificate_t *parent, const certificate_t *child)
Check whether "parent" signed "child".
certificate_verify_signature
certificate_status_t certificate_verify_signature(const uint8_t *signing_public_key, uint32_t signing_public_key_size, const certificate_t *certificate)
Verify the signature of a certificate with a public key.
internal_certificate
internal structure used to keep the values parsed from the x509
Definition: certificate.h:96
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/certificate_subparsing.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
certificate_subparsing.h
Go to the documentation of this file.
1
18#ifndef CERTIFICATE_SUBPARSING_H
19#define CERTIFICATE_SUBPARSING_H
20
28typedef enum {
29 TAG_BOOLEAN = 0x01,
30 TAG_INTEGER,
31 TAG_BITSTRING,
32 TAG_OCTETSTRING,
33 TAG_NULL,
34 TAG_OBJECT_IDENTIFIER,
35 TAG_ObjectDescriptor,
36 TAG_ENUMERATED = 0x0A,
37 TAG_UTF8String = 0x0C,
38 TAG_PrintableString = 0x13,
39 TAG_IA5String = 0x16,
40 TAG_UTCTime,
41 TAG_GeneralizedTime,
42 TAG_SEQUENCE = 0x30,
43 TAG_SET,
44 TAG_OPTION_0 = 0x80,
45 TAG_OPTION_1 ,
46 TAG_OPTION_2 ,
47 TAG_OPTION_3 ,
48 TAG_x509VERSION = 0xA0,
49 TAG_issuerUniqueID,
50 TAG_subjectUniqueID,
51 TAG_extensions,
52}certificate_tag_t;
53
55typedef enum {
56 ATTR_CN = 3,
57 ATTR_SN = 5,
58 ATTR_C = 6,
59 ATTR_LN = 7,
60 ATTR_SOPN = 8,
61 ATTR_ON = 10,
62 ATTR_OUN = 11,
63 ATTR_UID = 45,
64 ATTR_DN = 49,
65}certificate_name_attributes_t;
66
68typedef enum {
69 EXTENSION_KU = 15,
70 EXTENSION_BC = 19,
71 EXTENSION_AKI = 35,
72 EXTENSION_EKU = 37,
73}certificate_extensions_type_t;
74
76struct SignatureAlgorithmOID_st
77{
78 uint32_t len;
79 uint32_t type;
80 uint8_t oid[8];
81};
82
84struct AttributeOID_st
85{
86 uint32_t len;
87 uint32_t type;
88 uint8_t oid[3];
89};
90
92struct EllipticCurveOID_st
93{
94 uint32_t len;
95 uint32_t type;
96 uint8_t oid[9];
97};
98
100typedef struct attribute_st
101{
102 uint32_t type;
103 uint32_t strFormat;
104 const uint8_t *str;
105 uint32_t strSize;
106} cert_attribute_t;
107
109struct ExtensionOID_st
110{
111 uint32_t len;
112 uint32_t type;
113 uint8_t oid[5];
114};
115
117typedef struct extension_st
118{
119 uint32_t type;
120 uint32_t critical;
121 const uint8_t *value;
122 uint32_t valueSize;
123} cert_extension_t;
124
125
126/* Exported Macros */
127
129#define IS_VALID_TAG(tag) (( \
130 (TAG_BOOLEAN <= (tag) && (tag) <= TAG_ObjectDescriptor) || \
131 (tag) == TAG_ENUMERATED || \
132 (tag) == TAG_UTF8String || \
133 (tag) == TAG_PrintableString || \
134 (TAG_IA5String <= (tag) && (tag) <= TAG_GeneralizedTime) || \
135 (tag) == TAG_SEQUENCE || \
136 (tag) == TAG_SET || \
137 (TAG_OPTION_0 <= (tag) && (tag) <= TAG_OPTION_3) || \
138 (TAG_x509VERSION <= (tag) && (tag) <= TAG_extensions) ) ? 1 : 0)
139
140
141
151int32_t certificate_identify_ASN1_TLV(const uint8_t *asn1, int32_t *parsed, int32_t *size, const uint8_t **value, uint32_t* max_size);
152
160int32_t certificate_identify_attribute(const uint8_t *oid, int32_t size);
161
168void certificate_parse_ECDSA_signature(const uint8_t *signature, certificate_t *certificate, const uint8_t **next_thing, uint32_t* max_size);
169
176void certificate_parse_X509_version(const uint8_t *x509VersionField, certificate_t *certificate, const uint8_t **next_thing, uint32_t* max_size);
177
185void certificate_parse_signature_algorithm(const uint8_t *SA, uint32_t *singatureAlgorithm, const uint8_t **next_thing, uint32_t* max_size);
186
193void certificate_parse_ECC_public_key(const uint8_t *EccPK, certificate_t *certificate, const uint8_t **next_thing, uint32_t* max_size);
194
204void certificate_parse_integer(const uint8_t *integer, const uint8_t **outp, uint32_t *outSize, const uint8_t **next_thing, uint32_t* max_size);
205
214void certificate_parse_validity(const uint8_t *p, cert_validity_t *notBefore_st, cert_validity_t *notAfter_st, const uint8_t **next_thing, uint32_t* max_size);
215
222void certificate_parse_relative_distinguished_name(const uint8_t *p, const uint8_t **nextRDN, const uint8_t **attribute, uint32_t* max_size);
223
230void certificate_parse_attribute(const uint8_t *p, cert_attribute_t *attribute_st, const uint8_t **next_thing, uint32_t* max_size);
231
241int32_t certificate_date_compare(const cert_validity_t *D1, const cert_validity_t *D2);
242
248int32_t certificate_count_attributes(const uint8_t *p);
249
259int32_t certificate_case_insensitive_compare(const uint8_t *p1, const uint8_t *p2, int32_t size);
260
268int32_t certificate_case_identify_extension(const uint8_t *oid, int32_t size);
269
276void certificate_parse_extension(const uint8_t *ext, certificate_t *certificate, cert_extension_t *ext_st, uint32_t* max_size);
277
285int32_t certificate_get_small_integer(const uint8_t *value, int32_t size);
286
289#endif /* CERTIFICATE_SUBPARSING_H */
certificate_parse_validity
void certificate_parse_validity(const uint8_t *p, cert_validity_t *notBefore_st, cert_validity_t *notAfter_st, const uint8_t **next_thing, uint32_t *max_size)
Parse the validity of a certificate.
certificate_parse_extension
void certificate_parse_extension(const uint8_t *ext, certificate_t *certificate, cert_extension_t *ext_st, uint32_t *max_size)
Parse an x509 Extension.
certificate_count_attributes
int32_t certificate_count_attributes(const uint8_t *p)
Count the number of Attributes within a NAME.
certificate_extensions_type_t
certificate_extensions_type_t
Definitions of supported Extensions types.
Definition: certificate_subparsing.h:68
cert_attribute_t
struct attribute_st cert_attribute_t
typedef for the attribute
certificate_parse_integer
void certificate_parse_integer(const uint8_t *integer, const uint8_t **outp, uint32_t *outSize, const uint8_t **next_thing, uint32_t *max_size)
Parse an ASN.1 INTEGER.
certificate_name_attributes_t
certificate_name_attributes_t
Definitions of supported Name Attributes.
Definition: certificate_subparsing.h:55
certificate_parse_signature_algorithm
void certificate_parse_signature_algorithm(const uint8_t *SA, uint32_t *singatureAlgorithm, const uint8_t **next_thing, uint32_t *max_size)
Parse a SignatureAlgorithm (or signature of a tbsCertificate)
certificate_identify_ASN1_TLV
int32_t certificate_identify_ASN1_TLV(const uint8_t *asn1, int32_t *parsed, int32_t *size, const uint8_t **value, uint32_t *max_size)
Identify the ASN.1 TLV.
certificate_parse_relative_distinguished_name
void certificate_parse_relative_distinguished_name(const uint8_t *p, const uint8_t **nextRDN, const uint8_t **attribute, uint32_t *max_size)
Parse an RelativeDistinguishedName.
cert_extension_t
struct extension_st cert_extension_t
typedef for the extension
certificate_case_identify_extension
int32_t certificate_case_identify_extension(const uint8_t *oid, int32_t size)
Identify the Extension from its OID.
certificate_parse_ECC_public_key
void certificate_parse_ECC_public_key(const uint8_t *EccPK, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECC public Key from a certificate.
certificate_date_compare
int32_t certificate_date_compare(const cert_validity_t *D1, const cert_validity_t *D2)
Compare two cert_validity_t structures.
certificate_parse_ECDSA_signature
void certificate_parse_ECDSA_signature(const uint8_t *signature, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse an ECDSA signature.
certificate_parse_attribute
void certificate_parse_attribute(const uint8_t *p, cert_attribute_t *attribute_st, const uint8_t **next_thing, uint32_t *max_size)
Parse a Name Attribute.
certificate_case_insensitive_compare
int32_t certificate_case_insensitive_compare(const uint8_t *p1, const uint8_t *p2, int32_t size)
String Comparison (case insensitive and for utf8)
certificate_get_small_integer
int32_t certificate_get_small_integer(const uint8_t *value, int32_t size)
Reads the value of an INTEGER and returns it as a int32_t.
certificate_tag_t
certificate_tag_t
Definitions of X509 TAGs.
Definition: certificate_subparsing.h:28
certificate_identify_attribute
int32_t certificate_identify_attribute(const uint8_t *oid, int32_t size)
Identify the Name Attribute from its OID.
certificate_parse_X509_version
void certificate_parse_X509_version(const uint8_t *x509VersionField, certificate_t *certificate, const uint8_t **next_thing, uint32_t *max_size)
Parse the x509 Version of a certificate.
EXTENSION_EKU
@ EXTENSION_EKU
Definition: certificate_subparsing.h:72
EXTENSION_KU
@ EXTENSION_KU
Definition: certificate_subparsing.h:69
EXTENSION_BC
@ EXTENSION_BC
Definition: certificate_subparsing.h:70
EXTENSION_AKI
@ EXTENSION_AKI
Definition: certificate_subparsing.h:71
ATTR_OUN
@ ATTR_OUN
Definition: certificate_subparsing.h:62
ATTR_SN
@ ATTR_SN
Definition: certificate_subparsing.h:57
ATTR_CN
@ ATTR_CN
Definition: certificate_subparsing.h:56
ATTR_DN
@ ATTR_DN
Definition: certificate_subparsing.h:64
ATTR_SOPN
@ ATTR_SOPN
Definition: certificate_subparsing.h:60
ATTR_C
@ ATTR_C
Definition: certificate_subparsing.h:58
ATTR_ON
@ ATTR_ON
Definition: certificate_subparsing.h:61
ATTR_UID
@ ATTR_UID
Definition: certificate_subparsing.h:63
ATTR_LN
@ ATTR_LN
Definition: certificate_subparsing.h:59
TAG_issuerUniqueID
@ TAG_issuerUniqueID
Definition: certificate_subparsing.h:49
TAG_OPTION_0
@ TAG_OPTION_0
Definition: certificate_subparsing.h:44
TAG_UTCTime
@ TAG_UTCTime
Definition: certificate_subparsing.h:40
TAG_INTEGER
@ TAG_INTEGER
Definition: certificate_subparsing.h:30
TAG_BOOLEAN
@ TAG_BOOLEAN
Definition: certificate_subparsing.h:29
TAG_OBJECT_IDENTIFIER
@ TAG_OBJECT_IDENTIFIER
Definition: certificate_subparsing.h:34
TAG_SEQUENCE
@ TAG_SEQUENCE
Definition: certificate_subparsing.h:42
TAG_subjectUniqueID
@ TAG_subjectUniqueID
Definition: certificate_subparsing.h:50
TAG_x509VERSION
@ TAG_x509VERSION
Definition: certificate_subparsing.h:48
TAG_PrintableString
@ TAG_PrintableString
Definition: certificate_subparsing.h:38
TAG_NULL
@ TAG_NULL
Definition: certificate_subparsing.h:33
TAG_ENUMERATED
@ TAG_ENUMERATED
Definition: certificate_subparsing.h:36
TAG_OPTION_3
@ TAG_OPTION_3
Definition: certificate_subparsing.h:47
TAG_extensions
@ TAG_extensions
Definition: certificate_subparsing.h:51
TAG_OPTION_1
@ TAG_OPTION_1
Definition: certificate_subparsing.h:45
TAG_SET
@ TAG_SET
Definition: certificate_subparsing.h:43
TAG_OCTETSTRING
@ TAG_OCTETSTRING
Definition: certificate_subparsing.h:32
TAG_UTF8String
@ TAG_UTF8String
Definition: certificate_subparsing.h:37
TAG_ObjectDescriptor
@ TAG_ObjectDescriptor
Definition: certificate_subparsing.h:35
TAG_OPTION_2
@ TAG_OPTION_2
Definition: certificate_subparsing.h:46
TAG_BITSTRING
@ TAG_BITSTRING
Definition: certificate_subparsing.h:31
TAG_IA5String
@ TAG_IA5String
Definition: certificate_subparsing.h:39
TAG_GeneralizedTime
@ TAG_GeneralizedTime
Definition: certificate_subparsing.h:41
AttributeOID_st
Structure used to keep Name Attribute OIDs.
Definition: certificate_subparsing.h:85
AttributeOID_st::oid
uint8_t oid[3]
Definition: certificate_subparsing.h:88
AttributeOID_st::len
uint32_t len
Definition: certificate_subparsing.h:86
AttributeOID_st::type
uint32_t type
Definition: certificate_subparsing.h:87
EllipticCurveOID_st
Structure used to keep named Elliptic Curve OIDs.
Definition: certificate_subparsing.h:93
EllipticCurveOID_st::oid
uint8_t oid[9]
Definition: certificate_subparsing.h:96
EllipticCurveOID_st::len
uint32_t len
Definition: certificate_subparsing.h:94
EllipticCurveOID_st::type
uint32_t type
Definition: certificate_subparsing.h:95
ExtensionOID_st
Structure used to keep Name Attribute OIDs.
Definition: certificate_subparsing.h:110
ExtensionOID_st::oid
uint8_t oid[5]
Definition: certificate_subparsing.h:113
ExtensionOID_st::len
uint32_t len
Definition: certificate_subparsing.h:111
ExtensionOID_st::type
uint32_t type
Definition: certificate_subparsing.h:112
SignatureAlgorithmOID_st
Structure used to keep SignatureAlgorithm OIDs.
Definition: certificate_subparsing.h:77
SignatureAlgorithmOID_st::len
uint32_t len
Definition: certificate_subparsing.h:78
SignatureAlgorithmOID_st::oid
uint8_t oid[8]
Definition: certificate_subparsing.h:80
SignatureAlgorithmOID_st::type
uint32_t type
Definition: certificate_subparsing.h:79
attribute_st
typedef for the attribute
Definition: certificate_subparsing.h:101
attribute_st::str
const uint8_t * str
Definition: certificate_subparsing.h:104
attribute_st::strFormat
uint32_t strFormat
Definition: certificate_subparsing.h:103
attribute_st::strSize
uint32_t strSize
Definition: certificate_subparsing.h:105
attribute_st::type
uint32_t type
Definition: certificate_subparsing.h:102
extension_st
typedef for the extension
Definition: certificate_subparsing.h:118
extension_st::value
const uint8_t * value
Definition: certificate_subparsing.h:121
extension_st::valueSize
uint32_t valueSize
Definition: certificate_subparsing.h:122
extension_st::critical
uint32_t critical
Definition: certificate_subparsing.h:120
extension_st::type
uint32_t type
Definition: certificate_subparsing.h:119
internal_certificate
internal structure used to keep the values parsed from the x509
Definition: certificate.h:96
validity_st
typedef for the structure keeping the validity
Definition: certificate.h:69
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/custom_uwb.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
custom_uwb.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef _CUSTOM_UWB_H_
22#define _CUSTOM_UWB_H_
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "ACWG_Security.h"
30
31
40/* Exported functions ------------------------------------------------------- */
41
47void Initiate_uwb_ctx(ACWG_SessionContext_t *ctx);
48
54void Handle_uwb_Time_Sync(ACWG_SessionContext_t *ctx);
55
67void Fill_uwb_M1(ACWG_SessionContext_t *ctx);
68
84void Handle_uwb_M2(ACWG_SessionContext_t *ctx);
85
100void Fill_uwb_M3(ACWG_SessionContext_t *ctx);
101
113void Handle_uwb_M4(ACWG_SessionContext_t *ctx);
114
120void Prepare_ranging_init(ACWG_SessionContext_t *ctx);
121
129void Prepare_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout);
130
137void Execute_ranging_init(ACWG_SessionContext_t *ctx);
138
147void Execute_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout);
148
155void Close_ranging_init(ACWG_SessionContext_t *ctx);
156
163void Close_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout);
164
171void Suspend_ranging_init(ACWG_SessionContext_t *ctx);
172
179void Suspend_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout);
180
187void Resume_ranging_init(ACWG_SessionContext_t *ctx);
188
196void Resume_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout);
197
205uint8_t Handle_distance_result(ACWG_SessionContext_t *ctx);
206
213void Handle_lock_actuation(ACWG_SessionContext_t *ctx);
214
219void UWB_HW_init( void );
220
225void UWB_HW_loop( void );
226
231#ifdef __cplusplus
232}
233#endif
234
235#endif /* _CUSTOM_UWB_H_ */
236/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
UWB_HW_init
void UWB_HW_init(void)
Initialize UWB hardware. Uses for UWB hardware initialization, called only one time at startup.
Definition: custom_weak_override_uwb.c:229
Initiate_uwb_ctx
void Initiate_uwb_ctx(ACWG_SessionContext_t *ctx)
Initialize UWB session. Uses for UWB Context and ranging session initialization.
Definition: custom_weak_override_uwb.c:21
Execute_ranging_init
void Execute_ranging_init(ACWG_SessionContext_t *ctx)
Execute the ranging initialization step. Called only one time after prepare ranging steps....
Definition: custom_weak_override_uwb.c:88
Handle_lock_actuation
void Handle_lock_actuation(ACWG_SessionContext_t *ctx)
Trigger lock actuation based on session state. Called only one time after Execute_ranging_loop....
Definition: custom_weak_override_uwb.c:178
UWB_HW_loop
void UWB_HW_loop(void)
Run periodic UWB hardware tasks. Uses for periodic UWB hardware tasks, called repeatedly in main loop...
Definition: custom_weak_override_uwb.c:241
Resume_ranging_init
void Resume_ranging_init(ACWG_SessionContext_t *ctx)
Resume the ranging initialization step. Called only one time after resume response in ranging session...
Definition: custom_weak_override_uwb.c:150
Handle_distance_result
uint8_t Handle_distance_result(ACWG_SessionContext_t *ctx)
Handle and evaluate distance results. Called only one time during preparing Reader Status Exchange fr...
Definition: custom_weak_override_uwb.c:164
Suspend_ranging_init
void Suspend_ranging_init(ACWG_SessionContext_t *ctx)
Suspend the ranging initialization step. Called only one time after suspend response or suspend event...
Definition: custom_weak_override_uwb.c:137
Fill_uwb_M3
void Fill_uwb_M3(ACWG_SessionContext_t *ctx)
Fill outbound M3 message fields. Uses to fill UWB M3 message fields: The follow fields are session pa...
Definition: custom_weak_override_uwb.c:55
Resume_ranging_loop
void Resume_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout)
Resume the ranging loop step. Called repeatedly in the resume ranging loop until timeout expires....
Definition: custom_weak_override_uwb.c:155
Handle_uwb_M4
void Handle_uwb_M4(ACWG_SessionContext_t *ctx)
Handle inbound M4 message fields. Uses to handle UWB M4 message fields. The follow fields are session...
Definition: custom_weak_override_uwb.c:68
Fill_uwb_M1
void Fill_uwb_M1(ACWG_SessionContext_t *ctx)
Fill outbound M1 message fields. Uses to fill UWB M1 message fields: The first three fields depends o...
Definition: custom_weak_override_uwb.c:29
Close_ranging_init
void Close_ranging_init(ACWG_SessionContext_t *ctx)
Close the ranging initialization step. Called only one time after Handle_lock_actuation....
Definition: custom_weak_override_uwb.c:122
Execute_ranging_loop
void Execute_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout)
Execute the ranging loop step. Called repeatedly in the execute ranging loop until timeout expires....
Definition: custom_weak_override_uwb.c:95
Suspend_ranging_loop
void Suspend_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout)
Suspend the ranging loop step. Called repeatedly in the suspend ranging loop until timeout expires.
Definition: custom_weak_override_uwb.c:142
Prepare_ranging_init
void Prepare_ranging_init(ACWG_SessionContext_t *ctx)
Prepare the ranging initialization step. Called only once after M1/M2/M3/M4 exchange.
Definition: custom_weak_override_uwb.c:74
Prepare_ranging_loop
void Prepare_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout)
Prepare the ranging loop step. Called repeatedly in the prepare ranging loop until timeout expires....
Definition: custom_weak_override_uwb.c:79
Handle_uwb_Time_Sync
void Handle_uwb_Time_Sync(ACWG_SessionContext_t *ctx)
Handle UWB time synchronization frame. Uses to process and apply time sync information for the curren...
Close_ranging_loop
void Close_ranging_loop(ACWG_SessionContext_t *ctx, uint32_t *timeout)
Close the ranging loop step. Called repeatedly in the close ranging loop until timeout expires.
Definition: custom_weak_override_uwb.c:127
Handle_uwb_M2
void Handle_uwb_M2(ACWG_SessionContext_t *ctx)
Handle inbound M2 message fields. Uses to handle UWB M2 message fields: The first three fields is lin...
Definition: custom_weak_override_uwb.c:63
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security -> Projects Relation

  • Middlewares
  • ST
  • ACWG_Security

ACWG_Security → Projects Relation

File in Middlewares/ST/ACWG_Security | Includes file in Projects
inc / ACWG_Security.h | Common / Aliro / Inc / sm_crypto.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro -> Middlewares Relation

  • Projects
  • Common
  • Aliro

Aliro → Middlewares Relation

File in Projects/Common/Aliro | Includes file in Middlewares
Inc / app_aliro.h | ST / ACWG_Security / inc / ACWG_Security.h
Inc / app_nfc.h | ST / ACWG_Security / inc / ACWG_Security.h
Inc / custom_uwb.h | ST / ACWG_Security / inc / ACWG_Security.h
Inc / provisioning.h | ST / ACWG_Security / inc / ACWG_Security.h
Inc / stepup_mgr.h | ST / ACWG_Security / inc / ACWG_Security.h
Inc / tlwrapper.h | ST / ACWG_Security / inc / ACWG_Security.h
Src / app_aliro.c | ST / ACWG_Security / inc / ACWG_Security.h
Src / app_aliro.c | ST / ACWG_Security / inc / ACWG_build_info.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common -> Middlewares Relation

  • Projects
  • Common

Common → Middlewares Relation

File in Projects/Common | Includes file in Middlewares
Aliro / Inc / app_aliro.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Inc / app_nfc.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Inc / custom_uwb.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Inc / provisioning.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Inc / stepup_mgr.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Inc / tlwrapper.h | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Src / app_aliro.c | ST / ACWG_Security / inc / ACWG_Security.h
Aliro / Src / app_aliro.c | ST / ACWG_Security / inc / ACWG_build_info.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST/ACWG_Security/inc -> Projects Relation

  • Middlewares
  • ST
  • ACWG_Security
  • inc

inc → Projects Relation

File in Middlewares/ST/ACWG_Security/inc | Includes file in Projects
ACWG_Security.h | Common / Aliro / Inc / sm_crypto.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc -> Middlewares Relation

  • Projects
  • Common
  • Aliro
  • Inc

Inc → Middlewares Relation

File in Projects/Common/Aliro/Inc | Includes file in Middlewares
app_aliro.h | ST / ACWG_Security / inc / ACWG_Security.h
app_nfc.h | ST / ACWG_Security / inc / ACWG_Security.h
custom_uwb.h | ST / ACWG_Security / inc / ACWG_Security.h
provisioning.h | ST / ACWG_Security / inc / ACWG_Security.h
stepup_mgr.h | ST / ACWG_Security / inc / ACWG_Security.h
tlwrapper.h | ST / ACWG_Security / inc / ACWG_Security.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src -> Inc Relation

  • Projects
  • Common
  • Aliro
  • Src

Src → Inc Relation

File in Projects/Common/Aliro/Src | Includes file in Projects/Common/Aliro/Inc
app_aliro.c | app_aliro.h
app_aliro.c | app_build_info.h
app_aliro.c | app_nfc.h
app_aliro.c | app_version.h
app_aliro.c | provisioning.h
app_aliro.c | sm_crypto_mcu.h
app_aliro.c | tlwrapper.h
app_nfc.c | app_aliro.h
app_nfc.c | app_nfc.h
app_nfc.c | provisioning.h
app_nfc.c | tlwrapper.h
custom_weak_override_uwb.c | app_aliro.h
custom_weak_override_uwb.c | custom_uwb.h
flash_mng.c | flash_mng.h
provisioning.c | app_aliro.h
provisioning.c | flash_mng.h
provisioning.c | provisioning.h
provisioning.c | provisioning_info.h
provisioning.c | sm_crypto.h
sm_crypto_mcu.c | provisioning.h
sm_crypto_mcu.c | sm_crypto_mcu.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Src -> Middlewares Relation

  • Projects
  • Common
  • Aliro
  • Src

Src → Middlewares Relation

File in Projects/Common/Aliro/Src | Includes file in Middlewares
app_aliro.c | ST / ACWG_Security / inc / ACWG_build_info.h
app_aliro.c | ST / ACWG_Security / inc / ACWG_Security.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Middlewares/ST -> Projects Relation

  • Middlewares
  • ST

ST → Projects Relation

File in Middlewares/ST | Includes file in Projects
ACWG_Security / inc / ACWG_Security.h | Common / Aliro / Inc / sm_crypto.h


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/flash_mng.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
flash_mng.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _FLASH_MNG_H_
21#define _FLASH_MNG_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include "app_nfc.h"
33//#include "utils.h"
34#include "main.h"
35
39/* Exported types ------------------------------------------------------------*/
40
45typedef enum _flashOpStatus
46{
47 FLASH_OP_OK,
48 FLASH_OP_BUSY,
49 FLASH_OP_ERROR
50}
51flashOpStatus_e;
59/* Exported functions ------------------------------------------------------- */
60
68flashOpStatus_e WriteToFlash(void *data, uint32_t nBytes, uint32_t nAddress);
69
77flashOpStatus_e EraseWriteToFlash(void *data, uint32_t nBytes, uint32_t nAddress);
78
85flashOpStatus_e EraseFlash(uint32_t nAddress, uint32_t nBytes);
94#ifdef __cplusplus
95}
96#endif
97
98#endif /* _FLASH_MNG_H_ */
99/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
app_nfc.h
: Header for app_nfc.c file. This file contains the public NFC API and common NFC definitions for the...
WriteToFlash
flashOpStatus_e WriteToFlash(void *data, uint32_t nBytes, uint32_t nAddress)
Writes data to flash memory.
Definition: flash_mng.c:266
EraseWriteToFlash
flashOpStatus_e EraseWriteToFlash(void *data, uint32_t nBytes, uint32_t nAddress)
Erases the flash sector and writes data to it.
Definition: flash_mng.c:128
EraseFlash
flashOpStatus_e EraseFlash(uint32_t nAddress, uint32_t nBytes)
Erases a region of flash memory.
Definition: flash_mng.c:69
_flashOpStatus
_flashOpStatus
Definition: flash_mng.h:46
FLASH_OP_OK
@ FLASH_OP_OK
Definition: flash_mng.h:47
FLASH_OP_BUSY
@ FLASH_OP_BUSY
Definition: flash_mng.h:48
FLASH_OP_ERROR
@ FLASH_OP_ERROR
Definition: flash_mng.h:49
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };
/* Class not documented with doxygen comments */
class Undocumented { };
/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };
/*! A template class */
template<class T> class Templ { };
/*! Class that is inherited using protected inheritance */
class ProtectedBase { };
/*! Class that is inherited using private inheritance */
class PrivateBase { };
/*! Class that is used by the Inherited class */
class Used { };
/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
protected ProtectedBase,
private PrivateBase,
public Undocumented,
public Templ<int>
{
private:
Used *m_usedClass;
};

This will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled gray box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a gray border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.

The arrows have the following meaning:

  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labelled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labelled with the template parameters of the instance.


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/log_module_u5.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
log_module_u5.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _LOG_MODULE_U5_H_
21#define _LOG_MODULE_U5_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include <stdint.h>
29#include <stdbool.h>
30#include "st_errno.h"
31
40/* Exported types ------------------------------------------------------------*/
41
42typedef uint8_t Log_Verbose_Level_t;
43typedef uint8_t Log_Region_t;
44
52/* Exported macro ------------------------------------------------------------*/
53
59#define LOG_INFO_APP(...) do{Log_Module_Print(0,0,__VA_ARGS__);}while(0)
68#ifdef __cplusplus
69}
70#endif
71
72#endif /* _LOG_MODULE_U5_H_ */
73/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: Related Pages

Related Pages
Here is a list of all related documentation pages:
NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 information
NUCLEO-U545RE, NUCLEO-WBA65RI, X-NUCLEO-NFC10A1 and X-NUCLEO-NFC12A1 Building blocks
Getting started with hardware
Getting started with firmware
Todo List
Generated on Wed Feb 18 2026 18:15:46 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/provisioning.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
provisioning.h
Go to the documentation of this file.
1
19#ifndef _PROVISIONING_H_
20#define _PROVISIONING_H_
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30/* Includes ------------------------------------------------------------------*/
31#include "ACWG_Security.h"
32#include "stdbool.h"
33#include "provisioning_info.h"
34
38/* Exported constants --------------------------------------------------------*/
39
44#define PRIVATE_KEY_SIZE_BYTES ((uint32_t)32)
49#define AUTH_PUBKEY_LEN_BYTES ((uint32_t)64)
54#define GROUP_RESOLVING_KEY_SIZE_BYTES ((uint32_t)16)
59#define DEVICE_NAME_SIZE_BYTES ((uint32_t)16)
64#define B1_VENDOR_SPEC_EXT_SIZE_BYTES ((uint32_t)64)
69#define RESERVED_PAIRING_KEYS_SIZE_BYTES ((uint32_t)32)
74#define CERTIFICATE_SIZE ((uint32_t)400)
75
80#define NUM_PROV_DEVICES 5
81
82
90/* Exported variables ------------------------------------------------------------*/
91
99/* Exported types ------------------------------------------------------------*/
100
105typedef struct devices_s
106{
107 uint8_t name[DEVICE_NAME_SIZE_BYTES];
108 uint8_t endpoint_Keyslot[AUTH_KEYSLOT_LEN_BYTES];
109 uint8_t endpoint_PubK[AUTH_PUBKEY_LEN_BYTES];
110 uint8_t endpoint_PrivK[PRIVATE_KEY_SIZE_BYTES];
111}devices_t;
112
113
118typedef struct provstruct_s
119{
120 uint32_t isValid;
121 uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES + AUTH_READER_GROUP_SUB_ID_LEN_BYTES];
122 uint8_t readerPubK[AUTH_PUBKEY_LEN_BYTES];
123 uint8_t staticPrivateKey[PRIVATE_KEY_SIZE_BYTES];
124 uint8_t group_resolving_key[GROUP_RESOLVING_KEY_SIZE_BYTES];
125 uint8_t certificate_data[CERTIFICATE_SIZE];
126 uint32_t certificate_len;
127 uint8_t readerIssuerPubK[AUTH_PUBKEY_LEN_BYTES];
128 uint8_t b1VendorSpecificExtension[B1_VENDOR_SPEC_EXT_SIZE_BYTES];
129 uint32_t b1VendorSpecificExtensionLen;
130 uint32_t numDevices;
131 devices_t devices[NUM_PROV_DEVICES];
132 uint32_t isValidReserved;
133 uint8_t reservedPairingKeys[RESERVED_PAIRING_KEYS_SIZE_BYTES];
134 uint32_t struct_size;
135}provstruct_t;
143/* Exported functions ------------------------------------------------------- */
144
148void showJsonStatus();
149
153void showProvisioningStatus();
154
159void saveProvisioningToFlash(uint32_t profile_num);
160
165 provstruct_t* getProvisioningFromFlash();
166
172void loadProvisionFromJson(uint32_t jsonAddress, provstruct_t*provstruct);
173
178void convertProvisioningFromJson(uint32_t jsonAddress);
179
183void convertDefaultProvisioningFromJson();
184
188void printDeviceJson();
189
193void printScriptJson();
194
195
201void saveRDPubKToFlash(const uint8_t *pkey, const uint8_t ksize);
202
208void saveRDPrvKToFlash(const uint8_t *pkey, const uint8_t ksize);
209
215void saveRDidenToFlash(const uint8_t *pkey, const uint8_t ksize);
216
222void saveRDgrrkToFlash(const uint8_t *pkey, const uint8_t ksize);
223
229void saveCredIsPkToFlash(const uint8_t *pkey, const uint8_t ksize);
230
237void saveAccessCredentialPuBK(uint8_t *pkey, const uint8_t ksize, uint8_t nSlot, uint8_t *pkeyname);
238
245uint8_t is_zeros(uint8_t* pBuf, uint32_t nSize);
246
252uint8_t ProvisioningCheckEndpointPubK(uint8_t *endp_PubK);
253
261uint8_t ProvisioningGetEndpointPubKFromKeyslot(uint8_t *endp_PubK, uint8_t *endp_Keyslot, uint8_t*slotFound);
262
269void hexStrToHex(char *p, uint32_t len, uint8_t *hexp);
270
279#ifdef __cplusplus
280}
281#endif
282
283#endif //_PROVISIONING_H_
284/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
AUTH_READER_GROUP_SUB_ID_LEN_BYTES
#define AUTH_READER_GROUP_SUB_ID_LEN_BYTES
Length in bytes of a reader group sub ID.
Definition: ACWG_Security.h:72
AUTH_KEYSLOT_LEN_BYTES
#define AUTH_KEYSLOT_LEN_BYTES
Length in bytes of a keyslot.
Definition: ACWG_Security.h:77
AUTH_READER_GROUP_ID_LEN_BYTES
#define AUTH_READER_GROUP_ID_LEN_BYTES
Length in bytes of a reader group ID.
Definition: ACWG_Security.h:67
DEVICE_NAME_SIZE_BYTES
#define DEVICE_NAME_SIZE_BYTES
Size of device name in bytes.
Definition: provisioning.h:59
NUM_PROV_DEVICES
#define NUM_PROV_DEVICES
Maximum number of provisioned devices.
Definition: provisioning.h:80
B1_VENDOR_SPEC_EXT_SIZE_BYTES
#define B1_VENDOR_SPEC_EXT_SIZE_BYTES
Size of vendor specific extension in bytes.
Definition: provisioning.h:64
GROUP_RESOLVING_KEY_SIZE_BYTES
#define GROUP_RESOLVING_KEY_SIZE_BYTES
Size of group resolving key in bytes.
Definition: provisioning.h:54
PRIVATE_KEY_SIZE_BYTES
#define PRIVATE_KEY_SIZE_BYTES
Size of private key in bytes.
Definition: provisioning.h:44
AUTH_PUBKEY_LEN_BYTES
#define AUTH_PUBKEY_LEN_BYTES
Length of authentication public key in bytes.
Definition: provisioning.h:49
CERTIFICATE_SIZE
#define CERTIFICATE_SIZE
Size of certificate data in bytes.
Definition: provisioning.h:74
RESERVED_PAIRING_KEYS_SIZE_BYTES
#define RESERVED_PAIRING_KEYS_SIZE_BYTES
Size of buffer in bytes reserved for future use .
Definition: provisioning.h:69
convertDefaultProvisioningFromJson
void convertDefaultProvisioningFromJson()
Converts default provisioning data from JSON format.
Definition: provisioning.c:603
ProvisioningGetEndpointPubKFromKeyslot
uint8_t ProvisioningGetEndpointPubKFromKeyslot(uint8_t *endp_PubK, uint8_t *endp_Keyslot, uint8_t *slotFound)
Gets the endpoint public key from a keyslot.
Definition: provisioning.c:1429
saveRDgrrkToFlash
void saveRDgrrkToFlash(const uint8_t *pkey, const uint8_t ksize)
Saves the reader group resolving key to flash memory.
Definition: provisioning.c:1355
printScriptJson
void printScriptJson()
Prints the script JSON data.
convertProvisioningFromJson
void convertProvisioningFromJson(uint32_t jsonAddress)
Converts provisioning data from JSON format.
Definition: provisioning.c:874
loadProvisionFromJson
void loadProvisionFromJson(uint32_t jsonAddress, provstruct_t *provstruct)
Loads provisioning data from a JSON address.
Definition: provisioning.c:614
saveAccessCredentialPuBK
void saveAccessCredentialPuBK(uint8_t *pkey, const uint8_t ksize, uint8_t nSlot, uint8_t *pkeyname)
Saves the access credential public key.
Definition: provisioning.c:1235
saveProvisioningToFlash
void saveProvisioningToFlash(uint32_t profile_num)
Saves the provisioning data to flash memory.
Definition: provisioning.c:354
printDeviceJson
void printDeviceJson()
Prints the device JSON data.
Definition: provisioning.c:947
saveRDPrvKToFlash
void saveRDPrvKToFlash(const uint8_t *pkey, const uint8_t ksize)
Saves the reader private key to flash memory.
Definition: provisioning.c:1304
is_zeros
uint8_t is_zeros(uint8_t *pBuf, uint32_t nSize)
Checks if a buffer contains only zeros.
Definition: provisioning.c:1404
hexStrToHex
void hexStrToHex(char *p, uint32_t len, uint8_t *hexp)
Converts a hex string to a hex buffer.
Definition: provisioning.c:143
ProvisioningCheckEndpointPubK
uint8_t ProvisioningCheckEndpointPubK(uint8_t *endp_PubK)
Checks the endpoint public key for provisioning.
Definition: provisioning.c:1147
showProvisioningStatus
void showProvisioningStatus()
Shows the status of the provisioning data.
Definition: provisioning.c:323
saveRDidenToFlash
void saveRDidenToFlash(const uint8_t *pkey, const uint8_t ksize)
Saves the reader identity to flash memory.
Definition: provisioning.c:1330
saveCredIsPkToFlash
void saveCredIsPkToFlash(const uint8_t *pkey, const uint8_t ksize)
Saves the credential issuer public key to flash memory.
Definition: provisioning.c:1380
getProvisioningFromFlash
provstruct_t * getProvisioningFromFlash()
Retrieves the provisioning data from flash memory.
Definition: provisioning.c:594
saveRDPubKToFlash
void saveRDPubKToFlash(const uint8_t *pkey, const uint8_t ksize)
Saves the reader public key to flash memory.
Definition: provisioning.c:1190
showJsonStatus
void showJsonStatus()
Shows the status of the JSON provisioning data.
Definition: provisioning.c:299
provisioning_info.h
: Provisioning information and configuration defines for the application.
devices_s
Definition: provisioning.h:106
devices_s::endpoint_PubK
uint8_t endpoint_PubK[AUTH_PUBKEY_LEN_BYTES]
Definition: provisioning.h:109
devices_s::name
uint8_t name[DEVICE_NAME_SIZE_BYTES]
Definition: provisioning.h:107
devices_s::endpoint_PrivK
uint8_t endpoint_PrivK[PRIVATE_KEY_SIZE_BYTES]
Definition: provisioning.h:110
devices_s::endpoint_Keyslot
uint8_t endpoint_Keyslot[AUTH_KEYSLOT_LEN_BYTES]
Definition: provisioning.h:108
devices_t
Structure representing a provisioned device.
provstruct_s
Definition: provisioning.h:119
provstruct_s::devices
devices_t devices[NUM_PROV_DEVICES]
Definition: provisioning.h:131
provstruct_s::isValidReserved
uint32_t isValidReserved
Definition: provisioning.h:132
provstruct_s::certificate_len
uint32_t certificate_len
Definition: provisioning.h:126
provstruct_s::staticPrivateKey
uint8_t staticPrivateKey[PRIVATE_KEY_SIZE_BYTES]
Definition: provisioning.h:123
provstruct_s::b1VendorSpecificExtension
uint8_t b1VendorSpecificExtension[B1_VENDOR_SPEC_EXT_SIZE_BYTES]
Definition: provisioning.h:128
provstruct_s::certificate_data
uint8_t certificate_data[CERTIFICATE_SIZE]
Definition: provisioning.h:125
provstruct_s::isValid
uint32_t isValid
Definition: provisioning.h:120
provstruct_s::numDevices
uint32_t numDevices
Definition: provisioning.h:130
provstruct_s::struct_size
uint32_t struct_size
Definition: provisioning.h:134
provstruct_s::readerID
uint8_t readerID[AUTH_READER_GROUP_ID_LEN_BYTES+AUTH_READER_GROUP_SUB_ID_LEN_BYTES]
Definition: provisioning.h:121
provstruct_s::group_resolving_key
uint8_t group_resolving_key[GROUP_RESOLVING_KEY_SIZE_BYTES]
Definition: provisioning.h:124
provstruct_s::b1VendorSpecificExtensionLen
uint32_t b1VendorSpecificExtensionLen
Definition: provisioning.h:129
provstruct_s::readerIssuerPubK
uint8_t readerIssuerPubK[AUTH_PUBKEY_LEN_BYTES]
Definition: provisioning.h:127
provstruct_s::readerPubK
uint8_t readerPubK[AUTH_PUBKEY_LEN_BYTES]
Definition: provisioning.h:122
provstruct_s::reservedPairingKeys
uint8_t reservedPairingKeys[RESERVED_PAIRING_KEYS_SIZE_BYTES]
Definition: provisioning.h:133
provstruct_t
Structure representing the provisioning data.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/provisioning_info.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
provisioning_info.h
Go to the documentation of this file.
1
18/* Define to prevent recursive inclusion -------------------------------------*/
19#ifndef _PROVISIONING_INFO_H_
20#define _PROVISIONING_INFO_H_
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
34/* Exported constants --------------------------------------------------------*/
39#define ALIRO_APP_NAME "TruELock"
44#define DEFAULT_CMD_PARAMS_VALUE 0
45
50#define NFC_PROP_BUF_CONTENT { 0 }
55#define BLE_ADV_DISABLE 0
60#define ALIRO_NFC_TOTAL_DURATION 1000U
65#define TEST_HARNESS_SIMULATION 0
70#define ALIRO_PROT_VER_DEFAULT ( AUTH_EXP_TRANS_PROT_VERSION )
71
76#define ALIRO_PROT_VER xProtocolVersionSupported
77
82#define ALIRO_MAIN_PROT_VER (ALIRO_PROT_VER & 0xffff)
87#define ALIRO_HAS_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)?(1):(0))
92#define ALIRO_SEC_PROT_VER ((ALIRO_PROT_VER&0xFFFF0000)>>16)
97#define DEVICE_PROVISIONING_STRUCT_IS_VALID 0xA5A55A5A
102#define EXPIRY_TIME_STAMP_DEFAULT_VALUE 0x76100fe0
103 // end of Provisioning_info_Constants
105
110/* Exported macro ------------------------------------------------------------*/
115#define DISPLAY_SPLASH()
120#define LOAD_NFC_PROP()
125#define DET_NFC_PROP()
130#define INIT_NFC_PROP()
131
136#define UWB_SESSION_ID_DEFAULT getUwbSessionId()
137 // end of Provisioning_info_Macros
139
144/* Includes ------------------------------------------------------------------*/
145
146#include "User_provisioning.h"
147 // end of Provisioning_info_Includes
149 // end of PROVISIONING
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif //_PROVISIONING_INFO_H_
157/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
sm_crypto.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef _SM_CRYPTO_H_
22#define _SM_CRYPTO_H_
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32/* Includes ------------------------------------------------------------------*/
33#include <stdint.h>
34
38/* Exported constants --------------------------------------------------------*/
39
44#define RAW_PRIV_KEY_BYTE_SIZE ((uint32_t)32)
49#define SHA256_BYTE_SIZE ((uint32_t)32)
54#define ECDSA_256_SIG_BYTE_SIZE ((uint32_t)64)
62/* Exported types ------------------------------------------------------------*/
63
68typedef enum {
69 SM_Crypto_OK = 0,
70 SM_Crypto_Error,
71 SM_Crypto_HW_Error
72} SM_Crypto_Error_t;
73
74
82/* Exported functions ------------------------------------------------------- */
83
88 SM_Crypto_Error_t SM_init(void);
89
96 SM_Crypto_Error_t SM_genRandomBytes(uint8_t *bytes, uint32_t size);
97
103 SM_Crypto_Error_t SM_genKeypair(uint8_t *pub);
104
117 SM_Crypto_Error_t SM_KDFRFC5869(const uint8_t* pZ, uint32_t ZSize,
118 const uint8_t* pSalt, uint32_t saltSize,
119 const uint8_t* pFixedInfo, uint32_t fixedInfoSize,
120 uint32_t L, uint8_t* pOutput);
121
129 SM_Crypto_Error_t SM_sha1(uint8_t *input, uint32_t inputSize, uint8_t *hash);
130
138 SM_Crypto_Error_t SM_sha256(uint8_t *input, uint32_t inputSize, uint8_t *hash);
139
144 SM_Crypto_Error_t SM_sha256_start(void);
145
152 SM_Crypto_Error_t SM_sha256_update(const uint8_t *input, uint32_t inputSize);
153
161 SM_Crypto_Error_t SM_sha256_finish(uint8_t *hash, const uint8_t *input, uint32_t inputSize);
162
170 SM_Crypto_Error_t SM_sign(const uint8_t *tbs, uint32_t tbsSize, uint8_t *signature);
171
178 SM_Crypto_Error_t SM_Ecdh(const uint8_t *pPublicKey, uint8_t *pSharedSecret);
179
188 SM_Crypto_Error_t SM_deriveKdh(const uint8_t *pZ, const uint8_t * info, uint32_t infoSize, uint8_t *pKdh);
189
202 SM_Crypto_Error_t SM_aes256GcmDecrypt(const uint8_t* pKey, const uint8_t* pNonce, const uint8_t* pAad, const uint32_t aadSize,
203 const uint8_t* pPayload, const uint32_t payloadSize, uint8_t* pPlaintext, const uint8_t* pTag);
204
217 SM_Crypto_Error_t SM_aes256GcmEncrypt(const uint8_t* pKey, const uint8_t* pNonce, const uint8_t* pAad, const uint32_t aadSize,
218 const uint8_t* pInput, const uint32_t inputSize, uint8_t* pOutput, uint32_t* pOutputSize);
219
228 SM_Crypto_Error_t SM_verify(const uint8_t *pPublicKey, const uint8_t *tbs, const uint32_t tbsSize, const uint8_t *signature);
229
236 SM_Crypto_Error_t SM_getCertificate(uint8_t *certificate, uint32_t *certificateSize);
245#ifdef __cplusplus
246}
247#endif
248
249#endif // _SM_CRYPTO_H_
SM_Ecdh
SM_Crypto_Error_t SM_Ecdh(const uint8_t *pPublicKey, uint8_t *pSharedSecret)
Performs ECDH key agreement.
Definition: sm_crypto_mcu.c:352
SM_init
SM_Crypto_Error_t SM_init(void)
Initializes the cryptographic module.
SM_KDFRFC5869
SM_Crypto_Error_t SM_KDFRFC5869(const uint8_t *pZ, uint32_t ZSize, const uint8_t *pSalt, uint32_t saltSize, const uint8_t *pFixedInfo, uint32_t fixedInfoSize, uint32_t L, uint8_t *pOutput)
Key Derivation Function RFC5869.
Definition: sm_crypto_mcu.c:714
SM_sha256_finish
SM_Crypto_Error_t SM_sha256_finish(uint8_t *hash, const uint8_t *input, uint32_t inputSize)
Finishes SHA-256 computation and returns the hash.
Definition: sm_crypto_mcu.c:649
SM_aes256GcmDecrypt
SM_Crypto_Error_t SM_aes256GcmDecrypt(const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pPayload, const uint32_t payloadSize, uint8_t *pPlaintext, const uint8_t *pTag)
Decrypts data using AES-256 GCM.
Definition: sm_crypto_mcu.c:801
SM_sign
SM_Crypto_Error_t SM_sign(const uint8_t *tbs, uint32_t tbsSize, uint8_t *signature)
Signs data using ECDSA.
Definition: sm_crypto_mcu.c:392
SM_getCertificate
SM_Crypto_Error_t SM_getCertificate(uint8_t *certificate, uint32_t *certificateSize)
Gets the certificate.
Definition: sm_crypto_mcu.c:502
SM_aes256GcmEncrypt
SM_Crypto_Error_t SM_aes256GcmEncrypt(const uint8_t *pKey, const uint8_t *pNonce, const uint8_t *pAad, const uint32_t aadSize, const uint8_t *pInput, const uint32_t inputSize, uint8_t *pOutput, uint32_t *pOutputSize)
Encrypts data using AES-256 GCM.
Definition: sm_crypto_mcu.c:881
SM_sha1
SM_Crypto_Error_t SM_sha1(uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-1 hash.
Definition: sm_crypto_mcu.c:568
SM_deriveKdh
SM_Crypto_Error_t SM_deriveKdh(const uint8_t *pZ, const uint8_t *info, uint32_t infoSize, uint8_t *pKdh)
Derives KDH key.
Definition: sm_crypto_mcu.c:763
SM_verify
SM_Crypto_Error_t SM_verify(const uint8_t *pPublicKey, const uint8_t *tbs, const uint32_t tbsSize, const uint8_t *signature)
Verifies a signature using ECDSA.
Definition: sm_crypto_mcu.c:463
SM_genKeypair
SM_Crypto_Error_t SM_genKeypair(uint8_t *pub)
Generates a keypair and returns the public key.
Definition: sm_crypto_mcu.c:442
SM_sha256
SM_Crypto_Error_t SM_sha256(uint8_t *input, uint32_t inputSize, uint8_t *hash)
Computes SHA-256 hash.
Definition: sm_crypto_mcu.c:593
SM_sha256_update
SM_Crypto_Error_t SM_sha256_update(const uint8_t *input, uint32_t inputSize)
Updates SHA-256 computation with new data.
Definition: sm_crypto_mcu.c:632
SM_sha256_start
SM_Crypto_Error_t SM_sha256_start(void)
Starts SHA-256 computation.
Definition: sm_crypto_mcu.c:614
SM_genRandomBytes
SM_Crypto_Error_t SM_genRandomBytes(uint8_t *bytes, uint32_t size)
Generates random bytes.
Definition: sm_crypto_mcu.c:187
SM_Crypto_Error_t
SM_Crypto_Error_t
Error codes for SM cryptographic operations.
Definition: sm_crypto.h:68
SM_Crypto_Error
@ SM_Crypto_Error
Definition: sm_crypto.h:70
SM_Crypto_HW_Error
@ SM_Crypto_HW_Error
Definition: sm_crypto.h:71
SM_Crypto_OK
@ SM_Crypto_OK
Definition: sm_crypto.h:69
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto_mcu.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
sm_crypto_mcu.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef _SM_CRYPTO_MCU_H_
21#define _SM_CRYPTO_MCU_H_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31/* Includes ------------------------------------------------------------------*/
32#include "sm_crypto.h"
33#if defined(STM32U545xx) || defined(STM32U585xx)
34#include "stm32u5xx_hal.h"
35#elif defined(STM32U385xx)
36#include "stm32u3xx_hal.h"
37#elif defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
38#include "stm32wbaxx_hal.h"
39#else
40#error "product not supported"
41#endif
42
46/* Exported constants --------------------------------------------------------*/
51#define MAX_FIXED_INFO_SIZE ((uint32_t)256)
57/* Exported functions ------------------------------------------------------- */
58
67 SM_Crypto_Error_t SM_initCryptoMCU(RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp);
74#ifdef __cplusplus
75}
76#endif
77
78#endif // _SM_CRYPTO_MCU_H_
79/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
SM_Crypto_Error_t
SM_Crypto_Error_t
Error codes for SM cryptographic operations.
Definition: sm_crypto.h:68
SM_initCryptoMCU
SM_Crypto_Error_t SM_initCryptoMCU(RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp)
Initializes cryptographic hardware modules for MCU.
Definition: sm_crypto_mcu.c:166
sm_crypto.h
: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/sm_crypto_stsafe.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
sm_crypto_stsafe.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef _SM_CRYPTO_STSAFE_H_
22#define _SM_CRYPTO_STSAFE_H_
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32/* Includes ------------------------------------------------------------------*/
33#include "sm_crypto.h"
34#if defined(STM32U585xx)
35#include "stm32u5xx_hal.h"
36#elif defined(STM32WBA52xx) || defined(STM32WBA65xx)
37#include "stm32wbaxx_hal.h"
38#else
39#error "product not supported"
40#endif
41#include "stselib.h"
42
46/* Exported functions ------------------------------------------------------- */
47
53 SM_Crypto_Error_t SM_initCryptoStSafe(uint8_t *pairingdone);
62#ifdef __cplusplus
63}
64#endif
65
66#endif // _SM_CRYPTO_STSAFE_H_
67/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
SM_Crypto_Error_t
SM_Crypto_Error_t
Error codes for SM cryptographic operations.
Definition: sm_crypto.h:68
SM_initCryptoStSafe
SM_Crypto_Error_t SM_initCryptoStSafe(uint8_t *pairingdone)
Initializes cryptographic operations using STSAFE.
sm_crypto.h
: Header for sm_crypto.c file. This file provides the interface for SM cryptographic operations.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/stepup_mgr.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
stepup_mgr.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef __STEPUP_MGR_H
22#define __STEPUP_MGR_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32/* Includes ------------------------------------------------------------------*/
33#include "ACWG_Security.h"
34#include "stdbool.h"
35
39/* Exported types ------------------------------------------------------------*/
40//typedef struct _access_mngr_data
41//{
42// uint8_t access_credential_PuBK_last[64];
43//}
44//access_mngr_data_t;
45//
46//extern access_mngr_data_t access_mngr_data;
54/* Exported constants --------------------------------------------------------*/
62/* Exported macro ------------------------------------------------------------*/
70/* Private defines -----------------------------------------------------------*/
78/* Exported functions prototypes ---------------------------------------------*/
79
87uint8_t stepup_request(ACWG_SessionContext_t *acwgctx, uint8_t *stringAccElem, uint32_t AccElemLen, uint8_t *stringRevElem, uint32_t RevElemLen, uint8_t *buf, uint32_t *len);
88
95uint8_t stepup_pushdata(uint8_t *buf, uint32_t len);
96
102uint8_t stepup_process(ACWG_SessionContext_t *acwgctx);
103
109uint8_t stepup_CheckEndpointPubK(uint8_t *endp_PubK);
118#ifdef __cplusplus
119}
120#endif
121
122#endif /* __STEPUP_MGR_H */
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
stepup_request
uint8_t stepup_request(ACWG_SessionContext_t *acwgctx, uint8_t *stringAccElem, uint32_t AccElemLen, uint8_t *stringRevElem, uint32_t RevElemLen, uint8_t *buf, uint32_t *len)
Requests a step-up operation.
stepup_pushdata
uint8_t stepup_pushdata(uint8_t *buf, uint32_t len)
Pushes step-up data to the buffer.
stepup_CheckEndpointPubK
uint8_t stepup_CheckEndpointPubK(uint8_t *endp_PubK)
Checks the endpoint public key for step-up.
stepup_process
uint8_t stepup_process(ACWG_SessionContext_t *acwgctx)
Processes the step-up operation.
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/tlv.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
tlv.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef _TLV_H_
22#define _TLV_H_
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32/* Includes ------------------------------------------------------------------*/
33#include <stdint.h>
34
35
39/* Exported types ------------------------------------------------------------*/
44typedef struct {
45 uint8_t tag;
46 uint8_t *value;
47 uint32_t length;
48} tlv_t;
49
50
55typedef enum {
56 TLV_SUCCESS,
57 TLV_ERROR_SHORT_PAYLOAD,
58 TLV_ERROR_INVALID_LENGTH,
59 TLV_ERROR_SHORT_BUFFER,
60 TLV_ERROR_TAG_NOT_FOUND
61} tlvStatus_t;
70/* Exported functions ------------------------------------------------------- */
78 tlvStatus_t getOneTlv(uint8_t **tlvBuf, uint32_t *tlvLength, tlv_t *tlv);
79
87 tlvStatus_t appendTLV(uint8_t **inputBuffer, uint32_t *inputBufferLen, const tlv_t *tlv);
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* _TLV_H_ */
101/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
appendTLV
tlvStatus_t appendTLV(uint8_t **inputBuffer, uint32_t *inputBufferLen, const tlv_t *tlv)
Appends a TLV element to a buffer.
getOneTlv
tlvStatus_t getOneTlv(uint8_t **tlvBuf, uint32_t *tlvLength, tlv_t *tlv)
Extracts one TLV element from a buffer.
tlvStatus_t
tlvStatus_t
Status codes for TLV operations.
Definition: tlv.h:55
TLV_SUCCESS
@ TLV_SUCCESS
Definition: tlv.h:56
TLV_ERROR_INVALID_LENGTH
@ TLV_ERROR_INVALID_LENGTH
Definition: tlv.h:58
TLV_ERROR_TAG_NOT_FOUND
@ TLV_ERROR_TAG_NOT_FOUND
Definition: tlv.h:60
TLV_ERROR_SHORT_PAYLOAD
@ TLV_ERROR_SHORT_PAYLOAD
Definition: tlv.h:57
TLV_ERROR_SHORT_BUFFER
@ TLV_ERROR_SHORT_BUFFER
Definition: tlv.h:59
tlv_t
Structure representing a TLV (Tag-Length-Value) element.
Definition: tlv.h:44
tlv_t::tag
uint8_t tag
Definition: tlv.h:45
tlv_t::value
uint8_t * value
Definition: tlv.h:46
tlv_t::length
uint32_t length
Definition: tlv.h:47
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4


X-CUBE-ALIRO: C:/myCode/TruELock/X_CUBE_ALIRO_2/Firmware/Projects/Common/Aliro/Inc/tlwrapper.h Source File

  • File List
  • Globals
  • Projects
  • Common
  • Aliro
  • Inc
tlwrapper.h
Go to the documentation of this file.
1
20/* Define to prevent recursive inclusion -------------------------------------*/
21#ifndef __TLWRAPPER_H
22#define __TLWRAPPER_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "ACWG_Security.h"
30#include "stdbool.h"
31#include "custom_uwb.h"
32
33/* Exported types ------------------------------------------------------------*/
34
47typedef enum _tlw_error
48{
49 TLW_ERROR_NONE = 0,
50 TLW_NEW_OUTPUT,
51 TLW_NO_PREPARE_NEEDED,
52 TLW_ERROR_FAST,
53 TLW_NEED_GET_RESPONSE,
54 TLW_NEED_AUTH1,
55 TLW_NEED_LOAD_CERT,
56 TLW_BUSY,
57 TLW_FAIL_GENERATE,
58 TLW_FAIL_PROCESS,
59 TLW_FAIL_GENERIC,
60 TLW_FAIL_TIMEOUT,
61 TLW_END
62}
63tlw_error_e;
64
85typedef enum _tlw_state_nfc
86{
87 TLW_STATE_NFC_PREPARE_SELECT = 0,
88 TLW_STATE_NFC_PROCESS_SELECT,
89 TLW_STATE_NFC_PREPARE_AUTH0,
90 TLW_STATE_NFC_PROCESS_AUTH0,
91 TLW_STATE_NFC_PREPARE_LOAD_CERT,
92 TLW_STATE_NFC_PROCESS_LOAD_CERT,
93 TLW_STATE_NFC_PREPARE_AUTH1,
94 TLW_STATE_NFC_PROCESS_AUTH1,
95 TLW_STATE_NFC_PREPARE_AUTH1_CHAINED,
96 TLW_STATE_NFC_PROCESS_AUTH1_CHAINED,
97 TLW_STATE_NFC_PREPARE_SELECT_STEPUP,
98 TLW_STATE_NFC_PROCESS_SELECT_STEPUP,
99 TLW_STATE_NFC_PREPARE_STEPUP,
100 TLW_STATE_NFC_PROCESS_STEPUP,
101 TLW_STATE_NFC_PREPARE_GET_RESPONSE,
102 TLW_STATE_NFC_PREPARE_EXCHANGE,
103 TLW_STATE_NFC_PROCESS_EXCHANGE,
104
105 TLW_STATE_NFC_PREPARE_CONTROL_FLOW,
106 TLW_STATE_NFC_PROCESS_CONTROL_FLOW,
107
108 TLW_STATE_NFC_PREPARE_READER_STATUS_EXCHANGE,
109 TLW_STATE_NFC_PROCESS_READER_STATUS_EXCHANGE,
110 TLW_STATE_NFC_ERROR,
111 TLW_STATE_NFC_END
112}
113tlw_state_nfc_e;
114
135typedef enum _tlw_state_ble
136{
137 TLW_STATE_BLE_PREPARE_SELECT = 0,
138 TLW_STATE_BLE_PROCESS_SELECT,
139 TLW_STATE_BLE_PREPARE_AUTH0,
140 TLW_STATE_BLE_PROCESS_AUTH0,
141 TLW_STATE_BLE_PREPARE_LOAD_CERT,
142 TLW_STATE_BLE_PROCESS_LOAD_CERT,
143 TLW_STATE_BLE_PREPARE_AUTH1,
144 TLW_STATE_BLE_PROCESS_AUTH1,
145
146 TLW_STATE_BLE_PREPARE_STEPUP,
147 TLW_STATE_BLE_PROCESS_STEPUP,
148 TLW_STATE_BLE_PREPARE_GET_RESPONSE,
149
150 TLW_STATE_BLE_PREPARE_EXCHANGE,
151 TLW_STATE_BLE_PROCESS_EXCHANGE,
152 TLW_STATE_BLE_PREPARE_AP_COMPLETED,
153 TLW_STATE_BLE_PROCESS_AP_COMPLETED,
154
155 TLW_STATE_BLE_PROCESS_TIME_SYNC,
156 TLW_STATE_BLE_PROCESS_INITIATE_RANGING_SESSION,
157 TLW_STATE_BLE_PREPARE_M1,
158 TLW_STATE_BLE_PROCESS_M2,
159 TLW_STATE_BLE_PREPARE_M3,
160 TLW_STATE_BLE_PROCESS_M4,
161
162 // Reader initiated suspension
163 TLW_STATE_BLE_PREPARE_SUSPEND_RQU,
164 TLW_STATE_BLE_PROCESS_SUSPEND_RSP,
165
166 // Device initiated suspension
167 TLW_STATE_BLE_PREPARE_SUSPEND_RSP,
168 TLW_STATE_BLE_PROCESS_SUSPEND,
169
170 // Reader impose suspension
171 TLW_STATE_BLE_PREPARE_EVENT_RANGING_SUSPENDED,
172 // Device impose suspension
173 TLW_STATE_BLE_PROCESS_EVENT_RANGING_SUSPENDED,
174
175
176 // Device trigger resumption
177 TLW_STATE_BLE_PROCESS_EVENT_RANGING_RESUME,
178 TLW_STATE_BLE_PROCESS_RESUME_RSP,
179
180
181 TLW_STATE_BLE_PREPARE_RANGING,
182 TLW_STATE_BLE_EXECUTE_RANGING,
183 TLW_STATE_BLE_HANDLE_SUSPEND,
184 TLW_STATE_BLE_HANDLE_RESUME,
185 // Reader initiated resumption
186 TLW_STATE_BLE_PREPARE_RESUME_RQU,
187 TLW_STATE_BLE_HANDLE_DOOR_LOCK_OPERATION,
188
189 TLW_STATE_BLE_PREPARE_READER_STATUS_EXCHANGE,
190 TLW_STATE_BLE_PROCESS_READER_STATUS_EXCHANGE,
191
192 TLW_STATE_BLE_PREPARE_NOTIFICATION_EVENT_ERR,
193
194 TLW_STATE_BLE_ERROR,
195 TLW_STATE_BLE_END
196}
197tlw_state_ble_e;
198
219typedef struct _tlwrapper_SM_nfc
220{
221 uint8_t flags_nfc;
222 tlw_state_nfc_e state;
223 ACWG_SessionContext_t *ctx;
224 uint8_t *input;
225 uint16_t *input_len;
226 uint8_t output[512];
227 uint16_t output_len;
228 ACWG_Status_t (*callback)(ACWG_SessionContext_t *ctx);
229}
230 tlw_SM_nfc_t;
231
252typedef enum _General_Error_Attribute_ID
253{
254 GENERAL_UNKNOWN_ERROR = 0U,
255 GENERAL_RESOURCE_UNAVAILABLE = 1U,
256 GENERAL_WRONG_PARAMETERS = 2U,
257 GENERAL_URSK_UNAVAILABLE = 3U
258}
259General_Error_Attribute_ID_e;
280typedef struct _tlwrapper_SM_ble
281{
282 bool isBleOnly;
283 General_Error_Attribute_ID_e general_error_ble;
284 uint8_t flags_ble;
285 tlw_state_ble_e state;
286 ACWG_SessionContext_t *ctx;
287 uint8_t *input;
288 uint16_t *input_len;
289 uint8_t output[300];
290 uint16_t output_len;
291 ACWG_Status_t (*callback)(ACWG_SessionContext_t *ctx);
292 uint8_t (*sendData)(uint8_t *buff, uint16_t len);
293 uint8_t (*disconnect)(void);
294}
295 tlw_SM_ble_t;
296
317typedef struct _access_mngr_data
318{
319 uint8_t access_credential_PuBK_last[64];
320}
321 access_mngr_data_t;
322
331/* Exported variables --------------------------------------------------------*/
332
344extern tlw_SM_nfc_t nfc_SM;
345
366extern tlw_SM_ble_t ble_SM;
367
387extern access_mngr_data_t access_mngr_data;
388
398/* Exported functions prototypes ---------------------------------------------*/
399
413tlw_error_e tlw_init_nfc(ACWG_SessionContext_t *ctx);
414
420tlw_error_e tlw_reload_nfc(ACWG_SessionContext_t *ctx);
421
426tlw_error_e tlw_prepare_nfc(void);
427
432tlw_error_e tlw_process_nfc(void);
433
455tlw_error_e tlw_init_ble(ACWG_SessionContext_t *ctx);
456
462tlw_error_e tlw_reload_ble(ACWG_SessionContext_t *ctx);
463
468tlw_error_e tlw_prepare_ble(void);
469
474tlw_error_e tlw_process_ble(void);
475
483tlw_error_e tlw_ble_receivedData(uint8_t *data, uint8_t *len, uint8_t (*sendData_fn)(uint8_t *, uint16_t));
484
489tlw_error_e tlw_ble_SM_step(void);
490
495uint32_t getUwbSessionId( void );
496
518uint8_t tlw_CheckEndpointKey(ACWG_SessionContext_t *ctx);
519
524uint8_t* tlw_GetLastEndpointKey(void);
525
530void tlw_SetAccessElementString(uint8_t *AccElmStr);
531
536uint8_t *tlw_GetAccessElementString(void);
537
546#ifdef __cplusplus
547}
548#endif
549
550#endif /* __TLWRAPPER_H */
ACWG_Security.h
: Header for ACWG_Security.c file. This file contains the public declarations for the ACWG Security m...
custom_uwb.h
: Header for custom_uwb.c file. This file contains the public declarations for the custom UWB functio...
ACWG_Status_t
enum ACWG_Status ACWG_Status_t
Status codes for ACWG Security operations.
tlw_ble_receivedData
tlw_error_e tlw_ble_receivedData(uint8_t *data, uint8_t *len, uint8_t(*sendData_fn)(uint8_t *, uint16_t))
Handles received BLE data and sends response.
tlw_ble_SM_step
tlw_error_e tlw_ble_SM_step(void)
Steps the BLE state machine.
tlw_process_ble
tlw_error_e tlw_process_ble(void)
Processes the BLE state machine.
tlw_init_ble
tlw_error_e tlw_init_ble(ACWG_SessionContext_t *ctx)
Initializes the BLE state machine.
getUwbSessionId
uint32_t getUwbSessionId(void)
Gets the current UWB session ID.
tlw_reload_ble
tlw_error_e tlw_reload_ble(ACWG_SessionContext_t *ctx)
Reloads the BLE state machine.
tlw_prepare_ble
tlw_error_e tlw_prepare_ble(void)
Prepares the BLE state machine for operation.
ble_SM
tlw_SM_ble_t ble_SM
Global BLE state machine context.
tlw_init_nfc
tlw_error_e tlw_init_nfc(ACWG_SessionContext_t *ctx)
Initializes the NFC state machine.
tlw_prepare_nfc
tlw_error_e tlw_prepare_nfc(void)
Prepares the NFC state machine for operation.
tlw_process_nfc
tlw_error_e tlw_process_nfc(void)
Processes the NFC state machine.
tlw_reload_nfc
tlw_error_e tlw_reload_nfc(ACWG_SessionContext_t *ctx)
Reloads the NFC state machine.
nfc_SM
tlw_SM_nfc_t nfc_SM
Global NFC state machine context.
tlw_GetAccessElementString
uint8_t * tlw_GetAccessElementString(void)
Gets the access element string.
tlw_CheckEndpointKey
uint8_t tlw_CheckEndpointKey(ACWG_SessionContext_t *ctx)
Checks the endpoint public key.
tlw_SetAccessElementString
void tlw_SetAccessElementString(uint8_t *AccElmStr)
Sets the access element string.
tlw_GetLastEndpointKey
uint8_t * tlw_GetLastEndpointKey(void)
Gets the last endpoint public key.
_tlw_error
_tlw_error
Definition: tlwrapper.h:48
TLW_FAIL_TIMEOUT
@ TLW_FAIL_TIMEOUT
Definition: tlwrapper.h:60
TLW_NO_PREPARE_NEEDED
@ TLW_NO_PREPARE_NEEDED
Definition: tlwrapper.h:51
TLW_FAIL_GENERATE
@ TLW_FAIL_GENERATE
Definition: tlwrapper.h:57
TLW_FAIL_GENERIC
@ TLW_FAIL_GENERIC
Definition: tlwrapper.h:59
TLW_ERROR_FAST
@ TLW_ERROR_FAST
Definition: tlwrapper.h:52
TLW_NEW_OUTPUT
@ TLW_NEW_OUTPUT
Definition: tlwrapper.h:50
TLW_END
@ TLW_END
Definition: tlwrapper.h:61
TLW_NEED_AUTH1
@ TLW_NEED_AUTH1
Definition: tlwrapper.h:54
TLW_ERROR_NONE
@ TLW_ERROR_NONE
Definition: tlwrapper.h:49
TLW_NEED_GET_RESPONSE
@ TLW_NEED_GET_RESPONSE
Definition: tlwrapper.h:53
TLW_FAIL_PROCESS
@ TLW_FAIL_PROCESS
Definition: tlwrapper.h:58
TLW_BUSY
@ TLW_BUSY
Definition: tlwrapper.h:56
TLW_NEED_LOAD_CERT
@ TLW_NEED_LOAD_CERT
Definition: tlwrapper.h:55
access_mngr_data
access_mngr_data_t access_mngr_data
Global access manager data.
_access_mngr_data
Definition: tlwrapper.h:318
_tlwrapper_SM_ble
Definition: tlwrapper.h:281
_tlwrapper_SM_nfc
Definition: tlwrapper.h:220
ACWG_SessionContext
Session context for ACWG Security operations.
Definition: ACWG_Security.h:451
access_mngr_data_t
Structure for access manager data.
tlw_SM_ble_t
Structure for BLE state machine context in TLWrapper.
tlw_SM_nfc_t
Structure for NFC state machine context in TLWrapper.
Generated on Wed Feb 18 2026 18:15:45 for X-CUBE-ALIRO by doxygen 1.9.4