How Does SHA-256 Work?
learnmeabitcoinRecommended by 3 HN commenters across 3 months, 2020–2022
explainer · intermediate · evergreen · 2020–2022 on HN
A step-by-step animated explanation of how SHA-256 works, from padding and message schedule to the compression function and final hash, with source code for the animations.
Commenters call it clear enough to implement the algorithm from, and teachers use it in courses.
Up next
3 mo on HNNardwuar vs. N.E.R.D - The Extended Version
NardwuarServiette
Recommended 3× on HN · 2019–2023
2 mo on HNEEVblog 1547 (Part 1) - Contacting the Voyager 2 Space Probe
EEVblog
Recommended 2× on HN · 2023–2024
5 mo on HNHow Far Are The Nearest Stars?
Cody'sLab
Recommended 3× on HN · 2019–2025
14 mo on HNLEADERSHIP LAB: The Craft of Writing Effectively
UChicago Social Sciences
Recommended 15× on HN · 2019–2026
1 mo on HNWhy is light slower in glass? - Sixty Symbols
Sixty Symbols
Recommended 1× on HN · 2018–2021
2 mo on HNPinging The Voyager 2 Probe (PART 2)
EEVdiscover
Recommended 2× on HN · 2018–2023
9 mo on HNWhy Japan Looks the Way it Does: Zoning
Life Where I'm From
Recommended 8× on HN · 2021–2026
11 mo on HNWhat Bodies Think About: Bioelectric Computation Outside the Nervous System - NeurIPS 2018
The Artificial Intelligence Channel
Recommended 12× on HN · 2018–2024
11 mo on HNBehind the Scenes of iOS Security
Black Hat
Recommended 9× on HN · 2016–2026
11 mo on HNWhy Electronic Voting Is Still A Bad Idea
Tom Scott
Recommended 11× on HN · 2020–2026
11 mo on HNBut how does bitcoin actually work?
3Blue1Brown
Recommended 15× on HN · 2017–2024
8 mo on HNDiffie-Hellman Key Exchange
Art of the Problem
Recommended 9× on HN · 2016–2024
4 comments from Hacker News
I found this video to be an excellent explanation and sufficient to implement the algorithm: ▶ this video Code: link This site contains a nice visualization: link
Oh this is great. When we taught SHA-256 last semester, we linked to this YouTube video: ▶ this video . Next time we do it, we'll probably link to both. Having several different ways to visualize the same thing is very helpful, and I like that this one moves quickly. A couple of details missing from this visualization are how you pad a message to be a multiple of the block size, and how you chain blocks together to form a longer message. In the pseudocode at link , that's the "Pre-processing (Padding)" part and the "for each chunk" loop just below it. I get why you'd want to leave those things out, since they're not really the interesting part, and the screen is already pretty packed as it is. If anyone's feeling curious about implementing this yourself, take a look at these project notes: link . At some point I'll clean that up for public consumption, but for now just ignore the parts about grades and cheating :)
Here's the author doing an in-depth explanation of how SHA-256 works using this code: ▶ this video I'm halfway through, but looks very well done, thanks!
This looks great, though it requires quite sometime to go through it (and figure out what could possibly be understood by someone with knowledge of programming and bit wise operators, and what can just be skipped because it’s something only cryptographers can understand). If someone were to make a slower video explaining it with all the sections from this dissection, that’d be even more awesome. Edit: Seems like the author created a video for this — ▶ this video (thanks to 1_player’s comment at link ) On a tangent, here’s an animation (by someone else) explaining AES encryption — link (thanks to harrigan’s comment at link )