pkc_crypto_generate_keypair(3sec)Generates a pair of public and private keys Synopsis #include <pkc_certs.h> unsigned32 pkc_crypto_generate_keypair( gss_OID algorithm, unsigned32 size, void * alg_info, sec_pk_data_t * private_key, sec_pk_data_t * public_key); Parameters Input
algorithm
size
alg_info Output
private_key
public_key Description pkc_crypto_generate_keypair generates a pair of public and private keys. The (*generate_keypair)( ) routine of the crypto module specified by algorithm is called to do this (but note that crypto modules are not required to provide a (*generate_keypair)( ) function). The size parameter will be used by the routine to determine the key size in some way defined by the algorithm; for the RSA algorithm, for example, it should be treated as the number of bits in the key modulus. The private_key and public_key parameters should be expected to return BER-encoded PrivateKeyInfo and SubjectPublicKeyInfo data objects respectively. The alg_info parameter can be used for algorithm-specific information to modify the key generation process; NULL can be specified. Return Values
pkc_s_success Errors Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages. Related Information
Functions:
|