RSA Security Projection Television 5.2.2 Manual de usuario Pagina 325

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 376
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 324
Chapter 7 Public-Key Operations 303
Performing Elliptic Curve Operations
Step 5: Final
Step 6: Destroy
Destroy any objects that are no longer needed. Also, be sure to zeroize and free any
allocated memory when it is no longer needed.
unsigned char *decryptedData;
unsigned int maxDecryptedDataLen;
unsigned int outputLenUpdate;
maxDecryptedDataLen = outputLenTotal; /* Use the outputLenTotal from */
/* Step 5 of ECAES encryption */
decryptedData = T_malloc(maxDecryptedDataLen);
if ((status = (decryptedData == NULL_PTR)) != 0)
break;
if ((status = B_DecryptUpdate
(ecESDecrypt, decryptedData, &outputLenUpdate,
maxDecryptedDataLen, encryptedData, outputLenTotal,
(B_ALGORITHM_OBJ)NULL_PTR,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
unsigned int outputLenFinal, outputLenTotal;
if ((status = B_DecryptFinal
(ecESDecrypt, decryptedData + outputLenUpdate,
&outputLenFinal, maxDecryptedDataLen - outputLenUpdate,
(B_ALGORITHM_OBJ)NULL_PTR,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
outputLenTotal = outputLenUpdate + outputLenFinal;
B_DestroyAlgorithmObject (&ecESDecrypt);
B_DestroyKeyObject (&privateKey);
T_free (decryptedData);
Vista de pagina 324
1 2 ... 320 321 322 323 324 325 326 327 328 329 330 ... 375 376

Comentarios a estos manuales

Sin comentarios