Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I've been familiarizing myself with the basics of PGP. If I understand correctly, PGP symmetrically encrypts the data of interest using a random single-use key, then encrypts the encrypted data and its symmetric key using the public key of the intended recipient.

What benefit does the inner layer of symmetric key encryption provide? I am having trouble understanding how this layer adds security over simply encrypting the data with the recipient's public key straight away.

share|improve this question
1  
See crypto.stackexchange.com/q/14/351 and crypto.stackexchange.com/q/586/351 and crypto.stackexchange.com/q/5782/351, which already contain answers to your question. –  D.W. Sep 3 '13 at 7:27
1  
I think you misunderstood a detail of PGP encryption. Only the random symmetric key is encrypted under the recipient's (asymmetric) public key. This way to encrypt stuff is quite common and is called KEM/DEM paradigm: Key Encapsulation Method/Data Encapsulation Method oy Hybrid Encryption. Some refs: en.wikipedia.org/wiki/Hybrid_cryptosystem and en.kryptotel.net/encryption.html –  ddddavidee Sep 3 '13 at 9:31
    
@ddddavidee, you hit the nail on the head. I wish you would submit this as an answer! –  UltraBird Sep 3 '13 at 10:52
add comment

3 Answers

up vote 9 down vote accepted

I think you misunderstood a detail of PGP encryption. Only the random symmetric key is encrypted under the recipient's (asymmetric) public key. This way to encrypt stuff is quite common and is called KEM/DEM paradigm: Key Encapsulation Method/Data Encapsulation Method oy Hybrid Encryption. Some refs: en.wikipedia.org/wiki/Hybrid_cryptosystem and en.kryptotel.net/encryption.html.

share|improve this answer
add comment

KEM/DEM hybrid encryption has another advantage. It enables a very efficient multi-recipient encryption. The payload is encrypted and transmitted only one time.

Haven't you wondered yet why you are able to decrypt and read your own message although it was encrypted with the recipient's public key? Normally PGP encrypts the message key for symmetric encryption public keys of the recipient and your own public key. That way the message is encrypted just once. An additional recipient increases the size of the message by just a couple of bytes -- IIRC far less than 100 bytes.

share|improve this answer
1  
+1 multi-recipient encryption is a big point with email. –  Xeoncross Sep 3 '13 at 14:47
add comment

A PGP encrypted message can be hundreds or even thousands of bytes. Encrypting and decrypting large amounts of data using asymmetric algorithms is extremely slow. Encrypting only 32 to 16 bytes (the symmetric key) is much faster.

Additionally, if you encrypt the same message twice with an asymmetric algorithm, you will get the exact same ciphertext. Using a symmetric algorithm with new random keys makes each message indistinguishable from eachother.

share|improve this answer
3  
Just to quantify, a modern symmetric cipher takes 1-10 cycles per byte to encrypt an arbitrary length message while an assymetric algorithm takes hunders of thousands of cycles to encrypt a single small constant length message. –  nightcracker Sep 3 '13 at 11:30
1  
Minor nit: asymmetric encryption algorithms are nondetermanistic (even RSA, which uses random padding), and hence encrypting the same message twice yields distinct messages. This doesn't change your main point. –  poncho Sep 3 '13 at 11:57
    
Minor nit nit: RSA doesn't specify any padding schema. That's why we have PKCS#1. It provides RSASSA-PSS (Probabilistic Signature Scheme) and RSAES-OAEP (Optimal Asymmetric Encryption Scheme). Crypto newbies often make the mistake to create their own padding schema. –  Tiran Sep 3 '13 at 13:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.