mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
tcrypt: use hash values as substring if limiting KDF check.
This allows to specify --hash sha or --hash blake2 to limit KDF without need to specify full algorithm name (similar to cipher where we already use substring match).
This commit is contained in:
@@ -572,7 +572,7 @@ static int TCRYPT_init_hdr(struct crypt_device *cd,
|
||||
pwd[i] += params->passphrase[i];
|
||||
|
||||
for (i = 0; tcrypt_kdf[i].name; i++) {
|
||||
if (params->hash_name && strcmp(params->hash_name, tcrypt_kdf[i].hash))
|
||||
if (params->hash_name && !strstr(tcrypt_kdf[i].hash, params->hash_name))
|
||||
continue;
|
||||
if (!(params->flags & CRYPT_TCRYPT_LEGACY_MODES) && tcrypt_kdf[i].legacy)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user