Solved

Help with PGP Encryption details in java

Posted on 2006-07-12
4
2,823 Views
Last Modified: 2008-01-09
Hey, we have a ftp process that moves files to external servers and want to use PGP to encrypt the file before they are sent. I read through all the documents and understand how the process works with the public/session keys etc. My questions are regarding implementing it in java on linux specifically:

1) There are tons of pgp packages out there, which one is the most popular/easiest to use?
2) Are there any sample codes that's basically a pgp helloworld and show you how to use pgp to encrpt a file
3) What exactly does the receiver have to do? for example i use a pgp package and encrypt the file and send it to the receiver's server. Now do they have to use the exact same package/version? or will any package able to decrypt the file?
4) From your experience what are some of the things the send and receiver need to agree on first before implementation? for example key bit size? public key? etc.

I am just looking for some good practical advise on starting pgp as have no past experience with any encryption development.

thank you for your time!
0
Comment
Question by:gagaliya
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 17091923
    Hi!

Use Java version of OpenPGP available at http://www.cryptix.org/
Sample code/tests is provided in the zip file.
Also take a look at www.pgpi.org and www.openpgp.org for more detail about PGP.
The reciever only has to have a PGP system on his side with the senders public key and his private key and the sender has to have the recievers public key to encrypt the file before sending it over. The sender signs the encrypted package to let the receiver know that the package comed from him.
No they don't have to have the exact same package/version.
The only thing the sender and reciever has to do is have each others public key and by loading the public key from a person into your PGP system you are saying that you trust the person.

Regards,
  Tomas Helgi
0
 
LVL 1

Author Comment

by:gagaliya
ID: 17104105
hey a followup question, the public key is it just some number we manually create? i know it has to be 128bit etc depends on the requirement but is it just something i create out of thin air? for example "sdjweuiui223893389bdbhsdhjvci3390:"  ? :)

thanks
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 17104360
public and private keys are generated with PGP while the user tapps on the keyboard for
several seconds.

Regards,
  Tomas Helgi
0
 
LVL 1

Author Comment

by:gagaliya
ID: 17122311
thank you, i will try out that package
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jdbc error in jsp application 20 63
difference between sorce folder and folder in eclipise 3 28
jsp insert to database example 2 46
java mysql insert application 14 28
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question