[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: "Tom Schuring" <TomS@esd.nec.com.au>, <iaik-jce@iaik.tu-graz.ac.at>*Subject*: Re: [iaik-jce] RSA type "PKCS #1 v1.5 block type 2"*From*: "Andreas Sterbenz" <Andreas.Sterbenz@iaik.tu-graz.ac.at>*Date*: Fri, 23 Jul 1999 17:13:48 +0200*Organization*: IAIK*References*: <E6F2CFA041D9D21190540000F801D22409458B@esdmfs.esd.nec.com.au>*Sender*: iaik-jce-owner@iaik.tu-graz.ac.at

What happens depends on the IAIK JCE version you are using, I suggest 2.51 and will describe this version only. If you do a getInstance() with "RSA" or "RSA/ECB/PKCS1Padding" the blocktype will be automatically selected as 1 or 2 as appropriate for the type of operation you are doing. You can also use "RSA/2/PKCS1Padding" which will basically do the same and throw an exception if blocktype is inappropriate (i.e. signature operation, for example private key encryption). Again, if that does not work the problem is not in the padding but someplace else (wrong key, corrupt data, etc.) as the two SSL implementations interoperate ok. Regards, Andreas Sterbenz mailto:Andreas.Sterbenz@iaik.tu-graz.ac.at -----Ursprüngliche Nachricht----- Von: Tom Schuring <TomS@esd.nec.com.au> An: <iaik-jce@iaik.tu-graz.ac.at> Gesendet: Freitag, 23. Juli 1999 01:01 Betreff: [iaik-jce] RSA type "PKCS #1 v1.5 block type 2" > Hello, > > I'm trying to find a "common" setting for RSA encryption between > IAIK-RSA and the OpenSSL-RSA. Apparently I need to specify "PKCS #1 > v1.5 block type 2" ,but I'm not sure which of the settings for IAIK I > should use to get these settings. I have tried all of the following: > > Cipher.getInstance("RSA"); > Cipher.getInstance("RSA/0/PKCS1Padding"); > Cipher.getInstance("RSA/1/PKCS1Padding"); > Cipher.getInstance("RSA/2/PKCS1Padding"); > > just before I do a: > > rsa.init(Cipher.ENCRYPT_MODE, key ); > return rsa.doFinal(myData); > > but I'm not sure what will give me "PKCS #1 v1.5 block type 2" > > Any Idea's would be most welcome,

**References**:**[iaik-jce] RSA type "PKCS #1 v1.5 block type 2"***From:*Tom Schuring <TomS@esd.nec.com.au>

- Prev by Date:
**Re: [iaik-jce] JDK 1.2 keytool and IAIKKeyStore** - Next by Date:
**[iaik-jce] SignedContent** - Prev by thread:
**[iaik-jce] RSA type "PKCS #1 v1.5 block type 2"** - Next by thread:
**[iaik-jce] Network Outage** - Index(es):