From 1d789dc90da89d2859da8b04df3d3cb4e124a67c Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Thu, 19 Sep 2019 12:43:57 +0200 Subject: [PATCH] check algo names --- test/crypto_kem/printparams.c | 3 ++- test/crypto_sign/printparams.c | 3 ++- test/test_metadata_sizes.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/crypto_kem/printparams.c b/test/crypto_kem/printparams.c index 925b2119..efdaf5a0 100644 --- a/test/crypto_kem/printparams.c +++ b/test/crypto_kem/printparams.c @@ -10,5 +10,6 @@ int main() { printf("\t\"CRYPTO_SECRETKEYBYTES\": %u,\n", NAMESPACE(CRYPTO_SECRETKEYBYTES)); printf("\t\"CRYPTO_PUBLICKEYBYTES\": %u,\n", NAMESPACE(CRYPTO_PUBLICKEYBYTES)); printf("\t\"CRYPTO_CIPHERTEXTBYTES\": %u,\n", NAMESPACE(CRYPTO_CIPHERTEXTBYTES)); - printf("\t\"CRYPTO_BYTES\": %u\n}\n", NAMESPACE(CRYPTO_BYTES)); + printf("\t\"CRYPTO_BYTES\": %u,\n", NAMESPACE(CRYPTO_BYTES)); + printf("\t\"CRYPTO_ALGNAME\": \"%s\"\n}\n", NAMESPACE(CRYPTO_ALGNAME)); } diff --git a/test/crypto_sign/printparams.c b/test/crypto_sign/printparams.c index 8c38767c..eb218c87 100644 --- a/test/crypto_sign/printparams.c +++ b/test/crypto_sign/printparams.c @@ -9,5 +9,6 @@ int main() { printf("{\n"); printf("\t\"CRYPTO_SECRETKEYBYTES\": %u,\n", NAMESPACE(CRYPTO_SECRETKEYBYTES)); printf("\t\"CRYPTO_PUBLICKEYBYTES\": %u,\n", NAMESPACE(CRYPTO_PUBLICKEYBYTES)); - printf("\t\"CRYPTO_BYTES\": %u\n}\n", NAMESPACE(CRYPTO_BYTES)); + printf("\t\"CRYPTO_BYTES\": %u,\n", NAMESPACE(CRYPTO_BYTES)); + printf("\t\"CRYPTO_ALGNAME\": \"%s\"\n}\n", NAMESPACE(CRYPTO_ALGNAME)); } diff --git a/test/test_metadata_sizes.py b/test/test_metadata_sizes.py index 439310f0..950f212a 100644 --- a/test/test_metadata_sizes.py +++ b/test/test_metadata_sizes.py @@ -37,6 +37,7 @@ def test_metadata_sizes(implementation, impl_path, test_dir, init, destr): assert parsed['CRYPTO_SECRETKEYBYTES'] == metadata['length-secret-key'] assert parsed['CRYPTO_PUBLICKEYBYTES'] == metadata['length-public-key'] + assert parsed['CRYPTO_ALGNAME'] == metadata['name'] if implementation.scheme.type == 'kem': assert (