aspose file tools*
The moose likes Java in General and the fly likes RSA Encryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "RSA Encryption" Watch "RSA Encryption" New topic
Author

RSA Encryption

Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
Hi,

If generated public and private key pairs using RSA algorithm, and after that I want to encrypt some data with the public key. How I can achieve it.
I need an example program to encrypt data using rsa public key. Is it necessary to use rsa algorithm in encyption, when we used rsa algorithm to created public and private keys. Please give me the answer with an example.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
The Java API for encryption is called JCE; a code sample can be found here. This one in particular uses DES, not RSA, but by reading the relevant javadocs you should be able to adapt it easily.

And yes, RSA keys can be used with RSA only.


Ping & DNS - updated with new look and Ping home screen widget
Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
Thankyou Ulf Dittmer, for giving an example.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RSA Encryption
 
Similar Threads
encryption decryption
Passing Public Key
Encryption of long strings
need to generate RSA keys from txt files
encryption using certificate