From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jCk8a-00006M-1w for mharc-grub-devel@gnu.org; Fri, 13 Mar 2020 09:14:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57312) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCk8X-00006G-FY for grub-devel@gnu.org; Fri, 13 Mar 2020 09:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCk8W-0000hQ-72 for grub-devel@gnu.org; Fri, 13 Mar 2020 09:14:01 -0400 Received: from dibed.net-space.pl ([84.10.22.86]:34956) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1jCk8V-0000a8-S6 for grub-devel@gnu.org; Fri, 13 Mar 2020 09:14:00 -0400 Received: from router-fw.i.net-space.pl ([192.168.52.1]:46150 "EHLO tomti.i.net-space.pl") by router-fw-old.i.net-space.pl with ESMTP id S1946208AbgCMNNx (ORCPT ); Fri, 13 Mar 2020 14:13:53 +0100 X-Comment: RFC 2476 MSA function at dibed.net-space.pl logged sender identity as: dkiper Date: Fri, 13 Mar 2020 14:13:49 +0100 From: Daniel Kiper To: Patrick Steinhardt Cc: grub-devel@gnu.org, Leif Lindholm , agraf@csgraf.de, pjones@redhat.com, mjg59@google.com, phcoder@gmail.com, Milan Broz Subject: Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup Message-ID: <20200313131349.txdyacrwo4bexe4o@tomti.i.net-space.pl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 84.10.22.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 13:14:02 -0000 On Tue, Mar 10, 2020 at 07:58:30PM +0100, Patrick Steinhardt wrote: > In order to support the Argon2 key derival function for LUKS2, we > obviously need to implement Argon2. It doesn't make a lot of sense to > hand-code any crypto, which is why this commit instead imports Argon2 > from the cryptsetup project. This commit thus imports the code from the > official reference implementation located at [1]. The code is licensed > under CC0 1.0 Universal/Apache 2.0. Given that both LGPLv2.1+ and Apache > 2.0 are compatible with GPLv3, it should be fine to import that code. > > The code is imported from commit 62358ba (Merge pull request #270 from > bitmark-property-system/master, 2019-05-20). To make it work for GRUB, > several adjustments were required that have beed documented in > "grub-dev.texi". > > [1]: https://github.com/P-H-C/phc-winner-argon2 > > Signed-off-by: Patrick Steinhardt [...] > diff --git a/grub-core/lib/argon2/argon2.c b/grub-core/lib/argon2/argon2.c > new file mode 100644 > index 000000000..c77f7f6ff > --- /dev/null > +++ b/grub-core/lib/argon2/argon2.c > @@ -0,0 +1,232 @@ > +/* > + * Argon2 reference source code package - reference C implementations > + * > + * Copyright 2015 > + * Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves > + * > + * You may use this work under the terms of a Creative Commons CC0 1.0 > + * License/Waiver or the Apache Public License 2.0, at your option. The terms of > + * these licenses can be found at: > + * > + * - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 > + * - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 > + * > + * You should have received a copy of both of these licenses along with this > + * software. If not, they may be obtained at the above URLs. > + */ > + > +#include > + > +#include "argon2.h" > +#include "core.h" > + > +GRUB_MOD_LICENSE ("GPLv3"); I think we should change that if the license above is different. Anyway, I am trying to get in touch with FSF license team. I have not got a reply yet... I will see what is possible in my company... Otherwise patch LGTM... Daniel