You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often write padw padw padw to initialize the hasher state on the stack. It would make the code easier to read and maintain if instead we had hasher::initialize.
Ideally we would have a initializer for each of the supported hashers in the stdlib. And a procedure to take care of initialize the state if the input requires padding.
The text was updated successfully, but these errors were encountered:
The no-padding case is pretty simple to handle (as you have done in #1313). The case when the number of elements is not a multiple of 8 (i.e., not a multiple of the rate), is more tricky and will actually differ between RPO and RPX. But the procedure could look something like:
The idea is that it will take the number of elements to hash as input, set up the initial state correctly, and then return the state together with the number of permutations needed to hash the inputs. This num_permutations can then be used for a condition of a loop to absorb the input into the state (which we frequently do in practice).
We often write
padw padw padw
to initialize the hasher state on the stack. It would make the code easier to read and maintain if instead we hadhasher::initialize
.Ideally we would have a initializer for each of the supported hashers in the stdlib. And a procedure to take care of initialize the state if the input requires padding.
The text was updated successfully, but these errors were encountered: