
AI_RSAPrivate
AI_RSAPrivate
Purpose:
This AI allows you to encrypt data using the raw RSA algorithm. You can find the description of this algorithm in B. Schneier's Applied Cryptography.
AI_RSAPrivate is different from AI_PKCS_RSAPrivate because the former allows you to encrypt raw data, while the latter encrypts data in PKCS #1 format.
Because this algorithm does not pad, the total number of input bytes must be a multiple of the key’s modulus size in bytes. Your application is responsible for padding the data as appropriate. Also, each
To perform RSA encryption you can also use AI_PKCS_RSAPrivate and
AI_SET_OAEP_RSAPrivate. But you can use AI_RSAPrivate only if the data will be decrypted with AI_RSAPublic.
Type of information this allows you to use:
the RSA algorithm for performing raw private-key encryption.
Format of info supplied to B_SetAlgorithmInfo:
NULL_PTR.
Format of info returned by B_GetAlgorithmInfo:
NULL_PTR.
Crypto-C procedures to use with algorithm object:
B_EncryptInit, B_EncryptUpdate, B_EncryptFinal, B_DecryptInit,
B_DecryptUpdate, and B_DecryptFinal. You may pass (B_ALGORITHM_OBJ)NULL_PTR for all randomAlgorithm arguments.
2 1 0 | R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l |