Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I definitely agree with you on all your mentioned points, but I'm unclear on a few things:

* What do you mean that it requires a brute force attack on the first output? As I understand it, the attacker doesn't need to match all 256 bits of the derived key (only the first 128 bits), so the complexity is reduced by a lot. If those match, you can just run the KDF "properly" on the passphrase you guessed and get the rest of the bits, i.e. the IV. It thus weakens PBKDF2 to only need 2002 rounds of SHA, rather than 8000, and still allows you to decrypt the whole stream.

* If they used a random IV, they'd have to include it in the stream, which wouldn't really do anything more for security. The IV doesn't matter at all now either, but at least now it's secret. This attack doesn't use the key space of AES or the IV, though, so it's a bit moot.

* The CTR nonce would prevent the attacker from taking the 128-bit "shortcut", as they'd need all 256 bits of the derived key to decrypt the last block, which is the improvement I'm referring to.

Please correct me if I'm mistaken, I find crypto very interesting and would like to know where I'm wrong.



IVs are not really meant to be secret, IIRC. They're just meant to be different each time, to avoid getting the same cypher text if you have to encrypt another plaintext that begins with the same block.


To clarify, not that this should ever matter for you because you should never work with these primitives directly, but a CBC IV needs not only to be unique but also unpredictable (which is a different property than "secret", of course).


This would be used in a chosen plaintext attack, right? If you saw a ciphertext C1 with IV1, and you were able to choose the following Pj and predict the corresponding IVj, then you could verify whether the plaintext of C1 was P1~ by choosing Pj = P1~ XOR IV1 XOR IVj, so that Cj = C1 iff Pj = P1~. This would allow you to test likely values of P1~ from a dictionary.


Indeed, that is the case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: