A SERVICE OF

logo

Chapter 3 Key Info Types 263
KI_ECPrivate
KI_ECPrivate
Purpose:
This KI allows you to specify a private key used by the Elliptic Curve algorithm. The
information consists of the private component and the underlying elliptic curve
parameters.
Type of information this allows you to use:
an elliptic curve private key. The parameters of the key are specified as the private
component
privateKey
, and the underlying elliptic curve parameters.
Format of info supplied to B_SetKeyInfo:
pointer to an A_EC_PRIVATE_KEY structure:
Each
ITEM supplies an integer in canonical format, where the ITEM's
data
points to an
unsigned byte array, most significant byte first, and the
ITEM's
len
gives its length. For
all
ITEM values except the curve parameter base, leading zeros are stripped before it is
copied to the key object.
Format of info returned by B_GetKeyInfo:
pointer to an A_EC_PRIVATE_KEY structure.
Can get this info type if key object already has:
KI_ECPrivate or KI_ECPrivateBER.
typedef struct {
A_EC_PARAMS curveParams; /* the underlying elliptic curve parameters */
ITEM privateKey; /* private component */
} A_EC_PRIVATE_KEY;