#include "crypto_sign.h" #include "crypto_verify_32.h" #include "crypto_hash_sha512.h" #include "randombytes.h" #include "ge25519.h" #include "hram.h" #define MAXBATCH 64 int CRYPTO_NAMESPACE(open_batch)( unsigned char* const m[],long long mlen[], unsigned char* const sm[],const long long smlen[], unsigned char* const pk[], unsigned long long num ) { int ret = 0; unsigned long long i, j; shortsc25519 r[MAXBATCH]; sc25519 scalars[2*MAXBATCH+1]; ge25519 points[2*MAXBATCH+1]; unsigned char hram[crypto_hash_sha512_BYTES]; unsigned long long batchsize; for (i = 0;i < num;++i) mlen[i] = -1; while (num >= 3) { batchsize = num; if (batchsize > MAXBATCH) batchsize = MAXBATCH; for (i = 0;i < batchsize;++i) if (smlen[i] < 64) goto fallback; randombytes((unsigned char*)r,sizeof(shortsc25519) * batchsize); /* Computing scalars[0] = ((r1s1 + r2s2 + ...)) */ for(i=0;i