Chopped, Stored, Secured – The Story of the Hash Function
0xkrt26.github.io
Chopped, Stored, Secured – The Story of the Hash Function
1–10 of 18 posts
Re: Chopped, Stored, Secured – The Story of the Hash Function
#2Everything gets tweaked differently because you have different constraints and parameters for a hash function than for a block cipher (though: there were SHA3 contestants that used Rijndael/AES for the core permutation, which is attractive because it has broad hardware support), but the core doodads are basically the same.
(And of course, you can run this argument in reverse and derive a cipher from a hash function trivially. That's how Chapoly happened.)
Re: Chopped, Stored, Secured – The Story of the Hash Function
#3Considering that everything I have personal knowledge of here is obviously bunk, best ignore the rest of it too
Re: Chopped, Stored, Secured – The Story of the Hash Function
#4The right way to understand modern general-purpose cryptographic hash functions (like SHA2) is just to understand block ciphers. A hash function is a block cipher's permutation core, wired to a "compression" function (much simpler than compression as typically understood; somewhat analogous to the chaining CBC does) that feeds blocks through the same permutation continuously, scrambling state as it goes. Everything g…
I have a decent intuition for what a hash function does after twenty years of encountering them in the wild. I don't even know what a block cipher is. I understand hash functions less after reading this than I did before. My conclusion is that a hash function is just a block cipher in the category of endofunctors.
Re: Chopped, Stored, Secured – The Story of the Hash Function
#5The right way to understand modern general-purpose cryptographic hash functions (like SHA2) is just to understand block ciphers. A hash function is a block cipher's permutation core, wired to a "compression" function (much simpler than compression as typically understood; somewhat analogous to the chaining CBC does) that feeds blocks through the same permutation continuously, scrambling state as it goes. Everything g…
> just to understand block ciphers I have a decent intuition for what a hash function does after twenty years of encountering them in the wild. I don't even know what a block cipher is. I understand hash functions less after reading this than I did before. My conclusion is that a hash function is just a block cipher in the category of endofunctors.
Re: Chopped, Stored, Secured – The Story of the Hash Function
#6Earlier quoted context omitted.
> just to understand block ciphers I have a decent intuition for what a hash function does after twenty years of encountering them in the wild. I don't even know what a block cipher is. I understand hash functions less after reading this than I did before. My conclusion is that a hash function is just a block cipher in the category of endofunctors.
You know what they do , right, that's what you mean by having an intuition for them? Do you understand how they work? Why they're designed the way they are? I'm not saying you need to, but that's what the article is about.
Re: Chopped, Stored, Secured – The Story of the Hash Function
#7Earlier quoted context omitted.
You know what they do , right, that's what you mean by having an intuition for them? Do you understand how they work? Why they're designed the way they are? I'm not saying you need to, but that's what the article is about.
I read and understood the article, including the math in it, then came here (I know, that’s the wrong order) and read your comment, and promptly decided I knew less than I did before I started. It was very much like learning to use a monad in Haskell without knowing category theory, and then reading an article about them. Just because you understand an article written for the educated general public doesn’t mean you…
The job of a modern block cipher core is to take a (heavily) iterated function, figure out how to apply a single input key securely to each of those iterated rounds, thoroughly combining the key with the block of data, achieving indistinguishability from random as quickly into the sequence of rounds as possible (in the same kind of simple step process as a Rubik's Cube), while breaking structure (like linearity) that would solve for the key or the data mathematically.
Re: Chopped, Stored, Secured – The Story of the Hash Function
#8Re: Chopped, Stored, Secured – The Story of the Hash Function
#9Re: Chopped, Stored, Secured – The Story of the Hash Function
#10Earlier quoted context omitted.
I read and understood the article, including the math in it, then came here (I know, that’s the wrong order) and read your comment, and promptly decided I knew less than I did before I started. It was very much like learning to use a monad in Haskell without knowing category theory, and then reading an article about them. Just because you understand an article written for the educated general public doesn’t mean you…
Yeah, I'm not vouching for the article, just saying my response to it was that the simpler explanation for cryptographic hash functions is that they're a specialized application of a block cipher core. The job of a modern block cipher core is to take a (heavily) iterated function, figure out how to apply a single input key securely to each of those iterated rounds, thoroughly combining the key with the block of data,…
If you really were going for “simpler” rather than “more accurate” then I regret to inform you that you have joined the “monoid in the category of endofunctors” guy in room 2501 of the xkcd building.