Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > KeyStore and PublicKey

Reply
Thread Tools

KeyStore and PublicKey

 
 
Rogue Chameleon
Guest
Posts: n/a
 
      09-27-2004
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...



 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      09-27-2004
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).

 
Reply With Quote
 
 
 
 
Rogue Chameleon
Guest
Posts: n/a
 
      09-27-2004
Could I just use the certificate to store the public key?



--
Rogue Chameleon...


"Sudsy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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).
>



 
Reply With Quote
 
Sudsy
Guest
Posts: n/a
 
      09-27-2004
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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert a Publickey in a Keystore file without using keytoland wihtout a cert file ? Pedro Martins Java 2 02-24-2006 08:50 PM
storing PublicKey in MS Access Bond Java 4 09-25-2005 02:05 PM
read a PublicKey-String into a PublicKey-object Sven Bluege Java 1 09-21-2005 06:25 PM
Crypto.PublicKey.RSA.error: Plaintext too large Ajay Brar Python 5 08-04-2004 12:05 PM
JSSE -- SSL with client authentication and keystore with multiplecerts John Salvo Java 3 09-09-2003 01:04 AM



Advertisments