Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pkc_crypto_generate_keypair(3sec) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pkc_crypto_generate_keypair(3sec)  —  Subroutines

NAME

pkc_crypto_generate_keypair — Generates a pair of public and private keys

Synopsis

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

algorithmSpecifies the crypto module. 

sizeSpecifies the key size. 

alg_infoSpecifies algorithm-specific information, if any. 

Output

private_key
The generated private key.

public_keyThe generated 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
Operation successfully completed.

Errors

Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages. 

Related Information

Functions: pkc_crypto_intro(3sec), pkc_crypto_get_registered_algorithms(3sec), pkc_crypto_lookup_algorithm(3sec), pkc_crypto_register_signature_alg(3sec), pkc_crypto_sign(3sec), pkc_crypto_verify_signature(3sec). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026