> From: owner-openssl-us...@openssl.org On Behalf Of brajan
> Sent: Tuesday, 04 October, 2011 10:58

>  can any one tell me why the signature verification in 
> openssl fail when the
> message is signed bu java IBM fips compliant.i am using 
> openssl 0.9.8g in
> power Pc. i am getting error in 
> 
>       if (((unsigned int)sig->digest->length != m_len) ||
> (memcmp(m,sig->digest->data,m_len) != 0)) line of source code in
> RSA_verify().
> the value are 
> 
> m data 
> :a12df146d87db3ce911e61444eed322bbd027a58cfa27ceec3626317ebe62f89
> sig->digest->data :?*?H?b9???A6w?(?
> Memcompare fail mLen :64        sig->digest->length :20
> 
Assuming 'mLen' is the m_length/m_len passed to RSA_verify, 
it appears your digest-to-compare is 64 hex chars (32 bytes) 
while the digest specified by the signer is 20 bytes. 
It looks like you are computing the wrong hash, maybe SHA256 
instead of SHA1, and also representing it wrongly.



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to