Trying to test it out by compiling the sample code, but I get an error:
test.c:4:8: error: initializer element is not constant
struct NtruEncParams params = NTRU_DEFAULT_PARAMS_128_BITS; /*see section "Parameter Sets" below*/
^
test.c:7:1: error: expected identifier or ‘(’ before ‘if’
if (ntru_rand_init(&rand_ctx_def, &rng_def) != NTRU_SUCCESS)
^
test.c:10:1: error: expected identifier or ‘(’ before ‘if’
if (ntru_gen_key_pair(¶ms, &kp, &rand_ctx_def) != NTRU_SUCCESS)
^
the sample code is
#include "ntru.h"
/* key generation */
struct NtruEncParams params = NTRU_DEFAULT_PARAMS_128_BITS; /*see section "Parameter Sets" below*/
NtruRandGen rng_def = NTRU_RNG_DEFAULT;
NtruRandContext rand_ctx_def;
if (ntru_rand_init(&rand_ctx_def, &rng_def) != NTRU_SUCCESS)
printf("rng fail\n");
NtruEncKeyPair kp;
if (ntru_gen_key_pair(¶ms, &kp, &rand_ctx_def) != NTRU_SUCCESS)
printf("keygen fail\n");
Any idea of what to do?
Trying to test it out by compiling the sample code, but I get an error:
the sample code is
Any idea of what to do?