GenerateEcKey Method
GenerateEcKey(KeyReference, Byte)
Generate a new EC key pair for the given key reference.
C#
public ECPublicKeyParameters GenerateEcKey(KeyReference keyReference, byte replaceKvn)
Parameters
Type | Name | Description |
---|---|---|
KeyReference | keyReference | The KID-KVN pair of the key that should be generated. |
System.Byte | replaceKvn | The key version number of the key set that should be replaced, or 0 to generate a new key pair. |
Returns
The parameters of the generated key, including the curve and the public point.
Exceptions
Type | Condition |
---|---|
SecureChannelException | Thrown when there was an SCP error, described in the exception message. |
Remarks
GlobalPlatform has no command to generate key pairs on the card itself. This is a Yubico extension that tries to mimic the format of the GPC PUT KEY command.