Skip to content
Putting It All Together
step 1/5

Reading — step 1 of 5

Read

~1 min readPutting It Together

Putting It All Together

You've built every piece:

LayerLesson
Bit ops + ROTR1
Endianness2
Constants3
Schedule4
Compression5
Padding6
Merkle-Damgård7
Test vectors8
HMAC9

What we glossed over:

  • SHA-512: same structure but 64-bit words, 80 rounds, different constants.
  • SHA-3 / Keccak: completely different (sponge construction).
  • BLAKE2/3: faster than SHA-256, similar security; tree mode for parallelism.
  • Hardware acceleration: SHA-NI x86 instructions (sha256rnds2, sha256msg1/2) speed it up ~6x. Always-on in modern CPUs.
  • Side-channel hardening: SHA itself is constant-time, but key-dependent code paths around it must also be.

Where SHA-256 is used:

  • Bitcoin (block headers, mining proof-of-work, transaction IDs)
  • Git (object IDs)
  • TLS certificates (signature, fingerprint)
  • HMAC for API request signing
  • Password hashing (NEVER use bare SHA — use bcrypt/scrypt/argon2)

You now understand the function used trillions of times per second worldwide.

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…