From patchwork Sun Nov 16 21:23:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 716 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=gnwl12Ww; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8A27C6862A for ; Sun, 16 Nov 2025 14:23:56 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8qY5L0jDq6Wo for ; Sun, 16 Nov 2025 14:23:56 -0700 (MST) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 885AE685EA for ; Sun, 16 Nov 2025 14:23:54 -0700 (MST) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 66890685BF for ; Sun, 16 Nov 2025 14:23:51 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id bb0V_exZItBm for ; Sun, 16 Nov 2025 14:23:51 -0700 (MST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.51; helo=mail-io1-f51.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mail.u-boot.org (Postfix) with ESMTPS id E9E96684C5 for ; Sun, 16 Nov 2025 14:23:50 -0700 (MST) Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-948733e7810so138543039f.0 for ; Sun, 16 Nov 2025 13:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1763328229; x=1763933029; darn=u-boot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v4gevCGzqMdaWORKyTkNwcc7eeYnURnPZa1qn6bZEn0=; b=gnwl12WwTLJEEs/48SnNFHtR/mWiVgHfgaJviI8ZfhV79pr9+KaBWI5ZA5WlcaR3yB Z5ZsfIj59Wpl4jKJeShW75U0dzcHAuGBT4PqEBM57c6xnDKv6/gF+Wkax4YBNaRWvU/a 7LowBUb2TYWtoh+YIVFaSmua1WL2pu7sBK0Aw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763328229; x=1763933029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=v4gevCGzqMdaWORKyTkNwcc7eeYnURnPZa1qn6bZEn0=; b=UYZ+DJZAsQ4xQi8jwQ++7lmFkqt5R5HlXVwN61J79D+4LJNnSWWDe/hyTookzWCItv JBToMvMg6peZOfCGUcFsEICw0vey7O32rIcb+DdLWMB+LguDG+cStxQVJJ5kAdzm9Zms efZTJ9o1hP5SYd9bQWaOZzGFnA48unAJ3QSNtePeGpFSEeJ3F5StRjH2TSEx6GCrrUAL pg4ixXZuPEtypqj8IBCn4q39EZljCCL6HI4wfKnXPkLn66xA+sgdx3KS9HVaw5qX1Cw4 Jez/Xa6Bof2GyuxP0ZCRc1bD+RMLxbfIulMHTEMBkrHEw2PalBHAgRUt3LdVttYe0ZHu tS1A== X-Gm-Message-State: AOJu0Yxbr0JD7+NRIdrg5wUJL0wxUrW8p0oLLe2nsIYTvnKFN4JiarOa lTk4IGJwE4EPgu25Qtinirm6yz3F4JUzhGmFP+9JZSnaXPTNjjIqHnlrUe98l2ei7K2QPFayAqM xQgE= X-Gm-Gg: ASbGncsAH8nN6IhNtKcG7f37g8D4qcgKOcPTYsfvvy0DOPO7eC9l2A2KOge0t2f1flc D8Cy5Sp1tzpd4deW06ABNXMhMwWzSm1jTYjTHHoHA/cOcdDVxl5bz9lMOXfWuaAUa0NXWjre3xt ecEtODzW5pG8CzYN5StcheyASd21Xi42hbZlSiRLlrEyLqMtbMZVTgoSqvcCyDUGnftZCSuMsx0 UnRJRznQ9tvSlSP7INaKJnODJuK0HrW9oRnPzlpqaMfQnIT8a6uerCHvHm289Xpmf+Yoi7G7GgC Clbgm+6XsCsW58m8oxmvT3SUuEYQuUEA15DAB5fN7lU1+FxPETEGChvzyhJjpGXBe59ncF8BNJg 9HaNyWHzbfeSpiG0R0Myq76LEoJvgmBrjjB8Ssa9AohE2B400mw9Kp0zu6rgwAu/yLCsKPLYmei 2EnBD5K8DtEZGWS0KoKdur1f7kHbw= X-Google-Smtp-Source: AGHT+IFUn8JpJz2pQRry7/Guz90ZRL/2B7wdlnOCt9OWVwTTPBK+xCsHuK7MeXk1Tz8CglvSylBHsg== X-Received: by 2002:a02:a592:0:b0:5b7:c46d:f82e with SMTP id 8926c6da1cb9f-5b7c9de8cf8mr5218118173.18.1763328229315; Sun, 16 Nov 2025 13:23:49 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-948d2d162dcsm577962339f.13.2025.11.16.13.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Nov 2025 13:23:48 -0800 (PST) From: Simon Glass X-Google-Original-From: Simon Glass To: U-Boot Concept Date: Sun, 16 Nov 2025 14:23:17 -0700 Message-ID: <20251116212334.1603490-4-simon.glass@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251116212334.1603490-1-simon.glass@canonical.com> References: <20251116212334.1603490-1-simon.glass@canonical.com> MIME-Version: 1.0 Message-ID-Hash: USMBW4XKZNGYVPQ5JMCAV44KYBR7KQRM X-Message-ID-Hash: USMBW4XKZNGYVPQ5JMCAV44KYBR7KQRM X-MailFrom: sjg@chromium.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/14] luks: Tidy up debugging of unlock List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Name the derived key as such to avoid confusion. Fix a typo in nearby log_debug() statement. Update essiv_decrypt() to have a const * for its first argument. Signed-off-by: Simon Glass --- drivers/block/luks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/luks.c b/drivers/block/luks.c index a7f5b436e12..94139b4f56d 100644 --- a/drivers/block/luks.c +++ b/drivers/block/luks.c @@ -358,7 +358,7 @@ static int try_keyslot(struct udevice *blk, struct disk_partition *pinfo, /* Decrypt key material using derived key */ log_debug("expand key with key_size*8 %u bits\n", key_size * 8); - log_debug_hex("input key (derived_key) full:", derived_key, key_size); + log_debug_hex("derived_key", derived_key, key_size); aes_expand_key(derived_key, key_size * 8, expkey); log_debug_hex("expanded key [0-15]:", expkey, 16); @@ -405,7 +405,7 @@ static int try_keyslot(struct udevice *blk, struct disk_partition *pinfo, /* Check if the digest matches */ if (!memcmp(key_digest, hdr->mk_digest, LUKS_DIGESTSIZE)) { - log_debug("Uunlocked with key slot %d\n", slot_idx); + log_debug("Unlocked with key slot %d\n", slot_idx); return 0; } log_debug("key slot %d: wrong passphrase\n", slot_idx);