verity: add support for salting.
Salting is exposed as an optional salt=<hex> argument. The salt is appended to
hashed blocks if present, padded to 32 bytes with zero bytes.
This code is not yet used by any tools, so it should have no effect.
TEST=Adhoc, script:12138, unittest, autotest
Build an image (I did this for Kaen) and boot it.
Run the script attached to bug 12138; if it prints 'ok', everything's good.
Check that unit test 'CreateThenVerifyOkSalt' passes.
Run platform_DMVerityBitCorruption and platform_DMVerityCorruption.
Signed-off-by: Elly Jones <email@example.com>
Reviewed-by: Will Drewry <firstname.lastname@example.org>
5 files changed