ica_ec_key_init

Purpose

Initializes an ICA_EC_KEY data structure with given private (D) or public key values (X,Y) or both. D may be NULL, if no private key value shall be specified. X and Y may both be NULL, if no public key shall be specified. If X is specified, also Y must be specified, and vice versa.

Format


int ica_ec_key_init(const unsigned char *X, 
  const unsigned char *Y,
  const unsigned char *D, 
  ICA_EC_KEY *key);

Required hardware support

None.

Parameters

const unsigned char *X
Pointer to the public X value that shall be assigned to the ICA_EC_KEY object.
const unsigned char *Y
Pointer to the public Y value that shall be assigned to the ICA_EC_KEY object.
const unsigned char *D
Pointer to the private D value that shall be assigned to the ICA_EC_KEY object.
ICA_EC_KEY *key
Pointer to a previously allocated ICA_EC_KEY data structure.

Return codes

0
Success
EPERM
If the EC curve is not supported in this environment.

For return codes indicating exceptions, see Return codes.