#include #include #include #include "../xmss_fast.h" #define MLEN 3491 #define SIGNATURES 256 unsigned char sk[100]; unsigned char pk[64]; unsigned char mi[MLEN]; unsigned long long smlen; unsigned long long mlen; int main() { int r; unsigned long long i; int m = 32; int n = 32; int h = 8; int w = 16; int k = 2; xmss_params p; xmss_params *params = &p; xmss_set_params(params, m, n, h, w, k); // TODO should we hide this into xmss_fast.c and just allocate a large enough chunk of memory here? unsigned char stack[(h-k-1)*n]; unsigned int stackoffset = 0; unsigned char stacklevels[h-k-1]; unsigned char auth[h*n]; unsigned char keep[(h >> 1)*n]; treehash_inst treehash[h-k]; unsigned char th_nodes[(h-k)*n]; unsigned char retain[((1 << k) - k - 1)*n]; bds_state s; bds_state *state = &s; for(i=0;iwots_par.keysize+h*n; unsigned char mo[MLEN+signature_length]; unsigned char sm[MLEN+signature_length]; FILE *urandom = fopen("/dev/urandom", "r"); for(i=0;i