Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

SMIME using encrypted key

by quasi (Initiate)
on Mar 20, 2013 at 00:34 UTC ( #1024407=perlquestion: print w/ replies, xml ) Need Help??
quasi has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Crypt::SMIME If I decrypt a message the result is encrypted. I assume this is because I need to decrypt the key sent with the message and then use it to decrypt the rest of the message. How can I do this?

Comment on SMIME using encrypted key
Re: SMIME using encrypted key
by Anonymous Monk on Mar 20, 2013 at 07:10 UTC

    I'm using Crypt::SMIME If I decrypt a message the result is encrypted. I assume this is because I need to decrypt the key sent with the message and then use it to decrypt the rest of the message. How can I do this?

    You're confused. You need public key to encrypt a message, you need private key to sign/decrypt a message. You don't include either key in the message. You share public keys via a certificate authority / keyserver. You don't share private keys.

Re: SMIME using encrypted key
by quasi (Initiate) on Mar 20, 2013 at 14:15 UTC
    From what I understand: A sender encrypts a message with their cert then encrypts their cert with the recipients public cert and sends it with the message. The recipient uses their private key to decrypt the sender's cert which is then used to decrypt the message.
      Resolved. After looking at it with a different text editor, vi was choking on it, I could see that an attachment was base64 encoded.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1024407]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-08-23 00:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls