tkey: Use SHA256 to obtain the disk-encryption key

Rather than Blake2b, use SHA256 to obtain the disk-encryption key based
on the key material provided by the TKey. This matches the upcoming
disk-encryption test.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-14 11:30:43 -07:00
parent 2f8d7e7815
commit 3b61461616
3 changed files with 29 additions and 18 deletions

View File

@@ -53,8 +53,8 @@ static int cmd_test_tkey_sandbox(struct unit_test_state *uts)
/* Test getkey command */
ut_assertok(run_command("tkey getkey testuss", 0));
ut_assert_nextline("Public Key: 505152535455565758595a5b5c5d5e5f505152535455565758595a5b5c5d5e5f");
ut_assert_nextline("Disk Key: 228b2f6abf8be05649b2417586150bbf3e1b3f669afa1c6151ddc72957933c21");
ut_assert_nextline("Verification Hash: a72a46b8f8c7ff0824416ada886f62b6c2808896d71201a32814ab432c7a81cf");
ut_assert_nextline("Disk Key: e9b0599268ff8b083ef80dbd04be207ce9a19a60a888ccb3fe93710a0a70a34e");
ut_assert_nextline("Verification Hash: 8583a08d6c534e84ae81a8518071c16a8030893df05fecb84e514438591ba5ed");
/* After getkey, device should be in app mode */
ut_assertok(run_command("tkey fwmode", 0));