• Post Reply Bookmark Topic Watch Topic
  • New Topic

Asymmetric Encryption and Decryption  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am looking for some standard way of generating the key pair (Public and Private Key) and encrypting the text using the private key which would be decrypted at the other end using our public key.

Pls, either refer to me to some sites or with some open source where in I get the details how to proceed with the above approach.

Regards,
Krish
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard API for doing en-/decryption in Java Home page. You didn't mention which algorithm you want to use; if it's RSA, then you need to use an RSA provider like Bouncycastle, because JCE doesn't support RSA out of the box.
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for some standard way of generating the key pair (Public and Private Key) and encrypting the text using the private key which would be decrypted at the other end using our public key.


Normally, when you want to send text to the "other end", you ask for the other's public key, which you use to encrypt. The other end can then decrypt with their private key.

In your scenario, anyone listening to your conversation can decrypt -- as they can get your public key in the same way the other end gets it. The public key is.... public. You have to assume that everyone knows it.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!