oqs: Added signature tests

This commit is contained in:
Andreas Steffen 2020-11-10 20:28:33 +01:00 committed by Tobias Brunner
parent 09fa2cd2eb
commit 8e790fd5a6
5 changed files with 10505 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Martin Willi
* Copyright (C) 2016-2019 Andreas Steffen
* Copyright (C) 2016-2020 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@ typedef struct xof_test_vector_t xof_test_vector_t;
typedef struct drbg_test_vector_t drbg_test_vector_t;
typedef struct rng_test_vector_t rng_test_vector_t;
typedef struct ke_test_vector_t ke_test_vector_t;
typedef struct sig_test_vector_t sig_test_vector_t;
struct crypter_test_vector_t {
/** encryption algorithm this vector tests */
@ -172,6 +173,20 @@ struct ke_test_vector_t {
chunk_t shared;
};
struct sig_test_vector_t {
/** key type to test */
key_type_t type;
/** seed from which key material is derived */
chunk_t seed;
/** msg to be signed */
chunk_t msg;
/** expected public key */
chunk_t pk;
/** expected secret key */
chunk_t sk;
/** expected signed message */
chunk_t sm;
};
/**
* Cryptographic primitive testing framework.
*/

View File

@ -8,7 +8,9 @@ AM_CFLAGS = \
# because of the subdirectory, which would cause distclean to fail
noinst_LTLIBRARIES = libqske-oqs.la
libqske_oqs_la_SOURCES = \
oqs_kem.h oqs_kem.c oqs_drbg.h oqs_drbg.c
oqs_kem.h oqs_kem.c oqs_drbg.h oqs_drbg.c \
oqs_public_key.h oqs_public_key.c \
oqs_private_key.h oqs_private_key.c
libqske_oqs_la_LIBADD = \
-loqs -lcrypto -lm
@ -20,9 +22,7 @@ plugin_LTLIBRARIES = libstrongswan-oqs.la
endif
libstrongswan_oqs_la_SOURCES = \
oqs_plugin.h oqs_plugin.c \
oqs_public_key.h oqs_public_key.c \
oqs_private_key.h oqs_private_key.c
oqs_plugin.h oqs_plugin.c
libstrongswan_oqs_la_LDFLAGS = -module -avoid-version

View File

@ -3,7 +3,7 @@ TESTS = oqs_tests
check_PROGRAMS = $(TESTS)
oqs_tests_SOURCES = \
suites/test_oqs.c \
suites/test_oqs.c suites/test_oqs_sig.c \
oqs_tests.h oqs_tests.c
oqs_tests_CFLAGS = \

View File

@ -14,3 +14,4 @@
*/
TEST_SUITE(oqs_suite_create)
TEST_SUITE(oqs_sig_suite_create)

File diff suppressed because it is too large Load Diff