distaff
distaff copied to clipboard
Add assembly instruction for hashing long sequences of values
Current hash
instructions allow hashing between 1 and 4 field elements. Hashing of more than 4 elements is possible but requires the user to manually calculate the number of hash
instructions needed. Ideally, we should have a single digest.n
instruction which can be used to hash arbitrarily many elements.
Do we need to make an upper limit for the n number?
I don't think it matters too much (if the user wants to hash GBs of data they should be able to) - but I think we can put a limit on n to make sure it fits in a 32 bit integer.