SHA-256 explained step-by-step visually

Learning and science

cryptography education visualization

SHOW HN2022

1,241points
137comments
#6of 2,570 in 2022
Top 1%of 2022 by points

How HN took it

LovedMost comments that take a side are positive

18 positive, 14 neutral or asking, 1 mixed, 3 critical, out of 36 comments about the project. Thread score +0.42.

Design: 9 for, 2 againstDocs: 4 for, 0 againstExecution: 2 for, 0 againstIdea: 1 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clear, polished visualization that aids understanding

    From 4 comments
    • This is fantastic. I once implemented SHA-256 in Google Sheets to visualize it, but it had horrible performance compared to this. This is the best visualization I've seen yet.
      DJPocari on HN
    • I love single-purpose websites like this that put a potentially complex implementation behind an elegantly simple interface. This website’s design and styling are pretty too :)…
      jonathanyc on HN
    • Fantastic presentation! The utility functions from the source code are just as useful.
      seumars on HN
    • Looks fantastic, but the only thing missing is why each step is done.
      abrookewood on HN
  • Useful for teaching

    From 1 comment
    • Oh this is great. When we taught SHA-256 last semester, we linked to this YouTube video: https://youtu.be/f9EbD6iY9zI. Next time we do it, we'll probably link to both. Having…
      oconnor663 on HN

Objections

  • Padding and chunk chaining are not shown

    From 2 comments
    • Oh this is great. When we taught SHA-256 last semester, we linked to this YouTube video: https://youtu.be/f9EbD6iY9zI. Next time we do it, we'll probably link to both. Having…
      oconnor663 on HN
    • Thanks for the feedback and I am glad you'll use it for teaching (which was the main goal of this project)! The padding part it's briefly explained on the "dynamic" notes on the…
      manceraio on HN
  • Missing explanation of why each step is done

    From 1 comment
    • Looks fantastic, but the only thing missing is why each step is done.
      abrookewood on HN
  • Copy step visualization appears mismatched

    From 1 comment
    • On the third step(?) of the second step, it says "Copy 2nd chunk into 1st 16 words", but it's accompanied by a visualization of copying the 1st chunk into the 1st 16 words. Am I…
      recursive on HN

Requests

  • Add padding and multi-block chaining visualization

    From 1 comment
    • Oh this is great. When we taught SHA-256 last semester, we linked to this YouTube video: https://youtu.be/f9EbD6iY9zI. Next time we do it, we'll probably link to both. Having…
      oconnor663 on HN
  • Explain the reasoning behind each step

    From 1 comment
    • Looks fantastic, but the only thing missing is why each step is done.
      abrookewood on HN
  • Provide a video version

    From 1 comment
    • Can we have a video of this on youtube/dailymotion/vimeo/etc which we can download with yt-dlp?
      sylware on HN

Questions

  • Why these specific rotation and shift constants were chosen

    From 1 comment
    • So, how do people come up with these things? I assume every aspect of the design is carefully considered to defend it against various attacks. For example, why "right rotate 7…
      picture on HN
  • Whether SHA-256 can be inverted or preimage attacks prevented

    From 1 comment
    • I'm also wondering, how does this prevent preimaging attacks (or whatever they're called)? That is to say, what's stopping people from reliably producing output based on input?
      picture on HN

Alternatives named

  • Nayuki's AES and DES Excel walkthroughs

    From 1 comment
    • My way of explaining step by step visually is by implementing in Excel: AES https://www.nayuki.io/page/aes-cipher-internals-in-excel ; DES…
      nayuki on HN
  • sha256-animation terminal visualization

    From 1 comment
    • Similar project which visualizes SHA-256 into terminal: https://github.com/in3rsha/sha256-animation
      ypcx on HN
  • Written Python step-by-step SHA-256 article

    From 1 comment
    • There also exists a written description showing the process in Python, step by step, which I consider more helpful, because you do not need to stop and play the video.…
      y42 on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/30244534)