Re: 050 + at the beginning of verified signature

2013-10-10 Thread aqueelmirza
Hi

I tried replacing strlen(reply) with 20 but we are getting same result as
before. 

I am attaching reference files with this message. While trying this
solution, sometimes we were getting following error as well.
RSA operation error
140735121490396:error:0406706C:rsa routines:RSA_EAY_PUBLIC_DECRYPT:data
greater than mod len:rsa_eay.c:680: 

Can you please guide me?

result.txt   
signature.txt   
publicKey.pem   



--
View this message in context: 
http://openssl.6102.n7.nabble.com/050-at-the-beginning-of-verified-signature-tp46825p46847.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: 050 + at the beginning of verified signature

2013-10-09 Thread aqueelmirza
Hi Ken thanks for replying. I have been struggling with this issue since last
3 days. 
I am not using RSA_verify. I am using openssl -verify to verify my
signature. Secondly, should I write 20 instead of strlen(reply)?

Best Regards



--
View this message in context: 
http://openssl.6102.n7.nabble.com/050-at-the-beginning-of-verified-signature-tp46825p46828.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


050 + at the beginning of verified signature

2013-10-09 Thread aqueelmirza
I am using OpenSSL in iOS app to sign a message. I use RSA_sign to sign. When
I use RSA_verify to verify the signature, result is like this

050 +(f2d7846a5f495a743e470663facf7a2858d052cf

Where f2d7846a5f495a743e470663facf7a2858d052cf is the original signature. So
I am getting additional 050 +( at the beginning of the signature. Can anyone
please tell me the reason of this?

This is how I am signing

int sign = RSA_sign(NID_sha1,( char *)reply, strlen(reply), signature,
&siglen, myRSA );

where reply contains sha1 hashed data to be signed.

Best Regards



--
View this message in context: 
http://openssl.6102.n7.nabble.com/050-at-the-beginning-of-verified-signature-tp46825.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org