ANDROID: dm: Add wrapped key support in dm-default-key
To prevent keys from being compromised if an attacker acquires read access to kernel memory, some inline encryption hardware supports protecting the keys in hardware without software having access to or the ability to set the plaintext keys. Instead, software only sees "wrapped keys", which may differ on every boot. The keys can be initially generated either by software (in which case they need to be imported to hardware to be wrapped), or directly by the hardware. Add support for this type of hardware by allowing keys to be flagged as hardware-wrapped. When used, dm-default-key will pass the wrapped key to the inline encryption hardware to encryption metadata. The hardware will internally unwrap the key and derive the metadata encryption key. This is a reworked version of a patch which was temporily reverted by https://android-review.googlesource.com/c/kernel/common/+/1867365, and which originated from https://android-review.googlesource.com/c/kernel/common/+/1224286 . Bug: 147209885 Bug: 160883801 Bug: 160883266 Bug: 160885805 Test: Validate metadata encryption & FBE with wrapped keys. Change-Id: I38393727bf71e5d20b3c3ac9d2af62a1864a0a82 Signed-off-by:Barani Muthukumaran <bmuthuku@codeaurora.org> Signed-off-by:
Eric Biggers <ebiggers@google.com> (cherry picked from commit 56e1e0a6)
Loading
Please sign in to comment