AI_BSSecretSharing

You must supply an initialized random algorithm to B_EncryptUpdate. (The random algorithm is used only on the first call to B_EncryptUpdate). Supply (B_ALGORITHM_OBJ)NULL_PTR as the randomAlgorithm for B_EncryptFinal.

B_DecryptUpdate must be called threshold times to supply enough shares to recover the secret key. B_DecryptFinal returns a status of BE_INPUT_COUNT if the number of calls to B_DecryptUpdate is less than the threshold; otherwise, it returns a success status and outputs the secret key.

Supply (B_ALGORITHM_OBJ)NULL_PTR as the randomAlgorithm for B_DecryptUpdate and B_DecryptFinal. Supply (B_KEY_OBJ)NULL_PTR as the keyObject for B_EncryptInit and B_DecryptInit.

Output considerations:

The size of the output from each call to B_EncryptUpdate will be one byte more than the size of the secret. That byte represents the share.

1 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 28
Image 28
RSA Security 5 manual Output considerations