Fix LUKS1 format if pkbdf benchamr is disabled.

We use minimum iteration for key digest in this case
(the same already used in LUKS2).

Fixes: #478.
This commit is contained in:
Milan Broz
2019-11-20 22:07:52 +01:00
parent de6258d366
commit 6b1be52e6b
4 changed files with 20 additions and 1 deletions

View File

@@ -983,6 +983,7 @@ static int set_pbkdf_params(struct crypt_device *cd, const char *dev_type)
if (opt_pbkdf_iterations) {
pbkdf.iterations = opt_pbkdf_iterations;
pbkdf.time_ms = 0;
pbkdf.flags |= CRYPT_PBKDF_NO_BENCHMARK;
}