C h a p t e r 4
D e t a i l s o f C r y p t o - C F u n c t i o n s
non-zero
see Appendix A, ”Crypto-C Error Types”
0
Operation was successful.
Value
Description
Return value
B_GenerateInit
B_GenerateInit
Description
B_GenerateKeypair uses algorithmObject to generate a keypair, setting publicKey and privateKey to the result. The algorithm object for supplying random numbers is randomAlgorithm. The surrender context for processing and canceling during lengthy operations is surrenderContext; if its value is (A_SURRENDER_CTX *)NULL_PTR, Crypto-C does not use it. algorithmObject is reset to the state it was in after the call to
, so that another keypair generation may be performed. See
.

 

 

B_GenerateKeypair

 

 

B_GenerateKeypair

 

 

 

int B_GenerateKeypair (

 

B_ALGORITHM_OBJ

algorithmObject,

/* algorithm object */

B_KEY_OBJ

publicKey,

/* new public key */

B_KEY_OBJ

privateKey,

/* new private key */

B_ALGORITHM_OBJ

randomAlgorithm,

/* random algorithm */

A_SURRENDER_CTX *surrenderContext

/* surrender context */

);

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

317

Page 327
Image 327
RSA Security 5 manual Int BGenerateKeypair