#include #include #include "../xmss.h" #define MLEN 3491 #define SIGNATURES 1024 unsigned char mi[MLEN]; unsigned long long smlen; unsigned long long mlen; int main() { int r; unsigned long long i,j; int m = 32; int n = 32; int h = 20; int d = 5; int w = 16; xmssmt_params p; xmssmt_params *params = &p; xmssmt_set_params(params, m, n, h, d, w); unsigned char sk[(params->index_len+2*n+m)]; unsigned char pk[2*n]; unsigned long long signature_length = params->index_len + m + (d*params->xmss_par.wots_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;iindex_len+m+n+i]) printf("pk.pub_seed != sk.pub_seed %llu",i); } printf("pk checked\n"); unsigned int idx_len = params->index_len; // check index unsigned long long idx = 0; for(i = 0; i < idx_len; i++){ idx |= ((unsigned long long)sk[i]) << 8*(idx_len - 1 - i); } if(idx) printf("\nidx != 0: %llu\n",idx); for(i=0;i