F. Maury ⏚<p>Hey cryptographers,</p><p>this application is using the same symmetric secret to encrypt cookie values using AES-CBC: <a href="https://github.com/transloadit/uppy/issues/5705" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/transloadit/uppy/is</span><span class="invisible">sues/5705</span></a></p><p>This will eventually wear-out the secret.</p><p>I suggested deriving a different encryption key from the "secret" for every distinct document (i.e. a cookie value).</p><p>Would it be "safe" to derive the key using the IV as the "info" parameter in HKDF?</p><p>In "pseudocode", this would read like:</p><p>```<br>aes_key = hkdf(salt=[0]*32, ikm=secret, info=iv, length=32)<br>encrypt(aes_key, iv, plaintext)<br>```</p><p>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...</p><p><a href="https://infosec.exchange/tags/cryptography" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cryptography</span></a> <a href="https://infosec.exchange/tags/help" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>help</span></a> <a href="https://infosec.exchange/tags/opensource" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>opensource</span></a></p>