Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pueAW-0000yC-MN for mharc-grub-devel@gnu.org; Thu, 04 May 2023 14:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pueAU-0000xx-Tq for grub-devel@gnu.org; Thu, 04 May 2023 14:59:06 -0400 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pueAT-0007dQ-AJ for grub-devel@gnu.org; Thu, 04 May 2023 14:59:06 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 2334D184F2D for ; Thu, 4 May 2023 18:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1683226743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=IxryIonxYg+GLCwMyoM+xFIR7JLAuadefTPycPMu61U=; b=CoHzBhS6MkesE9o+N/GsYyNpH8RZt/v25MH1ovy7pvV64R+qlx/qtX3f3ItzBGILglW9Eb Qje9HuGqz2qXofPBGdhpVYE6dQBkfC4TW3edfkiFraaUsvzP+MeykCleHZZvhAewEzuxiR s+XyWS6DyP4feL/9WOsNmhhilpRKAsBR+LbQERK9RAV5/ZOPCkMbZS2ZrVHzrgqT68AdCY fRXbsjfUo7wb25UKIM0F8puGnrn2PWmTH6tDKiTl2F/G29XfjWnfKPXfM0wT0Y9ATUTpOK 2s2/DblPEHWy8FfmilHEqmvCCJqZM3yYdROdFl+LKNSovX7HoAE6FcpxEWW3QA== From: Josselin Poiret To: grub-devel@gnu.org Subject: Support in grub userland tools for other PBKDF2 hashes Date: Thu, 04 May 2023 20:58:51 +0200 Message-ID: <875y9753f8.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2023 18:59:07 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi everyone, It's been brought to my attention that in my commit [1], I mistakenly indicated that SHA256 was the only hash supported by the PBKDF2 kdf. I may have misread the default value for the list of possible values in the upstream spec, since more hashes are supported. One possible problem though is that it would not be possible to simply dynamically ask dm-crypt for the hash function that was used when unlocking, since that isn't kept around, from what I remember. I don't have the bandwidth to work on this currently, but I can see two solutions: either indiscriminately add all abstractions for all possible hash functions of PBKDF2, or parse the LUKS2 headers of the partition to find out which hash function is used. In the meantime, if you use a hash function that isn't SHA256, like SHA512, you'll need to add =2D-modules=3D"gcry_sha512" to your grub-install invocation. [1] aa5172a55cfabdd0bed3161ad44fc228b9d019f7 Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmRUAGsQHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5Fhcaiq1qC/wMXL381QpGp/fkb+kwoY4g2xZra/6k5Pwp KoOPUcS/cxvWZ5NBwq6PpiaWQA8tTQNi9Ky2CmHHC6GOjgn9Hingh+gYCakKAZkV j7lWP66xZoR+En6Wd/b1kiqV6r7Bhabz8Jo/1eP8xKbcHNp9D7R7+Cgt23FoGv63 PwIj1noDcMrSUIaQqmccpyJtxESGSJlDq8jdtSq7HdVO26+Kl0vThCHpSVOGHdxT ETpW6IQhsT04dAcw5pFCiCJ0+rwr9xxNrnKAVrZ9oJeGElHvY9A/p76xCVtkz1xg /ELbFxpAgIbwvMmp4v//JTMgBEkwlTWMuKHYz9QdnLvOJ1Yuh/WUB4Mh/6ve/3Nq 2zOGuTzYZpYTMG7JouP8H6OrJRLimGYjEtutbcyw4STlkXCNX6bGoBcKTMZtxf6a McYAE+XdtDGk+8vcxJCziSxI1kdBiCKn1A8kh6sWP8BI4y4d7MDbB1SC1Jaid2FB K0FettECdqAas3g5GlJUhPsu/goJEiY= =Inli -----END PGP SIGNATURE----- --=-=-=--