File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Questions about email encryption and signing with S/MIME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Questions about email encryption and signing with S/MIME" Watch "Questions about email encryption and signing with S/MIME" New topic
Author

Questions about email encryption and signing with S/MIME

Saeed Amer
Ranch Hand

Joined: Jan 20, 2004
Posts: 140
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
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
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.


Ping & DNS - my free Android networking tools app
Saeed Amer
Ranch Hand

Joined: Jan 20, 2004
Posts: 140
Thanks Ulf. I'll look into it.

Regards
Saeed
 
Don't get me started about those stupid light bulbs.
 
subject: Questions about email encryption and signing with S/MIME