z/OS Cryptographic Services System SSL Programming
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


gsk_encode_ec_parameters()

z/OS Cryptographic Services System SSL Programming
SC14-7495-00

Encodes the EC domain parameters for an ECC key

Format

   #include <gskcms.h>

   gsk_status gsk_encode_ec_parameters (
                                          int               arg_count,
                                          x509_ecurve_type  ec_curve,
                                          gsk_buffer *      key_params,
                                          ...)
    

Parameters

arg_count
Specifies the number of parameters following the arg_count parameter. Currently, arg_count must be set to 2.
ec_curve
Specifies the EC named curve
key_params
Returns the ASN.1 stream for the EC domain parameters. The application should call the gsk_free_buffer function to release the storage when it is no longer needed.

Results

The function return value will be 0 if no error is detected. Otherwise, it will be one of the return codes listed in the gskcms.h include file. These are some possible errors:
[ASN_NO_MEMORY]
Insufficient memory is available.
[CMSERR_BAD_ARG_COUNT]
Variable argument count is not valid.
[CMSERR_ECURVE_NOT_SUPPORTED]
Elliptic Curve is not supported

Usage

The gsk_encode_ec_parameters() routine will encode the EC domain parameters of an elliptic curve as an ASN.1 stream. The EC domain parameters will be encoded as described in SEC1 (Elliptic Curve Cryptography).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014