The Call of the Open Sidewalk

From a place slightly to the side of the more popular path

User Tools

Site Tools


pgpfan:tpp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pgpfan:tpp [2022/05/12 12:14] – More detail from better understanding. b.walzerpgpfan:tpp [2023/12/19 13:21] (current) – How unlikely? b.walzer
Line 42: Line 42:
 >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).
  
-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 of 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/html/rfc4880#section-4|section 4 of RFC-4880]]. The definition is all of 4 pages long. It includes code examples for each case of the length extension and a complete list of possible tags.+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/html/rfc4880#section-4|section 4 of RFC-4880]]. The definition is all of 4 pages long. It includes code examples for each case of the length extension and a complete list of possible tags.
  
 >The most recent keyserver attack happened because GnuPG accidentally went quadratic in parsing keys, 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.
Line 103: Line 103:
 >The PGP MDC can be stripped off messages –– it was encoded in such a way that you can simply chop off the last 22 bytes of the ciphertext to do that. >The PGP MDC can be stripped off messages –– it was encoded in such a way that you can simply chop off the last 22 bytes of the ciphertext to do that.
  
-This is trueIt just means that missing MDC is considered invalid. Many authenticated encryption schemes are removable and depend on the same convention.+Well, sure, you could do thatAn implementation would probably just stop with some sort of end of file/message/packet error. You obviously wouldn't end up with valid MDC check so this is an odd thing to suggest.
  
 >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. >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.
  
-That's just a different implication of the fact that MDCs can be stripped.+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; ... >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; ...
  
-Which would mean that the MDC was not mandatory where requiredYet another implication of the fact that MDCs can be stripped. +We have a problem hereThe 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 of success(1 out of 32768)((Discussion:[[https://github.com/google/end-to-end/issues/161|No warning on decrypting Tag 9 (no integrity protection) packets]], Exploit code:[[https://gist.github.com/coruus/85dea6eb82897044f65d]])). We can be charitable here and assume that the author simply did not do any research but this is very misleading.
- +
-The author again mentions that the MDC can be stripped in another portion of the rantThis is being highlighted here in support of the suggestion that the actual arguments have been expanded as much as possibleThis might suggest that there were not that many arguments available for this rant.+
  
 >Trevor Perrin worked the SEIP out to 16 whole bits of security. >Trevor Perrin worked the SEIP out to 16 whole bits of security.
  
-If you read the linked mailing list thread you will discover that this statement is quite misleading. Trevor Perrin was discussing a particular attack on the MDC which at one point required guessing with only a one in 2^16 (65536) chance of getting the guess rightAfter some further discussion that attack turned out to be completely impracticalThe discussion eventually ended with Trevor Perrin proposing a wildly impractical attack with the included comment: [[https://mailarchive.ietf.org/arch/msg/openpgp/IGk9eq5QkSsXGLIa7Z9P1Qhd_Qg/|"There's a lot of caveats to this attack, so it's probably not +This was wrong, but it was not Trevor Perrin's error. It turned out that the specification was wrong. Trevor Perrin was insightful enough to notice that the system described in the specification was vulnerable to this particular attackThe specification was corrected to what the implementations were actually doing and the vulnerability went awayThis discussion was from the IETF OpenPGP standard mailing list(([[https://mailarchive.ietf.org/arch/msg/openpgp/UYEBC7hnZNbMoNWrfz9zJQb_FUk/|The ITEF OpenPGP discussion thread about the security properties of the MDC.]])). If any actual MDC weaknesses had come from the discussion then they would have been resolved at that time. There is no reason to think that there is anything wrong with the MDC. This discussion was part of the process intended to ensure that the MDC is secure.
-anything to seriously worry about:"]]. This discussion was from the IETF OpenPGP standard mailing list. If any actual MDC weaknesses had come from the discussion then they would of been resolved at that time. There is no reason to think that the MDC is insecure. This discussion was part of the process intended to ensure that it is secure.+
  
 >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.
Line 167: Line 164:
 | Messages Saved on Phone   | Revealed  | Protected        | | Messages Saved on Phone   | Revealed  | Protected        |
  
-So the encrypted email actually ends up providing a better result for the user. That is because it is possible to lock up the encryption key more securely in practice with an offline medium than it is with an online, always available, medium like instant messaging. It seems possible that people don't bother with forward secrecy for email because they perceive it to be secure enough already. Forward secrecy might not be worth the extra effort for that particular medium.+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 key material more securely in practice with an offline medium than it is with an online, always available, medium like instant messaging. It seems possible that people don't bother with forward secrecy for email because they perceive it to be secure enough already. Forward secrecy might not be worth the extra effort for that particular medium.
  
 Please see the [[pgpfan:forward_secrecy|forward secrecy]] article for a somewhat more extensive discussion. Please see the [[pgpfan:forward_secrecy|forward secrecy]] article for a somewhat more extensive discussion.
pgpfan/tpp.1652357643.txt.gz · Last modified: 2022/05/12 12:14 by b.walzer