Hi

I have the following piece of code, which tries to make a public key from a
known
modulus (128 bytes) and exponent (8 bytes).


RSA* rsa = RSA_new();
rsa->n = BN_bin2bn(modulus, sizeof(modulus), NULL);
 rsa->e = BN_bin2bn(exponent, sizeof(exponent), NULL);
 rsa->p = NULL;
 rsa->q = NULL;
 int err = ERR_get_error();

        int RSASize = RSA_size(rsa);

RSASize is zero, and so is the result decryption (omitted).The documentation
tells not
to set the RSA field directly but use appropriate functions instead - my
question is:
Which ones ? Or is something else wrong. All advice will be appreciated.



Hannu

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to