3 ms·
Internal state is typically a small-ish bag of bits that mixes, and gets mixed deterministically, as the hash mechanism is used. See the internals of the Mersen
by psyc 10y ago
Internal state is typically a small-ish bag of bits that mixes, and gets mixed deterministically, as the hash mechanism is used. See the internals of the Mersenne Twister[0] for an example/analogy.
[0] https://en.wikipedia.org/wiki/Mersenne_Twister#Initialization https://en.wikipedia.org/wiki/Mersenne_Twister#Initializatio...
- bogomipz 10y agoThanks for the explanation and link. This makes total sense. Cheers.
- demerphq 10y agoIt is only small in older hashes. Modern hashes tend to have a state larger than both the seed and the input block. See: https://github.com/demerphq/smhasher/blob/master/HashAnatomy.md https://github.com/demerphq/smhasher/blob/master/HashAnatomy... It actually turns out there are performance benefit by having a larger seed, but not too large. (If you think about it this makes sense consider how many bits you can change with an average combining operation, and with a worse case combining operation.)