mastodon.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
Generic Mastodon server for anyone to use.

Server stats:

11K
active users

#cryptography

22 posts20 participants1 post today

Hey cryptographers,

this application is using the same symmetric secret to encrypt cookie values using AES-CBC: github.com/transloadit/uppy/is

This will eventually wear-out the secret.

I suggested deriving a different encryption key from the "secret" for every distinct document (i.e. a cookie value).

Would it be "safe" to derive the key using the IV as the "info" parameter in HKDF?

In "pseudocode", this would read like:

```
aes_key = hkdf(salt=[0]*32, ikm=secret, info=iv, length=32)
encrypt(aes_key, iv, plaintext)
```

The idea of using the IV is to not add anything new to the cookie value. My understanding is that the info parameter is not supposed to be confidential, but how secure is it if it is attacker controlled? I don't see any attacks, but I am no specialist either...

I love the fact that I am working in an industry where people write stuff like „If you’re using a standard AEAD mode in such a setup (wherein multiple keys are used), and you aren’t including key-commitment in your protocol design, you’re almost certainly prone to Invisible Salamanders.“

It sounds like we‘re magicians. „Be careful with your spells, apprentice! One wrong syllable and you might be afflicted with a plague of invisible salamanders until the next full moon.“