Hi,

You simply can't guess the padding mode if you don't know it in advance. Imagine the security consequences if this was possible : it would mean that an attacker can have information about the clear text without having access to the private key!!

Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr

barcaroller wrote:
How can I tell what the padding mode was before I attempt to decrypt data. For example, when I use

        RSA_private_decrypt(encsize,
                            encdata,
                            decdata,
                            privkey,
                            RSA_PKCS1_PADDING)


I sometimes (but not always) get the following error:

error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type is not 02



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

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

Reply via email to