LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations
yubikeycommands.hpp File Reference

Yubikey commands. More...

#include <logicalaccess/plugins/cards/iso7816/iso7816commands.hpp>
#include <logicalaccess/plugins/cards/yubikey/lla_cards_yubikey_api.hpp>
#include <logicalaccess/tlv.hpp>
#include <vector>

Go to the source code of this file.

Classes

struct  logicalaccess::s_YubikeySelectResponse
 
struct  logicalaccess::s_YubikeyCalculateResponse
 
struct  logicalaccess::s_YubikeyListItem
 
class  logicalaccess::YubikeyCommands
 The Yubikey commands class. More...
 

Namespaces

namespace  logicalaccess
 

Macros

#define CMD_YUBIKEY   "Yubikey"
 
#define YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_USB   0x01 /* USB Applications and capabilities that are available for use on this YubiKey. */
 
#define YUBIKEY_TLV_DEVINFO_SERIAL_NUMBER   0x02 /* Returns the serial number of the YubiKey (if present and visible). */
 
#define YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_USB   0x03 /* Applications that are currently enabled over USB on this YubiKey. */
 
#define YUBIKEY_TLV_DEVINFO_FORM_FACTOR   0x04 /* Specifies the form factor of the YubiKey (USB-A, USB-C, Nano, etc.) */
 
#define YUBIKEY_TLV_DEVINFO_FIRMWARE_VERSION   0x05 /* The Major.Minor.Patch version number of the firmware running on the YubiKey. */
 
#define YUBIKEY_TLV_DEVINFO_AUTOEJECT_TIMEOUT   0x06 /* Timeout in (ms?) before the YubiKey automatically "ejects" itself. */
 
#define YUBIKEY_TLV_DEVINFO_CHALLENGE_RESPONSE_TIMEOUT   0x07 /* The period of time (in seconds) after which the OTP challenge-response command should timeout. */
 
#define YUBIKEY_TLV_DEVINFO_DEVICE_FLAGS   0x08 /* Device flags that can control device-global behavior. */
 
#define YUBIKEY_TLV_DEVINFO_CONFIGURATION_LOCK   0x0A /* Indicates whether or not the YubiKey's configuration has been locked by the user. */
 
#define YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_NFC   0x0D /* NFC Applications and capabilities that are available for use on this YubiKey. */
 
#define YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_NFC   0x0E /* Applications that are currently enabled over USB on this YubiKey. */
 
#define YUBIKEY_TLV_NAME   0x71
 
#define YUBIKEY_TLV_NAME_LIST   0x72
 
#define YUBIKEY_TLV_KEY   0x73
 
#define YUBIKEY_TLV_CHALLENGE   0x74
 
#define YUBIKEY_TLV_FULL_RESPONSE   0x75
 
#define YUBIKEY_TLV_TRUNCATED_RESPONSE   0x76
 
#define YUBIKEY_TLV_HOTP_RESPONSE   0x77
 
#define YUBIKEY_TLV_PROPERTY   0x78
 
#define YUBIKEY_TLV_VERSION   0x79
 
#define YUBIKEY_TLV_IMF   0x7a
 
#define YUBIKEY_TLV_ALGORITHM   0x7b
 
#define YUBIKEY_TLV_TOUCH_RESPONSE   0x7c
 

Typedefs

typedef struct logicalaccess::s_YubikeySelectResponse logicalaccess::YubikeySelectResponse
 
typedef struct logicalaccess::s_YubikeyCalculateResponse logicalaccess::YubikeyCalculateResponse
 
typedef struct logicalaccess::s_YubikeyListItem logicalaccess::YubikeyListItem
 

Enumerations

enum  logicalaccess::YubikeyHMAC {
  logicalaccess::HMAC_UNKNOWN = 0x00 , logicalaccess::HMAC_SHA1 = 0x01 , logicalaccess::HMAC_SHA256 = 0x02 , logicalaccess::HMAC_SHA512 = 0x03 ,
  logicalaccess::HMAC_TYPE_HOTP = 0x10 , logicalaccess::HMAC_TYPE_TOTP = 0x20
}
 The HMAC algorithm. More...
 
enum  logicalaccess::YubikeyProperty { logicalaccess::PROP_NONE = 0x00 , logicalaccess::PROP_ONLY_INCREASE = 0x01 , logicalaccess::PROP_REQUIRE_TOUCH = 0x02 }
 Yubikey properties. More...
 
