Show / Hide Table of Contents

ConfigureChallengeResponse Class

Namespace: Yubico.YubiKey.Otp.Operations Assembly: Yubico.YubiKey.dll

Configures a YubiKey's OTP slot to perform challenge-response using either the Yubico OTP or the HMAC-SHA1 algorithm.

C#
public class ConfigureChallengeResponse : OperationBase<ConfigureChallengeResponse>
Inheritance object OperationBase<ConfigureChallengeResponse> ConfigureChallengeResponse

Remarks

This class is not to be instantiated by non-SDK code. Instead, you will get a reference to an instance of this class by calling ConfigureChallengeResponse(Slot).

Once you have a reference to an instance, the member methods of this class can be used to chain together configurations using a builder pattern.

Challenge-response mode needs to either have the UseHmacSha1ChallengeResponseMode(bool) or the UseYubicoOtpChallengeResponseMode(bool) setting selected.

Fields

Name Description
HmacSha1KeySize

The key for an HMAC-SHA1 operation is 20 bytes.

YubiOtpKeySize

The key for a Yubico OTP operation is 16 bytes.

Methods

Name Description
ExecuteOperation()

Execute the operation here.

GenerateKey(Memory<byte>)

Generates a cryptographically random series of bytes as the key for the credential.

PreLaunchOperation()

Validate all settings and choices here.

SetAllowUpdate(bool)

Allows certain non-security related settings to be modified after the configuration has been written.

UseButton(bool)

Require user acceptance by touching the YubiKey button for challenge-response operations

UseHmacSha1()

Configures the challenge-response to use the HMAC-SHA1 algorithm.

UseKey(ReadOnlyMemory<byte>)

Explicitly sets the key of the credential.

UseSmallChallenge(bool)

Set when the HMAC challenge will be less than 64-bytes.

UseYubiOtp()

Configures the challenge-response to use the Yubico OTP algorithm.

In this article
Back to top Generated by DocFX