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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    5,228
    John Salvo
    Sep 9, 2003
  2. Andrew Thompson
    Replies:
    5
    Views:
    9,817
    Andrew Thompson
    Dec 12, 2003
  3. Bond
    Replies:
    4
    Views:
    578
    Bjorn Abelli
    Sep 25, 2005
  4. Sven Bluege
    Replies:
    1
    Views:
    937
    Roedy Green
    Sep 21, 2005
  5. Pedro Martins
    Replies:
    2
    Views:
    2,455
    Roedy Green
    Feb 24, 2006
  6. Ajay Brar
    Replies:
    5
    Views:
    968
    Peter Hansen
    Aug 4, 2004
  7. Roedy Green

    Vista and .Keystore

    Roedy Green, Mar 11, 2007, in forum: Java
    Replies:
    7
    Views:
    574
    Roedy Green
    Mar 13, 2007
  8. Replies:
    0
    Views:
    504
Loading...