mirror of
https://codeberg.org/openpgp/notes.git
synced 2025-09-09 11:19:41 +02:00
write ch10
This commit is contained in:
parent
05b6e46d25
commit
bfcbbee8ae
1 changed files with 20 additions and 8 deletions
|
@ -10,12 +10,19 @@ SPDX-License-Identifier: CC-BY-SA-4.0
|
|||
|
||||
## High-Level overview of the message encryption process
|
||||
|
||||
OpenPGP uses a [hybrid cryptosystem](hybrid_cryptosystems). Encryption is performed in two distinct steps:
|
||||
Encryption in OpenPGP is performed in two distinct steps:
|
||||
|
||||
- The plaintext is encrypted with a (secret) symmetric key, the [*message key*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-confidentiality-via-encrypt). The (potentially large) payload only needs to be stored once in its encrypted form, even if it is encrypted to multiple recipients.
|
||||
- For each recipient of the message, a packet with information about the message key is generated.
|
||||
- Usually, the information that allows retrieval of the message key is encrypted to a public encryption component key of the recipient.
|
||||
- Alternatively - or additionally - the secret symmetric key may also be encrypted using a passphrase, in place of an asymmetric key. This is a specialized and less commonly used mode of operation that doesn't require OpenPGP certificates.
|
||||
1. The plaintext is encrypted with a (secret) symmetric key, the [*message key*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-confidentiality-via-encrypt). The (potentially large) ciphertext only needs to be stored once, even if it is sent to multiple recipients. All recipients get access to the same shared symmetric key for this message.
|
||||
2. For each recipient of the message, a packet with information about the message key is generated.
|
||||
- Usually, the information that allows retrieval of the message key is encrypted to a public encryption component key of the recipient.
|
||||
- Alternatively - or additionally - the secret symmetric key may also be encrypted using a passphrase. This is a specialized and less commonly used mode of operation that doesn't require OpenPGP certificates.
|
||||
|
||||
|
||||
```{admonition} TODO
|
||||
:class: warning
|
||||
|
||||
This text could center either the message, or the session key. Both are awkward, in different ways.
|
||||
```
|
||||
|
||||
## Generations of encryption mechanisms in OpenPGP
|
||||
|
||||
|
@ -29,17 +36,22 @@ Older, legacy encryption mechanisms exist in OpenPGP. However, those must not be
|
|||
|
||||
*Symmetrically Encrypted Integrity Protected Data* (SEIPD) packets represent the symmetric aspect of OpenPGP's encryption mechanism. The function of these packets is entirely independent of (asymmetric) OpenPGP keys. The SEIPD mechanisms only deal with symmetric cryptography.
|
||||
|
||||
A SEIPD packet contains the actual payload: the ciphertext of the encrypted message. For a large encrypted message, the SEIPD packet will also be large.
|
||||
|
||||
```{note}
|
||||
SEIPD packets are the successor to the [Symmetrically Encrypted Data](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-symmetrically-encrypted-dat) packet, which is obsolete.
|
||||
```
|
||||
|
||||
When decrypted, the data contained in a SEIPD packet forms an [OpenPGP message](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-openpgp-messages). That is, the decrypted data consists of a series of OpenPGP packets.
|
||||
|
||||
In both versions of SEIPD, the decryptor has obtained a *session key* in a previous step - before processing the SEIPD packet. Using this session key, the decryptor can decrypt the SEIPD packet and process the contained plaintext data.
|
||||
In both versions of SEIPD, the decryptor must have obtained a *session key* in a previous step, before processing the SEIPD packet. Using this session key, the decryptor can decrypt the SEIPD packet and process the plaintext data that it contains.
|
||||
|
||||
Both versions of SEIPD can be used in combination with two mechanisms that provide *session keys*:
|
||||
- [Public-Key Encrypted Session Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-public-key-encrypted-sessio) packets (PKESK) and
|
||||
- [Symmetric-Key Encrypted Session Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#skesk) packets (SKESK)
|
||||
|
||||
- [Public-Key Encrypted Session Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-public-key-encrypted-sessio) (PKESK) packets and
|
||||
- [Symmetric-Key Encrypted Session Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#skesk) (SKESK) packets.
|
||||
|
||||
The typical combination of mechanisms for encryption in OpenPGP is a [hybrid cryptosystem](hybrid_cryptosystems), consisting of [Public-Key Encrypted Session Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-public-key-encrypted-sessio) packets (PKESK), and a *Symmetrically Encrypted Integrity Protected Data* (SEIPD) packet. In this combination, an asymmetric cryptographic mechanism is used to protect a *session key*, with PKESK packets, and SEIPD packet is used to symmetrically encrypt the plaintext.
|
||||
|
||||
(SEIPDv2)=
|
||||
### v2 SEIPD, based on AEAD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue