Skip to main content
added 1 characters in body
Source Link
Jakub Žitný
  • 389
  • 1
  • 2
  • 9

I'd like to know if it's possible to use openssl command to retrieve and decrypt the key for encrypting/decryptig email content. I know I can decrypt the whole encrypted mail by something like this

openssl smime -decrypt -in enc_mail.eml -inkey recip_priv.pem > dec_mail.eml

However, I'd like to see the steps in between. If I understand the procedure right, the actual content of the email is being encrypted not by the recipient's pubkey, but with randomly generategenerated key on sender's side. This key is then encrypted with recipient's pubkey and attached to the encrypted message. Am I right? Is it possible to use openssl to show me the attached encrypted key and decrypt it separately?

Thanks.

I'd like to know if it's possible to use openssl command to retrieve and decrypt the key for encrypting/decryptig email content. I know I can decrypt the whole encrypted mail by something like this

openssl smime -decrypt -in enc_mail.eml -inkey recip_priv.pem > dec_mail.eml

However, I'd like to see the steps in between. If I understand the procedure right, the actual content of the email is being encrypted not by the recipient's pubkey, but with randomly generate key on sender's side. This key is then encrypted with recipient's pubkey and attached to the encrypted message. Am I right? Is it possible to use openssl to show me the attached encrypted key and decrypt it separately?

Thanks.

I'd like to know if it's possible to use openssl command to retrieve and decrypt the key for encrypting/decryptig email content. I know I can decrypt the whole encrypted mail by something like this

openssl smime -decrypt -in enc_mail.eml -inkey recip_priv.pem > dec_mail.eml

However, I'd like to see the steps in between. If I understand the procedure right, the actual content of the email is being encrypted not by the recipient's pubkey, but with randomly generated key on sender's side. This key is then encrypted with recipient's pubkey and attached to the encrypted message. Am I right? Is it possible to use openssl to show me the attached encrypted key and decrypt it separately?

Thanks.

Tweeted twitter.com/#!/StackSecurity/status/400001218460012544
Source Link
Jakub Žitný
  • 389
  • 1
  • 2
  • 9

SMIME email decryption key with OpenSSL

I'd like to know if it's possible to use openssl command to retrieve and decrypt the key for encrypting/decryptig email content. I know I can decrypt the whole encrypted mail by something like this

openssl smime -decrypt -in enc_mail.eml -inkey recip_priv.pem > dec_mail.eml

However, I'd like to see the steps in between. If I understand the procedure right, the actual content of the email is being encrypted not by the recipient's pubkey, but with randomly generate key on sender's side. This key is then encrypted with recipient's pubkey and attached to the encrypted message. Am I right? Is it possible to use openssl to show me the attached encrypted key and decrypt it separately?

Thanks.