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!

RSA OAEP encryption problem

843811Sep 8 2009
Hello,

I encrypt data with OAEP Padding in java but i´ m not able to decrypt it with openssl. If i use PKCS1Padding all works fine. This is (a small part of) my code:
Cipher cipherInstance = Cipher.getInstance("RSA/ECB/OAEPWithSHA1AndMGF1Padding");
cipherInstance.init(Cipher.ENCRYPT_MODE, pubKey);
enc= cipherInstance.doFinal(cipher);
Isn´t that enough? I already tried other things, but nothing works and i thought that this should be the right way. But it doesn´t seen so. I hope anybody can help me. Thank you and sorry for my bad english.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2009
Added on Sep 8 2009
0 comments
342 views