RSA Security Projection Television 5.2.2 Manual de usuario Pagina 270

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 269
Performing DSA Operations
248 RSA BSAFE Crypto-C Developers Guide
data and you know its length, your call is the following:
Step 5: Final
B_VerifyUpdate digested the data. Check the signature with B_VerifyFinal. The
Reference Manual Chapter 2 entry on
AI_DSAWithSHA1 states:
This function does not return immediately, so use a surrender context:
The return value will be zero if the signature verifies, nonzero if it does not. Of course,
a nonzero return value may indicate some other error, so check any error return
against the Crypto-C Error Types, Appendix A of the Reference Manual.
Step 6: Destroy
When you are done with all objects, remember to destroy them:
if ((status = B_VerifyUpdate
(dsaVerifier, inputData, inputDataLen,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
You must pass a random algorithm in B_SignFinal, but may pass
(B_ALGORITHM_OBJ)NULL_PTR for all other
randomAlgorithm
arguments.
/* generalFlag is for the surrender function. */
generalFlag = 0;
if ((status = B_VerifyFinal
(dsaVerifier, signature, signatureLen,
(B_ALGORITHM_OBJ)NULL_PTR,
&generalSurrenderContext)) != 0)
break;
B_DestroyAlgorithmObject (&dsaVerifier);
B_DestroyKeyObject (&dsaPublicKey);
Vista de pagina 269
1 2 ... 265 266 267 268 269 270 271 272 273 274 275 ... 375 376

Comentarios a estos manuales

Sin comentarios