Show / Hide Table of Contents

GenerateEcKey Method

GenerateEcKey(KeyReference, byte)

Generate a new EC key pair for the given key reference.

C#
public ECPublicKey GenerateEcKey(KeyReference keyReference, byte replaceKvn)

Parameters

Type Name Description
KeyReference keyReference

The KID-KVN pair of the key that should be generated.

byte replaceKvn

The key version number of the key set that should be replaced, or 0 to generate a new key pair.

Returns

ECPublicKey

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.

In this article
Back to top Generated by DocFX