While most of us use hash functions on a daily basis, few people can say that they truly understand what’s actually going on when they call SHA2("hello world"). Even fewer can say they’ve bothered to implement the function themselves, considering every introduction to cryptography starts off with a big warning saying to never, ever implement cryptographic primitives and just use vetted libraries due to the security implications. Of course, that important warning didn’t stop me from digging into the FIPS 180-4 spec (http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf) to scratch the itch to understand how exactly it works, and along the way get a much better intuition about what bitwise operators actually do, what a bit rotation is, and why hex notation actually matters.