37 if (target == NULL || size <= 0 || step <= 0)
40 for (
int i = 0; i < size; i += step) {
42 memcpy(tmp, target+i,
sizeof(
fr_t));
43 memcpy(target+i, target+i+1,
sizeof(
fr_t));
44 memcpy(target+i+1, tmp,
sizeof(
fr_t));
59 if (target == NULL || size <= 0 || step <= 0)
62 for (
int i = 0; i < size; i += step) {
64 memcpy(&tmp, target+i,
sizeof(
g1p_t));
65 memcpy(target+i, target+i+1,
sizeof(
g1p_t));
66 memcpy(target+i+1, &tmp,
sizeof(
g1p_t));
void varMangle(fr_t *target, size_t size, unsigned step)
swap elements at positions multiple of step. Nondestructive, call a second time to undo the changes
uint64_t fr_t[4]
Subgroup element stored as a 256-bit array (a 4-element little-endian array of uint64_t)....
G1 point in projective coordinates.
void testinit()
Sets a global variable to true if the STDOUT is a terminal. Needs to be done like so because while a ...