From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86D0BC4332F for ; Sat, 11 Nov 2023 18:07:08 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1sNZ-00074Y-3C; Sat, 11 Nov 2023 13:06:45 -0500 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 1r1sNX-000740-9B for grub-devel@gnu.org; Sat, 11 Nov 2023 13:06:43 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1sNT-0004hS-S2 for grub-devel@gnu.org; Sat, 11 Nov 2023 13:06:43 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6B114320094E; Sat, 11 Nov 2023 13:06:34 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 11 Nov 2023 13:06:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1699725993; x=1699812393; bh=RV wx6BCCf/nBNDCIFYbDck87g6cXqiDafOG2c+Pf39s=; b=PlVNabsDHH8n98ovaX Y0bh071CM4Kltw6Pe4uNLKp6R/NCjoiNWTuQ3zYeHD6laW/QlEkhKLvHv8FUQZE5 nb0kLXdgpPjpbWPtF5n0/2XAue8aUg5UyxPARzErPdedDL6dJVHJ6HSjJc8ctsCK tydZuOtsMQSxJv8WS2jJXQchJvBd2iE15L+7Kr9Q3xqa38WYedrEXC3Yh3MA8943 10OrBf6UmPtK2jecMiWhiuX4rrv6plHvRyjaHoHxJEDukGhOXdsr0YOHYSW5ImPJ HXAi5+r1bUiMjQF1Wmk9huuOvCvE2k0KZWISkyD+xhImsoFpzv8pWAP3BQNRaZX1 xNxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1699725993; x=1699812393; bh=RVwx6BCCf/nBN DCIFYbDck87g6cXqiDafOG2c+Pf39s=; b=XL07vTriLlqj1oNQOB7IXBL7UknKk D8fShpJZAgI+Qk5qUukCFbstV3ZRbHmIXpvuuIFTKwe5bk8k2y3aWV2dc+S4zRoZ 6e5YlVVeKlOJ3bbysVy0QJDk57VoywMJk92T7TTrFBefv6OY7ZHo69HPKWWeXUVS cwnE80embZh+k3xplfYFhz5re14fzeuL7bJNX217Xag+UdsFSwSL3gN0yn/T3M12 UaaFGIR8C2iquHGZ6sNhCxZ828vj37zsfjjNwJQ/+FniBbkhv4RB0QNW3WpfmkSk EELo6LJppDL285kHsOZGKVVXpcF167ADROGokGVFe2xVpOglj1ddNroXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvhedguddtkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepteffkedvleegieekteeuledvkeevtdekjeekgfffffffjeekteelieetfeeikeev necuffhomhgrihhnpehlihgsrhgvsghoohhtrdhorhhgpdgrrhgthhhlihhnuhigrdhorh hgpdhnihgthhholhgrshhjohhhnhhsohhnrdgthhdpghhithhhuhgsrdgtohhmpdhkvghr nhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehpshesphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Nov 2023 13:06:31 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id fb243ff9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 11 Nov 2023 18:05:57 +0000 (UTC) Date: Sat, 11 Nov 2023 19:06:27 +0100 From: Patrick Steinhardt To: Daniel Kiper , Leah Rowe , grub-devel@gnu.org, Glenn Washburn , main@axelen.xyz, Nicholas Johnson , phcoder@gmail.com Subject: Re: PATCHES: argon2 key derivation for luks2 Message-ID: References: <20231031113936.02da6802663e1bffa0c76888@libreboot.org> <20231031135758.3grgqch3cspv26nf@tomti.i.net-space.pl> MIME-Version: 1.0 In-Reply-To: Received-SPF: pass client-ip=64.147.123.25; envelope-from=ps@pks.im; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Reply-To: The development of GNU GRUB Content-Type: multipart/mixed; boundary="===============3721024904283157043==" Errors-To: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org Sender: grub-devel-bounces+grub-devel=archiver.kernel.org@gnu.org --===============3721024904283157043== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2KlLXi9Q2DoN4zQ0" Content-Disposition: inline --2KlLXi9Q2DoN4zQ0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 05, 2023 at 01:40:57AM -0500, Oskari Pirhonen wrote: > On Tue, Oct 31, 2023 at 14:57:58 +0100, Daniel Kiper wrote: > > Adding a few folks who were working on this... > >=20 > > On Tue, Oct 31, 2023 at 11:39:36AM +0000, Leah Rowe via Grub-devel wrot= e: > > > i'm not sure if the grub devs have seen this or not. anyway, see > > > attached patches. i didn't make these myself but i'm sending them her= e. > > > it's the PHC (password hash competition) implementation of argon2, > > > adapted for the grub source code. i've been using this in libreboot a= nd > > > it works very well, allows use of cryptomount on modern LUKS2 with > > > argon2 key deriv, so you don't need to downgrade to luks1 or pbkdf2 > > > anymore. i wrote about it here: https://libreboot.org/news/argon2.html > > > > > > one thing to note is that though the code is free software, it's a > > > permissive non-copyleft license; i still think grub should make use of > > > it, regardless. grub has lacked argon2 for years now, and re-writing = it > > > will probably be a lot of wasted effort if the phc one works. > > > > > > the phc implementation was originally adapted by someone named Axel, = to > > > the archlinux aur for grub 2.06: > > > https://aur.archlinux.org/cgit/aur.git/tree/?h=3Dgrub-improved-luks2-= git&id=3D1c7932d90f1f62d0fd5485c5eb8ad79fa4c2f50d > > > > > > nicholas johnson (https://nicholasjohnson.ch/) contacted me telling me > > > he'd re-adapted the code for grub 2.12, on top of the rc1 tag. i then > > > started using it in libreboot's grub. > > > > > > it would be nice if this could make it into the grub 2.12 release! the > > > patches are attached. > > > > > > PS: the original PHC code is here: > > > https://github.com/P-H-C/phc-winner-argon2 > >=20 > > It seems to me this is based on Patrick Steinhardt work. AFAICT Patrick > > is going to repost new version of the patch set after the release. So, > > I hope it will be included in the GRUB 2.14. We are not able to take th= is > > patch set into upcoming release in this stage of development. Sorry > > about that... > >=20 >=20 > Patrick also mentioned that he'd prefer it if the bundled gcrypt was > updated to a version with Argon2 support rather than adapting the > reference implementation, but that it is "a _major_ effort". [1] >=20 > - Oskari >=20 > [1]: https://lore.kernel.org/grub-devel/Y3xs82f11kZSSi5I@ncase/ Indeed. I had several tries at updating the vendored libgcrypt, but doing this is quite a frustrating experience to say the least. Every time I started I eventually gave up. So in the end I'm of two minds: yes, it would be great to pull in Argon2 via an updated libgcrypt instead of using the reference implementation. But to be frank, I do not feel like I have the time or the motivation to do the update myself given that it is such a huge task. So in the end, we may just be pragmatic and use the reference implementation for the time being until somebody steps up and does the update of libgcrypt. I also wouldn't mind if somebody else wants to step up and build on top of the work that I already did, but in that case I'd appreciate a "Based-on-patch-by:" trailer in the commits. But if nobody does, and if Daniel thinks that the reference implementation is okay for now, then I will resubmit the patches once GRUB 2.12 is out of the door. Patrick --2KlLXi9Q2DoN4zQ0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF9hrgiFbCdvenl/rVbJhu7ckPpQFAmVPwp4ACgkQVbJhu7ck PpTyaxAAjuzhTOsK/K5lmZevlEWpWUjgIfN84Rt4H628AqBC7LRxk8t8l7vS7YKD eOnyQgclLYp1QQai53R/yHGt6jVJghMo6vIIQqnlAdTxU9bOnrDtDMpb07umIxYg mPUY1FewbOu13gxC3Dc4RqEzGPH0p/2oKSMviV4UmdKaOeFHsTj8W0l0o10o8qU6 BRqCj086j2OTqtFMaGDaUqSamWbI1JY9xtvZi0nYuviWl+L1R14XnBu0UhCiqrkT LOLMkT/gzqs39xVw75ADZiDuHtBBkZAElWHHtqXp323eegjFGN7akgrkkXvRWelD mYojAucVe4ku5ubbInfabeqPeLavEfUz4tJgYhSsufBnpCkLQkanbXRfgg63SNxv g5USPkEUFDDvJw+8uNTjptYGpwhnHbzhyDYVKy3H31rnbrhQmH3hzXTO/a2mU7aD 47eBuKus43HSl7FbPwpTEHWtlql3D8JDCT6S9qp9G3vbqL1O39V+U9Vn7X9lba/g jYtZCH7su4NUYIj72pgcJnN/zmwK7u9PApLX0BHp/7qq4805Xyw9VuItBghYHr0Z NTLQhINtRiicM0Tb3anN4OoI16zRRm7jZ19WQp70XeWizfNlJnF9Og0zoUd2T0o0 ROcUyo4CjgcaPXDs2cZlRZn1gQ76uJTJ7kLUEG3orVS5+kr13SU= =89AP -----END PGP SIGNATURE----- --2KlLXi9Q2DoN4zQ0-- --===============3721024904283157043== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR3J1Yi1kZXZl bCBtYWlsaW5nIGxpc3QKR3J1Yi1kZXZlbEBnbnUub3JnCmh0dHBzOi8vbGlzdHMuZ251Lm9yZy9t YWlsbWFuL2xpc3RpbmZvL2dydWItZGV2ZWwK --===============3721024904283157043==--