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.