dont do indirection in for batch stuff

This commit is contained in:
cathugger 2020-11-22 10:21:06 +00:00
parent 5b5f414b79
commit 51d87c3857
No known key found for this signature in database
GPG key ID: 9BADDA2DAF6F01A8
19 changed files with 86 additions and 71 deletions

View file

@ -1,13 +1,12 @@
#include "fe25519.h"
#include "ge25519.h"
// assumes inz[] points to things in in[]
// NOTE: leaves in unfinished state
void ge25519_batchpack_destructive_1(bytes32 out[], ge25519_p3 in[], fe25519 *inz[], fe25519 tmp[], size_t num)
void ge25519_batchpack_destructive_1(bytes32 *out, ge25519_p3 *in, fe25519 *tmp, size_t num)
{
fe25519 ty;
fe25519_batchinvert(inz, tmp, inz, num);
fe25519_batchinvert(&in->z, &in->z, tmp, num, sizeof(ge25519_p3));
for (size_t i = 0; i < num; ++i) {
fe25519_mul(&ty, &in[i].y, &in[i].z);