From b085cda650345ffeaf34087c2cc5f393907799b1 Mon Sep 17 00:00:00 2001 From: Basil Hess <bhe@zurich.ibm.com> Date: Wed, 24 Jan 2024 12:35:26 +0100 Subject: [PATCH] build fixes --- tests/vectors_kem.c | 13 ------------- tests/vectors_sig.c | 21 --------------------- 2 files changed, 34 deletions(-) diff --git a/tests/vectors_kem.c b/tests/vectors_kem.c index 2fddf9f549..04296f17d5 100644 --- a/tests/vectors_kem.c +++ b/tests/vectors_kem.c @@ -67,16 +67,6 @@ static void hexStringToByteArray(const char *hexString, uint8_t *byteArray) { } } -static inline uint16_t UINT16_TO_BE(const uint16_t x) { - union { - uint16_t val; - uint8_t bytes[2]; - } y; - y.bytes[0] = (x >> 8) & 0xFF; - y.bytes[1] = x & 0xFF; - return y.val; -} - /* HQC-specific functions */ static inline bool is_ml_kem(const char *method_name) { return (0 == strcmp(method_name, OQS_KEM_alg_ml_kem_512)) @@ -104,11 +94,8 @@ OQS_STATUS kem_vector(const char *method_name, const uint8_t *decaps_sk, const uint8_t *decaps_ciphertext, const uint8_t *decaps_kprime) { uint8_t *entropy_input; - uint8_t seed[48]; FILE *fh = NULL; OQS_KEM *kem = NULL; - uint8_t *msg = NULL; - size_t msg_len = 0; uint8_t *public_key = NULL; uint8_t *secret_key = NULL; uint8_t *ss_encaps = NULL; diff --git a/tests/vectors_sig.c b/tests/vectors_sig.c index df7d008d4d..1cc2c08d12 100644 --- a/tests/vectors_sig.c +++ b/tests/vectors_sig.c @@ -20,15 +20,6 @@ typedef struct { fixed_prng_state prng_state = { .pos = 0 }; -/* Displays hexadecimal strings */ -static void OQS_print_hex_string(const char *label, const uint8_t *str, size_t len) { - printf("%-20s (%4zu bytes): ", label, len); - for (size_t i = 0; i < (len); i++) { - printf("%02X", str[i]); - } - printf("\n"); -} - static void fprintBstr(FILE *fp, const char *S, const uint8_t *A, size_t L) { size_t i; fprintf(fp, "%s", S); @@ -67,16 +58,6 @@ static void hexStringToByteArray(const char *hexString, uint8_t *byteArray) { } } -static inline uint16_t UINT16_TO_BE(const uint16_t x) { - union { - uint16_t val; - uint8_t bytes[2]; - } y; - y.bytes[0] = (x >> 8) & 0xFF; - y.bytes[1] = x & 0xFF; - return y.val; -} - /* HQC-specific functions */ static inline bool is_ml_dsa(const char *method_name) { return (0 == strcmp(method_name, OQS_SIG_alg_ml_dsa_44)) @@ -104,11 +85,9 @@ OQS_STATUS sig_vector(const char *method_name, const uint8_t *verif_sig, const uint8_t *verif_pk, const uint8_t *verif_msg, size_t verif_msg_len) { uint8_t *entropy_input; - uint8_t seed[48]; FILE *fh = NULL; OQS_SIG *sig = NULL; uint8_t *msg = NULL; - size_t msg_len = 0; uint8_t *public_key = NULL; uint8_t *secret_key = NULL; uint8_t *signature = NULL;