PGP (Or GnuGP) under Java

Discussion in 'Java' started by Luc The Perverse, Nov 28, 2005.

  1. If the only needed functionalities were message encryption and decryption -
    how difficult would it be to write a PGP client under Java?

    It seems like most (all?) of the algorithms used are available in Java.
    Yet I see no mention anywhere of a PGP client made in Java, and I don't know
    why.

    --
    ALEX TAYLOR
     
    Luc The Perverse, Nov 28, 2005
    #1
    1. Advertising

  2. Luc The Perverse

    Paul Rubin Guest

    "Luc The Perverse" <> writes:
    > If the only needed functionalities were message encryption and
    > decryption - how difficult would it be to write a PGP client under Java?


    Just what we call a "simple matter of programming". The message formats
    are documented in RFC 2440.

    > It seems like most (all?) of the algorithms used are available in
    > Java. Yet I see no mention anywhere of a PGP client made in Java,
    > and I don't know why.


    Nobody has wanted one enough to bother writing one. Maybe you will be
    the first.

    Actually, I think hushmail.com uses PGP message formats in their web
    applet, but that's maybe short of a complete implementation.
     
    Paul Rubin, Nov 28, 2005
    #2
    1. Advertising

  3. Paul Rubin wrote:

    > "Luc The Perverse" <> writes:
    >> If the only needed functionalities were message encryption and
    >> decryption - how difficult would it be to write a PGP client under Java?

    >
    > Just what we call a "simple matter of programming". The message formats
    > are documented in RFC 2440.


    J2SE already includes all necessary crypto algorithms and a powerful key
    management system. Through Xerxes, you also got a Base64 coder. HTTP
    support is already there, so it's just upon gluing all the components
    together and interface with a usable GUI. However, as shown below, it's not
    such a good idea.

    >> It seems like most (all?) of the algorithms used are available in
    >> Java. Yet I see no mention anywhere of a PGP client made in Java,
    >> and I don't know why.

    >
    > Nobody has wanted one enough to bother writing one. Maybe you will be
    > the first.


    Actually, there is no need for such a thing. We already got a JNI interface
    for GnuPG's library GPGme, whereas GnuPG is an multiplatform, stable and
    long-term proven software. Which is also way faster than Java when
    incoporating cryoptographic operations, and supports OS specific protection
    mechanisms like page locking, memory protection, random number generation,
    ....

    > Actually, I think hushmail.com uses PGP message formats in their web
    > applet, but that's maybe short of a complete implementation.


    Guess what they use...
    --
    Dieser Schrieb stellt eine private Meinungsäußerung des Verfassers im
    Sinne der gesetzlich garantierten Meinungsfreiheit dar. Wem das nicht
    passt, der wende sich an das Bundesverfassungsgericht. Viel Erfolg!
    Key: 0xA0E28D18 FP: 83AE 1136 1E2B 9767 8FB2 7594 4128 1A9E A0E2 8D18
     
    Sebastian Gottschalk, Nov 28, 2005
    #3
  4. Luc The Perverse

    Will Dickson Guest

    On Sun, 27 Nov 2005 16:21:49 -0800, Paul Rubin wrote:

    > "Luc The Perverse" <> writes:
    >> If the only needed functionalities were message encryption and
    >> decryption - how difficult would it be to write a PGP client under Java?

    >
    > Just what we call a "simple matter of programming". The message formats
    > are documented in RFC 2440.
    >
    >> It seems like most (all?) of the algorithms used are available in
    >> Java. Yet I see no mention anywhere of a PGP client made in Java,
    >> and I don't know why.

    >
    > Nobody has wanted one enough to bother writing one. Maybe you will be
    > the first.


    For the crypto "backend", http://www.bouncycastle.org/

    The user interface is up to you!

    Will.
     
    Will Dickson, Nov 29, 2005
    #4
  5. Luc The Perverse

    didisoft

    Joined:
    Sep 26, 2009
    Messages:
    1
    Example

    Here is an example code that encrypts PGP,
    Just four lines of code. I always thought it shouldn't be so hard to do such a simple thing:)

    import com.didisoft.pgp.PGPLib;

    public class EncryptWithoutKeystore {
    public static void main(String[] args) throws Exception{
    PGPLib pgp = new PGPLib();
    boolean asciiArmor = false;
    boolean withIntegrityCheck = false;
    pgp.encryptFile("INPUT.txt", "public_key.pkr", "OUTPUT.pgp", asciiArmor, withIntegrityCheck);
    }
    }
     
    Last edited: Sep 26, 2009
    didisoft, Sep 26, 2009
    #5
  6. Luc The Perverse

    joehobson

    Joined:
    Jun 10, 2011
    Messages:
    1
    Shouldn't be so hard, but why does it have to be so expensive?
     
    joehobson, Jun 10, 2011
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zapp

    Perl PGP question

    Zapp, Sep 9, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,365
  2. Apollo
    Replies:
    0
    Views:
    6,036
    Apollo
    Nov 29, 2003
  3. Ray Kane

    JavaMail and PGP

    Ray Kane, Jan 12, 2005, in forum: Java
    Replies:
    0
    Views:
    1,706
    Ray Kane
    Jan 12, 2005
  4. Replies:
    6
    Views:
    7,161
  5. Alessandro Bottoni

    Decrypting GPG/PGP email messages

    Alessandro Bottoni, Sep 1, 2005, in forum: Python
    Replies:
    10
    Views:
    889
    Paul Rubin
    Sep 3, 2005
Loading...

Share This Page