B_VerifyInit

B_VerifyInit

int B_VerifyInit (

 

 

B_ALGORITHM_OBJ

algorithmObject,

/* algorithm object */

B_KEY_OBJ

keyObject,

/* key object */

B_ALGORITHM_CHOOSER algorithmChooser,

/* algorithm chooser */

A_SURRENDER_CTX

*surrenderContext

/* surrender context */

);

 

 

 

 

 

Description

B_VerifyInit initializes algorithmObject for verifying a digital signature using the algorithm specified by a previous call to B_SetAlgorithmInfo. The chooser for selecting the algorithm method is algorithmChooser. The key object for supplying the key information is keyObject, which is typically a public key. 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.

B_VerifyInit only needs to be called once to set up a verification algorithm. The B_VerifyUpdate routine can be called multiple times to process blocks of data, and B_VerifyFinal is called once to process the last block which includes checking the computed signature against the expected signature that is passed to B_VerifyFinal. After B_VerifyFinal is called, B_VerifyUpdate can be called to start verifying another sequence of blocks. There is no need to call B_VerifyInit again.

Return value

Value

Description

0

Operation was successful.

non-zero

see Appendix A, ”Crypto-C Error Types”

 

 

3 3 8

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 348
Image 348
RSA Security 5 manual Int BVerifyInit