From: Klas Lindfors Date: Thu, 29 Nov 2012 07:41:18 +0000 (+0100) Subject: updated ykdef.h for 3.0 (neo) X-Git-Tag: v1.10.0~26 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7b4d81a485b9a9269fcb7873a230efc74daa002;p=yubikey-personalization updated ykdef.h for 3.0 (neo) --- diff --git a/ykcore/ykdef.h b/ykcore/ykdef.h index 5e0cbb6..28d1b3b 100644 --- a/ykcore/ykdef.h +++ b/ykcore/ykdef.h @@ -12,6 +12,7 @@ ** 10-05-01 / 2.2.0 / J E / Added support for 2.2 ext. + frame ** ** 11-04-15 / 2.3.0 / J E / Added support for 2.3 extensions ** ** 11-12-05 / 2.4.0 / J E / Added support for NFC and NDEF ** +** 12-10-28 / 3.0.0 / J E / NEO changes ** ** ** *****************************************************************************************/ @@ -23,12 +24,6 @@ #pragma pack(push, 1) #endif -/* USB Identity */ - -#define YUBICO_VID 0x1050 -#define YUBIKEY_PID 0x0010 -#define YUBIKEY_NEO_PID 0x0110 - /* Slot entries */ #define SLOT_CONFIG 1 /* First (default / V1) configuration */ @@ -41,6 +36,8 @@ #define SLOT_NDEF2 9 /* Write NDEF record for slot 2 */ #define SLOT_DEVICE_SERIAL 0x10 /* Device serial number */ +#define SLOT_DEVICE_CONFIG 0x11 /* Write device configuration record */ +#define SLOT_SCAN_MAP 0x12 /* Write scancode map */ #define SLOT_CHAL_OTP1 0x20 /* Write 6 byte challenge to slot 1, get Yubico OTP response */ #define SLOT_CHAL_OTP2 0x28 /* Write 6 byte challenge to slot 2, get Yubico OTP response */ @@ -214,6 +211,28 @@ struct nav_st { #define NAVFLAG_APPEND_TKT 0x02 /* Append ticket to URL */ #define NAVFLAG_DUAL_KEY_USAGE 0x04 /* Dual usage of key: Short = ticket Long = Navigate */ +/* Device configuration block (version 3.0) */ + +struct device_st { + unsigned char mode; /* Device mode */ + unsigned char crTimeout; /* Challenge-response timeout in seconds */ + unsigned short autoEject; /* Auto eject time in x10 seconds */ +}; + +#define MODE_OTP 0x00 /* OTP only */ +#define MODE_CCID 0x01 /* CCID only, no eject */ +#define MODE_OTP_CCID 0x02 /* OTP + CCID composite */ +#define MODE_MASK 0x0f /* Mask for mode bits */ + +#define MODE_FLAG_EJECT 0x10 /* CCID device supports eject (mode 1 only) */ + +#define DEFAULT_CHAL_TIMEOUT 15 /* Default challenge timeout in seconds */ + +/* Scancode mapping (version 3.0) */ + +#define SCAN_MAP "cbdefghijklnrtuvCBDEFGHIJKLNRTUV0123456789\t\r" +#define SHIFT_FLAG 0x80 /* Flag for shifted scan codes */ + /* Status block */ struct status_st { @@ -231,6 +250,20 @@ struct status_st { #define MODHEX_MAP "cbdefghijklnrtuv" +/* USB vendor ID (VID) and product ID (PID) mapping */ + +#define YUBICO_VID 0x1050 /* Global vendor ID */ +#define YUBIKEY_PID 0x0010 /* Yubikey (version 1 and 2) */ +#define NEO_OTP_PID 0x0110 /* Yubikey NEO - OTP only */ +#define NEO_OTP_CCID_PID 0x0111 // Yubikey NEO - OTP and CCID +/* USB Identity */ + +#define YUBICO_VID 0x1050 +#define YUBIKEY_PID 0x0010 +#define YUBIKEY_NEO_PID 0x0110 + +#define NEO_CCID_PID 0x0112 // Yubikey NEO - CCID only + #if defined(_WIN32) || defined(__GNUC__) #pragma pack(pop) #endif