RSA Security Projection Television 5.2.2 Manuel d'utilisateur Page 324

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 376
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 323
Performing Elliptic Curve Operations
302 RSA BSAFE Crypto-C Developers Guide
ECAES Private-Key Decryption
The steps for decryption are similar to those for encryption.
Step 1: Create
Create an algorithm object:
Step 2: Set
Associate the algorithm object with AI_EC_ES and pass NULL_PTR as the third
argument:
Step 3: Init
At this point, commit your algorithm object to perform decryption with a particular
private key. Be sure that
EC_CHOOSER contains the appropriate algorithm methods:
Step 4: Update
Since you know that the length of the plaintext cant be larger than the length of the
ciphertext, youll use this approximation to allocate space for the decrypted data:
B_ALGORITHM_OBJ ecESDecrypt = (B_ALGORITHM_OBJ)NULL_PTR;
if ((status = B_CreateAlgorithmObject (&ecESDecrypt)) != 0)
break;
if ((status = B_SetAlgorithmInfo
(ecESDecrypt, AI_EC_ES, NULL_PTR)) != 0)
break;
B_ALGORITHM_METHOD *EC_CHOOSER[] = {
&AM_ECFP_DECRYPT,
&AM_ECF2POLY_DECRYPT,
(B_ALGORITHM_METHOD *)NULL_PTR
};
if ((status = B_DecryptInit (ecESDecrypt, privateKey, EC_CHOOSER,
(A_SURRENDER_CTX *)NULL_PTR)) != 0)
break;
Vue de la page 323
1 2 ... 319 320 321 322 323 324 325 326 327 328 329 ... 375 376

Commentaires sur ces manuels

Pas de commentaire