Show / Hide Table of Contents

PinUvAuthProtocolTwo Class

Namespace: Yubico.YubiKey.Fido2.PinProtocols Assembly: Yubico.YubiKey.dll

This class contains methods that perform the platform operations of FIDO2's PIN/UV auth protocol two.

C#
public class PinUvAuthProtocolTwo : PinUvAuthProtocolBase
Inheritance object PinUvAuthProtocolBase PinUvAuthProtocolTwo

Constructors

Name Description
PinUvAuthProtocolTwo()

Constructs a new instance of PinUvAuthProtocolTwo.

Methods

Name Description
Authenticate(byte[])

Returns the result of computing HMAC-SHA-256 on the given message using the AuthenticationKey. With protocol 1, the result is the first 16 bytes of the HMAC, and with protocol 2 it is the entire 32-byte result.

Authenticate(byte[], byte[])

Returns the result of computing HMAC-SHA-256 on the given message using the provided keyData. With protocol 1, the result is the first 16 bytes of the HMAC, and with protocol 2 it is the entire 32-byte result.

Decrypt(byte[], int, int)

Returns the AES-256-CBC decryption of ciphertext using an IV specified by the protocol and the EncryptionKey. With protocol 1 the IV is all 00 bytes. With protocol 2, it is the first block size bytes of ciphertext.

DeriveKeys(byte[])

The key derivation function to run while performing ECDH. This will derive both the EncryptionKey and the AuthenticationKey.

Dispose(bool)

Release resources, overwrite sensitive data.

Encrypt(byte[], int, int)

Returns the AES-256-CBC encryption of plaintext using an IV specified by the protocol and the EncryptionKey. With protocol 1 the IV is all 00 bytes. With protocol 2, it is a new, random value.

In this article
Back to top Generated by DocFX