Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

need help on RSA

843810Mar 13 2003 — edited Jul 21 2003
Hi all,

I'm trying to use RSA algorithm but it's new to me, just wondering if someone could answer some of my questions:

1. What is the padding scheme people usually use? I see PKCS1, ISO9796, and ISO14888. Now PKCS1 says the message can not be more than k-11 bytes, where k is the bytes of RSA key. ISO9796 says it can not be more than k/2 bytes. What about ISO14888?

2. Some of the text I want to encrypt/decrypt are much larger than the RSA keys I have (which is 1024 bits). Is this do-able with any padding scheme of RSA? Or is RSA simply unable to encrypt text that is larger than its key size?

3. Does anyone know what padding scheme is implemented by Sun's implementation in J2SE (if it has an implementation)? Or Bounty-Castle? What about in openssl? I'm writing this application that involves smartcard, so I have to choose a padding scheme that will be supported by both the card and the off-card api I use. For off-card part, I have to do both a java and c version. I'm thinking about using Bounty-Castle for java part, and openssl's crypto library for c part. But since I'm totally new to this, not sure if these works.

Any help would be appreciated. Thanks a lot!
Michelle
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 18 2003
Added on Mar 13 2003
6 comments
461 views