RSA Security 5.2.2 manual Update, Asurrenderctx *NULLPTR != 0 break If status != 0 break

Models: 5.2.2

1 376
Download 376 pages 13.91 Kb
Page 332
Image 332

Secret Sharing

if ((status = B_DecryptInit (secretReconstructer, (B_KEY_OBJ)NULL_PTR, (B_ALGORITHM_CHOOSER)NULL_PTR, (A_SURRENDER_CTX *)NULL_PTR)) != 0)

break;

Step 4: Update

Call B_DecryptUpdate once for each of the shares you are using to reconstruct the secret. You can use any number of shares from the threshold number to the total number of shares.

Each call to B_DecryptUpdate produces no output, so pass NULL_PTRs. The input is a share. This call does not need a random algorithm, so pass a NULL_PTR. It is also quick, so it is reasonable to pass a properly cast NULL_PTR for the surrender context:

unsigned int outputLenUpdate;

for (count = 0; count < (int)secretSharingParams.threshold; ++count) { if ((status = B_DecryptUpdate

(secretReconstructer, NULL_PTR, &outputLenUpdate, 0, secretShare[count], secretShareLen[count], (B_ALGORITHM_OBJ)NULL_PTR,

(A_SURRENDER_CTX *)NULL_PTR)) != 0) break;

}

if (status != 0) break;

Step 5: Final

Finalize the process with B_DecryptFinal. There will be output now. This function does not need a random algorithm, so pass a NULL_PTR there. It is a quick call, so it is reasonable to pass a NULL_PTR for the surrender context:

3 1 0

R S A B S A F E C r y p t o - C D e v e l o p e r ’s G u i d e

Page 332
Image 332
RSA Security 5.2.2 manual Update, Asurrenderctx *NULLPTR != 0 break If status != 0 break