distaff icon indicating copy to clipboard operation
distaff copied to clipboard

Add assembly instruction for hashing long sequences of values

Open bobbinth opened this issue 3 years ago • 2 comments

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.

bobbinth avatar Aug 16 '20 16:08 bobbinth

Do we need to make an upper limit for the n number?

xz-cn avatar Aug 18 '20 05:08 xz-cn

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.

bobbinth avatar Aug 18 '20 07:08 bobbinth