modules/woz_aliro/include/aliro_device_apdu.h
openaliro/openaliro
Module

aliro_device_apdu.h

Device (User-Device) side of the Aliro Access-Protocol wire codec: the inverse…

modules/woz_aliro/include/aliro_device_apdu.h3 documented symbols

Overview

Device (User-Device) side of the Aliro Access-Protocol wire codec: the inverse of aliro_apdu.c. Where aliro_apdu builds reader commands and parses device responses, this parses the reader's AUTH0/AUTH1/EXCHANGE commands and builds the device's AUTH0/AUTH1/EXCHANGE responses. Pure byte manipulation, no crypto and no platform dependency, so it is host-KAT verifiable against the reader's own builders/parsers (round-trip) and the recovered layouts.

depends on aliro_apdu.h  ·  used by aliro_device.h aliro_device_apdu.c

API

Cstruct aliro_auth0_command

modules/woz_aliro/include/aliro_device_apdu.h:32

Fields parsed from an AUTH0Command TLV. All are mandatory on the wire.

Cstruct aliro_auth1_command

modules/woz_aliro/include/aliro_device_apdu.h:42

Fields parsed from an AUTH1Command TLV.

Cstruct aliro_exchange_command

modules/woz_aliro/include/aliro_device_apdu.h:48

Fields parsed from the DECRYPTED EXCHANGE command plaintext.

Fint aliro_apdu_unwrap(const uint8_t *apdu, size_t len, uint8_t *ins, const uint8_t **data, size_t *data_len)

modules/woz_aliro/include/aliro_device_apdu.h:58

Fint aliro_apdu_append_sw(uint8_t *buf, size_t *len, size_t cap, uint16_t sw)

modules/woz_aliro/include/aliro_device_apdu.h:63

Fint aliro_dev_parse_auth0_cmd(const uint8_t *tlv, size_t len, struct aliro_auth0_command *c)

modules/woz_aliro/include/aliro_device_apdu.h:66

Fint aliro_dev_parse_auth1_cmd(const uint8_t *tlv, size_t len, struct aliro_auth1_command *c)

modules/woz_aliro/include/aliro_device_apdu.h:67

Fint aliro_dev_parse_exchange_cmd(const uint8_t *plain, size_t len, struct aliro_exchange_command *c)

modules/woz_aliro/include/aliro_device_apdu.h:68

Fint aliro_dev_build_auth0_resp(const uint8_t device_eph_pub[65], const uint8_t *cryptogram64, uint8_t *out, size_t cap, size_t *out_len)

modules/woz_aliro/include/aliro_device_apdu.h:76

Fint aliro_dev_build_auth1_resp(const uint8_t device_sig[64], const uint8_t *device_pub65, uint8_t *out, size_t cap, size_t *out_len)

modules/woz_aliro/include/aliro_device_apdu.h:80

Fint aliro_dev_build_exchange_resp(uint16_t error, uint8_t *out, size_t cap, size_t *out_len)

modules/woz_aliro/include/aliro_device_apdu.h:85