mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-15 00:01:37 -04:00
Merge branch 'master' of https://github.com/open-quantum-safe/liboqs
Merge with master.
This commit is contained in:
commit
a44bd12ace
@ -20,11 +20,14 @@
|
||||
|
||||
void OQS_randombytes_system(uint8_t *random_array, size_t bytes_to_read);
|
||||
void OQS_randombytes_nist_kat(uint8_t *random_array, size_t bytes_to_read);
|
||||
#ifdef USE_OPENSSL
|
||||
void OQS_randombytes_openssl(uint8_t *random_array, size_t bytes_to_read);
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/rand.h>
|
||||
// Use OpenSSL's RAND_bytes as the default PRNG
|
||||
static void (*oqs_randombytes_algorithm)(uint8_t *, size_t) = (void (*)(uint8_t *, size_t)) & RAND_bytes;
|
||||
static void (*oqs_randombytes_algorithm)(uint8_t *, size_t) = &OQS_randombytes_openssl;
|
||||
#else
|
||||
static void (*oqs_randombytes_algorithm)(uint8_t *, size_t) = &OQS_randombytes_system;
|
||||
#endif
|
||||
@ -38,7 +41,7 @@ OQS_API OQS_STATUS OQS_randombytes_switch_algorithm(const char *algorithm) {
|
||||
return OQS_SUCCESS;
|
||||
} else if (0 == strcasecmp(OQS_RAND_alg_openssl, algorithm)) {
|
||||
#ifdef USE_OPENSSL
|
||||
oqs_randombytes_algorithm = (void (*)(uint8_t *, size_t)) & RAND_bytes;
|
||||
oqs_randombytes_algorithm = &OQS_randombytes_openssl;
|
||||
return OQS_SUCCESS;
|
||||
#else
|
||||
return OQS_ERROR;
|
||||
@ -107,3 +110,12 @@ void OQS_randombytes_system(uint8_t *random_array, size_t bytes_to_read) {
|
||||
CryptReleaseContext(hCryptProv, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
void OQS_randombytes_openssl(uint8_t *random_array, size_t bytes_to_read) {
|
||||
int rc;
|
||||
do {
|
||||
rc = RAND_bytes(random_array, bytes_to_read);
|
||||
} while (rc != 1);
|
||||
}
|
||||
#endif
|
||||
|
105
src/kem/kem.c
105
src/kem/kem.c
@ -12,12 +12,11 @@ OQS_API const char *OQS_KEM_alg_identifier(size_t i) {
|
||||
// EDIT-WHEN-ADDING-KEM
|
||||
const char *a[OQS_KEM_algs_length] = {
|
||||
OQS_KEM_alg_default,
|
||||
OQS_KEM_alg_sike_p503, OQS_KEM_alg_sike_p751, OQS_KEM_alg_sidh_p503, OQS_KEM_alg_sidh_p751,
|
||||
OQS_KEM_alg_bike1_l1, OQS_KEM_alg_bike1_l3, OQS_KEM_alg_bike1_l5, OQS_KEM_alg_bike2_l1, OQS_KEM_alg_bike2_l3, OQS_KEM_alg_bike2_l5, OQS_KEM_alg_bike3_l1, OQS_KEM_alg_bike3_l3, OQS_KEM_alg_bike3_l5,
|
||||
OQS_KEM_alg_frodokem_640_aes, OQS_KEM_alg_frodokem_640_cshake, OQS_KEM_alg_frodokem_976_aes, OQS_KEM_alg_frodokem_976_cshake,
|
||||
OQS_KEM_alg_bike1_l1, OQS_KEM_alg_bike1_l3, OQS_KEM_alg_bike1_l5,
|
||||
OQS_KEM_alg_bike2_l1, OQS_KEM_alg_bike2_l3, OQS_KEM_alg_bike2_l5,
|
||||
OQS_KEM_alg_bike3_l1, OQS_KEM_alg_bike3_l3, OQS_KEM_alg_bike3_l5,
|
||||
OQS_KEM_alg_newhope_512_cca_kem, OQS_KEM_alg_newhope_1024_cca_kem};
|
||||
OQS_KEM_alg_newhope_512_cca_kem, OQS_KEM_alg_newhope_1024_cca_kem,
|
||||
OQS_KEM_alg_sidh_p503, OQS_KEM_alg_sidh_p751,
|
||||
OQS_KEM_alg_sike_p503, OQS_KEM_alg_sike_p751};
|
||||
if (i >= OQS_KEM_algs_length) {
|
||||
return NULL;
|
||||
} else {
|
||||
@ -28,54 +27,6 @@ OQS_API const char *OQS_KEM_alg_identifier(size_t i) {
|
||||
OQS_API OQS_KEM *OQS_KEM_new(const char *method_name) {
|
||||
if (0 == strcasecmp(method_name, OQS_KEM_alg_default)) {
|
||||
return OQS_KEM_new(OQS_KEM_DEFAULT);
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sike_p503)) {
|
||||
#ifdef OQS_ENABLE_KEM_sike_p503
|
||||
return OQS_KEM_sike_p503_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sike_p751)) {
|
||||
#ifdef OQS_ENABLE_KEM_sike_p751
|
||||
return OQS_KEM_sike_p751_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sidh_p503)) {
|
||||
#ifdef OQS_ENABLE_KEM_sidh_p503
|
||||
return OQS_KEM_sidh_p503_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sidh_p751)) {
|
||||
#ifdef OQS_ENABLE_KEM_sidh_p751
|
||||
return OQS_KEM_sidh_p751_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_640_aes)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_640_aes
|
||||
return OQS_KEM_frodokem_640_aes_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_976_aes)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_976_aes
|
||||
return OQS_KEM_frodokem_976_aes_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_640_cshake)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_640_cshake
|
||||
return OQS_KEM_frodokem_640_cshake_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_976_cshake)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_976_cshake
|
||||
return OQS_KEM_frodokem_976_cshake_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_bike1_l1)) {
|
||||
#ifdef OQS_ENABLE_KEM_bike1_l1
|
||||
return OQS_KEM_bike1_l1_new();
|
||||
@ -129,6 +80,30 @@ OQS_API OQS_KEM *OQS_KEM_new(const char *method_name) {
|
||||
return OQS_KEM_bike3_l5_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_640_aes)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_640_aes
|
||||
return OQS_KEM_frodokem_640_aes_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_640_cshake)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_640_cshake
|
||||
return OQS_KEM_frodokem_640_cshake_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_976_aes)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_976_aes
|
||||
return OQS_KEM_frodokem_976_aes_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_frodokem_976_cshake)) {
|
||||
#ifdef OQS_ENABLE_KEM_frodokem_976_cshake
|
||||
return OQS_KEM_frodokem_976_cshake_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_newhope_512_cca_kem)) {
|
||||
#ifdef OQS_ENABLE_KEM_newhope_512_cca_kem
|
||||
@ -141,6 +116,30 @@ OQS_API OQS_KEM *OQS_KEM_new(const char *method_name) {
|
||||
return OQS_KEM_newhope_1024_cca_kem_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sidh_p503)) {
|
||||
#ifdef OQS_ENABLE_KEM_sidh_p503
|
||||
return OQS_KEM_sidh_p503_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sidh_p751)) {
|
||||
#ifdef OQS_ENABLE_KEM_sidh_p751
|
||||
return OQS_KEM_sidh_p751_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sike_p503)) {
|
||||
#ifdef OQS_ENABLE_KEM_sike_p503
|
||||
return OQS_KEM_sike_p503_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_KEM_alg_sike_p751)) {
|
||||
#ifdef OQS_ENABLE_KEM_sike_p751
|
||||
return OQS_KEM_sike_p751_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
// EDIT-WHEN-ADDING-KEM
|
||||
} else {
|
||||
|
@ -27,14 +27,24 @@
|
||||
|
||||
/** Algorithm identifier for default KEM algorithm. */
|
||||
#define OQS_KEM_alg_default "DEFAULT"
|
||||
/** Algorithm identifier for Sike p503 KEM. */
|
||||
#define OQS_KEM_alg_sike_p503 "Sike-p503"
|
||||
/** Algorithm identifier for Sike p751 KEM. */
|
||||
#define OQS_KEM_alg_sike_p751 "Sike-p751"
|
||||
/** Algorithm identifier for Sidh p503 KEM. */
|
||||
#define OQS_KEM_alg_sidh_p503 "Sidh-p503"
|
||||
/** Algorithm identifier for Sidh p751 KEM. */
|
||||
#define OQS_KEM_alg_sidh_p751 "Sidh-p751"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l1 "BIKE1-L1"
|
||||
/** Algorithm identifier for BIKE1-L3 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l3 "BIKE1-L3"
|
||||
/** Algorithm identifier for BIKE1-L5 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l5 "BIKE1-L5"
|
||||
/** Algorithm identifier for BIKE2-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l1 "BIKE2-L1"
|
||||
/** Algorithm identifier for BIKE2-L3 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l3 "BIKE2-L3"
|
||||
/** Algorithm identifier for BIKE2-L5 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l5 "BIKE2-L5"
|
||||
/** Algorithm identifier for BIKE3-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l1 "BIKE3-L1"
|
||||
/** Algorithm identifier for BIKE3-L3 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l3 "BIKE3-L3"
|
||||
/** Algorithm identifier for BIKE3-L5 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l5 "BIKE3-L5"
|
||||
/** Algorithm identifier for FrodoKEM-640-AES KEM. */
|
||||
#define OQS_KEM_alg_frodokem_640_aes "FrodoKEM-640-AES"
|
||||
/** Algorithm identifier for FrodoKEM-640-cSHAKE KEM. */
|
||||
@ -43,28 +53,18 @@
|
||||
#define OQS_KEM_alg_frodokem_976_aes "FrodoKEM-976-AES"
|
||||
/** Algorithm identifier for FrodoKEM-976-cSHAKE KEM. */
|
||||
#define OQS_KEM_alg_frodokem_976_cshake "FrodoKEM-976-cSHAKE"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l1 "BIKE1-L1"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l3 "BIKE1-L3"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike1_l5 "BIKE1-L5"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l1 "BIKE2-L1"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l3 "BIKE2-L3"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike2_l5 "BIKE2-L5"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l1 "BIKE3-L1"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l3 "BIKE3-L3"
|
||||
/** Algorithm identifier for BIKE1-L1 KEM. */
|
||||
#define OQS_KEM_alg_bike3_l5 "BIKE3-L5"
|
||||
/** Algorithm identifier for NewHope-512-CCA-KEM KEM. */
|
||||
#define OQS_KEM_alg_newhope_512_cca_kem "NewHope-512-CCA-KEM"
|
||||
/** Algorithm identifier for NewHope-1024-CCA-KEM KEM. */
|
||||
#define OQS_KEM_alg_newhope_1024_cca_kem "NewHope-1024-CCA-KEM"
|
||||
/** Algorithm identifier for Sidh p503 KEM. */
|
||||
#define OQS_KEM_alg_sidh_p503 "Sidh-p503"
|
||||
/** Algorithm identifier for Sidh p751 KEM. */
|
||||
#define OQS_KEM_alg_sidh_p751 "Sidh-p751"
|
||||
/** Algorithm identifier for Sike p503 KEM. */
|
||||
#define OQS_KEM_alg_sike_p503 "Sike-p503"
|
||||
/** Algorithm identifier for Sike p751 KEM. */
|
||||
#define OQS_KEM_alg_sike_p751 "Sike-p751"
|
||||
// EDIT-WHEN-ADDING-KEM
|
||||
/** Number of algorithm identifiers above. */
|
||||
#define OQS_KEM_algs_length 20
|
||||
@ -223,8 +223,8 @@ OQS_API void OQS_KEM_free(OQS_KEM *kem);
|
||||
|
||||
#include <oqs/kem_bike.h>
|
||||
#include <oqs/kem_frodokem.h>
|
||||
#include <oqs/kem_sike.h>
|
||||
#include <oqs/kem_newhopenist.h>
|
||||
#include <oqs/kem_sike.h>
|
||||
// EDIT-WHEN-ADDING-KEM
|
||||
|
||||
#endif // __OQS_KEM_H
|
||||
|
@ -12,15 +12,15 @@ OQS_API const char *OQS_SIG_alg_identifier(size_t i) {
|
||||
// EDIT-WHEN-ADDING-SIG
|
||||
const char *a[OQS_SIG_algs_length] = {
|
||||
OQS_SIG_alg_default,
|
||||
OQS_SIG_alg_qTESLA_I,
|
||||
OQS_SIG_alg_qTESLA_III_size,
|
||||
OQS_SIG_alg_qTESLA_III_speed,
|
||||
OQS_SIG_alg_picnic_L1_FS,
|
||||
OQS_SIG_alg_picnic_L1_UR,
|
||||
OQS_SIG_alg_picnic_L3_FS,
|
||||
OQS_SIG_alg_picnic_L3_UR,
|
||||
OQS_SIG_alg_picnic_L5_FS,
|
||||
OQS_SIG_alg_picnic_L5_UR};
|
||||
OQS_SIG_alg_picnic_L5_UR,
|
||||
OQS_SIG_alg_qTESLA_I,
|
||||
OQS_SIG_alg_qTESLA_III_size,
|
||||
OQS_SIG_alg_qTESLA_III_speed};
|
||||
if (i >= OQS_SIG_algs_length) {
|
||||
return NULL;
|
||||
} else {
|
||||
@ -31,24 +31,6 @@ OQS_API const char *OQS_SIG_alg_identifier(size_t i) {
|
||||
OQS_API OQS_SIG *OQS_SIG_new(const char *method_name) {
|
||||
if (0 == strcasecmp(method_name, OQS_SIG_alg_default)) {
|
||||
return OQS_SIG_new(OQS_SIG_DEFAULT);
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_I)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_I
|
||||
return OQS_SIG_qTESLA_I_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_III_size)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_III_size
|
||||
return OQS_SIG_qTESLA_III_size_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_III_speed)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_III_speed
|
||||
return OQS_SIG_qTESLA_III_speed_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_picnic_L1_FS)) {
|
||||
#ifdef OQS_ENABLE_SIG_picnic_L1_FS
|
||||
return OQS_SIG_picnic_L1_FS_new();
|
||||
@ -84,6 +66,24 @@ OQS_API OQS_SIG *OQS_SIG_new(const char *method_name) {
|
||||
return OQS_SIG_picnic_L5_UR_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_I)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_I
|
||||
return OQS_SIG_qTESLA_I_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_III_size)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_III_size
|
||||
return OQS_SIG_qTESLA_III_size_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
} else if (0 == strcasecmp(method_name, OQS_SIG_alg_qTESLA_III_speed)) {
|
||||
#ifdef OQS_ENABLE_SIG_qTESLA_III_speed
|
||||
return OQS_SIG_qTESLA_III_speed_new();
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
// EDIT-WHEN-ADDING-SIG
|
||||
} else {
|
||||
|
@ -27,12 +27,6 @@
|
||||
|
||||
/** Algorithm identifier for default SIG algorithm. */
|
||||
#define OQS_SIG_alg_default "DEFAULT"
|
||||
/** Algorithm identifier for qTESLA_I */
|
||||
#define OQS_SIG_alg_qTESLA_I "qTESLA_I"
|
||||
/** Algorithm identifier for qTESLA_III_size */
|
||||
#define OQS_SIG_alg_qTESLA_III_size "qTESLA_III_size"
|
||||
/** Algorithm identifier for qTESLA_III_speed */
|
||||
#define OQS_SIG_alg_qTESLA_III_speed "qTESLA_III_speed"
|
||||
/** Algorithm identifier for picnic_L1_FS */
|
||||
#define OQS_SIG_alg_picnic_L1_FS "picnic_L1_FS"
|
||||
/** Algorithm identifier for picnic_L1_UR */
|
||||
@ -45,6 +39,12 @@
|
||||
#define OQS_SIG_alg_picnic_L5_FS "picnic_L5_FS"
|
||||
/** Algorithm identifier for Picnic_L5_FS */
|
||||
#define OQS_SIG_alg_picnic_L5_UR "picnic_L5_UR"
|
||||
/** Algorithm identifier for qTESLA_I */
|
||||
#define OQS_SIG_alg_qTESLA_I "qTESLA_I"
|
||||
/** Algorithm identifier for qTESLA_III_size */
|
||||
#define OQS_SIG_alg_qTESLA_III_size "qTESLA_III_size"
|
||||
/** Algorithm identifier for qTESLA_III_speed */
|
||||
#define OQS_SIG_alg_qTESLA_III_speed "qTESLA_III_speed"
|
||||
// EDIT-WHEN-ADDING-SIG
|
||||
/** Number of algorithm identifiers above (including default). */
|
||||
#define OQS_SIG_algs_length 10
|
||||
@ -203,8 +203,8 @@ OQS_API OQS_STATUS OQS_SIG_verify(const OQS_SIG *sig, const uint8_t *message, si
|
||||
*/
|
||||
OQS_API void OQS_SIG_free(OQS_SIG *sig);
|
||||
|
||||
#include <oqs/sig_qtesla.h>
|
||||
#include <oqs/sig_picnic.h>
|
||||
#include <oqs/sig_qtesla.h>
|
||||
// EDIT-WHEN-ADDING-SIG
|
||||
|
||||
#endif // __OQS_SIG_H
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <oqs/oqs.h>
|
||||
|
||||
/* Displays hexadecimal strings */
|
||||
static void OQS_print_hex_string(const char *label, const uint8_t *str, size_t len) {
|
||||
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", ((unsigned char *) (str))[i]);
|
||||
@ -29,7 +29,7 @@ void fprintBstr(FILE *fp, const char *S, const uint8_t *A, size_t L) {
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
static OQS_STATUS kem_kat(const char *method_name) {
|
||||
OQS_STATUS kem_kat(const char *method_name) {
|
||||
|
||||
uint8_t entropy_input[48];
|
||||
uint8_t seed[48];
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <oqs/oqs.h>
|
||||
|
||||
/* Displays hexadecimal strings */
|
||||
static void OQS_print_hex_string(const char *label, const uint8_t *str, size_t len) {
|
||||
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", ((unsigned char *) (str))[i]);
|
||||
@ -18,7 +18,7 @@ typedef struct magic_s {
|
||||
uint8_t val[32];
|
||||
} magic_t;
|
||||
|
||||
static OQS_STATUS kem_test_correctness(const char *method_name) {
|
||||
OQS_STATUS kem_test_correctness(const char *method_name) {
|
||||
|
||||
OQS_KEM *kem = NULL;
|
||||
uint8_t *public_key = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user