4 ms·
I'm not sure I understand this comment: age doesn't have authenticated encryption, but neither does PGP. The closest thing in PGP is the "Modification Detection
by woodruffw 4y ago
I'm not sure I understand this comment: age doesn't have authenticated encryption, but neither does PGP. The closest thing in PGP is the "Modification Detection Code," which is hilariously broken[1].
Edit: On top of that, every PGP implementation that I've ever worked with happily streams unauthenticated, decrypted plaintext before completing MDC verification.
[1]: https://latacora.micro.blog/2019/07/16/the-pgp-problem.html https://latacora.micro.blog/2019/07/16/the-pgp-problem.html
- upofadown 4y agoIt turns out that "The PGP Problem" was simply wrong about the MDC being broken (among other incorrect and misleading arguments)[1]. Note that since PGP addresses offline non-connected media it is simpler to directly authenticate the material. So the sort of thing that is being described here as "authenticated encryption" is not usually relevant[2]. >On top of that, every PGP implementation that I've ever worked with happily streams unauthenticated, decrypted plaintext before completing MDC verification. For offline non-connected media, that is a completely reasonable approach. Not everything works like TLS. [1] https://articles.59.ca/doku.php?id=pgpfan:tpp https://articles.59.ca/doku.php?id=pgpfan:tpp [2] https://articles.59.ca/doku.php?id=pgpfan:authenticated https://articles.59.ca/doku.php?id=pgpfan:authenticated
- woodruffw 4y agoThis post doesn't adequately explain how MDC isn't broken: if my PGP implementation gives me unauthenticated data, then I am not doing authenticated encryption no matter what might be smashed onto the end of my ciphertext. Folding authentication into the correctness decryption phase is the only secure and misuse-resistant way to do authenticated encryption; PGP fails to provide either. We can nitpick about the factuality of the "16 bit" claim or the truncation attack (which I believe GPG has since fixed), but neither directly contradicts the above. > Note that since PGP addresses offline non-connected media it is simpler to directly authenticate the material. So the sort of thing that is being described here as "authenticated encryption" is not usually relevant[2]. Okay, but you just pointed to this property as a "huge footgun" in age. Why is it a footgun there, and not in PGP? Besides, this is entirely ignoring actual use patterns: age is intended for offline file encryption, while PGP is used in all kinds of online channels and directly advertises itself as a "toolbox" for any purpose.
- upofadown 4y ago>Folding authentication into the correctness decryption phase is the only secure and misuse-resistant way to do authenticated encryption... Again, PGP does not do things the same way TLS does. I do not see how you can possibly prove that other approaches can not be secure. >We can nitpick about the factuality of the "16 bit" claim or the truncation attack (which I believe GPG has since fixed), but neither directly contradicts the above. There is no nitpicking involved here. The claim is straight up wrong. The author of The PGP Principle either misread the email thread or deliberately misrepresented it. GPG could not fix that which was not broken. >Okay, but you just pointed to this property as a "huge footgun" in age. Why is it a footgun there, and not in PGP? Please read this article to understand how PGP does things: * https://articles.59.ca/doku.php?id=pgpfan:authenticated https://articles.59.ca/doku.php?id=pgpfan:authenticated >PGP is used in all kinds of online channels and directly advertises itself as a "toolbox" for any purpose. I think I will have to ask for a reference here. I have never seen a claim that PGP is good for online types of media.
- bawolff 4y agoI think the GP was complaining about lack of key management not lack of authenticated encryption. In any case i clicked on the github link for AGE and it said ChaCha20-Poly1305, which is an authenticated encryption (AEAD) algorithm, so im very confused by your comment. Am i missing something?
- woodruffw 4y agoIn age with X25519 identities, ChaCha20-Poly1305 ensures the authenticity of data modulo the public key. It doesn't ensure the authenticity of the data itself, since anybody can encrypt to the public key. In other words: it establishes that the data was encrypted to the expected key (and is not just random data being transformed by the cryptosystem), but not that a particular entity encrypted to that key. (age does provide de-facto authenticated encryption when you use it with a passphrase, since the passphrase effectively forms a proof of identity. But not with asymmetric keypairs.)
- bawolff 4y agoThis entire conversation is confusing because people are mixing up authenticated encryption with key management/signing, but those are separate things. Its possible that i am mistaken (not a crypto expert), but usually the term "authenticated encryption" means the ciphertext is verified to not have been modified by an attacker (to for example do a padding oracle attack, although that wouldnt apply to a stream cipher of course). It has nothing to do with authenticating the source of the message or verifying the entire message has not been replaced by a different valid ciphertext - that's a totally different thing. So Age provides authenticated encryption. It does not prevent an attacker who knows the public key from substituting in a different ciphertext, because that has nothing to do with authenticated encryption.
- woodruffw 4y agoThe terminology here is very confusing, because "authenticity" means different things in different schemes: it might mean authenticity of the ciphertext (which age does provide), or it might mean authenticity of the plaintext (which age does not provide with X25519 identities). With an X25519 identity, age will guarantee that, if you can decrypt, then you are decrypting a message that was encrypted to a public key that you have the private half of. This is an improvement over some schemes, where decryption is potentially malleable (with a small enough message and enough tries, an attacker can make you decrypt something that looks valid but wasn't actually encrypted correctly). But it can't guarantee that you should trust everything that's encrypted against your public key.
- aborsy 4y agoHe probably refers to the lack of signatures in the asymmetric mode. The symmetric encryption in Age is authenticated. GPG 2.3 offers AEADs (and before that MDC, though I am not sure of error behavior recently).
- upofadown 4y agoThe MDC is as much "authenticated encryption" as the proposed pointless and harmful "AEAD" modes[1]. The confusion here comes from the fact that a non-connection oriented protocol like PGP does that authentication directly on the plaintext[2]. There is no authentication to maintain over the life of a connection to maintain in the way that, say, TLS requires. [1] https://articles.59.ca/doku.php?id=pgpfan:no_new_ae https://articles.59.ca/doku.php?id=pgpfan:no_new_ae [2] https://articles.59.ca/doku.php?id=pgpfan:authenticated https://articles.59.ca/doku.php?id=pgpfan:authenticated