Can S/MIME be still considered secure? Previoulsy I had asked this question at https://stackoverflow.com/questions/18235983/can-s-mime-be-still-considered-secure but I feel this forum is topic-wise the right place.

Recently there has been a discussion whether secret service agencies have access to certification authorities. Also before that several CAs were facing security problems being attacked by hackers.

Given this, I am wondering whether S/MIME can be still considered secure. Some time ago I had generated a free email certificate from one CA. To my surprise the key had not been generated with a tool on my own computer; instead it was generated by the CA and emailed to me. I am wondering: 


If this CA is infiltrated by a secret service agency, will they have access to my private key and can use it to decrypt emails encrypted by my public key? 
Are there tools to generate S/MIME keys on an own computer? If so, is it possible to send only public keys to a CA to get them signed?
Yes, obviously if the CA generated your private key, they might keep it and share it with anybody.
Yes on both counts.


In fact, the normal way to generate a certificate -- whether for a Web server (TLS) or for yourself (S/MIME or TLS client) -- is to create a "Certificate Signing Request" and send it to the CA. The CSR includes your public key, not your private key; the private key never leaves your own computer.

See http://www.howtoforge.com/how-to-encrypt-mails-with-ssl-certificates-s-mime for step-by-step instructions using OpenSSL. Note: That page has instructions for creating a self-signed certificate, but further down it shows how to create a CSR and then sign it with a private CA. In practice you just send the CSR to the CA and pay them to sign it.

Assuming this is how you get your signed certificate, the only thing you lose when the CA is compromised is that somebody else could pretend to be you. That does sacrifice one of the purposes of S/MIME (authentication). Such forgeries are very easy to detect after the fact, so even if our security services have this capability, they could not use it very often without getting caught.