30#define YKYH_INS_PUT 0x01
31#define YKYH_INS_DELETE 0x02
32#define YKYH_INS_CALCULATE 0x03
33#define YKYH_INS_GET_CHALLENGE 0x04
34#define YKYH_INS_LIST 0x05
35#define YKYH_INS_RESET 0x06
36#define YKYH_INS_GET_VERSION 0x07
39#define YKYH_P1_RESET 0xde
42#define YKYH_P2_RESET 0xad
45#define YKYH_TAG_NAME 0x71
46#define YKYH_TAG_NAME_LIST 0x72
47#define YKYH_TAG_PW 0x73
48#define YKYH_TAG_ALGO 0x74
49#define YKYH_TAG_KEY_ENC 0x75
50#define YKYH_TAG_KEY_MAC 0x76
51#define YKYH_TAG_CONTEXT 0x77
52#define YKYH_TAG_RESPONSE 0x78
53#define YKYH_TAG_VERSION 0x79
54#define YKYH_TAG_TOUCH 0x7a
57#define YKYH_SCP03_ALGO 38
58#define YKYH_SCP11_ALGO 39
60#define SW_SUCCESS 0x9000
61#define SW_ERR_AUTHENTICATION_FAILED 0x63c0
64#define YKYH_MIN_NAME_LEN 1
65#define YKYH_MAX_NAME_LEN 64
66#define YKYH_KEY_LEN 16
68#define YKYH_CONTEXT_LEN 16
71#define YKYH_DEFAULT_SALT "Yubico"
72#define YKYH_DEFAULT_ITERS 10000
104 size_t key_enc_len,
const uint8_t *key_mac,
size_t key_mac_len,
105 const char *pw,
const uint8_t touch_policy);
109 size_t context_len,
const char *pw,
uint8_t *key_s_enc,
110 size_t key_s_enc_len,
uint8_t *key_s_mac,
111 size_t key_s_mac_len,
uint8_t *key_s_rmac,
112 size_t key_s_rmac_len,
uint8_t *retries);
ykyh_rc ykyh_put(ykyh_state *state, const char *name, const uint8_t *key_enc, size_t key_enc_len, const uint8_t *key_mac, size_t key_mac_len, const char *pw, const uint8_t touch_policy)
ykyh_rc ykyh_get_version(ykyh_state *state, char *version, size_t len)
const char * ykyh_strerror(ykyh_rc err)
ykyh_rc ykyh_get_challenge(ykyh_state *state)
ykyh_rc ykyh_done(ykyh_state *state)
ykyh_rc ykyh_connect(ykyh_state *state, const char *wanted)
ykyh_rc ykyh_list_keys(ykyh_state *state, ykyh_list_entry *list, size_t *list_items)
ykyh_rc ykyh_reset(ykyh_state *state)
ykyh_rc ykyh_list_readers(ykyh_state *state, char *readers, size_t *len)
ykyh_rc ykyh_init(ykyh_state **state, int verbose)
#define YKYH_MAX_NAME_LEN
ykyh_rc ykyh_delete(ykyh_state *state, char *name)
const char * ykyh_strerror_name(ykyh_rc err)
ykyh_rc ykyh_calculate(ykyh_state *state, const char *name, uint8_t *context, size_t context_len, const char *pw, uint8_t *key_s_enc, size_t key_s_enc_len, uint8_t *key_s_mac, size_t key_s_mac_len, uint8_t *key_s_rmac, size_t key_s_rmac_len, uint8_t *retries)
ykyh_rc ykyh_disconnect(ykyh_state *state)