• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need help on genarate public key,private key to test PGP encryption & decryption on windows system

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have some java code to encrypt a file using some public key. I have public key file. File encrypted successfully. Now I want to decrypt the encrypted file to get the original file. For that one I need private key & password. I don't have private key & password. I am using PGP encryption algorithim. Please guide me how to genarate public key file & private key file & password. So that I can test the code with one file encryption & decryption in my side. I am spending lot of time on the net. Bit difficult for me to understand all those.

Please help me on this.


Thanks in advance.


Regards,
ChakraPani.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You indicated you have a public key.
Is this your own key or is this someone elses who you intend to send the encrypted file to?

I assume it must be someone elses because if it was your own key you should already know the password and be able to generate the private key for it using PGP desktop or numerous free utilities to generate key pairs.

If my assumption is right, the easiest way to test your routine is to encrypt the file to TWO public keys. The public key of the person you intend to send the file to as well as your own public key. This way, you will both be able to decrypt the file.

You are probably already using encryptedDataGenerator.addMethod(PGPPublicKey) to add the public key you have.

Just do this a second time with your own key as well.

Then the file will be encrypted to both keys allowing both people to decrypt it.

 
ChakraPani Margani
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.
reply
    Bookmark Topic Watch Topic
  • New Topic