Show / Hide Table of Contents

AuthenticateDecryptCommand Constructor

AuthenticateDecryptCommand(ReadOnlyMemory<byte>, byte)

Initializes a new instance of the AuthenticateDecryptCommand class. This command takes the slot number and the data to decrypt.

C#
public AuthenticateDecryptCommand(ReadOnlyMemory<byte> dataToDecrypt, byte slotNumber)

Parameters

Type Name Description
ReadOnlyMemory<byte> dataToDecrypt

The data to decrypt.

byte slotNumber

The slot holding the private key to use.

Exceptions

Type Condition
ArgumentException

The ciphertext is not the correct length.

Remarks

The slot number must be for a slot that holds an RSA private key. It cannot be F9 (the attestation key).

If the key that will be used to decrypt is RSA-1024, then the data to decrypt must be 128 (1024 bits) bytes long. If the key is RSA-2048, then the data must be 256 bytes (2048 bits) long. If the key is RSA-3072, then the data must be 384 bytes (3072 bits) long. If the key is RSA-4096, then the data must be 512 bytes (4096 bits) long. See also the User's Manual entry on decrypting in the PIV commands page.

In this article
Back to top Generated by DocFX