CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
t1_state_t Struct Reference

Card-side T=1 state. Embedded entirely in caller-provided storage. More...

#include <t1_state.h>

Public Attributes

uint8_t ns_send
uint8_t ns_expected
uint16_t ifsc
uint16_t ifsd
bool use_crc
uint8_t apdu_buf [4096]
size_t apdu_len
bool apdu_in_progress
uint8_t resp_buf [4096]
size_t resp_len
size_t resp_sent
bool resp_pending
uint8_t control_block [254+5]
size_t control_len

Detailed Description

Card-side T=1 state. Embedded entirely in caller-provided storage.

Definition at line 44 of file t1_state.h.

Member Data Documentation

◆ apdu_buf

uint8_t t1_state_t::apdu_buf[4096]

Definition at line 57 of file t1_state.h.

Referenced by handle_iblock().

◆ apdu_in_progress

bool t1_state_t::apdu_in_progress

Definition at line 59 of file t1_state.h.

Referenced by handle_iblock(), and handle_sblock().

◆ apdu_len

size_t t1_state_t::apdu_len

Definition at line 58 of file t1_state.h.

Referenced by handle_iblock(), and handle_sblock().

◆ control_block

uint8_t t1_state_t::control_block[254+5]

Definition at line 68 of file t1_state.h.

Referenced by encode_rblock(), encode_sblock_response(), and t1_state_next_outbound().

◆ control_len

size_t t1_state_t::control_len

Definition at line 69 of file t1_state.h.

Referenced by encode_rblock(), encode_sblock_response(), and t1_state_next_outbound().

◆ ifsc

uint16_t t1_state_t::ifsc

Max INF length we can RECEIVE. Initialised to T1_DEFAULT_IFSC.

Definition at line 50 of file t1_state.h.

Referenced by t1_state_init().

◆ ifsd

uint16_t t1_state_t::ifsd

Max INF length the READER can RECEIVE. Initialised to T1_DEFAULT_IFSC.

Definition at line 51 of file t1_state.h.

Referenced by handle_sblock(), t1_state_init(), and t1_state_next_outbound().

◆ ns_expected

uint8_t t1_state_t::ns_expected

N(S) we expect on the next incoming I-block.

Definition at line 47 of file t1_state.h.

Referenced by handle_iblock(), handle_rblock(), handle_sblock(), and t1_state_init().

◆ ns_send

uint8_t t1_state_t::ns_send

Next N(S) we will set on outgoing I-block.

Definition at line 46 of file t1_state.h.

Referenced by handle_rblock(), handle_sblock(), t1_state_init(), and t1_state_next_outbound().

◆ resp_buf

uint8_t t1_state_t::resp_buf[4096]

Definition at line 62 of file t1_state.h.

Referenced by t1_state_next_outbound(), and t1_state_queue_response().

◆ resp_len

size_t t1_state_t::resp_len

Definition at line 63 of file t1_state.h.

Referenced by handle_sblock(), t1_state_next_outbound(), and t1_state_queue_response().

◆ resp_pending

bool t1_state_t::resp_pending

◆ resp_sent

size_t t1_state_t::resp_sent

Definition at line 64 of file t1_state.h.

Referenced by handle_sblock(), t1_state_next_outbound(), and t1_state_queue_response().

◆ use_crc

bool t1_state_t::use_crc

The documentation for this struct was generated from the following file:
  • components/mod_gpg/include/mod_gpg/openpgp/t1/t1_state.h