On Wed, Jun 01, 2005, Suram Chandra Sekhar wrote: > Hi, > Thank you very much for the reply. > > I still have some confusion w.r.t to the version of the draft (PKCS#1 v2.0 > and PKCS#1 v2.1 specification). > > I was referring to rfc3447 (PKCS#1 v2.1) and the older draft > PKCS #1: RSA Cryptography Specifications Version 2.0. > > rfc3447(PKCS#1 v2.1) section 9.2 (EMSA-PKCS1-v1_5) says in step 5 as > follows... > > 5. Concatenate PS, the DER encoding T, and other padding to form the > encoded message EM as > EM = 0x00 || 0x01 || PS || 0x00 || T. > > PKCS#1 v2.0 section 9.2.1 (EMSA_PKCS1-v1_5) says in step 5 as follows.. > > 5. Concatenate PS, the DER encoding T, and other padding to form the > encoded message EM as: EM = 01 || PS || 00 || T > > > When I use RSA_PKCS1_PADDING in Openssl function RSA_private_encrypt(), it > is adding the stating bytes as 00 01 as defined in > PKCS#1 v2.1. > > But as per PKCS#1 v2.0 specification, it must be only 01. > > The protocol requirement is to use PKCS#1v2.0. >
Then the PKCS#1v2.0 is wrong. That section is supposed to describe the system used by PKCS#1 v1.5 which includes the zero. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]