This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions about email encryption and signing with S/MIME

 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am using JavaMail API to send emails. I have questions about encrypting and signing outgoing emails. I have least knowledge on this topic so please excuse me for my ignorance.

I have been reading various posts (here on Java Ranch and elsewhere) on how to encrypt emails but couldn't quite get the hang of what pieces I need to put in place to achieve this. One way (suggested by Ulf Dittmer and many other posts) is to use S/MIME and this is what I'd like to use.

Q1. If I encrypt and sign an outgoing email (using S/MIME as many posts suggest), would it be readable by the intended receiver anywhere in the world? Or is it that I have to somehow communicate to the receiver how to decrypt the message?

Encrypting the email

Here is excerpt for email encryption about which I have questions:


Q2. What is this "S/MIME keystore" and what is "Key Alias"?

Q3. Is this how I should generate it:


Q4. What is alias in above command?

Q5. What is public Key here?

Q6. Is this how it I should generate it:


Q7. What is ".csr" file in the command above? How can I generate this? Is the keystore file the same as in the first command above?

Q8. I may well be wrong but do I need to buy some sort of Security Certificate (SSL Certificate) from some vendor in order to be able to encrypt/sign the out going emails?

Signing the email

Here is the excerpt for signing the email:



I guess answers to my questions in the S/MIME section will answers my questions for this signing part.

And I found these excerpts here.

Any help/guidance is highly appreciated.

Regards
Saeed
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This library may help: http://javamail-crypto.sourceforge.net/ which claims to support OpenPGP and S/MIME with JavaMail.

You may want to read up on Public Key Infrastructure (PKI) in order to understand what the role of public and private keys is.
 
Saeed Amer
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf. I'll look into it.

Regards
Saeed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic