• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Asymmetric Encryption and Decryption

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Do Re Mi Fa So La Tiny Ad
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic