KeyStore and PublicKey

R

Rogue Chameleon

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?
 
S

Sudsy

Rogue Chameleon wrote:
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).
 
S

Sudsy

Rogue said:
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.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top