wikipedia states that OpenPGP is currently defined with RFC 4880 which defines a very simple process that doesn't seem like it represents modern RSA + AES encrypted email:

  1. The sender creates a message.
  2. The sending OpenPGP generates a random number to be used as a session key for this message only.
  3. The session key is encrypted using each recipient's public key. These "encrypted session keys" start the message.
  4. The sending OpenPGP encrypts the message using the session key, which forms the remainder of the message. Note that the message is also usually compressed.
  5. The receiving OpenPGP decrypts the session key using the recipient's private key.
  6. The receiving OpenPGP decrypts the message using the session key. If the message was compressed, it will be decompressed.

Where is the PKCS v1.5 or OAEP padding? Where is the hash/hmac integrity check? Where is the signature?

Can someone detail the actual modern PGP process or point me to a more complete explanation of the process?


1 Answer 1


Where is the PKCS v1.5 or OAEP padding?

For RSA, PKCS1v1.5 is in 5.1. The other kind of publickey encryption used by PGP and described in the same section, usually written El Gamal or abbreviated EG but here written Elgamal, is already randomized and doesn't need to pad the encrypted data, which is for either algorithm a slightly modified form of the 'session' key. (Since PGP is designed and used in a way that I don't consider to really be a session, I often substitute the more generic term DEK = Data Encryption Key.)

Where is the hash/hmac integrity check?

That's a 'recent' (this century) addition. See 5.13 and 5.14.

Where is the signature?

2.1 is only confidentiality. The next section introduces Authentication via Digital Signature and the details are in 5.2 and 5.4 although it's a bit tedious to disentangle signing of data from signing of keys which is more complicated but a vital part of PGP.

  • So it is correct to say OpenPGP doesn't use OAEP?
    – Zach
    Feb 2, 2023 at 19:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .