diff mbox

[1/1] Adding the Scrypt key derivation library.

Message ID CANeaEXGaudiymi+4JKxCvLTJVqBfckNWCqT+DPMBOWJJsMBuZw@mail.gmail.com
State Accepted
Headers show

Commit Message

Parnell Springmeyer Aug. 8, 2015, 6:02 p.m. UTC

Comments

Thomas Petazzoni Aug. 28, 2015, 1:38 p.m. UTC | #1
Dear Parnell Springmeyer,

Thanks for your contribution!

You should normally send patches inline (using git send-email) rather
than as an attachment. This allows to more easily review your patch by
simply replying to your e-mail.

That being said, for this first patch, I applied it to our next branch,
after doing quite a few changes:

    [Thomas:
      - move from "Libraries -> Crypto" to "System tools", since it only
        installs one binary, scrypt, and no library.
      - bump from 1.1.6 to 1.2.0
      - add comment in the .hash file explaining where the hash is coming
        from.
      - add missing dependency on OpenSSL
      - use BSD-2c as the license code, instead of BSD2
      - use 'main.c' as the license file.]

I messed up a bit when committing, since I committed your original
patch, and then separately my changes. But at least this way you can
clearly see what I have changed:

  http://git.buildroot.net/buildroot/commit/?h=next&id=84face61cf1dfefe864d6d47976932a32bbde9f2
  http://git.buildroot.net/buildroot/commit/?h=next&id=0d83de383224c65ec250a005130b1d3cc6fd6d76

Thanks!

Thomas
diff mbox

Patch

From a7e4b6da1392ff00c1f6ecd8fee5cab43c928f5e Mon Sep 17 00:00:00 2001
From: Parnell Springmeyer <parnell@digitalmentat.com>
Date: Sat, 8 Aug 2015 11:51:42 -0500
Subject: [PATCH 1/1] Adding the Scrypt key derivation library.

Signed-off-by: Parnell Springmeyer <parnell@digitalmentat.com>
---
 package/Config.in          |  1 +
 package/scrypt/Config.in   |  8 ++++++++
 package/scrypt/scrypt.hash |  1 +
 package/scrypt/scrypt.mk   | 13 +++++++++++++
 4 files changed, 23 insertions(+)
 create mode 100644 package/scrypt/Config.in
 create mode 100644 package/scrypt/scrypt.hash
 create mode 100644 package/scrypt/scrypt.mk

diff --git a/package/Config.in b/package/Config.in
index 47d14d7..f8553e5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -753,6 +753,7 @@  menu "Crypto"
 	source "package/nettle/Config.in"
 	source "package/openssl/Config.in"
 	source "package/polarssl/Config.in"
+	source "package/scrypt/Config.in"
 endmenu
 
 menu "Database"
diff --git a/package/scrypt/Config.in b/package/scrypt/Config.in
new file mode 100644
index 0000000..8be7f54
--- /dev/null
+++ b/package/scrypt/Config.in
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_SCRYPT
+	bool "scrypt"
+	help
+	  A password-based key derivation function specifically designed
+	  to make it costly to perform large-scale custom hardware attacks
+	  by requiring large amounts of memory.
+
+	  http://www.tarsnap.com/scrypt.html
diff --git a/package/scrypt/scrypt.hash b/package/scrypt/scrypt.hash
new file mode 100644
index 0000000..e6b690e
--- /dev/null
+++ b/package/scrypt/scrypt.hash
@@ -0,0 +1 @@ 
+sha256 dfd0d1a544439265bbb9b58043ad3c8ce50a3987b44a61b1d39fd7a3ed5b7fb8  scrypt-1.1.6.tgz
diff --git a/package/scrypt/scrypt.mk b/package/scrypt/scrypt.mk
new file mode 100644
index 0000000..2db6e2e
--- /dev/null
+++ b/package/scrypt/scrypt.mk
@@ -0,0 +1,13 @@ 
+################################################################################
+#
+# scrypt
+#
+################################################################################
+
+SCRYPT_VERSION = 1.1.6
+SCRYPT_SOURCE = scrypt-$(SCRYPT_VERSION).tgz
+SCRYPT_SITE = http://www.tarsnap.com/scrypt
+SCRYPT_LICENSE = BSD2
+SCRYPT_INSTALL_STAGING = YES
+
+$(eval $(autotools-package))
-- 
2.1.4