diff options
-rw-r--r-- | DEPENDENCIES | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | common.c | 24 | ||||
-rwxr-xr-x | test | 2 | ||||
-rw-r--r-- | xsum.man | 2 |
6 files changed, 24 insertions, 12 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES index d62071a..3172d30 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -9,7 +9,7 @@ BUILD DEPENDENCIES: coreutils gcc libc - libkeccak>=1.2 + libkeccak>=1.4 make sed @@ -16,8 +16,10 @@ BIN =\ sha3-256sum\ sha3-384sum\ sha3-512sum\ + rawshake128sum\ rawshake256sum\ rawshake512sum\ + shake128sum\ shake256sum\ shake512sum @@ -34,8 +36,10 @@ sha3-224sum = SHA3-224 sha3-256sum = SHA3-256 sha3-384sum = SHA3-384 sha3-512sum = SHA3-512 +rawshake128sum = RawSHAKE128 rawshake256sum = RawSHAKE256 rawshake512sum = RawSHAKE512 +shake128sum = SHAKE128 shake256sum = SHAKE256 shake512sum = SHAKE512 @@ -11,8 +11,10 @@ SYNOPSIS sha3-256sum [option ...] [file ...] sha3-384sum [option ...] [file ...] sha3-512sum [option ...] [file ...] + shake128sum [option ...] [file ...] shake256sum [option ...] [file ...] shake512sum [option ...] [file ...] + rawshake128sum [option ...] [file ...] rawshake256sum [option ...] [file ...] rawshake512sum [option ...] [file ...] @@ -91,17 +91,19 @@ make_spec(struct libkeccak_generalised_spec *restrict gspec, struct libkeccak_sp switch (libkeccak_degeneralise_spec(gspec, spec)) { case 0: break; - TEST (STATE_NONPOSITIVE, "the state size must be positive"); - TEST (STATE_TOO_LARGE, "the state size is too large, may not exceed 1600"); - TEST (STATE_MOD_25, "the state size must be a multiple of 25"); - TEST (WORD_NONPOSITIVE, "the word size must be positive"); - TEST (WORD_TOO_LARGE, "the word size is too large, may not exceed 64"); - TEST (STATE_WORD_INCOHERENCY, "the state size must be exactly 25 times the word size"); - TEST (CAPACITY_NONPOSITIVE, "the capacity must be positive"); - TEST (CAPACITY_MOD_8, "the capacity must be a multiple of 8"); - TEST (BITRATE_NONPOSITIVE, "the rate must be positive"); - TEST (BITRATE_MOD_8, "the rate must be a multiple of 8"); - TEST (OUTPUT_NONPOSITIVE, "the output size must be positive"); + TEST (STATE_NONPOSITIVE, "the state size must be positive"); + TEST (STATE_TOO_LARGE, "the state size is too large, may not exceed 1600"); + TEST (STATE_MOD_25, "the state size must be a multiple of 25"); + TEST (WORD_NONPOSITIVE, "the word size must be positive"); + TEST (WORD_TOO_LARGE, "the word size is too large, may not exceed 64"); + TEST (STATE_WORD_INCOHERENCY, "the state size must be exactly 25 times the word size"); + TEST (CAPACITY_NONPOSITIVE, "the capacity must be positive"); + TEST (CAPACITY_MOD_8, "the capacity must be a multiple of 8"); + TEST (BITRATE_NONPOSITIVE, "the rate must be positive"); + TEST (BITRATE_MOD_8, "the rate must be a multiple of 8"); + TEST (OUTPUT_NONPOSITIVE, "the output size must be positive"); + TEST (STATE_BITRATE_CAPACITY_INCONSISTENCY, "the sum of the rate and capacity must equal" + " the state size (25 times the word size)"); default: user_error("unknown error in algorithm parameters"); } @@ -36,11 +36,13 @@ test "$(printf '' | ./sha3-224sum -lu)" = '6B4E03423667DBB73B6E15454F0EB1ABD4597 test "$(printf '' | ./sha3-224sum -b)" = "$(printf '\153\116\003\102\066\147\333\267\073\156\025\105\117\016\261\253\324\131\177\232\033\007\216\077\133\132\153\307')" +test "$(printf '' | ./rawshake128sum -N 128)" = 'fa019a3b17630df6014853b5470773f1 -' test "$(printf '' | ./rawshake256sum -N 128)" = '3a1108d4a90a31b85a10bdce77f4bfbd -' test "$(printf '' | ./rawshake256sum -N 8)" = '3a -' test "$(printf '' | ./rawshake512sum -N 128)" = '0ae7dac687c3525d5c2a6c4119ea3968 -' +test "$(printf '' | ./shake128sum -N 128)" = '7f9c2ba4e88f827d616045507605853e -' test "$(printf '' | ./shake256sum -N 128)" = '46b9dd2b0ba88d13233b3feb743eeb24 -' test "$(printf '' | ./shake256sum -N 8)" = '46 -' test "$(printf '' | ./shake512sum -N 128)" = 'ae1b4eea1eaf5ea633e66045f03ff11b -' @@ -107,8 +107,10 @@ or if you know what you are doing; apart from which is intended to .I always be used with +.BR shake128sum (1), .BR shake256sum (1), .BR shake512sum (1), +.BR rawshake128sum (1), .BR rawshake256sum (1), and .BR rawshake512sum (1). |