From 4582b5447826886a4ce7f5cd095daed2513d352d Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 12 Mar 2019 10:42:10 +0100 Subject: Ajout de l'implémentation à seuil d'ordre 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modifications nécessaires dans l'infra : - retrait conditionnel de test-tweakey, vu que l'API n'est pas la même pour l'implémentation à seuil, - retrait conditionnel de l'avertissement "-Wparentheses", plus agaçant qu'autre chose sur les calculs booléens de cipher.c, e.g. y_hi&3 ^ (y_hi&8)>>1 où la priorité est intuitive (shifts avant AND avant XOR). C'est dommage de perdre les avertissements sur if (a&b == c), mais tant pis… On va compter sur La Suite De Test®©™ pour nous couvrir. Co-authored-by: Alexandre Adomnicai Co-authored-by: leo --- test/check-implementation.sh | 2 +- test/common.mk | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/check-implementation.sh b/test/check-implementation.sh index 4113637..0750d1b 100755 --- a/test/check-implementation.sh +++ b/test/check-implementation.sh @@ -46,7 +46,7 @@ run-genkat () local nist_flags=(-std=c99 -Wall -Wextra -Wshadow -fsanitize=address,undefined -O2) - gcc ${nist_flags[@]} -Werror -I${genkat_dir} ${genkat_dir}/*.c -o ${genkat} + gcc ${nist_flags[@]} -I${genkat_dir} ${genkat_dir}/*.c -o ${genkat} ${genkat} mv LWC_AEAD_KAT*.txt ${vectors_dir}/${mode}-${keylen} diff --git a/test/common.mk b/test/common.mk index 677dcbe..c978c2d 100644 --- a/test/common.mk +++ b/test/common.mk @@ -11,9 +11,16 @@ endif IMPLEMENTATION = ref +ifeq "$(IMPLEMENTATION)" "add_threshold" +# Filter out tests on tweakey schedule, as the thresholded API differs. +tests = $(filter-out test-tweakey,$(basename $(wildcard test-*.c))) +# Don't trigger warnings for "a&b ^ c". +CFLAGS += -Wno-parentheses +else tests = $(basename $(wildcard test-*.c)) -traces = $(basename $(wildcard traces-*.c)) +endif +traces = $(basename $(wildcard traces-*.c)) test_dir = $(dir $(lastword $(MAKEFILE_LIST))) root_dir = $(test_dir).. -- cgit v1.2.3