enum  logicalaccess::YubikeySlot {
  logicalaccess::SLOT_DUMMY = 0x00 , logicalaccess::SLOT_CONFIG_1 = 0x01 , logicalaccess::SLOT_NAV = 0x02 , logicalaccess::SLOT_CONFIG_2 = 0x03 ,
  logicalaccess::SLOT_UPDATE_1 = 0x04 , logicalaccess::SLOT_UPDATE_2 = 0x05 , logicalaccess::SLOT_SWAP = 0x06 , logicalaccess::SLOT_NDEF_1 = 0x08 ,
  logicalaccess::SLOT_NDEF_2 = 0x09 , logicalaccess::SLOT_DEVICE_SERIAL = 0x10 , logicalaccess::SLOT_DEVICE_CONFIGURATION = 0x11 , logicalaccess::SLOT_SCAN_MAP = 0x12 ,
  logicalaccess::SLOT_YUBIKEY_4_CAPABILITIES = 0x13 , logicalaccess::SLOT_CHALLENGE_OTP_1 = 0x20 , logicalaccess::SLOT_CHALLENGE_OTP_2 = 0x28 , logicalaccess::SLOT_CHALLENGE_HMAC_1 = 0x30 ,
  logicalaccess::SLOT_CHALLENGE_HMAC_2 = 0x38
}
 Yubikey slot. Only used for the old slot-based Yubikey API. More...
 

Detailed Description

Yubikey commands.

Author
Maxime C. maxim.nosp@m.e-de.nosp@m.v@isl.nosp@m.og.c.nosp@m.om

Macro Definition Documentation

◆ CMD_YUBIKEY

#define CMD_YUBIKEY   "Yubikey"

◆ YUBIKEY_TLV_ALGORITHM

#define YUBIKEY_TLV_ALGORITHM   0x7b

◆ YUBIKEY_TLV_CHALLENGE

#define YUBIKEY_TLV_CHALLENGE   0x74

◆ YUBIKEY_TLV_DEVINFO_AUTOEJECT_TIMEOUT

#define YUBIKEY_TLV_DEVINFO_AUTOEJECT_TIMEOUT   0x06 /* Timeout in (ms?) before the YubiKey automatically "ejects" itself. */

◆ YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_NFC

#define YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_NFC   0x0D /* NFC Applications and capabilities that are available for use on this YubiKey. */

◆ YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_USB

#define YUBIKEY_TLV_DEVINFO_AVAILABLE_CAPABILITIES_USB   0x01 /* USB Applications and capabilities that are available for use on this YubiKey. */

◆ YUBIKEY_TLV_DEVINFO_CHALLENGE_RESPONSE_TIMEOUT

#define YUBIKEY_TLV_DEVINFO_CHALLENGE_RESPONSE_TIMEOUT   0x07 /* The period of time (in seconds) after which the OTP challenge-response command should timeout. */

◆ YUBIKEY_TLV_DEVINFO_CONFIGURATION_LOCK

#define YUBIKEY_TLV_DEVINFO_CONFIGURATION_LOCK   0x0A /* Indicates whether or not the YubiKey's configuration has been locked by the user. */

◆ YUBIKEY_TLV_DEVINFO_DEVICE_FLAGS

#define YUBIKEY_TLV_DEVINFO_DEVICE_FLAGS   0x08 /* Device flags that can control device-global behavior. */

◆ YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_NFC

#define YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_NFC   0x0E /* Applications that are currently enabled over USB on this YubiKey. */

◆ YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_USB

#define YUBIKEY_TLV_DEVINFO_ENABLED_CAPABILITIES_USB   0x03 /* Applications that are currently enabled over USB on this YubiKey. */

◆ YUBIKEY_TLV_DEVINFO_FIRMWARE_VERSION

#define YUBIKEY_TLV_DEVINFO_FIRMWARE_VERSION   0x05 /* The Major.Minor.Patch version number of the firmware running on the YubiKey. */

◆ YUBIKEY_TLV_DEVINFO_FORM_FACTOR

#define YUBIKEY_TLV_DEVINFO_FORM_FACTOR   0x04 /* Specifies the form factor of the YubiKey (USB-A, USB-C, Nano, etc.) */

◆ YUBIKEY_TLV_DEVINFO_SERIAL_NUMBER

#define YUBIKEY_TLV_DEVINFO_SERIAL_NUMBER   0x02 /* Returns the serial number of the YubiKey (if present and visible). */

◆ YUBIKEY_TLV_FULL_RESPONSE

#define YUBIKEY_TLV_FULL_RESPONSE   0x75

◆ YUBIKEY_TLV_HOTP_RESPONSE

#define YUBIKEY_TLV_HOTP_RESPONSE   0x77

◆ YUBIKEY_TLV_IMF

#define YUBIKEY_TLV_IMF   0x7a

◆ YUBIKEY_TLV_KEY

#define YUBIKEY_TLV_KEY   0x73

◆ YUBIKEY_TLV_NAME

#define YUBIKEY_TLV_NAME   0x71

◆ YUBIKEY_TLV_NAME_LIST

#define YUBIKEY_TLV_NAME_LIST   0x72

◆ YUBIKEY_TLV_PROPERTY

#define YUBIKEY_TLV_PROPERTY   0x78

◆ YUBIKEY_TLV_TOUCH_RESPONSE

#define YUBIKEY_TLV_TOUCH_RESPONSE   0x7c

◆ YUBIKEY_TLV_TRUNCATED_RESPONSE

#define YUBIKEY_TLV_TRUNCATED_RESPONSE   0x76

◆ YUBIKEY_TLV_VERSION

#define YUBIKEY_TLV_VERSION   0x79