diff --git a/.github/workflows/test-ref.yml b/.github/workflows/test-ref.yml index 7f928681..b97ded2d 100644 --- a/.github/workflows/test-ref.yml +++ b/.github/workflows/test-ref.yml @@ -10,8 +10,8 @@ jobs: strategy: matrix: hash: - - sha256 - - shake256 + - sha2 + - shake - haraka size: - 128 diff --git a/.github/workflows/test-sha2-avx2.yml b/.github/workflows/test-sha2-avx2.yml new file mode 100644 index 00000000..d0dd58e8 --- /dev/null +++ b/.github/workflows/test-sha2-avx2.yml @@ -0,0 +1,33 @@ +name: Tests for sha2-avx2 implementation + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + size: + - 128 + - 192 + - 256 + option: + - s + - f + thash: + - simple + - robust + steps: + - uses: actions/checkout@v1 + - name: Run make + run: | + make -C sha2-avx2 THASH=${{ matrix.thash }} clean + make -C sha2-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha2-${{ matrix.size }}${{ matrix.option }} tests + make -C sha2-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha2-${{ matrix.size }}${{ matrix.option }} test + make -C sha2-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha2-${{ matrix.size }}${{ matrix.option }} PQCgenKAT_sign + - name: Run PQCgenKAT_sign + run: python3 vectors.py sphincs-sha2-${{ matrix.size }}${{ matrix.option }}-${{ matrix.thash }} sha2-avx2 + +# vim: set ft=yaml ts=2 sw=2 et : diff --git a/.github/workflows/test-sha256-avx2.yml b/.github/workflows/test-sha256-avx2.yml deleted file mode 100644 index 3dc5ef41..00000000 --- a/.github/workflows/test-sha256-avx2.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Tests for sha256-avx2 implementation - -on: - - push - - pull_request - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - size: - - 128 - - 192 - - 256 - option: - - s - - f - thash: - - simple - - robust - steps: - - uses: actions/checkout@v1 - - name: Run make - run: | - make -C sha256-avx2 THASH=${{ matrix.thash }} clean - make -C sha256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha256-${{ matrix.size }}${{ matrix.option }} tests - make -C sha256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha256-${{ matrix.size }}${{ matrix.option }} test - make -C sha256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-sha256-${{ matrix.size }}${{ matrix.option }} PQCgenKAT_sign - - name: Run PQCgenKAT_sign - run: python3 vectors.py sphincs-sha256-${{ matrix.size }}${{ matrix.option }}-${{ matrix.thash }} sha256-avx2 - -# vim: set ft=yaml ts=2 sw=2 et : diff --git a/.github/workflows/test-shake-avx2.yml b/.github/workflows/test-shake-avx2.yml new file mode 100644 index 00000000..4e6ddea4 --- /dev/null +++ b/.github/workflows/test-shake-avx2.yml @@ -0,0 +1,33 @@ +name: Tests for shake-avx2 implementation + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + size: + - 128 + - 192 + - 256 + option: + - s + - f + thash: + - simple + - robust + steps: + - uses: actions/checkout@v1 + - name: Run make + run: | + make -C shake-avx2 THASH=${{ matrix.thash }} clean + make -C shake-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake-${{ matrix.size }}${{ matrix.option }} tests + make -C shake-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake-${{ matrix.size }}${{ matrix.option }} test + make -C shake-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake-${{ matrix.size }}${{ matrix.option }} PQCgenKAT_sign + - name: Run PQCgenKAT_sign + run: python3 vectors.py sphincs-shake-${{ matrix.size }}${{ matrix.option }}-${{ matrix.thash }} shake-avx2 + +# vim: set ft=yaml ts=2 sw=2 et : diff --git a/.github/workflows/test-shake256-avx2.yml b/.github/workflows/test-shake256-avx2.yml deleted file mode 100644 index 1537eb20..00000000 --- a/.github/workflows/test-shake256-avx2.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Tests for shake256-avx2 implementation - -on: - - push - - pull_request - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - size: - - 128 - - 192 - - 256 - option: - - s - - f - thash: - - simple - - robust - steps: - - uses: actions/checkout@v1 - - name: Run make - run: | - make -C shake256-avx2 THASH=${{ matrix.thash }} clean - make -C shake256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake256-${{ matrix.size }}${{ matrix.option }} tests - make -C shake256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake256-${{ matrix.size }}${{ matrix.option }} test - make -C shake256-avx2 THASH=${{ matrix.thash }} PARAMS=sphincs-shake256-${{ matrix.size }}${{ matrix.option }} PQCgenKAT_sign - - name: Run PQCgenKAT_sign - run: python3 vectors.py sphincs-shake256-${{ matrix.size }}${{ matrix.option }}-${{ matrix.thash }} shake256-avx2 - -# vim: set ft=yaml ts=2 sw=2 et : diff --git a/README.md b/README.md index c5813000..afb63dbb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This repository contains the software that accompanies the [SPHINCS+ submission] ### Parameters -The [SPHINCS+ specification](https://sphincs.org/data/sphincs+-specification.pdf) proposed a set of 36 named instances, specifying hash functions and concrete parameters for the security level, tree dimensions, WOTS+ and FORS. This reference implementation allows for more flexibility, as parameters can be specified in a `params.h` file. The proposed parameter sets have been predefined in `ref/params/params-*.h`, and the hash function can be varied by linking with the different implementations of `hash.h`, i.e., `hash_haraka.c`, `hash_sha256.c` and `hash_shake256.c`, as well as different implementations of `thash.h`, i.e., `*_robust.c` and `*_simple.c`. This is demonstrated in the `Makefile`. See the table below for a summary of the parameter sets. These parameters target the NIST security categories 1, 3 and 5; for each category, there is a parameter set geared towards either small signatures or fast signature generation. +The [SPHINCS+ specification](https://sphincs.org/data/sphincs+-specification.pdf) proposed a set of 36 named instances, specifying hash functions and concrete parameters for the security level, tree dimensions, WOTS+ and FORS. This reference implementation allows for more flexibility, as parameters can be specified in a `params.h` file. The proposed parameter sets have been predefined in `ref/params/params-*.h`, and the hash function can be varied by linking with the different implementations of `hash.h`, i.e., `hash_haraka.c`, `hash_sha2.c` and `hash_shake.c`, as well as different implementations of `thash.h`, i.e., `*_robust.c` and `*_simple.c`. This is demonstrated in the `Makefile`. See the table below for a summary of the parameter sets. These parameters target the NIST security categories 1, 3 and 5; for each category, there is a parameter set geared towards either small signatures or fast signature generation. | | n | h | d | log(t) | k | w | bit security | pk bytes | sk bytes | sig bytes | | :------------ | -: | -: | -: | -----: | -: | --: | -----------: | -------: | -------: | --------: | diff --git a/SHA256SUMS b/SHA256SUMS index e3286481..e781c990 100644 --- a/SHA256SUMS +++ b/SHA256SUMS @@ -10,27 +10,27 @@ a838509fa6ec49ade2638efc35d9e29fdb56bd9b843d5e1f48210a2cab218332 sphincs-haraka- e1e3258be6b4467bcea81392363f657a58278a5b99fe240f29e388b0fe72f5da sphincs-haraka-256f-simple b5c5cc535f03789c25c018c009615ac62ba5b64188e4db5e3ede5513e3704dcc sphincs-haraka-256s-robust 9428a566a2c2ee03665fc0eb2dbf208deb1b28716dc8c2d5e7c036a9f83d31da sphincs-haraka-256s-simple -b6c82007bbce794f9fd67de708cd4d959319c744b918ddb28795fd491b713aa9 sphincs-sha256-128f-robust -708f6ab77f8026361e975f7be7b9b5d1cd8aca56e4a3604c85ef3f9fe6618549 sphincs-sha256-128f-simple -f4c2f31082fc8ad15419edc4f24c34a83d909f75eb37ea5ffe53df0fb5ef5306 sphincs-sha256-128s-robust -65942fac8e225fde77dd277d297e68c94c2e25a2a4089f88be4b56fa92b18a84 sphincs-sha256-128s-simple -b8e617db2099e617dfc372ff732eead88872aea791e2fe82628568d75dd03c78 sphincs-sha256-192f-robust -84b1a342683bcad658efb6c65f7367c6b30623e74e3a24c2238d19eaf74722ab sphincs-sha256-192f-simple -50c4b94dc788446077b48af1d8fa0170dc2114b4cb72a19f1d8c7628f9dadfd6 sphincs-sha256-192s-robust -13efa67b9297afa051b9b30e2686266350c8b4000caa49aa432516e2a86d0b68 sphincs-sha256-192s-simple -dc3330f8f19c816f45ee9a1127bf2b8a8c900e05df9a964bb760f0adf8f9b1b3 sphincs-sha256-256f-robust -46e286dc1a20012789c1bf4793a8eb2043dd0c11df729fa36d9f96b0aeffdac6 sphincs-sha256-256f-simple -1f42b407e1e351861ba23e520b1974f399e349fcb66c614d727a38fb4e646634 sphincs-sha256-256s-robust -c816ca365a667e4d6564a95ac576bc9d7be0de7e66eff93e6f05dd4f134a183f sphincs-sha256-256s-simple -4be71430814589ce7c861030c7cdce0aa73f75885b693b41fdb7c34d8f32fa79 sphincs-shake256-128f-robust -5167df2ce46f33b76ccf0688f7769217d91878bd7d9b431080a3032eba51da10 sphincs-shake256-128f-simple -fbe6c99d6ccc42fc9af5babbac532f28288d4164b182515dffeb1cd47f351d12 sphincs-shake256-128s-robust -e7d5caee1941be99b6dfe46a95fc4535a34792f429e61d1cdc7fd3bbafe9ff02 sphincs-shake256-128s-simple -243d0e25de08fea547b0beae5f778a48bd55e56066435f9cdb9afc60a722699e sphincs-shake256-192f-robust -f204fd1cd5dce187441d104ae7159b64322b6a4afae708d48dc9966fe418ec4e sphincs-shake256-192f-simple -cb13eaa2b1c074f53c87f1025e6bb1b356ad8de3bea9388b90a058a6460766bb sphincs-shake256-192s-robust -4cc01c4a562d738ac54f5abfead35ecc4f46a1e2531fa12b4bc2819f4560c351 sphincs-shake256-192s-simple -5a736aeba47f8d84e3ca47126715affcb4ce6cef13e3c9f6af220827973aa383 sphincs-shake256-256f-robust -127f7ab83c740344546fe30777b221e8cb39f30fc4242d07d7608dc31a9835d4 sphincs-shake256-256f-simple -4d2ca7d10f2206c3cb9a26c6b00a0361601a1fe2dddf102fbfd6d3dac0be10fe sphincs-shake256-256s-robust -4ce4552e2e9b009a9016eb6dbcbefae3da2de151d61e2f392d4b9517eaeab91d sphincs-shake256-256s-simple +b6c82007bbce794f9fd67de708cd4d959319c744b918ddb28795fd491b713aa9 sphincs-sha2-128f-robust +708f6ab77f8026361e975f7be7b9b5d1cd8aca56e4a3604c85ef3f9fe6618549 sphincs-sha2-128f-simple +f4c2f31082fc8ad15419edc4f24c34a83d909f75eb37ea5ffe53df0fb5ef5306 sphincs-sha2-128s-robust +65942fac8e225fde77dd277d297e68c94c2e25a2a4089f88be4b56fa92b18a84 sphincs-sha2-128s-simple +b8e617db2099e617dfc372ff732eead88872aea791e2fe82628568d75dd03c78 sphincs-sha2-192f-robust +84b1a342683bcad658efb6c65f7367c6b30623e74e3a24c2238d19eaf74722ab sphincs-sha2-192f-simple +50c4b94dc788446077b48af1d8fa0170dc2114b4cb72a19f1d8c7628f9dadfd6 sphincs-sha2-192s-robust +13efa67b9297afa051b9b30e2686266350c8b4000caa49aa432516e2a86d0b68 sphincs-sha2-192s-simple +dc3330f8f19c816f45ee9a1127bf2b8a8c900e05df9a964bb760f0adf8f9b1b3 sphincs-sha2-256f-robust +46e286dc1a20012789c1bf4793a8eb2043dd0c11df729fa36d9f96b0aeffdac6 sphincs-sha2-256f-simple +1f42b407e1e351861ba23e520b1974f399e349fcb66c614d727a38fb4e646634 sphincs-sha2-256s-robust +c816ca365a667e4d6564a95ac576bc9d7be0de7e66eff93e6f05dd4f134a183f sphincs-sha2-256s-simple +4be71430814589ce7c861030c7cdce0aa73f75885b693b41fdb7c34d8f32fa79 sphincs-shake-128f-robust +5167df2ce46f33b76ccf0688f7769217d91878bd7d9b431080a3032eba51da10 sphincs-shake-128f-simple +fbe6c99d6ccc42fc9af5babbac532f28288d4164b182515dffeb1cd47f351d12 sphincs-shake-128s-robust +e7d5caee1941be99b6dfe46a95fc4535a34792f429e61d1cdc7fd3bbafe9ff02 sphincs-shake-128s-simple +243d0e25de08fea547b0beae5f778a48bd55e56066435f9cdb9afc60a722699e sphincs-shake-192f-robust +f204fd1cd5dce187441d104ae7159b64322b6a4afae708d48dc9966fe418ec4e sphincs-shake-192f-simple +cb13eaa2b1c074f53c87f1025e6bb1b356ad8de3bea9388b90a058a6460766bb sphincs-shake-192s-robust +4cc01c4a562d738ac54f5abfead35ecc4f46a1e2531fa12b4bc2819f4560c351 sphincs-shake-192s-simple +5a736aeba47f8d84e3ca47126715affcb4ce6cef13e3c9f6af220827973aa383 sphincs-shake-256f-robust +127f7ab83c740344546fe30777b221e8cb39f30fc4242d07d7608dc31a9835d4 sphincs-shake-256f-simple +4d2ca7d10f2206c3cb9a26c6b00a0361601a1fe2dddf102fbfd6d3dac0be10fe sphincs-shake-256s-robust +4ce4552e2e9b009a9016eb6dbcbefae3da2de151d61e2f392d4b9517eaeab91d sphincs-shake-256s-simple diff --git a/benchmark.py b/benchmark.py index 8327aede..4ae60036 100755 --- a/benchmark.py +++ b/benchmark.py @@ -6,10 +6,10 @@ from subprocess import DEVNULL, run implementations = [ - ('ref', ['shake256', 'sha256', 'haraka']), + ('ref', ['shake', 'sha2', 'haraka']), ('haraka-aesni', ['haraka']), - ('shake256-avx2', ['shake256']), - ('sha256-avx2', ['sha256']), + ('shake-avx2', ['shake']), + ('sha2-avx2', ['sha2']), ] options = ["f", "s"] diff --git a/haraka-aesni/fors.c b/haraka-aesni/fors.c index 7f624815..abd8d52f 120000 --- a/haraka-aesni/fors.c +++ b/haraka-aesni/fors.c @@ -1 +1 @@ -../shake256-avx2/fors.c \ No newline at end of file +../shake-avx2/fors.c \ No newline at end of file diff --git a/haraka-aesni/hashx4.h b/haraka-aesni/hashx4.h index 78656ca5..3dc1ba4a 120000 --- a/haraka-aesni/hashx4.h +++ b/haraka-aesni/hashx4.h @@ -1 +1 @@ -../shake256-avx2/hashx4.h \ No newline at end of file +../shake-avx2/hashx4.h \ No newline at end of file diff --git a/haraka-aesni/merkle.c b/haraka-aesni/merkle.c index 2e3f830c..7a8454d9 120000 --- a/haraka-aesni/merkle.c +++ b/haraka-aesni/merkle.c @@ -1 +1 @@ -../shake256-avx2/merkle.c \ No newline at end of file +../shake-avx2/merkle.c \ No newline at end of file diff --git a/haraka-aesni/thashx4.h b/haraka-aesni/thashx4.h index f8e934c6..982555e9 120000 --- a/haraka-aesni/thashx4.h +++ b/haraka-aesni/thashx4.h @@ -1 +1 @@ -../shake256-avx2/thashx4.h \ No newline at end of file +../shake-avx2/thashx4.h \ No newline at end of file diff --git a/haraka-aesni/utilsx4.c b/haraka-aesni/utilsx4.c index 6d2d7615..ea6a5cf4 120000 --- a/haraka-aesni/utilsx4.c +++ b/haraka-aesni/utilsx4.c @@ -1 +1 @@ -../shake256-avx2/utilsx4.c \ No newline at end of file +../shake-avx2/utilsx4.c \ No newline at end of file diff --git a/haraka-aesni/utilsx4.h b/haraka-aesni/utilsx4.h index 049d3f17..faf4c28d 120000 --- a/haraka-aesni/utilsx4.h +++ b/haraka-aesni/utilsx4.h @@ -1 +1 @@ -../shake256-avx2/utilsx4.h \ No newline at end of file +../shake-avx2/utilsx4.h \ No newline at end of file diff --git a/haraka-aesni/wots.c b/haraka-aesni/wots.c index 5a4b92df..07845f11 120000 --- a/haraka-aesni/wots.c +++ b/haraka-aesni/wots.c @@ -1 +1 @@ -../shake256-avx2/wots.c \ No newline at end of file +../shake-avx2/wots.c \ No newline at end of file diff --git a/haraka-aesni/wotsx4.h b/haraka-aesni/wotsx4.h index 5837c365..db76d0f7 120000 --- a/haraka-aesni/wotsx4.h +++ b/haraka-aesni/wotsx4.h @@ -1 +1 @@ -../shake256-avx2/wotsx4.h \ No newline at end of file +../shake-avx2/wotsx4.h \ No newline at end of file diff --git a/ref/Makefile b/ref/Makefile index fa3063b9..09533cd8 100644 --- a/ref/Makefile +++ b/ref/Makefile @@ -7,17 +7,17 @@ CFLAGS=-Wall -Wextra -Wpedantic -O3 -std=c99 -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS) SOURCES = address.c randombytes.c merkle.c wots.c wotsx1.c utils.c utilsx1.c fors.c sign.c HEADERS = params.h address.h randombytes.h merkle.h wots.h wotsx1.h utils.h utilsx1.h fors.h api.h hash.h thash.h -ifneq (,$(findstring shake256,$(PARAMS))) - SOURCES += fips202.c hash_shake256.c thash_shake256_$(THASH).c +ifneq (,$(findstring shake,$(PARAMS))) + SOURCES += fips202.c hash_shake.c thash_shake_$(THASH).c HEADERS += fips202.h endif ifneq (,$(findstring haraka,$(PARAMS))) SOURCES += haraka.c hash_haraka.c thash_haraka_$(THASH).c HEADERS += haraka.h endif -ifneq (,$(findstring sha256,$(PARAMS))) - SOURCES += sha256.c hash_sha256.c thash_sha256_$(THASH).c - HEADERS += sha256.h +ifneq (,$(findstring sha2,$(PARAMS))) + SOURCES += sha2.c hash_sha2.c thash_sha2_$(THASH).c + HEADERS += sha2.h endif DET_SOURCES = $(SOURCES:randombytes.%=rng.%) diff --git a/ref/context.h b/ref/context.h index 19dc8138..aded5643 100644 --- a/ref/context.h +++ b/ref/context.h @@ -9,7 +9,7 @@ typedef struct { uint8_t pub_seed[SPX_N]; uint8_t sk_seed[SPX_N]; -#ifdef SPX_SHA256 +#ifdef SPX_SHA2 // sha256 state that absorbed pub_seed uint8_t state_seeded[40]; diff --git a/ref/hash_sha256.c b/ref/hash_sha2.c similarity index 99% rename from ref/hash_sha256.c rename to ref/hash_sha2.c index 255c00c5..bae959a8 100644 --- a/ref/hash_sha256.c +++ b/ref/hash_sha2.c @@ -5,7 +5,7 @@ #include "utils.h" #include "params.h" #include "hash.h" -#include "sha256.h" +#include "sha2.h" #if SPX_N >= 24 #define SPX_SHAX_OUTPUT_BYTES SPX_SHA512_OUTPUT_BYTES diff --git a/ref/hash_shake256.c b/ref/hash_shake.c similarity index 100% rename from ref/hash_shake256.c rename to ref/hash_shake.c diff --git a/ref/params/params-sphincs-sha256-128f.h b/ref/params/params-sphincs-sha2-128f.h similarity index 98% rename from ref/params/params-sphincs-sha256-128f.h rename to ref/params/params-sphincs-sha2-128f.h index cbc6605a..26e40cd2 100644 --- a/ref/params/params-sphincs-sha256-128f.h +++ b/ref/params/params-sphincs-sha2-128f.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-sha256-128s.h b/ref/params/params-sphincs-sha2-128s.h similarity index 98% rename from ref/params/params-sphincs-sha256-128s.h rename to ref/params/params-sphincs-sha2-128s.h index 69c9db7e..dedf6673 100644 --- a/ref/params/params-sphincs-sha256-128s.h +++ b/ref/params/params-sphincs-sha2-128s.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-sha256-192f.h b/ref/params/params-sphincs-sha2-192f.h similarity index 98% rename from ref/params/params-sphincs-sha256-192f.h rename to ref/params/params-sphincs-sha2-192f.h index 0d8dd3fb..ec9b3b6c 100644 --- a/ref/params/params-sphincs-sha256-192f.h +++ b/ref/params/params-sphincs-sha2-192f.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-sha256-192s.h b/ref/params/params-sphincs-sha2-192s.h similarity index 98% rename from ref/params/params-sphincs-sha256-192s.h rename to ref/params/params-sphincs-sha2-192s.h index 8d0d9bf6..4a27e28b 100644 --- a/ref/params/params-sphincs-sha256-192s.h +++ b/ref/params/params-sphincs-sha2-192s.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-sha256-256f.h b/ref/params/params-sphincs-sha2-256f.h similarity index 98% rename from ref/params/params-sphincs-sha256-256f.h rename to ref/params/params-sphincs-sha2-256f.h index 31579a8a..83c2bbdb 100644 --- a/ref/params/params-sphincs-sha256-256f.h +++ b/ref/params/params-sphincs-sha2-256f.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-sha256-256s.h b/ref/params/params-sphincs-sha2-256s.h similarity index 98% rename from ref/params/params-sphincs-sha256-256s.h rename to ref/params/params-sphincs-sha2-256s.h index df47da9c..cd4dec81 100644 --- a/ref/params/params-sphincs-sha256-256s.h +++ b/ref/params/params-sphincs-sha2-256s.h @@ -78,6 +78,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../sha256_offsets.h" +#include "../sha2_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-128f.h b/ref/params/params-sphincs-shake-128f.h similarity index 98% rename from ref/params/params-sphincs-shake256-128f.h rename to ref/params/params-sphincs-shake-128f.h index f1af819b..78e55320 100644 --- a/ref/params/params-sphincs-shake256-128f.h +++ b/ref/params/params-sphincs-shake-128f.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-128s.h b/ref/params/params-sphincs-shake-128s.h similarity index 98% rename from ref/params/params-sphincs-shake256-128s.h rename to ref/params/params-sphincs-shake-128s.h index 64d3f296..a1e4d44c 100644 --- a/ref/params/params-sphincs-shake256-128s.h +++ b/ref/params/params-sphincs-shake-128s.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-192f.h b/ref/params/params-sphincs-shake-192f.h similarity index 98% rename from ref/params/params-sphincs-shake256-192f.h rename to ref/params/params-sphincs-shake-192f.h index 97a38556..2e355fc2 100644 --- a/ref/params/params-sphincs-shake256-192f.h +++ b/ref/params/params-sphincs-shake-192f.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-192s.h b/ref/params/params-sphincs-shake-192s.h similarity index 98% rename from ref/params/params-sphincs-shake256-192s.h rename to ref/params/params-sphincs-shake-192s.h index 4ea7cd42..afba1b29 100644 --- a/ref/params/params-sphincs-shake256-192s.h +++ b/ref/params/params-sphincs-shake-192s.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-256f.h b/ref/params/params-sphincs-shake-256f.h similarity index 98% rename from ref/params/params-sphincs-shake256-256f.h rename to ref/params/params-sphincs-shake-256f.h index e17dfc1e..2dc78e54 100644 --- a/ref/params/params-sphincs-shake256-256f.h +++ b/ref/params/params-sphincs-shake-256f.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/params/params-sphincs-shake256-256s.h b/ref/params/params-sphincs-shake-256s.h similarity index 98% rename from ref/params/params-sphincs-shake256-256s.h rename to ref/params/params-sphincs-shake-256s.h index 5f8b2175..f20ebe4c 100644 --- a/ref/params/params-sphincs-shake256-256s.h +++ b/ref/params/params-sphincs-shake-256s.h @@ -73,6 +73,6 @@ #define SPX_PK_BYTES (2 * SPX_N) #define SPX_SK_BYTES (2 * SPX_N + SPX_PK_BYTES) -#include "../shake256_offsets.h" +#include "../shake_offsets.h" #endif diff --git a/ref/sha256.c b/ref/sha2.c similarity index 99% rename from ref/sha256.c rename to ref/sha2.c index 519eb31a..548707af 100644 --- a/ref/sha256.c +++ b/ref/sha2.c @@ -7,7 +7,7 @@ #include #include "utils.h" -#include "sha256.h" +#include "sha2.h" static uint32_t load_bigendian_32(const uint8_t *x) { return (uint32_t)(x[3]) | (((uint32_t)(x[2])) << 8) | diff --git a/ref/sha256.h b/ref/sha2.h similarity index 96% rename from ref/sha256.h rename to ref/sha2.h index 145fe481..2a241997 100644 --- a/ref/sha256.h +++ b/ref/sha2.h @@ -1,5 +1,5 @@ -#ifndef SPX_SHA256_H -#define SPX_SHA256_H +#ifndef SPX_SHA2_H +#define SPX_SHA2_H #define SPX_SHA256_BLOCK_BYTES 64 #define SPX_SHA256_OUTPUT_BYTES 32 /* This does not necessarily equal SPX_N */ diff --git a/ref/sha256_offsets.h b/ref/sha2_offsets.h similarity index 89% rename from ref/sha256_offsets.h rename to ref/sha2_offsets.h index bc20d356..e05249de 100644 --- a/ref/sha256_offsets.h +++ b/ref/sha2_offsets.h @@ -1,8 +1,8 @@ -#if !defined( SHA256_OFFSETS_H_ ) -#define SHA256_OFFSETS_H_ +#if !defined( SHA2_OFFSETS_H_ ) +#define SHA2_OFFSETS_H_ /* - * Offsets of various fields in the address structure when we use SHA256 as + * Offsets of various fields in the address structure when we use SHA2 as * the Sphincs+ hash function */ @@ -16,6 +16,6 @@ #define SPX_OFFSET_TREE_HGT 17 /* The byte used to specify the height of this node in the FORS or Merkle tree */ #define SPX_OFFSET_TREE_INDEX 18 /* The start of the 4 byte field used to specify the node in the FORS or Merkle tree */ -#define SPX_SHA256 1 +#define SPX_SHA2 1 -#endif /* SHA256_OFFSETS_H_ */ +#endif /* SHA2_OFFSETS_H_ */ diff --git a/ref/shake256_offsets.h b/ref/shake_offsets.h similarity index 97% rename from ref/shake256_offsets.h rename to ref/shake_offsets.h index cc5886f3..176360fa 100644 --- a/ref/shake256_offsets.h +++ b/ref/shake_offsets.h @@ -16,6 +16,6 @@ #define SPX_OFFSET_TREE_HGT 27 /* The byte used to specify the height of this node in the FORS or Merkle tree */ #define SPX_OFFSET_TREE_INDEX 28 /* The start of the 4 byte field used to specify the node in the FORS or Merkle tree */ -#define SPX_SHAKE256 1 +#define SPX_SHAKE 1 #endif /* SHAKE_OFFSETS_H_ */ diff --git a/ref/thash_sha256_robust.c b/ref/thash_sha2_robust.c similarity index 99% rename from ref/thash_sha256_robust.c rename to ref/thash_sha2_robust.c index d6732ef1..613ef39f 100644 --- a/ref/thash_sha256_robust.c +++ b/ref/thash_sha2_robust.c @@ -4,7 +4,7 @@ #include "thash.h" #include "address.h" #include "params.h" -#include "sha256.h" +#include "sha2.h" #if SPX_SHA512 static void thash_512(unsigned char *out, const unsigned char *in, unsigned int inblocks, diff --git a/ref/thash_sha256_simple.c b/ref/thash_sha2_simple.c similarity index 98% rename from ref/thash_sha256_simple.c rename to ref/thash_sha2_simple.c index c76d4967..2931019b 100644 --- a/ref/thash_sha256_simple.c +++ b/ref/thash_sha2_simple.c @@ -4,7 +4,7 @@ #include "thash.h" #include "address.h" #include "params.h" -#include "sha256.h" +#include "sha2.h" #if SPX_SHA512 static void thash_512(unsigned char *out, const unsigned char *in, unsigned int inblocks, diff --git a/ref/thash_shake256_robust.c b/ref/thash_shake_robust.c similarity index 100% rename from ref/thash_shake256_robust.c rename to ref/thash_shake_robust.c diff --git a/ref/thash_shake256_simple.c b/ref/thash_shake_simple.c similarity index 100% rename from ref/thash_shake256_simple.c rename to ref/thash_shake_simple.c diff --git a/sha256-avx2/.gitignore b/sha2-avx2/.gitignore similarity index 100% rename from sha256-avx2/.gitignore rename to sha2-avx2/.gitignore diff --git a/sha256-avx2/Makefile b/sha2-avx2/Makefile similarity index 70% rename from sha256-avx2/Makefile rename to sha2-avx2/Makefile index 9a9be583..6b4ea642 100644 --- a/sha256-avx2/Makefile +++ b/sha2-avx2/Makefile @@ -1,12 +1,12 @@ -PARAMS = sphincs-sha256-128f +PARAMS = sphincs-sha2-128f THASH = robust CC = /usr/bin/gcc CFLAGS = -Wall -Wextra -Wpedantic -O3 -std=c99 -march=native -fomit-frame-pointer -flto -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS) -SOURCES = hash_sha256.c hash_sha256x8.c thash_sha256_$(THASH).c thash_sha256_$(THASH)x8.c sha256.c sha256x8.c sha512x4.c sha256avx.c address.c randombytes.c merkle.c wots.c utils.c utilsx8.c fors.c sign.c -HEADERS = params.h hash.h hashx8.h thash.h thashx8.h sha256.h sha256x8.h sha512x4.h sha256avx.h address.h randombytes.h merkle.h wots.h utils.h utilsx8.h fors.h api.h +SOURCES = hash_sha2.c hash_sha2x8.c thash_sha2_$(THASH).c thash_sha2_$(THASH)x8.c sha2.c sha256x8.c sha512x4.c sha256avx.c address.c randombytes.c merkle.c wots.c utils.c utilsx8.c fors.c sign.c +HEADERS = params.h hash.h hashx8.h thash.h thashx8.h sha2.h sha256x8.h sha512x4.h sha256avx.h address.h randombytes.h merkle.h wots.h utils.h utilsx8.h fors.h api.h DET_SOURCES = $(SOURCES:randombytes.%=rng.%) DET_HEADERS = $(HEADERS:randombytes.%=rng.%) diff --git a/sha256-avx2/PQCgenKAT_sign.c b/sha2-avx2/PQCgenKAT_sign.c similarity index 100% rename from sha256-avx2/PQCgenKAT_sign.c rename to sha2-avx2/PQCgenKAT_sign.c diff --git a/sha256-avx2/address.c b/sha2-avx2/address.c similarity index 100% rename from sha256-avx2/address.c rename to sha2-avx2/address.c diff --git a/sha256-avx2/address.h b/sha2-avx2/address.h similarity index 100% rename from sha256-avx2/address.h rename to sha2-avx2/address.h diff --git a/sha256-avx2/api.h b/sha2-avx2/api.h similarity index 100% rename from sha256-avx2/api.h rename to sha2-avx2/api.h diff --git a/sha256-avx2/context.h b/sha2-avx2/context.h similarity index 100% rename from sha256-avx2/context.h rename to sha2-avx2/context.h diff --git a/sha256-avx2/fors.c b/sha2-avx2/fors.c similarity index 100% rename from sha256-avx2/fors.c rename to sha2-avx2/fors.c diff --git a/sha256-avx2/fors.h b/sha2-avx2/fors.h similarity index 100% rename from sha256-avx2/fors.h rename to sha2-avx2/fors.h diff --git a/sha256-avx2/hash.h b/sha2-avx2/hash.h similarity index 100% rename from sha256-avx2/hash.h rename to sha2-avx2/hash.h diff --git a/sha2-avx2/hash_sha2.c b/sha2-avx2/hash_sha2.c new file mode 120000 index 00000000..cfd85d40 --- /dev/null +++ b/sha2-avx2/hash_sha2.c @@ -0,0 +1 @@ +../ref/hash_sha2.c \ No newline at end of file diff --git a/sha256-avx2/hash_sha256x8.c b/sha2-avx2/hash_sha2x8.c similarity index 99% rename from sha256-avx2/hash_sha256x8.c rename to sha2-avx2/hash_sha2x8.c index 60a8999a..3f59b9ab 100644 --- a/sha256-avx2/hash_sha256x8.c +++ b/sha2-avx2/hash_sha2x8.c @@ -5,7 +5,7 @@ #include "utils.h" #include "params.h" #include "hashx8.h" -#include "sha256.h" +#include "sha2.h" #include "sha256x8.h" #include "sha256avx.h" diff --git a/sha256-avx2/hashx8.h b/sha2-avx2/hashx8.h similarity index 100% rename from sha256-avx2/hashx8.h rename to sha2-avx2/hashx8.h diff --git a/sha256-avx2/merkle.c b/sha2-avx2/merkle.c similarity index 100% rename from sha256-avx2/merkle.c rename to sha2-avx2/merkle.c diff --git a/sha256-avx2/merkle.h b/sha2-avx2/merkle.h similarity index 100% rename from sha256-avx2/merkle.h rename to sha2-avx2/merkle.h diff --git a/sha256-avx2/params.h b/sha2-avx2/params.h similarity index 100% rename from sha256-avx2/params.h rename to sha2-avx2/params.h diff --git a/sha2-avx2/params/params-sphincs-sha2-128f.h b/sha2-avx2/params/params-sphincs-sha2-128f.h new file mode 120000 index 00000000..d901a75f --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-128f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-128f.h \ No newline at end of file diff --git a/sha2-avx2/params/params-sphincs-sha2-128s.h b/sha2-avx2/params/params-sphincs-sha2-128s.h new file mode 120000 index 00000000..a9955def --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-128s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-128s.h \ No newline at end of file diff --git a/sha2-avx2/params/params-sphincs-sha2-192f.h b/sha2-avx2/params/params-sphincs-sha2-192f.h new file mode 120000 index 00000000..ecbc980c --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-192f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-192f.h \ No newline at end of file diff --git a/sha2-avx2/params/params-sphincs-sha2-192s.h b/sha2-avx2/params/params-sphincs-sha2-192s.h new file mode 120000 index 00000000..c2db1ba0 --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-192s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-192s.h \ No newline at end of file diff --git a/sha2-avx2/params/params-sphincs-sha2-256f.h b/sha2-avx2/params/params-sphincs-sha2-256f.h new file mode 120000 index 00000000..b3886152 --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-256f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-256f.h \ No newline at end of file diff --git a/sha2-avx2/params/params-sphincs-sha2-256s.h b/sha2-avx2/params/params-sphincs-sha2-256s.h new file mode 120000 index 00000000..420ffec6 --- /dev/null +++ b/sha2-avx2/params/params-sphincs-sha2-256s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-sha2-256s.h \ No newline at end of file diff --git a/sha256-avx2/randombytes.c b/sha2-avx2/randombytes.c similarity index 100% rename from sha256-avx2/randombytes.c rename to sha2-avx2/randombytes.c diff --git a/sha256-avx2/randombytes.h b/sha2-avx2/randombytes.h similarity index 100% rename from sha256-avx2/randombytes.h rename to sha2-avx2/randombytes.h diff --git a/sha256-avx2/rng.c b/sha2-avx2/rng.c similarity index 100% rename from sha256-avx2/rng.c rename to sha2-avx2/rng.c diff --git a/sha256-avx2/rng.h b/sha2-avx2/rng.h similarity index 100% rename from sha256-avx2/rng.h rename to sha2-avx2/rng.h diff --git a/sha2-avx2/sha2.c b/sha2-avx2/sha2.c new file mode 120000 index 00000000..7ba32d4b --- /dev/null +++ b/sha2-avx2/sha2.c @@ -0,0 +1 @@ +../ref/sha2.c \ No newline at end of file diff --git a/sha2-avx2/sha2.h b/sha2-avx2/sha2.h new file mode 120000 index 00000000..8c1ff672 --- /dev/null +++ b/sha2-avx2/sha2.h @@ -0,0 +1 @@ +../ref/sha2.h \ No newline at end of file diff --git a/sha256-avx2/sha256avx.c b/sha2-avx2/sha256avx.c similarity index 100% rename from sha256-avx2/sha256avx.c rename to sha2-avx2/sha256avx.c diff --git a/sha256-avx2/sha256avx.h b/sha2-avx2/sha256avx.h similarity index 100% rename from sha256-avx2/sha256avx.h rename to sha2-avx2/sha256avx.h diff --git a/sha256-avx2/sha256x8.c b/sha2-avx2/sha256x8.c similarity index 100% rename from sha256-avx2/sha256x8.c rename to sha2-avx2/sha256x8.c diff --git a/sha256-avx2/sha256x8.h b/sha2-avx2/sha256x8.h similarity index 100% rename from sha256-avx2/sha256x8.h rename to sha2-avx2/sha256x8.h diff --git a/sha2-avx2/sha2_offsets.h b/sha2-avx2/sha2_offsets.h new file mode 120000 index 00000000..ca632789 --- /dev/null +++ b/sha2-avx2/sha2_offsets.h @@ -0,0 +1 @@ +../ref/sha2_offsets.h \ No newline at end of file diff --git a/sha256-avx2/sha512x4.c b/sha2-avx2/sha512x4.c similarity index 100% rename from sha256-avx2/sha512x4.c rename to sha2-avx2/sha512x4.c diff --git a/sha256-avx2/sha512x4.h b/sha2-avx2/sha512x4.h similarity index 100% rename from sha256-avx2/sha512x4.h rename to sha2-avx2/sha512x4.h diff --git a/sha256-avx2/sign.c b/sha2-avx2/sign.c similarity index 100% rename from sha256-avx2/sign.c rename to sha2-avx2/sign.c diff --git a/sha256-avx2/test/benchmark.c b/sha2-avx2/test/benchmark.c similarity index 100% rename from sha256-avx2/test/benchmark.c rename to sha2-avx2/test/benchmark.c diff --git a/sha256-avx2/test/fors.c b/sha2-avx2/test/fors.c similarity index 100% rename from sha256-avx2/test/fors.c rename to sha2-avx2/test/fors.c diff --git a/sha256-avx2/test/spx.c b/sha2-avx2/test/spx.c similarity index 100% rename from sha256-avx2/test/spx.c rename to sha2-avx2/test/spx.c diff --git a/sha256-avx2/test/thashx8.c b/sha2-avx2/test/thashx8.c similarity index 98% rename from sha256-avx2/test/thashx8.c rename to sha2-avx2/test/thashx8.c index d319d505..da76ac8f 100644 --- a/sha256-avx2/test/thashx8.c +++ b/sha2-avx2/test/thashx8.c @@ -8,7 +8,7 @@ #include "../hash.h" #if SPX_SHA512 -#include "../sha256.h" +#include "../sha2.h" #include "../sha512x4.h" #endif diff --git a/sha256-avx2/thash.h b/sha2-avx2/thash.h similarity index 100% rename from sha256-avx2/thash.h rename to sha2-avx2/thash.h diff --git a/sha2-avx2/thash_sha2_robust.c b/sha2-avx2/thash_sha2_robust.c new file mode 120000 index 00000000..60e51399 --- /dev/null +++ b/sha2-avx2/thash_sha2_robust.c @@ -0,0 +1 @@ +../ref/thash_sha2_robust.c \ No newline at end of file diff --git a/sha256-avx2/thash_sha256_robustx8.c b/sha2-avx2/thash_sha2_robustx8.c similarity index 99% rename from sha256-avx2/thash_sha256_robustx8.c rename to sha2-avx2/thash_sha2_robustx8.c index e2bef12a..e15671a7 100644 --- a/sha256-avx2/thash_sha256_robustx8.c +++ b/sha2-avx2/thash_sha2_robustx8.c @@ -5,7 +5,7 @@ #include "utils.h" #include "params.h" #include "thashx8.h" -#include "sha256.h" +#include "sha2.h" #include "sha256x8.h" #include "sha256avx.h" diff --git a/sha2-avx2/thash_sha2_simple.c b/sha2-avx2/thash_sha2_simple.c new file mode 120000 index 00000000..c87305c6 --- /dev/null +++ b/sha2-avx2/thash_sha2_simple.c @@ -0,0 +1 @@ +../ref/thash_sha2_simple.c \ No newline at end of file diff --git a/sha256-avx2/thash_sha256_simplex8.c b/sha2-avx2/thash_sha2_simplex8.c similarity index 99% rename from sha256-avx2/thash_sha256_simplex8.c rename to sha2-avx2/thash_sha2_simplex8.c index 393f7704..2b40d028 100644 --- a/sha256-avx2/thash_sha256_simplex8.c +++ b/sha2-avx2/thash_sha2_simplex8.c @@ -5,7 +5,7 @@ #include "utils.h" #include "params.h" #include "thashx8.h" -#include "sha256.h" +#include "sha2.h" #include "sha256x8.h" #include "sha256avx.h" diff --git a/sha256-avx2/thashx8.h b/sha2-avx2/thashx8.h similarity index 100% rename from sha256-avx2/thashx8.h rename to sha2-avx2/thashx8.h diff --git a/sha256-avx2/utils.c b/sha2-avx2/utils.c similarity index 100% rename from sha256-avx2/utils.c rename to sha2-avx2/utils.c diff --git a/sha256-avx2/utils.h b/sha2-avx2/utils.h similarity index 100% rename from sha256-avx2/utils.h rename to sha2-avx2/utils.h diff --git a/sha256-avx2/utilsx8.c b/sha2-avx2/utilsx8.c similarity index 100% rename from sha256-avx2/utilsx8.c rename to sha2-avx2/utilsx8.c diff --git a/sha256-avx2/utilsx8.h b/sha2-avx2/utilsx8.h similarity index 100% rename from sha256-avx2/utilsx8.h rename to sha2-avx2/utilsx8.h diff --git a/sha256-avx2/wots.c b/sha2-avx2/wots.c similarity index 100% rename from sha256-avx2/wots.c rename to sha2-avx2/wots.c diff --git a/sha256-avx2/wots.h b/sha2-avx2/wots.h similarity index 100% rename from sha256-avx2/wots.h rename to sha2-avx2/wots.h diff --git a/sha256-avx2/wotsx8.h b/sha2-avx2/wotsx8.h similarity index 100% rename from sha256-avx2/wotsx8.h rename to sha2-avx2/wotsx8.h diff --git a/sha256-avx2/hash_sha256.c b/sha256-avx2/hash_sha256.c deleted file mode 120000 index 6516e103..00000000 --- a/sha256-avx2/hash_sha256.c +++ /dev/null @@ -1 +0,0 @@ -../ref/hash_sha256.c \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-128f.h b/sha256-avx2/params/params-sphincs-sha256-128f.h deleted file mode 120000 index 9268bf97..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-128f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-128f.h \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-128s.h b/sha256-avx2/params/params-sphincs-sha256-128s.h deleted file mode 120000 index 896554bd..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-128s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-128s.h \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-192f.h b/sha256-avx2/params/params-sphincs-sha256-192f.h deleted file mode 120000 index db89c5ce..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-192f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-192f.h \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-192s.h b/sha256-avx2/params/params-sphincs-sha256-192s.h deleted file mode 120000 index 13ece1ee..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-192s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-192s.h \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-256f.h b/sha256-avx2/params/params-sphincs-sha256-256f.h deleted file mode 120000 index 20985668..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-256f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-256f.h \ No newline at end of file diff --git a/sha256-avx2/params/params-sphincs-sha256-256s.h b/sha256-avx2/params/params-sphincs-sha256-256s.h deleted file mode 120000 index eac86135..00000000 --- a/sha256-avx2/params/params-sphincs-sha256-256s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-sha256-256s.h \ No newline at end of file diff --git a/sha256-avx2/sha256.c b/sha256-avx2/sha256.c deleted file mode 120000 index b336e957..00000000 --- a/sha256-avx2/sha256.c +++ /dev/null @@ -1 +0,0 @@ -../ref/sha256.c \ No newline at end of file diff --git a/sha256-avx2/sha256.h b/sha256-avx2/sha256.h deleted file mode 120000 index 07f1173d..00000000 --- a/sha256-avx2/sha256.h +++ /dev/null @@ -1 +0,0 @@ -../ref/sha256.h \ No newline at end of file diff --git a/sha256-avx2/sha256_offsets.h b/sha256-avx2/sha256_offsets.h deleted file mode 120000 index f93a6173..00000000 --- a/sha256-avx2/sha256_offsets.h +++ /dev/null @@ -1 +0,0 @@ -../ref/sha256_offsets.h \ No newline at end of file diff --git a/sha256-avx2/thash_sha256_robust.c b/sha256-avx2/thash_sha256_robust.c deleted file mode 120000 index 7da04f27..00000000 --- a/sha256-avx2/thash_sha256_robust.c +++ /dev/null @@ -1 +0,0 @@ -../ref/thash_sha256_robust.c \ No newline at end of file diff --git a/sha256-avx2/thash_sha256_simple.c b/sha256-avx2/thash_sha256_simple.c deleted file mode 120000 index 107099aa..00000000 --- a/sha256-avx2/thash_sha256_simple.c +++ /dev/null @@ -1 +0,0 @@ -../ref/thash_sha256_simple.c \ No newline at end of file diff --git a/shake256-a64/.gitignore b/shake-a64/.gitignore similarity index 100% rename from shake256-a64/.gitignore rename to shake-a64/.gitignore diff --git a/shake256-a64/Makefile b/shake-a64/Makefile similarity index 83% rename from shake256-a64/Makefile rename to shake-a64/Makefile index 95472e7a..f2a0e5f1 100644 --- a/shake256-a64/Makefile +++ b/shake-a64/Makefile @@ -1,9 +1,9 @@ -PARAMS = sphincs-shake256-128f +PARAMS = sphincs-shake-128f THASH = robust CFLAGS = -Wall -Wextra -Wpedantic -O3 -std=c99 -fomit-frame-pointer -flto -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS) -SOURCES = hash_shake256.c hash_shake256x2.c thash_shake256_$(THASH)x2.c address.c randombytes.c merkle.c wots.c utils.c utilsx2.c fors.c sign.c fips202.c fips202x2.c f1600x2.c f1600x2.s +SOURCES = hash_shake.c hash_shakex2.c thash_shake_$(THASH)x2.c address.c randombytes.c merkle.c wots.c utils.c utilsx2.c fors.c sign.c fips202.c fips202x2.c f1600x2.c f1600x2.s HEADERS = params.h hash.h hashx2.h thashx2.h address.h randombytes.h merkle.h wots.h utils.h utilsx2.h fors.h api.h fips202.h fips202x2.h f1600x2.h thash.h DET_SOURCES = $(SOURCES:randombytes.%=rng.%) diff --git a/shake256-a64/PQCgenKAT_sign.c b/shake-a64/PQCgenKAT_sign.c similarity index 100% rename from shake256-a64/PQCgenKAT_sign.c rename to shake-a64/PQCgenKAT_sign.c diff --git a/shake256-a64/address.c b/shake-a64/address.c similarity index 100% rename from shake256-a64/address.c rename to shake-a64/address.c diff --git a/shake256-a64/address.h b/shake-a64/address.h similarity index 100% rename from shake256-a64/address.h rename to shake-a64/address.h diff --git a/shake256-a64/api.h b/shake-a64/api.h similarity index 100% rename from shake256-a64/api.h rename to shake-a64/api.h diff --git a/shake256-a64/context.h b/shake-a64/context.h similarity index 100% rename from shake256-a64/context.h rename to shake-a64/context.h diff --git a/shake256-a64/f1600x2.c b/shake-a64/f1600x2.c similarity index 100% rename from shake256-a64/f1600x2.c rename to shake-a64/f1600x2.c diff --git a/shake256-a64/f1600x2.h b/shake-a64/f1600x2.h similarity index 100% rename from shake256-a64/f1600x2.h rename to shake-a64/f1600x2.h diff --git a/shake256-a64/f1600x2.s b/shake-a64/f1600x2.s similarity index 100% rename from shake256-a64/f1600x2.s rename to shake-a64/f1600x2.s diff --git a/shake256-a64/fips202.c b/shake-a64/fips202.c similarity index 100% rename from shake256-a64/fips202.c rename to shake-a64/fips202.c diff --git a/shake256-a64/fips202.h b/shake-a64/fips202.h similarity index 100% rename from shake256-a64/fips202.h rename to shake-a64/fips202.h diff --git a/shake256-a64/fips202x2.c b/shake-a64/fips202x2.c similarity index 100% rename from shake256-a64/fips202x2.c rename to shake-a64/fips202x2.c diff --git a/shake256-a64/fips202x2.h b/shake-a64/fips202x2.h similarity index 100% rename from shake256-a64/fips202x2.h rename to shake-a64/fips202x2.h diff --git a/shake256-a64/fors.c b/shake-a64/fors.c similarity index 100% rename from shake256-a64/fors.c rename to shake-a64/fors.c diff --git a/shake256-a64/fors.h b/shake-a64/fors.h similarity index 100% rename from shake256-a64/fors.h rename to shake-a64/fors.h diff --git a/shake256-a64/hash.h b/shake-a64/hash.h similarity index 100% rename from shake256-a64/hash.h rename to shake-a64/hash.h diff --git a/shake-a64/hash_shake.c b/shake-a64/hash_shake.c new file mode 120000 index 00000000..1d9d0cd8 --- /dev/null +++ b/shake-a64/hash_shake.c @@ -0,0 +1 @@ +../ref/hash_shake.c \ No newline at end of file diff --git a/shake256-a64/hash_shake256x2.c b/shake-a64/hash_shakex2.c similarity index 100% rename from shake256-a64/hash_shake256x2.c rename to shake-a64/hash_shakex2.c diff --git a/shake256-a64/hashx2.h b/shake-a64/hashx2.h similarity index 100% rename from shake256-a64/hashx2.h rename to shake-a64/hashx2.h diff --git a/shake256-a64/merkle.c b/shake-a64/merkle.c similarity index 100% rename from shake256-a64/merkle.c rename to shake-a64/merkle.c diff --git a/shake256-a64/merkle.h b/shake-a64/merkle.h similarity index 100% rename from shake256-a64/merkle.h rename to shake-a64/merkle.h diff --git a/shake256-a64/params.h b/shake-a64/params.h similarity index 100% rename from shake256-a64/params.h rename to shake-a64/params.h diff --git a/shake-a64/params/params-sphincs-shake-128f.h b/shake-a64/params/params-sphincs-shake-128f.h new file mode 120000 index 00000000..c65db987 --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-128f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-128f.h \ No newline at end of file diff --git a/shake-a64/params/params-sphincs-shake-128s.h b/shake-a64/params/params-sphincs-shake-128s.h new file mode 120000 index 00000000..18671f7e --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-128s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-128s.h \ No newline at end of file diff --git a/shake-a64/params/params-sphincs-shake-192f.h b/shake-a64/params/params-sphincs-shake-192f.h new file mode 120000 index 00000000..d071e35e --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-192f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-192f.h \ No newline at end of file diff --git a/shake-a64/params/params-sphincs-shake-192s.h b/shake-a64/params/params-sphincs-shake-192s.h new file mode 120000 index 00000000..267e2c85 --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-192s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-192s.h \ No newline at end of file diff --git a/shake-a64/params/params-sphincs-shake-256f.h b/shake-a64/params/params-sphincs-shake-256f.h new file mode 120000 index 00000000..3b4743bb --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-256f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-256f.h \ No newline at end of file diff --git a/shake-a64/params/params-sphincs-shake-256s.h b/shake-a64/params/params-sphincs-shake-256s.h new file mode 120000 index 00000000..0795ee14 --- /dev/null +++ b/shake-a64/params/params-sphincs-shake-256s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-256s.h \ No newline at end of file diff --git a/shake256-a64/randombytes.c b/shake-a64/randombytes.c similarity index 100% rename from shake256-a64/randombytes.c rename to shake-a64/randombytes.c diff --git a/shake256-a64/randombytes.h b/shake-a64/randombytes.h similarity index 100% rename from shake256-a64/randombytes.h rename to shake-a64/randombytes.h diff --git a/shake256-a64/rng.c b/shake-a64/rng.c similarity index 100% rename from shake256-a64/rng.c rename to shake-a64/rng.c diff --git a/shake256-a64/rng.h b/shake-a64/rng.h similarity index 100% rename from shake256-a64/rng.h rename to shake-a64/rng.h diff --git a/shake-a64/shake_offsets.h b/shake-a64/shake_offsets.h new file mode 120000 index 00000000..8cfe4c0c --- /dev/null +++ b/shake-a64/shake_offsets.h @@ -0,0 +1 @@ +../ref/shake_offsets.h \ No newline at end of file diff --git a/shake256-a64/sign.c b/shake-a64/sign.c similarity index 100% rename from shake256-a64/sign.c rename to shake-a64/sign.c diff --git a/shake256-a64/test/benchmark.c b/shake-a64/test/benchmark.c similarity index 100% rename from shake256-a64/test/benchmark.c rename to shake-a64/test/benchmark.c diff --git a/shake256-a64/test/cycles.c b/shake-a64/test/cycles.c similarity index 100% rename from shake256-a64/test/cycles.c rename to shake-a64/test/cycles.c diff --git a/shake256-a64/test/cycles.h b/shake-a64/test/cycles.h similarity index 100% rename from shake256-a64/test/cycles.h rename to shake-a64/test/cycles.h diff --git a/shake256-a64/test/fors.c b/shake-a64/test/fors.c similarity index 100% rename from shake256-a64/test/fors.c rename to shake-a64/test/fors.c diff --git a/shake256-a64/test/spx.c b/shake-a64/test/spx.c similarity index 100% rename from shake256-a64/test/spx.c rename to shake-a64/test/spx.c diff --git a/shake256-a64/test/thashx2.c b/shake-a64/test/thashx2.c similarity index 100% rename from shake256-a64/test/thashx2.c rename to shake-a64/test/thashx2.c diff --git a/shake256-a64/thash.h b/shake-a64/thash.h similarity index 100% rename from shake256-a64/thash.h rename to shake-a64/thash.h diff --git a/shake256-a64/thash_shake256_robustx2.c b/shake-a64/thash_shake_robustx2.c similarity index 100% rename from shake256-a64/thash_shake256_robustx2.c rename to shake-a64/thash_shake_robustx2.c diff --git a/shake256-a64/thash_shake256_simplex2.c b/shake-a64/thash_shake_simplex2.c similarity index 100% rename from shake256-a64/thash_shake256_simplex2.c rename to shake-a64/thash_shake_simplex2.c diff --git a/shake256-a64/thashx2.h b/shake-a64/thashx2.h similarity index 100% rename from shake256-a64/thashx2.h rename to shake-a64/thashx2.h diff --git a/shake256-a64/utils.c b/shake-a64/utils.c similarity index 100% rename from shake256-a64/utils.c rename to shake-a64/utils.c diff --git a/shake256-a64/utils.h b/shake-a64/utils.h similarity index 100% rename from shake256-a64/utils.h rename to shake-a64/utils.h diff --git a/shake256-a64/utilsx2.c b/shake-a64/utilsx2.c similarity index 100% rename from shake256-a64/utilsx2.c rename to shake-a64/utilsx2.c diff --git a/shake256-a64/utilsx2.h b/shake-a64/utilsx2.h similarity index 100% rename from shake256-a64/utilsx2.h rename to shake-a64/utilsx2.h diff --git a/shake256-a64/wots.c b/shake-a64/wots.c similarity index 100% rename from shake256-a64/wots.c rename to shake-a64/wots.c diff --git a/shake256-a64/wots.h b/shake-a64/wots.h similarity index 100% rename from shake256-a64/wots.h rename to shake-a64/wots.h diff --git a/shake256-a64/wotsx2.h b/shake-a64/wotsx2.h similarity index 100% rename from shake256-a64/wotsx2.h rename to shake-a64/wotsx2.h diff --git a/shake256-avx2/.gitignore b/shake-avx2/.gitignore similarity index 100% rename from shake256-avx2/.gitignore rename to shake-avx2/.gitignore diff --git a/shake256-avx2/Makefile b/shake-avx2/Makefile similarity index 84% rename from shake256-avx2/Makefile rename to shake-avx2/Makefile index b5955098..3b1cef98 100644 --- a/shake256-avx2/Makefile +++ b/shake-avx2/Makefile @@ -1,10 +1,10 @@ -PARAMS = sphincs-shake256-128f +PARAMS = sphincs-shake-128f THASH = robust CC = /usr/bin/gcc CFLAGS = -Wall -Wextra -Wpedantic -O3 -std=c99 -march=native -fomit-frame-pointer -flto -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS) -SOURCES = hash_shake256.c hash_shake256x4.c thash_shake256_$(THASH).c thash_shake256_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c fips202.c fips202x4.c keccak4x/KeccakP-1600-times4-SIMD256.o +SOURCES = hash_shake.c hash_shakex4.c thash_shake_$(THASH).c thash_shake_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c fips202.c fips202x4.c keccak4x/KeccakP-1600-times4-SIMD256.o HEADERS = params.h hash.h hashx4.h thash.h thashx4.h address.h randombytes.h merkle.h wots.h utils.h utilsx4.h fors.h api.h fips202.h fips202x4.h DET_SOURCES = $(SOURCES:randombytes.%=rng.%) diff --git a/shake256-avx2/PQCgenKAT_sign.c b/shake-avx2/PQCgenKAT_sign.c similarity index 100% rename from shake256-avx2/PQCgenKAT_sign.c rename to shake-avx2/PQCgenKAT_sign.c diff --git a/shake256-avx2/address.c b/shake-avx2/address.c similarity index 100% rename from shake256-avx2/address.c rename to shake-avx2/address.c diff --git a/shake256-avx2/address.h b/shake-avx2/address.h similarity index 100% rename from shake256-avx2/address.h rename to shake-avx2/address.h diff --git a/shake256-avx2/api.h b/shake-avx2/api.h similarity index 100% rename from shake256-avx2/api.h rename to shake-avx2/api.h diff --git a/shake256-avx2/context.h b/shake-avx2/context.h similarity index 100% rename from shake256-avx2/context.h rename to shake-avx2/context.h diff --git a/shake256-avx2/fips202.c b/shake-avx2/fips202.c similarity index 100% rename from shake256-avx2/fips202.c rename to shake-avx2/fips202.c diff --git a/shake256-avx2/fips202.h b/shake-avx2/fips202.h similarity index 100% rename from shake256-avx2/fips202.h rename to shake-avx2/fips202.h diff --git a/shake256-avx2/fips202x4.c b/shake-avx2/fips202x4.c similarity index 100% rename from shake256-avx2/fips202x4.c rename to shake-avx2/fips202x4.c diff --git a/shake256-avx2/fips202x4.h b/shake-avx2/fips202x4.h similarity index 100% rename from shake256-avx2/fips202x4.h rename to shake-avx2/fips202x4.h diff --git a/shake256-avx2/fors.c b/shake-avx2/fors.c similarity index 100% rename from shake256-avx2/fors.c rename to shake-avx2/fors.c diff --git a/shake256-avx2/fors.h b/shake-avx2/fors.h similarity index 100% rename from shake256-avx2/fors.h rename to shake-avx2/fors.h diff --git a/shake256-avx2/hash.h b/shake-avx2/hash.h similarity index 100% rename from shake256-avx2/hash.h rename to shake-avx2/hash.h diff --git a/shake-avx2/hash_shake.c b/shake-avx2/hash_shake.c new file mode 120000 index 00000000..1d9d0cd8 --- /dev/null +++ b/shake-avx2/hash_shake.c @@ -0,0 +1 @@ +../ref/hash_shake.c \ No newline at end of file diff --git a/shake256-avx2/hash_shake256x4.c b/shake-avx2/hash_shakex4.c similarity index 100% rename from shake256-avx2/hash_shake256x4.c rename to shake-avx2/hash_shakex4.c diff --git a/shake256-avx2/hashx4.h b/shake-avx2/hashx4.h similarity index 100% rename from shake256-avx2/hashx4.h rename to shake-avx2/hashx4.h diff --git a/shake256-avx2/keccak4x/KeccakP-1600-times4-SIMD256.c b/shake-avx2/keccak4x/KeccakP-1600-times4-SIMD256.c similarity index 100% rename from shake256-avx2/keccak4x/KeccakP-1600-times4-SIMD256.c rename to shake-avx2/keccak4x/KeccakP-1600-times4-SIMD256.c diff --git a/shake256-avx2/keccak4x/KeccakP-1600-times4-SnP.h b/shake-avx2/keccak4x/KeccakP-1600-times4-SnP.h similarity index 100% rename from shake256-avx2/keccak4x/KeccakP-1600-times4-SnP.h rename to shake-avx2/keccak4x/KeccakP-1600-times4-SnP.h diff --git a/shake256-avx2/keccak4x/KeccakP-1600-unrolling.macros b/shake-avx2/keccak4x/KeccakP-1600-unrolling.macros similarity index 100% rename from shake256-avx2/keccak4x/KeccakP-1600-unrolling.macros rename to shake-avx2/keccak4x/KeccakP-1600-unrolling.macros diff --git a/shake256-avx2/keccak4x/SIMD256-config.h b/shake-avx2/keccak4x/SIMD256-config.h similarity index 100% rename from shake256-avx2/keccak4x/SIMD256-config.h rename to shake-avx2/keccak4x/SIMD256-config.h diff --git a/shake256-avx2/keccak4x/align.h b/shake-avx2/keccak4x/align.h similarity index 100% rename from shake256-avx2/keccak4x/align.h rename to shake-avx2/keccak4x/align.h diff --git a/shake256-avx2/keccak4x/brg_endian.h b/shake-avx2/keccak4x/brg_endian.h similarity index 100% rename from shake256-avx2/keccak4x/brg_endian.h rename to shake-avx2/keccak4x/brg_endian.h diff --git a/shake256-avx2/merkle.c b/shake-avx2/merkle.c similarity index 100% rename from shake256-avx2/merkle.c rename to shake-avx2/merkle.c diff --git a/shake256-avx2/merkle.h b/shake-avx2/merkle.h similarity index 100% rename from shake256-avx2/merkle.h rename to shake-avx2/merkle.h diff --git a/shake256-avx2/params.h b/shake-avx2/params.h similarity index 100% rename from shake256-avx2/params.h rename to shake-avx2/params.h diff --git a/shake-avx2/params/params-sphincs-shake-128f.h b/shake-avx2/params/params-sphincs-shake-128f.h new file mode 120000 index 00000000..c65db987 --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-128f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-128f.h \ No newline at end of file diff --git a/shake-avx2/params/params-sphincs-shake-128s.h b/shake-avx2/params/params-sphincs-shake-128s.h new file mode 120000 index 00000000..18671f7e --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-128s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-128s.h \ No newline at end of file diff --git a/shake-avx2/params/params-sphincs-shake-192f.h b/shake-avx2/params/params-sphincs-shake-192f.h new file mode 120000 index 00000000..d071e35e --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-192f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-192f.h \ No newline at end of file diff --git a/shake-avx2/params/params-sphincs-shake-192s.h b/shake-avx2/params/params-sphincs-shake-192s.h new file mode 120000 index 00000000..267e2c85 --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-192s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-192s.h \ No newline at end of file diff --git a/shake-avx2/params/params-sphincs-shake-256f.h b/shake-avx2/params/params-sphincs-shake-256f.h new file mode 120000 index 00000000..3b4743bb --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-256f.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-256f.h \ No newline at end of file diff --git a/shake-avx2/params/params-sphincs-shake-256s.h b/shake-avx2/params/params-sphincs-shake-256s.h new file mode 120000 index 00000000..0795ee14 --- /dev/null +++ b/shake-avx2/params/params-sphincs-shake-256s.h @@ -0,0 +1 @@ +../../ref/params/params-sphincs-shake-256s.h \ No newline at end of file diff --git a/shake256-avx2/randombytes.c b/shake-avx2/randombytes.c similarity index 100% rename from shake256-avx2/randombytes.c rename to shake-avx2/randombytes.c diff --git a/shake256-avx2/randombytes.h b/shake-avx2/randombytes.h similarity index 100% rename from shake256-avx2/randombytes.h rename to shake-avx2/randombytes.h diff --git a/shake256-avx2/rng.c b/shake-avx2/rng.c similarity index 100% rename from shake256-avx2/rng.c rename to shake-avx2/rng.c diff --git a/shake256-avx2/rng.h b/shake-avx2/rng.h similarity index 100% rename from shake256-avx2/rng.h rename to shake-avx2/rng.h diff --git a/shake-avx2/shake_offsets.h b/shake-avx2/shake_offsets.h new file mode 120000 index 00000000..8cfe4c0c --- /dev/null +++ b/shake-avx2/shake_offsets.h @@ -0,0 +1 @@ +../ref/shake_offsets.h \ No newline at end of file diff --git a/shake256-avx2/sign.c b/shake-avx2/sign.c similarity index 100% rename from shake256-avx2/sign.c rename to shake-avx2/sign.c diff --git a/shake256-avx2/test/benchmark.c b/shake-avx2/test/benchmark.c similarity index 100% rename from shake256-avx2/test/benchmark.c rename to shake-avx2/test/benchmark.c diff --git a/shake256-avx2/test/fors.c b/shake-avx2/test/fors.c similarity index 100% rename from shake256-avx2/test/fors.c rename to shake-avx2/test/fors.c diff --git a/shake256-avx2/test/spx.c b/shake-avx2/test/spx.c similarity index 100% rename from shake256-avx2/test/spx.c rename to shake-avx2/test/spx.c diff --git a/shake256-avx2/test/thashx4.c b/shake-avx2/test/thashx4.c similarity index 100% rename from shake256-avx2/test/thashx4.c rename to shake-avx2/test/thashx4.c diff --git a/shake256-avx2/thash.h b/shake-avx2/thash.h similarity index 100% rename from shake256-avx2/thash.h rename to shake-avx2/thash.h diff --git a/shake-avx2/thash_shake_robust.c b/shake-avx2/thash_shake_robust.c new file mode 120000 index 00000000..3be16c67 --- /dev/null +++ b/shake-avx2/thash_shake_robust.c @@ -0,0 +1 @@ +../ref/thash_shake_robust.c \ No newline at end of file diff --git a/shake256-avx2/thash_shake256_robustx4.c b/shake-avx2/thash_shake_robustx4.c similarity index 100% rename from shake256-avx2/thash_shake256_robustx4.c rename to shake-avx2/thash_shake_robustx4.c diff --git a/shake-avx2/thash_shake_simple.c b/shake-avx2/thash_shake_simple.c new file mode 120000 index 00000000..1b5a5a21 --- /dev/null +++ b/shake-avx2/thash_shake_simple.c @@ -0,0 +1 @@ +../ref/thash_shake_simple.c \ No newline at end of file diff --git a/shake256-avx2/thash_shake256_simplex4.c b/shake-avx2/thash_shake_simplex4.c similarity index 100% rename from shake256-avx2/thash_shake256_simplex4.c rename to shake-avx2/thash_shake_simplex4.c diff --git a/shake256-avx2/thashx4.h b/shake-avx2/thashx4.h similarity index 100% rename from shake256-avx2/thashx4.h rename to shake-avx2/thashx4.h diff --git a/shake256-avx2/utils.c b/shake-avx2/utils.c similarity index 100% rename from shake256-avx2/utils.c rename to shake-avx2/utils.c diff --git a/shake256-avx2/utils.h b/shake-avx2/utils.h similarity index 100% rename from shake256-avx2/utils.h rename to shake-avx2/utils.h diff --git a/shake256-avx2/utilsx4.c b/shake-avx2/utilsx4.c similarity index 100% rename from shake256-avx2/utilsx4.c rename to shake-avx2/utilsx4.c diff --git a/shake256-avx2/utilsx4.h b/shake-avx2/utilsx4.h similarity index 100% rename from shake256-avx2/utilsx4.h rename to shake-avx2/utilsx4.h diff --git a/shake256-avx2/wots.c b/shake-avx2/wots.c similarity index 100% rename from shake256-avx2/wots.c rename to shake-avx2/wots.c diff --git a/shake256-avx2/wots.h b/shake-avx2/wots.h similarity index 100% rename from shake256-avx2/wots.h rename to shake-avx2/wots.h diff --git a/shake256-avx2/wotsx4.h b/shake-avx2/wotsx4.h similarity index 100% rename from shake256-avx2/wotsx4.h rename to shake-avx2/wotsx4.h diff --git a/shake256-a64/hash_shake256.c b/shake256-a64/hash_shake256.c deleted file mode 120000 index 33cc3330..00000000 --- a/shake256-a64/hash_shake256.c +++ /dev/null @@ -1 +0,0 @@ -../ref/hash_shake256.c \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-128f.h b/shake256-a64/params/params-sphincs-shake256-128f.h deleted file mode 120000 index 390c5615..00000000 --- a/shake256-a64/params/params-sphincs-shake256-128f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-128f.h \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-128s.h b/shake256-a64/params/params-sphincs-shake256-128s.h deleted file mode 120000 index 2d39127c..00000000 --- a/shake256-a64/params/params-sphincs-shake256-128s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-128s.h \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-192f.h b/shake256-a64/params/params-sphincs-shake256-192f.h deleted file mode 120000 index 2cbee2f2..00000000 --- a/shake256-a64/params/params-sphincs-shake256-192f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-192f.h \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-192s.h b/shake256-a64/params/params-sphincs-shake256-192s.h deleted file mode 120000 index c6822626..00000000 --- a/shake256-a64/params/params-sphincs-shake256-192s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-192s.h \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-256f.h b/shake256-a64/params/params-sphincs-shake256-256f.h deleted file mode 120000 index d70e402a..00000000 --- a/shake256-a64/params/params-sphincs-shake256-256f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-256f.h \ No newline at end of file diff --git a/shake256-a64/params/params-sphincs-shake256-256s.h b/shake256-a64/params/params-sphincs-shake256-256s.h deleted file mode 120000 index 0a205f64..00000000 --- a/shake256-a64/params/params-sphincs-shake256-256s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-256s.h \ No newline at end of file diff --git a/shake256-a64/shake256_offsets.h b/shake256-a64/shake256_offsets.h deleted file mode 120000 index 36444364..00000000 --- a/shake256-a64/shake256_offsets.h +++ /dev/null @@ -1 +0,0 @@ -../ref/shake256_offsets.h \ No newline at end of file diff --git a/shake256-avx2/hash_shake256.c b/shake256-avx2/hash_shake256.c deleted file mode 120000 index 33cc3330..00000000 --- a/shake256-avx2/hash_shake256.c +++ /dev/null @@ -1 +0,0 @@ -../ref/hash_shake256.c \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-128f.h b/shake256-avx2/params/params-sphincs-shake256-128f.h deleted file mode 120000 index 390c5615..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-128f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-128f.h \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-128s.h b/shake256-avx2/params/params-sphincs-shake256-128s.h deleted file mode 120000 index 2d39127c..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-128s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-128s.h \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-192f.h b/shake256-avx2/params/params-sphincs-shake256-192f.h deleted file mode 120000 index 2cbee2f2..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-192f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-192f.h \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-192s.h b/shake256-avx2/params/params-sphincs-shake256-192s.h deleted file mode 120000 index c6822626..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-192s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-192s.h \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-256f.h b/shake256-avx2/params/params-sphincs-shake256-256f.h deleted file mode 120000 index d70e402a..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-256f.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-256f.h \ No newline at end of file diff --git a/shake256-avx2/params/params-sphincs-shake256-256s.h b/shake256-avx2/params/params-sphincs-shake256-256s.h deleted file mode 120000 index 0a205f64..00000000 --- a/shake256-avx2/params/params-sphincs-shake256-256s.h +++ /dev/null @@ -1 +0,0 @@ -../../ref/params/params-sphincs-shake256-256s.h \ No newline at end of file diff --git a/shake256-avx2/shake256_offsets.h b/shake256-avx2/shake256_offsets.h deleted file mode 120000 index 36444364..00000000 --- a/shake256-avx2/shake256_offsets.h +++ /dev/null @@ -1 +0,0 @@ -../ref/shake256_offsets.h \ No newline at end of file diff --git a/shake256-avx2/thash_shake256_robust.c b/shake256-avx2/thash_shake256_robust.c deleted file mode 120000 index 93f460b3..00000000 --- a/shake256-avx2/thash_shake256_robust.c +++ /dev/null @@ -1 +0,0 @@ -../ref/thash_shake256_robust.c \ No newline at end of file diff --git a/shake256-avx2/thash_shake256_simple.c b/shake256-avx2/thash_shake256_simple.c deleted file mode 120000 index a09033bf..00000000 --- a/shake256-avx2/thash_shake256_simple.c +++ /dev/null @@ -1 +0,0 @@ -../ref/thash_shake256_simple.c \ No newline at end of file diff --git a/vectors.py b/vectors.py index 4904992b..ae045ce4 100755 --- a/vectors.py +++ b/vectors.py @@ -6,7 +6,7 @@ # With two arguments, checks whether the sha256 sum of the given # generated NIST KAT response file is correct, e.g.: # -# ./vectors.py sphincs-shake256-128s-simple shake256-avx2 +# ./vectors.py sphincs-shake-128s-simple shake-avx2 import multiprocessing import subprocess @@ -17,7 +17,7 @@ import os import sys -fns = ['shake256', 'sha256', 'haraka'] +fns = ['shake', 'sha2', 'haraka'] options = ["f", "s"] sizes = [128, 192, 256] thashes = ['robust', 'simple']