mirror of
https://codeberg.org/openpgp/notes.git
synced 2025-09-09 11:19:41 +02:00
ch12: compression draft
This commit is contained in:
parent
710c69ee86
commit
d48f816d5b
1 changed files with 25 additions and 2 deletions
|
@ -5,6 +5,29 @@ SPDX-License-Identifier: CC-BY-SA-4.0
|
|||
|
||||
# Compression
|
||||
|
||||
## Zooming in: Packet structure
|
||||
Optional compression of data is one element of OpenPGP's composable functionality. Compression within OpenPGP can be convenient to applications.
|
||||
|
||||
### Decompression yields a 'wrapped' openpgp packet stream
|
||||
In one use case, this functionality is particularly helpful: When encrypting a message, the encrypted output is by definition high-entropy, and cannot be compressed anymore - even if the plaintext message was low-entropy, and could have been compressed well (like, for example, a text-file).
|
||||
|
||||
|
||||
This means that to use whatever potential for compression exists, the message must be compressed *before* encryption. OpenPGP offers an integrated compression mechanism to make this convenient (otherwise, messages would need to be compressed and decompressed before and after encryption, to achieve the same space-efficiency).
|
||||
|
||||
## Decompression yields a 'wrapped' OpenPGP packet stream
|
||||
|
||||
Compression in OpenPGP is a simple mechanism: A [Compressed Data packet](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-compressed-data-packet-type) acts as a compressed container for a series of OpenPGP packets.
|
||||
|
||||
The compressed data packet consists of the specification of which compression algorithm is used, followed by a compressed representation of the contained data.
|
||||
|
||||
The series of OpenPGP packets inside the Compressed Data packet can be handled like any stream of OpenPGP packets.
|
||||
|
||||
## Typical usage
|
||||
|
||||
Compressed data packets are often used inside [encrypted data packets](encryption_chapter), or wrapping the data of an [inline-signed message](inline_signature).
|
||||
|
||||
---
|
||||
|
||||
```{admonition} TODO
|
||||
:class: warning
|
||||
|
||||
link to a packet dump example that shows compression
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue