4 ms·
The post uses the term "internal state" pretty early on(initialize internal state, etc) and continues to reference it frequently for the algorithmic steps but n
by bogomipz 10y ago
The post uses the term "internal state" pretty early on(initialize internal state, etc) and continues to reference it frequently for the algorithmic steps but nowhere is "internal state" defined. Can someone explain to me what this "internal state"?
- psyc 10y agoInternal 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.)
- ArashPartow 10y ago@bogomipz: The explanation provided by psyc is spot on. Please do note that I've updated the article with explanations for both 'Internal State' and the corresponding 'Finalize' process.