RSA Security Projection Television 5.2.2 Manual de usuario Pagina 265

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 264
Chapter 7 Public-Key Operations 243
Performing DSA Operations
contains the AM for SHA1 random number generation. The last argument is the
surrender context. This function call is quick; the lengthy portion was generating the
parameters:
Step 6: Destroy
When you are done with all objects, remember to destroy them:
DSA Signatures
In this section, we describe how to write Crypto-C code that computes or verifies DSA
digital signatures. See Authentication and Digital Signatures on page 57 for
information on what a digital signature is. For signing, Crypto-C offers
B_SignInit,
B_SignUpdate, and B_SignFinal, which will digest the data and create a signature
using DSA with a private key. For verification, Crypto-C offers
B_VerifyInit,
B_VerifyUpdate, and B_VerifyFinal to digest the data again and check the signature
using its DSA public key.
B_KEY_OBJ dsaPublicKey = (B_KEY_OBJ)NULL_PTR;
B_KEY_OBJ dsaPrivateKey = (B_KEY_OBJ)NULL_PTR;
if ((status = B_CreateKeyObject (&dsaPublicKey)) != 0)
break;
if ((status = B_CreateKeyObject (&dsaPrivateKey)) != 0)
break;
if ((status = B_GenerateKeypair
(dsaKeyGenObj, dsaPublicKey, dsaPrivateKey,
randomAlgorithm, (A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
B_DestroyAlgorithmObject (&randomAlgorithm);
B_DestroyAlgorithmObject (&dsaKeyGenObj);
B_DestroyKeyObject (&dsaPublicKey);
B_DestroyKeyObject (&dsaPrivateKey);
Vista de pagina 264
1 2 ... 260 261 262 263 264 265 266 267 268 269 270 ... 375 376

Comentarios a estos manuales

Sin comentarios