From 3f9c09b1e0901248c96c47e392a2888c40b2f182 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Thu, 2 Mar 2017 17:32:50 -0800 Subject: crypto: passphrase hashing with Argon2 This commit adds in the PassphraseHash function which hashes the provided passphrase (in key form) using Argon2id. This cost parameters for Argon2id and that salt are both fed into the function. It also includes tests and benchmarks for the passphrase hashing. Change-Id: I060db3e71213c756d45ce5603a0a59d3d7a1e609 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e9cb5c8..79cbca8 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,15 @@ You will also want to add `$GOPATH/bin` to your `$PATH`. * `make` * A C compiler (`gcc` or `clang`) * Go +* [Argon2 Passphrase Hash](https://github.com/P-H-C/phc-winner-argon2), a C + library which can be installed (both the header `argon2.h` and library + `libargon2`) by running: + ```bash + > git clone https://github.com/P-H-C/phc-winner-argon2 argon2 + > cd argon2 + > make + > sudo make install + ``` Once this is setup, you can run `make fscrypt` to build the executable in `build/fscrypt`. Pass `"LDFLAGS += -static"` to `make` to get a static @@ -84,6 +93,8 @@ dynamically linked binary by default. `fscrypt` has the following runtime dependencies: * Kernel support for filesystem encryption (this will depend on your kernel configuration and specific filesystem) +* `libargon2` (see the above installation instructions for Argon2), unless you + built a static executable. Installing it just requires placing it in your path or running `make install`. Change `$GOBIN` to change the install location of `fscrypt`. By default, -- cgit v1.2.3