Hello, > I have found the reason for the problem. Deep inside my program was a bug > that switched modulus and exponent, so I set the wrong values to n and e. My first suggestion :-)
> I've fixed the bug and also removed the leading 00 so that I get a good 128 > byte long modulus and a 4 byte long exponent. Leading 00 are important, if first byte is greater then 127 this number may be treated as negative. > If I call RSA_verify I get now the reason 155 as error description. > If I call RSA_public_decrypt I get a NULL pointer access violation. > > What can I do now? RSA_public_decrypt() with RSA_NO_PADDING should work good only with these data. First RSA_public_decrypt() should work, next you may try RSA_verify() because core of this function is RSA_public_decrypt() :-) You should carefully check parameters of RSA_public_decrypt() ! Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]