Arsen Hayrapetyan wrote:
jimmy wrote:
Arsen Hayrapetyan wrote:
Hello,
I have the following question:
unsigned char *plaintext = "Test message";
unsigned char * ciphertext=NULL;
RSA *rsa =...; /*here I have an RSA key */
RSA_public_encrypt(strlen(plaintext), plaintext, ciphertext, rsa,
RSA_PKCS1_OAEP_PADDIN*G* );
What will be the length of ciphertext?
Same size as ur key (i.e., size in bytes)
When I use
RSA_private_decrypt (flen, ...) to decrypt the message just encrypted,
what should I pass to fuction as the first argument? (I read a mail
i think it is length of ur cipher text, so u know how long it is :)
When I am passing RSA_size(rsa) as the first argument to
RSA_private_decrypt(), I
am receiving the initial message decoded as "Test messageA". I have
allocated the
RSA_size(rsa) bytes for the buffer receiving the decodod text. Does the
decoding function return
STRING (null-terminated)?
Arsen.
No, AFAICS it doesn't NULL terminate, but does return the length of
plain text bytes.
-jb
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]