KeyStore and PublicKey

Discussion in 'Java' started by Rogue Chameleon, Sep 27, 2004.

  1. Hi all

    My objective is to pass an encrypted file between two servers. On server A,
    I want to use a public key to encrypt the file. On server B, I want to use
    a private key to decrypt the file.

    What I've determined so far is:

    - I will use CipherOutputStream to write out the encrypted file
    - I will use CipherInputStream to read in the encrypted file
    - I will have a password-protected .keystore file on server B that will
    contain the private key

    My question is, how do I store the public key on server A?


    --
    Rogue Chameleon...
    Rogue Chameleon, Sep 27, 2004
    #1
    1. Advertising

  2. Rogue Chameleon

    Sudsy Guest

    Rogue Chameleon wrote:
    <snip>
    > My question is, how do I store the public key on server A?


    You can use a Java Key Store (JKS) to store X.509 certificates
    (containing the public key).
    Sudsy, Sep 27, 2004
    #2
    1. Advertising

  3. Could I just use the certificate to store the public key?



    --
    Rogue Chameleon...


    "Sudsy" <> wrote in message
    news:...
    > Rogue Chameleon wrote:
    > <snip>
    > > My question is, how do I store the public key on server A?

    >
    > You can use a Java Key Store (JKS) to store X.509 certificates
    > (containing the public key).
    >
    Rogue Chameleon, Sep 27, 2004
    #3
  4. Rogue Chameleon

    Sudsy Guest

    Rogue Chameleon wrote:
    > Could I just use the certificate to store the public key?


    Sure, if you've already got the .crt file. You can run into
    problems depending on the classes you use however. Some
    REQUIRE the use of a keystore (JKS, pkcs12, etc.)
    Sudsy, Sep 27, 2004
    #4
    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. John Salvo
    Replies:
    3
    Views:
    4,742
    John Salvo
    Sep 9, 2003
  2. Bond
    Replies:
    4
    Views:
    501
    Bjorn Abelli
    Sep 25, 2005
  3. Sven Bluege
    Replies:
    1
    Views:
    829
    Roedy Green
    Sep 21, 2005
  4. Pedro Martins
    Replies:
    2
    Views:
    2,100
    Roedy Green
    Feb 24, 2006
  5. Ajay Brar
    Replies:
    5
    Views:
    768
    Peter Hansen
    Aug 4, 2004
Loading...

Share This Page