Hello out there,

I am writing a Linux tool for user authentification that uses RSA
encryption. I have some usernames and hexadecimal key values (2048 bit
modulus, in this application, the public exponent is fixed for all keys)
stored in a file. When reading out the modulus value, I am using the
BN_hex2bn() function which gives me a (whee!) 2045 bit modulus 'cause the
upper three bits are set to zero.

I don't know if this is really the problem, but when trying to do a
RSA_public_encrypt(),
I get the following error:

"error:0306E06C:bignum routines:BN_mod_inverse:no inverse"

and RSA_public_encrypt() fails. I have seen some PEM_xxx functions around,
but I haven't found any documentation for them, yet. I would like to keep
overhead small, so I am looking for an easy way to read in RSA public keys
(later, I will have to read RSA private keys which I will get as hex strings
representing the private key values).

So, how do I do it correctly?

Thanks for any answers,

Stephan A. Maciej

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

Reply via email to