Show / Hide Table of Contents

VerifySignature Method

VerifySignature(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Use the given public key to verify the signature. Use the given Application ID (hash of origin data) and Client Data Hash (includes the challenge) to build the data to verify.

C#
public bool VerifySignature(ReadOnlyMemory<byte> userPublicKey, ReadOnlyMemory<byte> applicationId, ReadOnlyMemory<byte> clientDataHash)

Parameters

Type Name Description
ReadOnlyMemory<byte> userPublicKey

The public key partner to the private key used to authenticate this credential, as an encoded EC Point.

ReadOnlyMemory<byte> applicationId

The original applicationId that was provided to the AuthenticateCommand. This is the hash of the origin data.

ReadOnlyMemory<byte> clientDataHash

The original clientDataHash that was provided to the AuthenticateCommand. This contains the challenge.

Returns

bool

A bool, true if the signature verifies, false otherwise.

Remarks

This will build the data to verify from the input applicationId, clientDataHash, along with the user presence and counter data inside this object. The user presence and counter were part of the authentication response, the encodedResponse of the constructor. It will then verify the signature inside this object (from the encoded response) using the public key.

The public key is returned by the YubiKey during registration. See the RegistrationData class.

In this article
Back to top Generated by DocFX