scReduce

fnubyte[32] scReduce(scope const ref ubyte[64] w) nothrow @trusted @nogc

Reduces a 512-bit little-endian integer modulo the group order.

A fixed 260-iteration shift-subtract division: the shifted order starts at L << 259 and walks down to L, conditionally subtracting at every step. The iteration count depends only on the operand width, never on the value.

Parameters

wLittle-endian 64-byte value to reduce.

Returns

w mod L as 32 little-endian bytes.