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!

Encrypting a message in Java using RSA algorithm with .net public key

843811Sep 9 2008 — edited Sep 10 2008
I want to encrypt a string with using in java with public key generated in .net.
Sample of public key is
<Modulus>q4uA0cngLkJwi0IOcY8R7LHM+SRDIgoqsS/KhXerkeLyvmqx4IladZTJ13zlTDnhmfYzOvtRNXbIktaiho9OVANf8yKMXTdWPEnyEfbBnDRtwfRKO/Js+ODWiVSXr+7rHMbrT4+&#xA;tBz+2+MUlG3I38KvrJqfQzskbPkXHEwdIQOM=</Modulus>
<Exponent>AQAB</Exponent>

I have to use UTF8 encoding.
JDK version I am using is 1.3. Currently I am trying it with bouncycastle-jce-jdk13-112.jar but each time I encrypt it, I am getting a different encrypted String.

I am using ECB mode and NoPadding.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 8 2008
Added on Sep 9 2008
7 comments
1,237 views