The other variable currently uses BigInteger before being converted to an Int32:
for (int i = 0; i < delta; i++) {
IntsToBlock(idxBlock, t, m, i);
Hash(idxBlock, counter++, salt, idxBlock);
var other = new BigInteger(idxBlock, isUnsigned: true, isBigEndian: false) % spaceCost;
Hash(buffer[m], counter++, buffer[m], buffer[(int)other]);
}
This is done for interoperability with existing implementations, but it seems preferable to use UInt64 like everywhere else. However, this would mean all implementations would have to be updated in line with the draft.
The
other
variable currently usesBigInteger
before being converted to anInt32
:This is done for interoperability with existing implementations, but it seems preferable to use
UInt64
like everywhere else. However, this would mean all implementations would have to be updated in line with the draft.