If I were to have a 4096-bit file of random data (/dev/random) used as a keyfile for LUKS, would there be any benefit to having a key iteration count higher than 1?

My reasoning is that the attacker could choose to guess the contents of the 4096-bit file (very very hard), the 256-bit master key (still hard, but easier than the 4096-bit file), or the potentially key-stretched 256-bit key derived from the keyfile that would decrypt the master key (equivalent in difficulty to the master key).

Am I correct in believing that an iteration count of 1 is no less secure than a count of 100000 for the keyfile?


1 Answer 1


Key stretching is only used to make small-entropy keys less vulnerable to brute force attacks. If it is (nearly) impossible to break the original key, than there's little sense in using a iteration count of more than 1.

If the input to the function is as big (in sense of entropy in bit) as the output, then an attacker could just attack the algorithm which did use the output and not the key derivation function itself.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.