18#define U2F_INS_REGISTER 0x01
19#define U2F_INS_AUTHENTICATE 0x02
20#define U2F_INS_VERSION 0x03
23#define U2F_AUTH_CHECK_ONLY 0x07
24#define U2F_AUTH_ENFORCE 0x03
25#define U2F_AUTH_DONT_ENFORCE 0x08
28#define U2F_SW_NO_ERROR 0x9000
29#define U2F_SW_CONDITIONS_NOT_SATISFIED 0x6985
30#define U2F_SW_WRONG_DATA 0x6A80
31#define U2F_SW_WRONG_LENGTH 0x6700
32#define U2F_SW_CLA_NOT_SUPPORTED 0x6E00
33#define U2F_SW_INS_NOT_SUPPORTED 0x6D00
34#define U2F_SW_WRONG_P1P2 0x6B00
35#define U2F_SW_WTF 0x6F00
38#define U2F_CHALLENGE_SIZE 32
39#define U2F_APPLICATION_SIZE 32
40#define U2F_KEY_HANDLE_SIZE 64
41#define U2F_REGISTER_ID 0x05
42#define U2F_EC_POINT_SIZE 65
43#define U2F_EC_KEY_SIZE 32
44#define U2F_MAX_ATT_CERT_SIZE 1024
45#define U2F_MAX_EC_SIG_SIZE 72
82 uint8_t *signature, uint8_t *sig_len);
94 uint8_t *response, uint16_t response_max);
bool u2f_init_attestation(void)
Initializes attestation key material and builds self-signed attestation certificate.
bool u2f_get_attestation_cert(const uint8_t **cert, uint16_t *cert_len)
Returns attestation certificate pointer and length, initializing attestation on demand if the boot-ti...
uint16_t u2f_process_apdu(const uint8_t *apdu, uint16_t apdu_len, uint8_t *response, uint16_t response_max)
Parses U2F APDU and dispatches to instruction handlers.
bool u2f_attestation_sign(const uint8_t *data, size_t data_len, uint8_t *signature, uint8_t *sig_len)
Signs payload using the attestation key, initializing attestation on demand if the boot-time init did...