From 4c12f4af56ab8747149f929e032b1c595d5764db Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Thu, 13 Apr 2017 11:51:05 -0400 Subject: [PATCH] Amend the build instructions to mention libsodium and default build only to mpw. --- README.md | 26 +++++++++++++++++++------- platform-independent/cli-c/build | 8 ++++---- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0d20c925..3f0a2c66 100644 --- a/README.md +++ b/README.md @@ -158,15 +158,27 @@ For example: ./build && sudo ./install mpw -h -The build has a few dependencies you should have installed before running it: +Normally, this is all you need to do, however note that there are a few dependencies that need to be met, depending on which targets you are building: - - `mpw`: `openssl-dev`, `ncurses-dev` (if `mpw_color=1`) - - `mpw-bench`: `openssl-dev` - - `mpw-tests`: `openssl-dev`, `libxml2` + - `mpw` -There are a few different ways you can modify the build process: +The C implementation depends either on `libsodium` or Tarsnap's `scrypt` and `openssl-dev`. - - You can change the targets that should be built. By default, all targets are built. These are the available targets: +We recommend you install `libsodium`. If `libsodium` is not installed when `./build` is executed, the script will try to download and statically link Tarsnap's `scrypt` instead. Tarsnap's `scrypt` depends on you having `openssl-dev` installed. + +If you have `mpw_color` enabled (it is enabled by default), the build also depends on `ncurses-dev` to communicate with the terminal. + + - `mpw-bench` + +This tool compares the performance of a few cryptographic algorithms, including bcrypt. The `./build` script will try to automatically download and statically link `bcrypt`. + + - `mpw-tests` + +This tool runs a suite of tests to ensure the correct passwords are being generated by the algorithm under various circumstances. The test suite is declared in `mpw-tests.xml` which needs to exist in the current working directory when running the tool. In addition, `libxml2` is used to parse the file, so this target depends on you having it installed when running `./build`. + +Finally, there are a few different ways you can modify the build process: + + - You can change the targets that should be built. By default, only `mpw` is built. These are the available targets: - `mpw`: This is the standard command-line `mpw` tool which implements all Master Password features. - `mpw-tests`: This is a tool to perform the standard tests script on the `mpw` implementation. - `mpw-bench`: This is a tool to run a benchmark on the `mpw` implementation, comparing it to the performance of other algorithms. @@ -176,7 +188,7 @@ There are a few different ways you can modify the build process: To change the targets to build, use: - targets='mpw mpw-bench' ./build + targets='mpw mpw-tests' ./build To add a library search path, use: diff --git a/platform-independent/cli-c/build b/platform-independent/cli-c/build index 0d6a00d3..52ca6804 100755 --- a/platform-independent/cli-c/build +++ b/platform-independent/cli-c/build @@ -32,14 +32,14 @@ else # Default targets. # Modify here or override using targets='mpw mpw-bench' ./build targets=( - mpw # C CLI version of Master Password. - mpw-bench # C CLI Master Password benchmark utility. - mpw-tests # C Master Password algorithm tester. + mpw # C CLI version of Master Password, requires libsodium or openssl-dev. + #mpw-bench # C CLI Master Password benchmark utility. + #mpw-tests # C Master Password algorithm test suite, requires libxml2. ) fi # Optional features. -mpw_color=${mpw_color:-1} # Colorized Identicon, requires libncurses-dev +mpw_color=${mpw_color:-1} # Colorized Identicon, requires libncurses-dev. # Default build flags. export CFLAGS="-O3 $CFLAGS"