pgpfan:tpp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pgpfan:tpp [2020/06/11 01:12] – Messed up authors format b.walzer | pgpfan:tpp [2024/05/02 13:39] (current) – We have a reference now b.walzer | ||
---|---|---|---|
Line 1: | Line 1: | ||
======The PGP Problem: A Critique====== | ======The PGP Problem: A Critique====== | ||
- | The article can be found here: | + | You can read the [[https:// |
+ | |||
+ | The anti-PGP rant in question | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | This is a pretty good rant. I feel like I am attacking a work of art with an axe here, but the rant promotes misconceptions that need to be addressed. | ||
+ | |||
+ | I only use Signal Messenger as a counter example in the following because the author of the rant uses it as an example of something that they think could be used as a replacement for encrypted email. I currently consider Signal Messenger one of the best in its class (2021). | ||
+ | |||
+ | >//The PGP Problem// | ||
+ | |||
+ | > | ||
+ | |||
+ | The entire rant is basically about how OpenPGP is old and therefore bad and how new things, sometimes only vaguely defined, are good. So let's address this first. | ||
+ | |||
+ | If someone, while trying to sell you some high security mechanical system, told you that the system had remained unbreached for the last 20 years you would take that as a compelling argument. You would be unlikely to demand a newer design. Normally old designs that have stood the test of time are valued. Cryptography is based on mathematical/ | ||
+ | |||
+ | So the rant is contending something that goes against conventional expectations. Normally that would require some evidence and/or a good argument. The rant provides neither. | ||
+ | |||
+ | > | ||
+ | |||
+ | Leaving out the context can make a rant flow better but quietly switching back and forth between fundamentally different issues of specification and implementation does not at all improve the chances of proper understanding. | ||
+ | |||
+ | >// | ||
>For reasons none of us here in the future understand, PGP has a packet-based structure. | >For reasons none of us here in the future understand, PGP has a packet-based structure. | ||
- | That is because a long term standard must be extensible. Thus the fields can not be fixed and it must be possible to add new types. | + | A long term standard must be extensible. Thus the fields can not be fixed and it must be possible to add new types. |
+ | |||
+ | |tag|length|data| | ||
+ | |||
+ | Explicitly defining the length at the start of the packet makes the result resistant | ||
>There are at least 8 different ways of encoding the length of a packet, depending on whether you’re using “new” or “old” format packets. | >There are at least 8 different ways of encoding the length of a packet, depending on whether you’re using “new” or “old” format packets. | ||
- | This is true in a narrow technical sense but is misleading. | + | This is true in a narrow technical sense but is misleading. |
+ | does the same sort of thing but no one is claiming that there are 6 (4) different UTF-8 representations. | ||
>The “new format” packets have variable-length lengths, like BER (try to write a PGP implementation and you may wish for the sweet release of ASN.1). | >The “new format” packets have variable-length lengths, like BER (try to write a PGP implementation and you may wish for the sweet release of ASN.1). | ||
- | The [[https://tools.ietf.org/ | + | For part of my working life I had to implement low level protocols from specifications of various kinds. If I had of encountered the OpenPGP packet structure I would have considered implementing to be a relatively good time. The reader is invited to experience the overwhelming complexity of the OpenPGP packet structure. It is defined in [[https://datatracker.ietf.org/doc/ |
- | >... which also follow this deranged format. | + | >The most recent keyserver attack happened because GnuPG accidentally went quadratic in parsing keys, which also follow this deranged format. |
- | I will acknowledge that this is a rant. So it primarily expresses | + | This had nothing to do with the parsing of the packet format and it was not accidental. GnuPG undoubtedly did things the way they did for simplicity. That' |
>The actual system doesn’t get simpler. | >The actual system doesn’t get simpler. | ||
Compared to what working public key based public key system? OpenPGP as a protocol is relatively [[pgpfan: | Compared to what working public key based public key system? OpenPGP as a protocol is relatively [[pgpfan: | ||
+ | |||
+ | >//Mired In Backwards Compatibility// | ||
>If you’re lucky, your local GnuPG defaults to 2048-bit RSA, ... | >If you’re lucky, your local GnuPG defaults to 2048-bit RSA, ... | ||
- | Which is [[pgpfan: | + | Which is [[pgpfan: |
>... the 64-bit-block CAST5 cipher in CFB, ... | >... the 64-bit-block CAST5 cipher in CFB, ... | ||
- | Here are the symmetrical ciphers GnuPG version 2.2.12 | + | Here are the symmetrical ciphers GnuPG version 2.2.12 |
< | < | ||
Line 37: | Line 66: | ||
</ | </ | ||
- | CAST5 isn't even in the list, much less a default of some sort. | + | CAST5 isn't even in the list, much less a default of some sort. CAST5 remains unbroken and would be quite suitable for use in a length limited, offline, stateless medium like email. CAST5 actually serves as an example of how old encryption methods can still be completely usable. CFB ([[pgpfan: |
+ | |||
+ | >...that mixing compression and encryption is dangerous... | ||
+ | |||
+ | This comes from an attack on an online, stateful encryption protocol that involved information leakage due to compression. This sort of attack is not applicable to the sort of offline, stateless systems that OpenPGP is used for. See: [[pgpfan: | ||
+ | |||
+ | Mixing apples and oranges in this way is common. The rant fails to make this distinction in more than one place. | ||
+ | |||
+ | >// | ||
+ | |||
+ | Here we are clearly talking about implementations... | ||
+ | |||
+ | >> | ||
+ | |||
+ | There have been several encrypted messaging usability studies conducted over the years. They tend to use OpenPGP implementations rather than the encrypted messenger of the week for obvious reasons. They are // | ||
+ | |||
+ | In a usability study involving Signal(([[https:// | ||
+ | On the Usability and Security of State-of-the-Art | ||
+ | Secure Mobile Messaging]])), | ||
+ | |||
+ | >// | ||
>PGP begs users to keep a practically-forever root key tied to their identity. | >PGP begs users to keep a practically-forever root key tied to their identity. | ||
- | Most people prefer to keep their identity indefinitely. That is why, say, the Signal protocol also has a " | + | Most people prefer to keep their identity indefinitely. That is why, say, the Signal protocol also has a " |
+ | identity" | ||
>The PGP cheering section will immediately reply “that’s why you keep keys on a Yubikey”. | >The PGP cheering section will immediately reply “that’s why you keep keys on a Yubikey”. | ||
- | That particular cheering section might eventually get around to that, but they first would mention | + | ... which would be a reasonable point. An air gapped system such as a Yubikey does significantly reduce |
- | Subkeys are a fairly fundamental PGP concept... | + | >// |
- | >...they needed to authenticate ciphertext, and that PGP’s signatures weren’t accomplishing that. | + | This section is based on a misconception. A stateless, offline capable system such as OpenPGP does not require the sort of authenticated encryption meant here and the [[pgpfan: |
- | PGP's signatures are cryptographically strong and are indeed intended | + | > |
- | >So OpenPGP invented the MDC system: | + | Well, sure, you could do that. An implementation would probably just stop with some sort of end of file/ |
- | The MDC is a simple check of message | + | >To retain backwards compatibility with insecure older messages, PGP introduced a new packet type to signal that the MDC needs to be validated; if you use the wrong type, the MDC doesn’t get checked. |
+ | |||
+ | An application that required the MDC would obviously not accept an entirely absent MDC. | ||
+ | |||
+ | >Even if you do, the new SEIP packet format is close enough to the insecure SE format that you can potentially trick readers into downgrading; | ||
+ | |||
+ | We have a problem here. The juxtaposition of the non sequitur about chopping off the last 22 bytes makes it seem that that is all that is required to downgrade the MDC. Some digging reveals that this is actually quite difficult and has a very low chance | ||
+ | |||
+ | >Trevor Perrin worked the SEIP out to 16 whole bits of security. | ||
+ | |||
+ | This was wrong, but it was not Trevor Perrin' | ||
>And, finally, even if everything goes right, the reference PGP implementation will (wait for it) release unauthenticated plaintext to callers, even if the MDC doesn’t match. | >And, finally, even if everything goes right, the reference PGP implementation will (wait for it) release unauthenticated plaintext to callers, even if the MDC doesn’t match. | ||
- | There is no such " | + | There is no such " |
+ | |||
+ | >// | ||
+ | |||
+ | >Other people organize “key signing parties”. | ||
+ | |||
+ | Alas, this is something that doesn' | ||
> | > | ||
- | In the same way that " | + | In the same way that " |
+ | |||
+ | >//Leaks Metadata// | ||
+ | |||
+ | > | ||
+ | |||
+ | It is important to note that this linkage is only to the recipient of the message. Normally in a messaging system the recipient has to be provided to allow the message to be routed to the destination. If someone were to come up with a system that made the recipient anonymous it would be little extra work to omit this linkage. Such usage is explicitly supported under the OpenPGP standard. | ||
> | > | ||
- | They do? A PGP keyserver links an email address to a PGP identity. That identity might not be linked to a physical identity at all. If you did not want this linkage then you would have no reason to use a keyserver. | + | They do? A PGP keyserver links an email address to a PGP identity. That identity might not be linked to a physical identity at all. |
+ | If you did not want this linkage then you would have no reason to use a keyserver. | ||
+ | |||
+ | >//No Forward Secrecy// | ||
+ | |||
+ | Reduced to the essence; forward secrecy is where you delete the encryption key protecting some encrypted data to prevent that key from falling into the possession of an attacker that already has that encrypted data. There is nothing preventing any system from doing that, even something based on the OpenPGP standard. For a practical demonstration see: [[pgpfan: | ||
>Forward secrecy means that if you lose your key to an attacker today, they still can’t go back and read yesterday’s messages; ... | >Forward secrecy means that if you lose your key to an attacker today, they still can’t go back and read yesterday’s messages; ... | ||
- | Unless those messages are archived. If they get your private key then they almost | + | Unless those messages are archived, which is normally the case with email and tends to be the default on other systems (e.g. Signal Messenger). If they get your private key then they pretty much for sure get your archived messages. Very few people are willing to go without a message archive so forward secrecy is unlikely to help in most practical |
- | >If we’ve learned 3 important things about cryptography design in the last 20 years, at least 2 of them are that negotiation and compatibility are evil. | + | >In modern cryptography engineering, |
- | Then it is fortunate that PGP does not do negotiation. It can't. PGP supports asynchronous store and forward applications. It works over a one way channel. Your cipher, digest, and compression preferences come along with your public key They are signed and so are protected by the base cryptographic system. An adversary would have to break the cryptography to modify your preferences. | + | Almost all email in transit (> |
- | I do not agree that compatibility is a bad thing. PGP is actually a good example of how to deal with backwards compatibility in a good way. | + | >It’s theoretically possible to achieve |
- | >Modern protocols like TLS 1.3 are jettisoning backwards compatibility with things like RSA, not adding it. | + | The interesting question here is: why not? It's easy to do in a technical sense and would not cause your correspondents to have to reverify your identity. |
- | Only for one specific | + | In 2020 a company called Cellebrite announced that they had a specific |
+ | |||
+ | | ^ Signal | ||
+ | | Archived Network Messages | Protected | Protected | ||
+ | | Messages Saved on Phone | Revealed | ||
+ | |||
+ | So the encrypted email actually ends up providing a better result for the user. That is because it is possible to lock up the secret | ||
+ | |||
+ | Please see the [[pgpfan: | ||
+ | |||
+ | >// | ||
+ | |||
+ | This section compares apples to oranges to kumquats. Categorizing the different things here would be so tedious that I will just give up and admit defeat. Let's move on. | ||
+ | |||
+ | >// | ||
+ | |||
+ | I am reasonably certain that this section is based on a misapprehension. An offline stateless protocol like OpenPGP is not susceptible to downgrade attacks in the ways that online stateful protocols are. Negotiation is simply not possible for a medium that involves generating an encrypted/ | ||
+ | |||
+ | I do not agree that compatibility is a bad thing. OpenPGP is actually a good example of how to deal with backwards compatibility in a good way. | ||
+ | |||
+ | >//Janky Code// | ||
+ | |||
+ | I have not been involved with the GnuPG source code enough to venture some sort of opinion on its quality. Presumably the author of the rant has. The GnuPG project treats side channel attacks | ||
>The 2018 Efail vulnerability was a result of it releasing unauthenticated plaintext to callers. | >The 2018 Efail vulnerability was a result of it releasing unauthenticated plaintext to callers. | ||
- | Sort of a weird example. | + | This is a proposal for a fix for [[pgpfan: |
+ | |||
+ | Since the EFAIL topic is now on the table, I can't help but bring up some related points. The much beleaguered OpenPGP modification detection code (MDC) reliably detected the EFAIL attack. The researchers were not able to overcome | ||
+ | |||
+ | >GnuPG is also effectively the reference implementation for PGP, and also the basis for most other tools that integrate PGP cryptography. It isn’t going anywhere. To rely on PGP is to rely on GPG. | ||
+ | |||
+ | The popular Thunderbird email client switched from GnuPG to RNP. Is RNP "effectively the reference implementation for PGP" now? I count 20 different OpenPGP implementations on the OpenPGP.org developer page(([[https:// | ||
+ | |||
+ | >// | ||
- | > | ||
- | > | ||
> | > | ||
- | Are we being trolled | + | Comment not required |
- | [[pgpfan: | + | [[pgpfan: |
+ | [[em: | ||
pgpfan/tpp.1591837948.txt.gz · Last modified: 2020/06/11 01:12 by b.walzer