From: Eric Biggers <ebiggers@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-fscrypt@vger.kernel.org,
Bartosz Golaszewski <brgl@bgdev.pl>,
Gaurav Kashyap <quic_gaurkash@quicinc.com>
Subject: [xfstests PATCH] fscrypt-crypt-util: fix KDF contexts for SM8650
Date: Fri, 17 Jan 2025 23:23:36 -0800 [thread overview]
Message-ID: <20250118072336.605023-1-ebiggers@kernel.org> (raw)
From: Eric Biggers <ebiggers@google.com>
Update the KDF contexts to match those actually used on SM8650. This
turns out to be needed for the hardware-wrapped key tests generic/368
and generic/369 to pass on the SM8650 HDK (now that I have one to
actually test it). Apparently the contexts changed between the
prototype version I tested a couple years ago and the final version.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
src/fscrypt-crypt-util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/fscrypt-crypt-util.c b/src/fscrypt-crypt-util.c
index 4dde1d4a..f51b3669 100644
--- a/src/fscrypt-crypt-util.c
+++ b/src/fscrypt-crypt-util.c
@@ -2278,21 +2278,21 @@ static void hw_kdf(const u8 *master_key, size_t master_key_size,
static void derive_inline_encryption_key(const u8 *master_key,
size_t master_key_size,
u8 inlinecrypt_key[INLINECRYPT_KEY_SIZE])
{
static const u8 ctx[36] =
- "inline encryption key\0\0\0\0\0\0\x03\x43\0\x82\x50\0\0\0\0";
+ "inline encryption key\0\0\0\0\0\0\x02\x43\0\x82\x50\0\0\0\0";
hw_kdf(master_key, master_key_size, ctx, sizeof(ctx),
inlinecrypt_key, INLINECRYPT_KEY_SIZE);
}
static void derive_sw_secret(const u8 *master_key, size_t master_key_size,
u8 sw_secret[SW_SECRET_SIZE])
{
static const u8 ctx[28] =
- "raw secret\0\0\0\0\0\0\0\0\0\x03\x17\0\x80\x50\0\0\0\0";
+ "raw secret\0\0\0\0\0\0\0\0\0\x02\x17\0\x80\x50\0\0\0\0";
hw_kdf(master_key, master_key_size, ctx, sizeof(ctx),
sw_secret, SW_SECRET_SIZE);
}
base-commit: dec8cfb46ba0f19d29d13412841f68ebf119a452
--
2.48.1
next reply other threads:[~2025-01-18 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-18 7:23 Eric Biggers [this message]
2025-02-10 20:40 ` [xfstests PATCH] fscrypt-crypt-util: fix KDF contexts for SM8650 Eric Biggers
2025-02-11 4:06 ` Zorro Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250118072336.605023-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=brgl@bgdev.pl \
--cc=fstests@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=quic_gaurkash@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox