mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
ANDROID: dm-default-key: Update key size for wrapped keys
Wrapped keys can have key sizes of variable length.
Pass in the wrapped key size sent from userspace instead
of using a fixed value from the cipher when calling into
blk-crypto.
Bug: 156230001
Test: Validated metadata encryption with wrappedkey_v0 when /data
is mounted on a dm device.
fstab: metadata_encryption=aes-256-xts:wrappedkey_v0
Git-repo: https://android.googlesource.com/kernel/common/
Change-Id: I9c8bfff71eaf783427270766c419feceefb6be2d
Signed-off-by: Gaurav Kashyap <gaurkash@codeaurora.org>
This commit is contained in:
parent
4fbfcf8302
commit
c96d48845a
1 changed files with 1 additions and 1 deletions
|
|
@ -230,7 +230,7 @@ static int default_key_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
|||
goto bad;
|
||||
}
|
||||
|
||||
err = blk_crypto_init_key(&dkc->key, raw_key, cipher->key_size,
|
||||
err = blk_crypto_init_key(&dkc->key, raw_key, raw_key_size,
|
||||
dkc->is_hw_wrapped, cipher->mode_num,
|
||||
dkc->sector_size);
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue