[Concept,17/19] bootctl: Allow unlocking LUKS2 partitions

Message ID 20251208023229.3929910-18-sjg@u-boot.org
State New
Headers
Series bootctl: Continue development with TKey functionality |

Commit Message

Simon Glass Dec. 8, 2025, 2:32 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Switch away from a pre-derived key so that LUKS2 partitions can be
unlocked. Update the ulock message to be more generic.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 boot/bootctl/logic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/boot/bootctl/logic.c b/boot/bootctl/logic.c
index 96cc270ae2c..2ed106628e7 100644
--- a/boot/bootctl/logic.c
+++ b/boot/bootctl/logic.c
@@ -334,9 +334,9 @@  static int perform_tkey_unlock(struct udevice *dev, struct osinfo *os, int seq,
 	 * processed by PBKDF2/Argon2 just like a text passphrase would be.
 	 * This matches how cryptsetup --key-file works.
 	 */
-	log_info("Using LUKS1 unlock with binary passphrase\n");
+	log_info("Using LUKS unlock with binary passphrase\n");
 	ret = luks_unlock(os->bflow.blk, &pinfo, priv->tkey_disk_key,
-			  TKEY_DISK_KEY_SIZE, true, master_key, key_sizep);
+			  TKEY_DISK_KEY_SIZE, false, master_key, key_sizep);
 	if (ret)
 		return log_msg_ret("htu", ret);