> [[email protected] - Thu Sep 09 11:14:31 2010]:
> 
> Hi,
> yes, this problem you can reproduce with files, which I send to
> you in first mail (see to file test.zip).
> - test_pubkey.pem with
> public key of certificate
> - test_signature.bin with valid 256 byte
> length signature
> - test.data with data for signing and verification
> and try this command:
> openssl dgst -verify test_pubkey.pem -signature
> test_signature.bin -sha1 test.data
> 

This indicates there is a problem with the signature. If you do:

openssl rsautl -verify -in test_signature.bin -pubin -inkey
test_pubkey.pem -hexdump

you see the 20 byte "signature":

0000 - 49 ed e1 26 7f 1f d8 e6-1d fc 7f bb 1a 32 e0 f3   I..&.........2..
0010 - 11 b4 c5 c6                                       ....

If you also do:

openssl rsautl -verify -in test_signature.bin -pubin -inkey
test_pubkey.pem -hexdump -raw

You get the raw decrypted block with the original padding:

0000 - 00 01 ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0010 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0020 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0030 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0040 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0050 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0060 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0070 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0080 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
0090 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
00a0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
00b0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
00c0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
00d0 - ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff   ................
00e0 - ff ff ff ff ff ff ff ff-ff ff ff 00 49 ed e1 26   ............I..&
00f0 - 7f 1f d8 e6 1d fc 7f bb-1a 32 e0 f3 11 b4 c5 c6   .........2......

As you can see there is no DigestInfo there at all and OpenSSL is
returning the correct signed data. If this works with other software
they may have a workaround to tolerate this broken format which OpenSSL
doesn't.

Steve.
-- 
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to