|
@@ -706,14 +706,14 @@ qcrypto_block_luks_store_key(QCryptoBlock *block,
|
|
|
|
|
|
assert(slot_idx < QCRYPTO_BLOCK_LUKS_NUM_KEY_SLOTS);
|
|
assert(slot_idx < QCRYPTO_BLOCK_LUKS_NUM_KEY_SLOTS);
|
|
slot = &luks->header.key_slots[slot_idx];
|
|
slot = &luks->header.key_slots[slot_idx];
|
|
|
|
+ splitkeylen = luks->header.master_key_len * slot->stripes;
|
|
|
|
+
|
|
if (qcrypto_random_bytes(slot->salt,
|
|
if (qcrypto_random_bytes(slot->salt,
|
|
QCRYPTO_BLOCK_LUKS_SALT_LEN,
|
|
QCRYPTO_BLOCK_LUKS_SALT_LEN,
|
|
errp) < 0) {
|
|
errp) < 0) {
|
|
goto cleanup;
|
|
goto cleanup;
|
|
}
|
|
}
|
|
|
|
|
|
- splitkeylen = luks->header.master_key_len * slot->stripes;
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Determine how many iterations are required to
|
|
* Determine how many iterations are required to
|
|
* hash the user password while consuming 1 second of compute
|
|
* hash the user password while consuming 1 second of compute
|