AuthenticateKeyAgreeCommand Constructor
AuthenticateKeyAgreeCommand(ReadOnlyMemory<Byte>, Byte)
Initializes a new instance of the AuthenticateKeyAgreeCommand class. This command takes the slot number and the corresponding party's public key.
C#
public AuthenticateKeyAgreeCommand(ReadOnlyMemory<byte> correspondentPublicKey, byte slotNumber)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | correspondentPublicKey | The public key that will be used to perform phase 2 of ECDH. |
System.Byte | slotNumber | The slot holding the private key to use. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The correspondent public value is not the correct length. |
Remarks
The slot number must be for a slot that holds an ECC private key. It
cannot be F9
(the attestation key).
If the key that will be used to perform key agreement is ECC-P256, then the correspondent public key data must be 65 bytes long. If the key is ECC-P384, then the data must be 97 bytes long. See also the User's Manual entry on key agreement in the PIV commands page.