3
$\begingroup$

Let's assume that, for creating a LUKS volume, I generate a random, 40 character passphrase that includes numbers, symbols, and upper and lower case letters, using the pwgen utility.

Given that the passphrase contains roughly 256 bits of entropy, if I use aes-xts-plain as my cipher, a 512 bit key, and sha512 for the hash, then would it be necessary (worth any reasonable gain) to also use a high iteration count -- say, 1 million, for the sake of example?

$\endgroup$
5
$\begingroup$

If you are certain that the passphrase contains enough entropy, then iteration is not needed. The iteration is only required when the entropy is low. The only way to preclude brute force search through a small search space is to make each guess take a prohibitively long amount of time. This is why the iteration count is recommended to be high: To ensure that nobody can guess more then a small number of passwords per second.

If the passphrase contains 256 bits of entropy, then it does not matter how fast the hash can be computed - the search space is simply too large for anyone to search through, regardless of how fast they can look.

$\endgroup$
  • $\begingroup$ "The iteration is only required when the entropy is low and the search space is small." The part that I boldfaced is inaccurate and should be removed. A low-entropy secret can be drawn from a large set. $\endgroup$ – Luis Casillas Nov 22 '16 at 22:24
  • $\begingroup$ @LuisCasillas What if we changed the "and" in the quote to an "or", so that it reads, "The iteration is only required when the entropy is low or the search space is small"? Would this change make the quote accurate, as well? $\endgroup$ – user311982 Nov 22 '16 at 22:41
  • 1
    $\begingroup$ Accurate but redundant, because small search space implies low entropy. The important thing isn't how many distinct passwords are possible (the size of the search space), but rather their probability distribution of the passwords (the function that assigns a probability to every password) and how it enables (or not) an attacker to succeed much sooner than a random search would by guessing likely passwords ahead of unlikely ones. An entropy of $b$ bits means the attacker, on average, succeeds after $2^{b-1}$ guesses. $\endgroup$ – Luis Casillas Nov 22 '16 at 22:55
  • $\begingroup$ @LuisCasillas Feel free to use the edit button to make such suggestions in the future - that's what it is there for $\endgroup$ – Ella Rose Nov 22 '16 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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