Skip to content

Redraw the AES picture so it makes sense - #72

Merged
ru44 merged 1 commit into
mainfrom
fix/aes-picture
Nov 26, 2026
Merged

ru44 merged 1 commit into
mainfrom
fix/aes-picture

Conversation

@ru44

@ru44 ru44 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

The block-cipher (AES) lesson's picture was two unlabelled towers of squares with a thin red outline on the differing bits, so it was hard to tell what it showed.

Now, at every stage:

  • message A ("hi") sits above message B ("Hi", one bit apart: a capital letter), and each square shows its 0 or 1;
  • a red column marks every bit where A and B differ;
  • a bar counts those bits toward the "half" mark (8 of 16, a well-mixed block);
  • the round's three steps are named between stages (mix in the key, swap each group of 4 bits from a table, shuffle the bits);
  • rounds not run yet are faded instead of leaving empty space;
  • the Arabic layout is mirrored, and numbers are kept out of the Arabic SVG text so they cannot be reordered.

The lesson text in both languages quotes the new numbers (1, 2, 6, 8, 8 bits as rounds go 0→4; 11 and 8 for flip 10 and 15). The Arabic now names the sliders by their Arabic labels instead of «rounds» and «flip». Default flip is 2 so B starts as "Hi"; challenges are still unsolved at the defaults.

Checked in a browser in Arabic (dark) and English (light). pnpm check, type-check, lint and build pass.

The old picture showed two unlabelled towers of squares with a thin red outline
on the differing bits. Now message A ("hi") sits above message B ("Hi", one
bit apart) at every stage, each square shows its 0 or 1, a red column marks
every bit where they differ, and a bar counts them toward half (8 of 16).
The round's three steps are named between stages, rounds not run yet are
faded instead of leaving empty space, and the Arabic layout is mirrored.

The lesson text quotes the new numbers (1, 2, 6, 8, 8) and the Arabic now
names the sliders by their Arabic labels.
@ru44
ru44 merged commit b580e6d into main Nov 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant