Hacker News new | ask | show | jobs
by tptacek 7 days ago
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, 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.

1 comments

Do you mean “simpler” or do you mean “more accurate”? I’m quite willing to accept your explanation as more accurate, but it is not simpler, at least if you don’t know much about modern cryptography. To understand the article, all I needed was some algebra. I think my 13-year-old could mostly get it. To try to understand your second paragraph here, I’ve spent about fifteen minutes so far looking things up (starting with the definition of “block cipher” and ending somewhere about halfway through the Wikipedia article on AES) and I have a sense of its meaning in the abstract, but if there’s a quiz tomorrow I’m in trouble.

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.

Both, I think? There's no way around having to learn about block cryptography, and trying to learn specifically about cryptographic hash functions without learning how a cipher works seems like a bad plan. You get these huge visualizations of the internals of SHA2 or whatever and then attempts to explain every operation in them, most of which are missing the core abstraction those operations were designed around; it's like recapitulating a block cipher from first principles.