|
| YubikeyISO7816Commands () |
| Constructor.
|
|
| YubikeyISO7816Commands (std::string ct) |
|
virtual | ~YubikeyISO7816Commands () |
| Destructor.
|
|
YubikeySelectResponse | selectYubikeyOATH () override |
| Select the Yubikey OATH application.
|
|
ByteVector | selectYubikeyOTP () override |
| Select the old Yubikey OTP application.
|
|
ByteVector | otp_getResponse (YubikeySlot slot, const ByteVector &challenge) override |
| Challenge/Response operation.
|
|
ByteVector | otp_getSerialNumber () override |
| Reads the serial number of the YubiKey if it is allowed by the configuration. Note that certain keys, such as the Security Key by Yubico, do not have serial numbers.
|
|
std::vector< TLVPtr > | otp_getDeviceInfo () override |
| Reads configuration and metadata information about the YubiKey. Similar commands exist in other applications. The Command APDU may be different, however the data in the Response APDU will be of identical format.
|
|
bool | otp_queryFIPSMode () override |
| Determines whether or not the device is loaded with FIPS capable firmware, as well as if the key is currently in a FIPS compliant state.
|
|
void | oath_put (const ByteVector &name, YubikeyHMAC algorithm, uint8_t digits, const ByteVector &key, YubikeyProperty property=PROP_NONE, const ByteVector &imf=ByteVector()) override |
| Adds a new (or overwrites) OATH credential.
|
|
void | oath_delete (const ByteVector &name) override |
| Deletes an existing credential.
|
|
void | oath_setCode (YubikeyHMAC algorithm, const ByteVector &key, const ByteVector &challenge) override |
| Configures Authentication. If length 0 is sent, authentication is removed. The key to be set is expected to be a user-supplied UTF-8 encoded password passed through 1000 rounds of PBKDF2 with the ID from select used as salt. 16 bytes of that are used. When configuring authentication you are required to send an 8 byte challenge and one authentication-response with that key, in order to confirm that the application and the host software can calculate the same response for that key.
|
|
std::vector< YubikeyListItem > | oath_list () override |
| Lists configured credentials.
|
|
void | oath_reset () override |
| Resets the application to just-installed state.
|
|
YubikeyCalculateResponse | oath_calculate (const ByteVector &name, const ByteVector &challenge, bool truncate=false) override |
| Performs CALCULATE for one named credential.
|
|
ByteVector | oath_validate (const ByteVector &challenge, const ByteVector &response) override |
| Validates authentication (mutually). The challenge for this comes from the SELECT command. The response if computed by performing the correct HMAC function of that challenge with the correct key. A new challenge is then sent to the application, together with the response. The application will then respond with a similar calculation that the host software can verify.
|
|
std::vector< YubikeyCalculateResponse > | oath_calculateAll (const ByteVector &challenge, bool truncate) override |
| Performs CALCULATE for all available credentials, returns name + response for TOTP and just name for HOTP and credentials requiring touch.
|
|
ByteVector | oath_sendRemainingInstruction () override |
| Gets remaining data if everything didn’t fit in previous response (response code was 61xx).
|
|
std::shared_ptr< ISO7816Commands > | getISO7816Commands () const override |
|
std::shared_ptr< ISO7816ReaderCardAdapter > | getISO7816ReaderCardAdapter () const |
| Get the ISO7816 reader/card adapter.
|
|
Public Member Functions inherited from logicalaccess::YubikeyCommands |
| YubikeyCommands () |
| Constructor.
|
|
| YubikeyCommands (std::string cmdtype) |
| Constructor.
|
|
virtual YubikeySelectResponse | selectYubikeyOATH ()=0 |
| Select the Yubikey OATH application.
|
|
virtual ByteVector | selectYubikeyOTP ()=0 |
| Select the old Yubikey OTP application.
|
|
virtual ByteVector | otp_getResponse (YubikeySlot slot, const ByteVector &challenge)=0 |
| Challenge/Response operation.
|
|
virtual ByteVector | otp_getSerialNumber ()=0 |
| Reads the serial number of the YubiKey if it is allowed by the configuration. Note that certain keys, such as the Security Key by Yubico, do not have serial numbers.
|
|
virtual std::vector< TLVPtr > | otp_getDeviceInfo ()=0 |
| Reads configuration and metadata information about the YubiKey. Similar commands exist in other applications. The Command APDU may be different, however the data in the Response APDU will be of identical format.
|
|
virtual bool | otp_queryFIPSMode ()=0 |
| Determines whether or not the device is loaded with FIPS capable firmware, as well as if the key is currently in a FIPS compliant state.
|
|
virtual void | oath_put (const ByteVector &name, YubikeyHMAC algorithm, uint8_t digits, const ByteVector &key, YubikeyProperty property=PROP_NONE, const ByteVector &imf=ByteVector())=0 |
| Adds a new (or overwrites) OATH credential.
|
|
virtual void | oath_delete (const ByteVector &name)=0 |
| Deletes an existing credential.
|
|
virtual void | oath_setCode (YubikeyHMAC algorithm, const ByteVector &key, const ByteVector &challenge)=0 |
| Configures Authentication. If length 0 is sent, authentication is removed. The key to be set is expected to be a user-supplied UTF-8 encoded password passed through 1000 rounds of PBKDF2 with the ID from select used as salt. 16 bytes of that are used. When configuring authentication you are required to send an 8 byte challenge and one authentication-response with that key, in order to confirm that the application and the host software can calculate the same response for that key.
|
|
virtual std::vector< YubikeyListItem > | oath_list ()=0 |
| Lists configured credentials.
|
|
virtual void | oath_reset ()=0 |
| Resets the application to just-installed state.
|
|
virtual YubikeyCalculateResponse | oath_calculate (const ByteVector &name, const ByteVector &challenge, bool truncate=false)=0 |
| Performs CALCULATE for one named credential.
|
|
virtual ByteVector | oath_validate (const ByteVector &challenge, const ByteVector &response)=0 |
| Validates authentication (mutually). The challenge for this comes from the SELECT command. The response if computed by performing the correct HMAC function of that challenge with the correct key. A new challenge is then sent to the application, together with the response. The application will then respond with a similar calculation that the host software can verify.
|
|
virtual std::vector< YubikeyCalculateResponse > | oath_calculateAll (const ByteVector &challenge, bool truncate=false)=0 |
| Performs CALCULATE for all available credentials, returns name + response for TOTP and just name for HOTP and credentials requiring touch.
|
|
virtual ByteVector | oath_sendRemainingInstruction ()=0 |
| Gets remaining data if everything didn’t fit in previous response (response code was 61xx).
|
|
virtual std::shared_ptr< ISO7816Commands > | getISO7816Commands () const =0 |
|
Public Member Functions inherited from logicalaccess::Commands |
| Commands ()=delete |
| Constructor.
|
|
virtual | ~Commands () |
|
std::shared_ptr< Chip > | getChip () const override |
| Get the chip.
|
|
virtual void | setChip (std::shared_ptr< Chip > chip) |
| Set the chip.
|
|
std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const override |
| Get the reader/card adapter.
|
|
virtual void | setReaderCardAdapter (std::shared_ptr< ReaderCardAdapter > adapter) |
| Set the reader/card adapter.
|
|
virtual const std::string & | getCmdType () const |
| Get the cmd name.
|
|
virtual void | setCmdType (const std::string &command_type) |
| Set the cmd name.
|
|
Public Member Functions inherited from logicalaccess::ICommands |
virtual | ~ICommands ()=default |
|
virtual std::shared_ptr< Chip > | getChip () const =0 |
| Get the chip.
|
|
virtual std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const =0 |
| Get the reader/card adapter.
|
|