hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
APDU Protocol Library

‍Protocol Stack Extension for APDU Exchange

This library is built on top of the generic hsw-protocol library and offers an extended interface for exchanging APDUs.

It can be used on top of any existing ifx_protocol_t stack to better fit the needs of interacting with secure elements.

Example

// Protocol can be populated by any concrete implementation
ifx_protocol_t protocol;
// Build and exchange APDUs
ifx_apdu_t apdu = {
.cla = 0x00u,
.ins = 0xA4u,
.p1 = 0x04u,
.p2 = 0x00u,
.lc = 0u,
.data = NULL,
.le = 0u
};
ifx_apdu_protocol_transceive(&protocol, &apdu, &response);
// Verify response
if (response.sw != 0x9000u)
{
// Handle error
}
Generic protocol API for exchanging APDUs with secure elements.
APDU (response) en-/decoding utility.
Generic protocol API (ISO/OSI stack).
Data storage struct for APDU response information.
Definition ifx-apdu.h:130
uint16_t sw
APDU response status word.
Definition ifx-apdu.h:144
Data storage for APDU fields.
Definition ifx-apdu.h:89
uint8_t cla
APDU instruction class.
Definition ifx-apdu.h:93