From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Gradl Subject: [PATCH] Add argon2. Date: Sun, 05 Jun 2016 15:46:00 -0500 Message-ID: <87lh2jpdo7.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9ew7-0004J4-CJ for guix-devel@gnu.org; Sun, 05 Jun 2016 16:46:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9ew2-0003ou-JU for guix-devel@gnu.org; Sun, 05 Jun 2016 16:46:18 -0400 Received: from mail.openmailbox.org ([62.4.1.34]:38529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9ew2-0003od-CN for guix-devel@gnu.org; Sun, 05 Jun 2016 16:46:14 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain Hello Guix, Attached is a patch to add the password hashing library Argon2. It is a dependency for opendht. The source tree contains the directory "blake2". At first I thought this is a bundled version of blake2, but it seems that this is a seperate implementation. The sources bundled with Argon2 are significantly different from the ones at https://github.com/BLAKE2/BLAKE2. My conclusion is that this is a Blake2 implementation made by and for Argon2. Thus I did not unbundle it. Do you agree with this? Thank you! Best, Lukas --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-argon2.patch Content-Transfer-Encoding: quoted-printable >From ba263b4a49d1acf83e4e42d1e9e0d51572268928 Mon Sep 17 00:00:00 2001 From: Lukas Gradl Date: Sun, 5 Jun 2016 15:35:24 -0500 Subject: [PATCH] gnu: Add argon2. * gnu/packages/password-utils.scm (argon2): New variable. --- gnu/packages/password-utils.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.= scm index 30ed130..1579821 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -5,6 +5,7 @@ ;;; Copyright =C2=A9 2016 Christopher Allan Webber ;;; Copyright =C2=A9 2016 Jessica Tallon ;;; Copyright =C2=A9 2016 Andreas Enge +;;; Copyright =C2=A9 2016 Lukas Gradl ;;; ;;; This file is part of GNU Guix. ;;; @@ -295,3 +296,39 @@ Synchronization is possible using the integrated git s= upport, which commits changes to your password database to a git repository that can be managed through the pass command.") (license license:gpl2+))) + +(define-public argon2 + (package + (name "argon2") + (version "20160406") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://codeload.github.com/P-H-C/phc-winner-" + name "/tar.gz/" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0g6wa94sh639xl1qc8z21q43r1mp8y77r1zf8nwx5pfsxd8fmyzv")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags '("CC=3Dgcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (install-file "argon2" (string-append out "/bin")) + (install-file "libargon2.a" (string-append out "/lib")) + (install-file "libargon2.so" (string-append out "/lib")) + (copy-recursively "include" + (string-append out "/include")))))))) + (home-page "https://www.argon2.com/") + (synopsis "Password hashing library") + (description "Argon2 provides a key derivation function that was decla= red +winner of the 2015 Password Hashing Competition.") + (license license:cc0))) --=20 2.7.4 --=-=-=--