by wofo on 4/28/25, 9:59 PM with 64 comments
by tptacek on 4/28/25, 11:49 PM
I wrote a local file encryption tool, around the same time Filippo was doing `age`, and used the AD on Chapoly to authenticate the chunk offset into the file. (The only thing interesting my tool did was that it could pull keys from AWS KMS).
So one use for AD is to authenticate headers; another is contextual binding.
If it helps (because 'stavros asked across the thread why bother having AD at all rather than just including it in the ciphertext), authenticated data can include data that doesn't even appear in the message, but rather is derived from the context at the time the message is encrypted and decrypted. A message only meant to be decrypted on a particular host (or whatever), for instance, could include the host in its AD, but never record that in the actual bits of the message.
by peterldowns on 4/28/25, 11:41 PM
If you squint at the example usage in the tests, it's basically the API that the blogpost describes.
https://github.com/peterldowns/symcrypt/blob/main/symcrypt_t...
As an aside, I'm always curious to understand why the encryption people say "never roll your own crypto" but then also ship confusing APIs without clear usage examples. For instance, check out the golang chacha20poly1305 docs:
by stavros on 4/28/25, 11:59 PM
by senderista on 4/29/25, 1:04 AM
by twic on 4/28/25, 11:49 PM
by kazinator on 4/29/25, 2:13 AM
We can imagine, e.g. in the context of e-mail, if the DKIM header signature were combined a PGP-encrypted body as one operation. I'm ducking under the table now, though.
by andrekandre on 4/29/25, 1:07 AM
just the right length and pacing to get me to the end and the point across
by dlenski on 4/29/25, 11:49 PM
> What's my AEAD again, what's my AEAD again?
by halosghost on 4/28/25, 11:11 PM