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


gsk_construct_private_key_rsa()

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

Constructs an RSA private key from its component values.
Note: This function is deprecated. Use gsk_construct_private_key() instead.

Format

   #include <gskcms.h>

   gsk_status gsk_construct_private_key_rsa (
                                          gsk_buffer *             modulus,
                                          gsk_buffer *             public_exponent,
                                          gsk_buffer *             private_exponent,
                                          gsk_buffer *             prime1,
                                          gsk_buffer *             prime2,
                                          gsk_buffer *             prime_exponent1,
                                          gsk_buffer *             prime_exponent2,
                                          gsk_buffer *             coefficient,
                                          pkcs_private_key_info *  private_key)

Parameters

modulus
Specifies the modulus (n).
public_exponent
Specifies the public exponent (e).
private_exponent
Specifies the private exponent (d).
prime1
Specifies the 1st prime (p).
prime2
Species the 2nd prime (q).
prime_exponent1
Specifies the private exponent d modulo p-1
prime_exponent2
Specifies the private exponent d modulo q-1.
coefficient
Specifies the CRT coefficient q-1 mod p.
private_key
Returns the private key

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_ELEMENTS_MISSING]
Required data element is missing.

Usage

The gsk_construct_private_key_rsa() function constructs pkcs_private_key_info from its RSA private key components. The pkcs_private_key_info structures x509_algorithm_identifier is set with x509_alg_rsaEncryption, while version specifies 0.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014