Hi,

I am having problems with padding errors. I have looked through the mailing
archives, but haven't found anything usefull :(.

What happens is that I have a Perl script that signs a string of text. This
Perl script uses Crypt::OpenSSL::RSA version 0.16, a Perl library that wraps
around the OpenSSL Crypto libraries.

The output of my Perl script is an octet-string that contains the digital
signature (MD5, PKCS#1 type 1 padded). It is put in an HTML form, together
with the data that is signed.

The octet-string is then posted to a FastCGI program written in C++. This
program reconstructs the data the signature was calculated over and tries to
verify it.

The problem is that about 1 out of 2 generated signatures cannot be
decrypted and leads to the error: "RSA_public_decrypt: error:0407006A:rsa
routines:RSA_padding_check_PKCS1_type_1:block type is not 01"

On my test system, the signature is verified on the same system as it is
generated. So reversing the signature's data, as some have suggested, seems
illogical.

I use OpenSSL 0.9.6g, which is the newest available.

I am sorry, but I hardly know anything about the how the encryption itself
works. I am using the OpenSSL as an API, so please don't try to explain the
mathematical backgrounds to me, that's probably a waste of time :).

Thanks for listening to me, and thanks in advance if anyone can give me some
suggestions!

PeterV


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

Reply via email to