diff --git a/.gitignore b/.gitignore index 76f14337..28dfdc39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ .ci *.tar.gz libjade-* -.vscode \ No newline at end of file +.vscode +*.so +*.csv diff --git a/.gitmodules b/.gitmodules index 7867183a..d797be56 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,17 @@ url = https://github.com/tyhicks/ssbd-tools.git [submodule "submodules/crypto-specs"] path = submodules/crypto-specs - url = git@github.com:formosa-crypto/crypto-specs.git + url = https://github.com/formosa-crypto/crypto-specs.git [submodule "test/external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing"] path = test/external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing url = https://github.com/JoaoDiogoDuarte/xwing.git +[submodule "test/external/crypto_hash/sha3-256/common/Kyber_FIPS202"] + path = test/external/crypto_hash/sha3-256/common/Kyber_FIPS202 + url = https://github.com/JoaoDiogoDuarte/kyber-mlkem-static/ + branch = justhash +[submodule "test/external/crypto_kem/xwing_naive/common/JoaoDDuarte_xwing_naive"] + path = test/external/crypto_kem/xwing_naive/common/JoaoDDuarte_xwing_naive + url = https://github.com/JoaoDiogoDuarte/xwing.git +[submodule "test/external/crypto_kem/xwing_naive/common/JoaoDiogoDuarte_xwing_naive"] + path = test/external/crypto_kem/xwing_naive/common/JoaoDiogoDuarte_xwing_naive + url = https://github.com/JoaoDiogoDuarte/xwing.git diff --git a/README.md b/README.md index 35685ab6..a43a5b72 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # Libjade - Libjade is a formally verified cryptographic library written in [the jasmin programming language](https://github.com/jasmin-lang/jasmin) with computer-verified proofs in [EasyCrypt](https://github.com/EasyCrypt/easycrypt). diff --git a/bench/Makefile b/bench/Makefile index b2b62308..3cc42ee2 100644 --- a/bench/Makefile +++ b/bench/Makefile @@ -82,7 +82,7 @@ MAIN = $(COMMON)/crypto_$(OPERATION).c DEFINE ?= DNAMESPACES = -DJADE_NAMESPACE=$(NAMESPACE1) -DJADE_NAMESPACE_LC=$(NAMESPACE) INCLUDES = -I$(IDIR)/include/ -I$(COMMON)/ -I$(RANDINC) -COMPILE = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(ASM) $(RANDLIB) -lgsl $(CIL) +COMPILE = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(ASM) $(RANDLIB) -lblas -lgsl $(CIL) # -------------------------------------------------------------------- .PHONY: __phony benchs diff --git a/bench/Makefile.partial_implementations b/bench/Makefile.partial_implementations index b4d9d3a4..a513cd81 100644 --- a/bench/Makefile.partial_implementations +++ b/bench/Makefile.partial_implementations @@ -5,8 +5,8 @@ EXTERNAL_PATH = $(subst $(BIN),external,$(@D)) EXTERNAL_LIB_STATIC = ../test/$(EXTERNAL_PATH)/$(subst -,_,$(subst /,_,$(EXTERNAL_PATH))).a EXTERNAL_LIB_SHARED = $(abspath ../test/$(EXTERNAL_PATH)/$(subst -,_,$(subst /,_,$(EXTERNAL_PATH))).so) -EXTERNAL_COMPILE1 = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(PRINT) $(ASM) $(RANDLIB) $(EXTERNAL_LIB) -lgsl $(CIL) -EXTERNAL_COMPILE2 = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(PRINT) $(ASM) $(RANDLIB) -lgsl $(EXTERNAL_LIB_SHARED) +EXTERNAL_COMPILE1 = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(PRINT) $(ASM) $(RANDLIB) $(EXTERNAL_LIB) -lblas -lgsl $(CIL) +EXTERNAL_COMPILE2 = $(CC) $(CFLAGS) -o $@ $(DEFINE) $(DNAMESPACES) $(INCLUDES) $(MAIN) $(PRINT) $(ASM) $(RANDLIB) -lblas -lgsl $(EXTERNAL_LIB_SHARED) #-- falcon512 @@ -44,8 +44,37 @@ $(XWING_C_AVX2_BINARIES): __phony | $(XWING_C_AVX2_DIR) $(XWING_C_AVX2_DIR)/$(CI $(MAKE) -C ../test/$(EXTERNAL_PATH) $(EXTERNAL_COMPILE2) -l25519 $(CIL) || true +#-- --------------------------------------------------------------------------- +#-- xwing_naive + +#-- +XWING_NAIVE_C_AVX2_DIR:=bin/crypto_kem/xwing_naive/amd64/c-avx2/ +XWING_NAIVE_C_AVX2_BINARIES:=$(foreach bin,$(BENCH_BINARIES),$(XWING_NAIVE_C_AVX2_DIR)$(bin)) + +$(XWING_NAIVE_C_AVX2_BINARIES): __phony | $(XWING_NAIVE_C_AVX2_DIR) $(XWING_NAIVE_C_AVX2_DIR)/$(CID) + $(MAKE) -C $(IDIR) || true + $(CIC) + $(MAKE) -C ../test/$(EXTERNAL_PATH) + $(EXTERNAL_COMPILE2) -l25519 $(CIL) || true + +#-- --------------------------------------------------------------------------- +#-- sha3fips + +SHA3_256_C_AVX2_DIR:=bin/crypto_hash/sha3-256/amd64/c-avx2/ +SHA3_256_C_AVX2_BINARIES:=$(foreach bin,$(BENCH_BINARIES),$(SHA3_256_C_AVX2_DIR)$(bin)) + +$(SHA3_256_C_AVX2_BINARIES): __phony | $(SHA3_256_C_AVX2_DIR) $(SHA3_256_C_AVX2_DIR)/$(CID) + $(MAKE) -C $(IDIR) || true + $(CIC) + $(MAKE) -C ../test/$(EXTERNAL_PATH) + $(EXTERNAL_COMPILE2) $(CIL) || true + + + #-- clean clean-external: $(MAKE) -C ../test/external/crypto_sign/falcon/falcon512/amd64/avx2 clean $(MAKE) -C ../test/external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing/src/crypto_kem/xwing/ref/ clean $(MAKE) -C ../test/external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing/src/crypto_kem/xwing/avx2/ clean + $(MAKE) -C ../test/external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing_naive/src/crypto_kem/xwing_naive/avx2/ clean + $(MAKE) -C ../test/external/crypto_sign/sha3-256/common/Kyber_FIPS202/avx2/ clean diff --git a/bench/common/increment.c b/bench/common/increment.c index eaa252ba..cc45d23c 100644 --- a/bench/common/increment.c +++ b/bench/common/increment.c @@ -30,10 +30,15 @@ static size_t inc_2(size_t len) return len << 1; } -static size_t size_inc_2(size_t start, size_t end) +static size_t inc_1088(size_t len) +{ + return len + 1088; +} + +static size_t size_inc_1088(size_t start, size_t end) { size_t i, r=0; - for(i = start; i <= end; i = inc_2(i)) + for(i = start; i <= end; i = inc_1088(i)) { r += 1; } return r; } diff --git a/run_hash.sh b/run_hash.sh new file mode 100755 index 00000000..4ef1bfdc --- /dev/null +++ b/run_hash.sh @@ -0,0 +1 @@ +cd bench/ && make DEFINE='-DRUNS=100 -DLOOPS=100 -DST_ON -DMININBYTES=134 -DMAXINBYTES=1222 -DINC_INBYTES=1088' FILTER=../src/crypto_hash/sha3-256/% && ./bin/crypto_hash/sha3-256/amd64/c-avx2/bench diff --git a/run_xwing.sh b/run_xwing.sh new file mode 100755 index 00000000..790606b0 --- /dev/null +++ b/run_xwing.sh @@ -0,0 +1,2 @@ +#!/bin/sh +cd bench/ && make DEFINE='-DRUNS=100 -DST_ON' FILTER=../src/crypto_kem/xwing/% && ./bin/crypto_kem/xwing/amd64/c-avx2/bench diff --git a/run_xwing_naive.sh b/run_xwing_naive.sh new file mode 100755 index 00000000..012890f0 --- /dev/null +++ b/run_xwing_naive.sh @@ -0,0 +1 @@ +cd bench/ && make DEFINE='-DRUNS=100 -DST_ON' FILTER=../src/crypto_kem/xwing_naive/% && ./bin/crypto_kem/xwing_naive/amd64/c-avx2/bench diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..aea824ad --- /dev/null +++ b/shell.nix @@ -0,0 +1,97 @@ +{ pkgs ? import {} }: +with pkgs; +let + librandombytes = stdenv.mkDerivation rec { + pname = "librandombytes"; + version = "20230919"; + + src = fetchzip { + url = "https://randombytes.cr.yp.to/librandombytes-${version}.tar.gz"; + hash = "sha256-wr44x45AwEU1v4kvbmG37npUJGmRprnUtAzQvJJuPyw="; + }; + + nativeBuildInputs = [ python3 ]; + + buildInputs = [ openssl ]; + + configurePhase = '' + patchShebangs configure + patchShebangs scripts-build + ./configure --prefix=${placeholder "out"} + ''; + }; + + libcpucycles = stdenv.mkDerivation rec { + pname = "libcpucycles"; + version = "20240114"; + + src = fetchzip { + url = "https://cpucycles.cr.yp.to/libcpucycles-${version}.tar.gz"; + hash = "sha256-EWUmQjsoHZfSC6xPxKaNW0M5X1AIHerWC9HbC84CLtY="; + }; + + nativeBuildInputs = [ python3 ]; + + configurePhase = '' + patchShebangs configure + patchShebangs scripts-build + ./configure --prefix=${placeholder "out"} + ''; + }; + + lib25519 = stdenv.mkDerivation rec { + pname = "lib25519"; + version = "20230630"; + + src = fetchzip { + url = "https://lib25519.cr.yp.to/lib25519-${version}.tar.gz"; + hash = "sha256-mZ6U3ZbcCW+frnf8/TB8x/5LgxW/96lmSB+oX4tvCpQ="; + }; + + nativeBuildInputs = [ python3 ]; + + buildInputs = [ librandombytes libcpucycles ]; + + configurePhase = '' + patchShebangs configure + patchShebangs scripts-build + ./configure --prefix=${placeholder "out"} + ''; + }; + + jasmin-src = pkgs.fetchFromGitHub { + owner = "Rixxc"; + repo = "jasmin"; + rev = "c523a9e20bae85e028c6cb9b0b55bfc3f8f3734b"; + hash = "sha256-6cDmfj55mYwTQE0Fka7s3/EuBts9hj+65xgWQ7OTez8="; + }; + + jasmin = pkgs.callPackage "${jasmin-src}/default.nix" { inherit pkgs; }; + + gls = stdenv.mkDerivation rec { + pname = "libgls"; + version = "2.7"; + + src = fetchzip { + url = "https://mirror.ibcp.fr/pub/gnu/gsl/gsl-${version}.tar.gz"; + hash = "sha256-/5yCVBUHRlqnG3bmkI80S41t0UNRiVda5X8/itNBLSw="; + }; + + buildInputs = [ + blas + ]; + }; +in +pkgs.mkShell { + nativeBuildInputs = [ + jasmin + ]; + + buildInputs = [ + blas + gls + libsodium + lib25519 + ]; + } + diff --git a/src/crypto_hash/sha3-256/amd64/c-avx2/Makefile b/src/crypto_hash/sha3-256/amd64/c-avx2/Makefile new file mode 100644 index 00000000..2e562f7c --- /dev/null +++ b/src/crypto_hash/sha3-256/amd64/c-avx2/Makefile @@ -0,0 +1,7 @@ +hash.s: hash.c + $(CC) -Wall -Werror -S hash.c + +clean: + rm -f hash.s + +distclean: clean \ No newline at end of file diff --git a/src/crypto_hash/sha3-256/amd64/c-avx2/hash.c b/src/crypto_hash/sha3-256/amd64/c-avx2/hash.c new file mode 100644 index 00000000..c85153fd --- /dev/null +++ b/src/crypto_hash/sha3-256/amd64/c-avx2/hash.c @@ -0,0 +1,9 @@ +#include "include/api.h" +#include + +int sha3_256(uint8_t *h, const uint8_t *in, size_t inlen); + +int jade_hash_sha3_256_amd64_c_avx2(uint8_t *hash, const uint8_t *input, + uint64_t input_length) { + return sha3_256(hash, input, input_length); +} diff --git a/src/crypto_hash/sha3-256/amd64/c-avx2/hash.jazz b/src/crypto_hash/sha3-256/amd64/c-avx2/hash.jazz new file mode 100644 index 00000000..01b665be --- /dev/null +++ b/src/crypto_hash/sha3-256/amd64/c-avx2/hash.jazz @@ -0,0 +1,2 @@ + +// This file has no code on purpose: its presence here simplifies the setup for testing and benchmarking for non-Jasmin implementations (such as this one) \ No newline at end of file diff --git a/src/crypto_hash/sha3-256/amd64/c-avx2/include/api.h b/src/crypto_hash/sha3-256/amd64/c-avx2/include/api.h new file mode 100644 index 00000000..64a517fe --- /dev/null +++ b/src/crypto_hash/sha3-256/amd64/c-avx2/include/api.h @@ -0,0 +1,18 @@ +#ifndef JADE_HASH_sha3_256_amd64_c_avx2_API_H +#define JADE_HASH_sha3_256_amd64_c_avx2_API_H + +#define JADE_HASH_sha3_256_amd64_c_avx2_BYTES 32 + +#define JADE_HASH_sha3_256_amd64_c_avx2_ALGNAME "SHA3-256" +#define JADE_HASH_sha3_256_amd64_c_avx2_ARCH "amd64" +#define JADE_HASH_sha3_256_amd64_c_avx2_IMPL "avx2" + +#include + +int jade_hash_sha3_256_amd64_c_avx2( + uint8_t *hash, + const uint8_t *input, + uint64_t input_length +); + +#endif diff --git a/src/crypto_kem/xwing_naive/META.yml b/src/crypto_kem/xwing_naive/META.yml new file mode 100644 index 00000000..cb75547b --- /dev/null +++ b/src/crypto_kem/xwing_naive/META.yml @@ -0,0 +1,26 @@ +name: X-Wing-Naive +type: kem +checksumsmall: +checksumbig: +claimed-nist-level: 3 +claimed-security: IND-CCA2 +length-public-key: 1216 +length-ciphertext: 1120 +length-secret-key: 2464 +length-shared-secret: 32 +principal-submitters: + - TODO +auxiliary-submitters: + - TODO +implementations: + - name: amd64/ref + version: TODO + supported_platforms: + - architecture: x86_64 + operating_systems: + - Linux + - Darwin + required_flags: # FIXME + - avx2 + - bmi2 + - popcnt \ No newline at end of file diff --git a/src/crypto_kem/xwing_naive/amd64/c-avx2/Makefile b/src/crypto_kem/xwing_naive/amd64/c-avx2/Makefile new file mode 100644 index 00000000..b6ec086b --- /dev/null +++ b/src/crypto_kem/xwing_naive/amd64/c-avx2/Makefile @@ -0,0 +1,8 @@ + +kem.s: kem.c + $(CC) -Wall -Werror -S kem.c + +clean: + rm -f kem.s + +distclean: clean diff --git a/src/crypto_kem/xwing_naive/amd64/c-avx2/dependencies b/src/crypto_kem/xwing_naive/amd64/c-avx2/dependencies new file mode 100644 index 00000000..0cc95a1c --- /dev/null +++ b/src/crypto_kem/xwing_naive/amd64/c-avx2/dependencies @@ -0,0 +1,2 @@ +lib25519 (-> libcpucycles; librandombytes (-> libssl-dev) ) +libsodium diff --git a/src/crypto_kem/xwing_naive/amd64/c-avx2/include/api.h b/src/crypto_kem/xwing_naive/amd64/c-avx2/include/api.h new file mode 100644 index 00000000..8159e889 --- /dev/null +++ b/src/crypto_kem/xwing_naive/amd64/c-avx2/include/api.h @@ -0,0 +1,47 @@ +#ifndef JADE_KEM_xwing_naive_amd64_c_avx2_API_H +#define JADE_KEM_xwing_naive_amd64_c_avx2_API_H + +#include + +#define JADE_KEM_xwing_naive_amd64_c_avx2_PUBLICKEYBYTES 1216 +#define JADE_KEM_xwing_naive_amd64_c_avx2_SECRETKEYBYTES 2464 +#define JADE_KEM_xwing_naive_amd64_c_avx2_CIPHERTEXTBYTES 1120 +#define JADE_KEM_xwing_naive_amd64_c_avx2_KEYPAIRCOINBYTES 96 +#define JADE_KEM_xwing_naive_amd64_c_avx2_ENCCOINBYTES 64 +#define JADE_KEM_xwing_naive_amd64_c_avx2_BYTES 32 + +#define JADE_KEM_xwing_naive_amd64_c_avx2_ALGNAME "X-Wing-Naive" +#define JADE_KEM_xwing_naive_amd64_c_avx2_ARCH "amd64" +#define JADE_KEM_xwing_naive_amd64_c_avx2_IMPL "c-avx2" + +int jade_kem_xwing_naive_amd64_c_avx2_keypair_derand( + uint8_t *public_key, + uint8_t *secret_key, + const uint8_t *coins +); + +int jade_kem_xwing_naive_amd64_c_avx2_keypair( + uint8_t *public_key, + uint8_t *secret_key +); + +int jade_kem_xwing_naive_amd64_c_avx2_enc_derand( + uint8_t *ciphertext, + uint8_t *shared_secret, + const uint8_t *public_key, + const uint8_t *coins +); + +int jade_kem_xwing_naive_amd64_c_avx2_enc( + uint8_t *ciphertext, + uint8_t *shared_secret, + const uint8_t *public_key +); + +int jade_kem_xwing_naive_amd64_c_avx2_dec( + uint8_t *shared_secret, + const uint8_t *ciphertext, + const uint8_t *secret_key +); + +#endif diff --git a/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.c b/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.c new file mode 100644 index 00000000..a0dfb0ba --- /dev/null +++ b/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.c @@ -0,0 +1,55 @@ +#include "include/api.h" + +// +int xwing_naive_avx2_keypair_derand(unsigned char *pk, unsigned char *sk, const unsigned char *coins); +int xwing_naive_avx2_keypair(unsigned char *pk, unsigned char *sk); +int xwing_naive_avx2_enc_derand(unsigned char *ct, unsigned char *ss, const unsigned char *pk, const unsigned char *coins); +int xwing_naive_avx2_enc(unsigned char *ct, unsigned char *ss, const unsigned char *pk); +int xwing_naive_avx2_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk); +// + +int jade_kem_xwing_naive_amd64_c_avx2_keypair_derand( + uint8_t *public_key, + uint8_t *secret_key, + const uint8_t *coins +) +{ + return xwing_naive_avx2_keypair_derand(public_key, secret_key, coins); +} + +int jade_kem_xwing_naive_amd64_c_avx2_keypair( + uint8_t *public_key, + uint8_t *secret_key +) +{ + return xwing_naive_avx2_keypair(public_key, secret_key); +} + +int jade_kem_xwing_naive_amd64_c_avx2_enc_derand( + uint8_t *ciphertext, + uint8_t *shared_secret, + const uint8_t *public_key, + const uint8_t *coins +) +{ + return xwing_naive_avx2_enc_derand(ciphertext, shared_secret, public_key, coins); +} + +int jade_kem_xwing_naive_amd64_c_avx2_enc( + uint8_t *ciphertext, + uint8_t *shared_secret, + const uint8_t *public_key +) +{ + return xwing_naive_avx2_enc(ciphertext, shared_secret, public_key); +} + +int jade_kem_xwing_naive_amd64_c_avx2_dec( + uint8_t *shared_secret, + const uint8_t *ciphertext, + const uint8_t *secret_key +) +{ + return xwing_naive_avx2_dec(shared_secret, ciphertext, secret_key); +} + diff --git a/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.jazz b/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.jazz new file mode 100644 index 00000000..e7f3837e --- /dev/null +++ b/src/crypto_kem/xwing_naive/amd64/c-avx2/kem.jazz @@ -0,0 +1 @@ +// This file has no code on purpose: its presence here simplifies the setup for testing and benchmarking for non-Jasmin implementations (such as this one) diff --git a/test/Makefile.partial_implementations b/test/Makefile.partial_implementations index b349ccf6..6efbc9c3 100644 --- a/test/Makefile.partial_implementations +++ b/test/Makefile.partial_implementations @@ -71,9 +71,39 @@ $(XWING_C_AVX2_BINARIES): __phony | $(XWING_C_AVX2_DIR) $(XWING_C_AVX2_DIR)/$(CI $(MAKE) -C $(EXTERNAL_PATH) $(EXTERNAL_COMPILE2) -l25519 $(CIL) || true +#-- --------------------------------------------------------------------------- +#-- xwing_naive + +#-- +XWING_NAIVE_C_AVX2_DIR:=bin/crypto_kem/xwing_naive/amd64/c-avx2/ +XWING_NAIVE_C_AVX2_BINARIES:=$(foreach bin,$(TESTING_BINARIES),$(XWING_NAIVE_C_AVX2_DIR)$(bin)) + +$(XWING_NAIVE_C_AVX2_BINARIES): __phony | $(XWING_NAIVE_C_AVX2_DIR) $(XWING_NAIVE_C_AVX2_DIR)/$(CID) + $(MAKE) -C $(IDIR) || true + $(CIC) + $(MAKE) -C $(EXTERNAL_PATH) + $(EXTERNAL_COMPILE2) -l25519 $(CIL) || true + +#-- --------------------------------------------------------------------------- +#-- sha3fips + +#-- +SHA3_256_C_AVX2_DIR:=bin/crypto_hash/sha3-256/amd64/c-avx2/ +SHA3_256_C_AVX2_BINARIES:=$(foreach bin,$(TESTING_BINARIES),$(SHA3_256_C_AVX2_DIR)$(bin)) + +$(SHA3_256_C_AVX2_BINARIES): __phony | $(SHA3_256_C_AVX2_DIR) $(SHA3_256_C_AVX2_DIR)/$(CID) + $(MAKE) -C $(IDIR) || true + $(CIC) + $(MAKE) -C $(EXTERNAL_PATH) + $(EXTERNAL_COMPILE2) $(CIL) || true + #-- clean clean-external: $(MAKE) -C external/crypto_sign/falcon/falcon512/amd64/avx2 clean $(MAKE) -C external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing/src/crypto_kem/xwing/ref/ clean $(MAKE) -C external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing/src/crypto_kem/xwing/avx2/ clean + $(MAKE) -C external/crypto_kem/xwing/common/JoaoDiogoDuarte_xwing_naive/src/crypto_kem/xwing_naive/avx2/ clean + $(MAKE) -C external/crypto_hash/sha3-256/common/Kyber_FIPS202/avx2/ clean + + diff --git a/test/external/crypto_hash/sha3-256/amd64/c-avx2/Makefile b/test/external/crypto_hash/sha3-256/amd64/c-avx2/Makefile new file mode 100644 index 00000000..feccbef6 --- /dev/null +++ b/test/external/crypto_hash/sha3-256/amd64/c-avx2/Makefile @@ -0,0 +1,10 @@ + +external_crypto_hash_sha3_256_amd64_c_avx2.so: + make -C ../../common/Kyber_FIPS202/avx2/ sha3.so + cp ../../common/Kyber_FIPS202/avx2/sha3.so $@ + +clean: + rm -f external_crypto_hash_sha3_256_amd64_c_avx2.so + +distclean: clean + make -C ../../common/Kyber_FIPS202/avx2/ clean \ No newline at end of file diff --git a/test/external/crypto_hash/sha3-256/common/Kyber_FIPS202 b/test/external/crypto_hash/sha3-256/common/Kyber_FIPS202 new file mode 160000 index 00000000..d264a777 --- /dev/null +++ b/test/external/crypto_hash/sha3-256/common/Kyber_FIPS202 @@ -0,0 +1 @@ +Subproject commit d264a777288c675825476b0587d5f598ef5b0d87 diff --git a/test/external/crypto_kem/xwing_naive/amd64/c-avx2/Makefile b/test/external/crypto_kem/xwing_naive/amd64/c-avx2/Makefile new file mode 100644 index 00000000..af3b09f7 --- /dev/null +++ b/test/external/crypto_kem/xwing_naive/amd64/c-avx2/Makefile @@ -0,0 +1,9 @@ +external_crypto_kem_xwing_naive_amd64_c_avx2.so: + make -C ../../common/JoaoDiogoDuarte_xwing_naive/src/crypto_kem/xwing_naive/avx2/ libxwing_naive_avx2.so + cp ../../common/JoaoDiogoDuarte_xwing_naive/src/crypto_kem/xwing_naive/avx2/libxwing_naive_avx2.so $@ + +clean: + rm -f external_crypto_kem_xwing_naive_amd64_c_avx2.so + +distclean: clean + make -C ../../common/JoaoDiogoDuarte_xwing_naive/src/crypto_kem/xwing_naive/avx2/ clean \ No newline at end of file diff --git a/test/external/crypto_kem/xwing_naive/common/JoaoDiogoDuarte_xwing_naive b/test/external/crypto_kem/xwing_naive/common/JoaoDiogoDuarte_xwing_naive new file mode 160000 index 00000000..68fc2303 --- /dev/null +++ b/test/external/crypto_kem/xwing_naive/common/JoaoDiogoDuarte_xwing_naive @@ -0,0 +1 @@ +Subproject commit 68fc2303b64cc111d09d2b240fa196174df490b8