About Encryption Algorithm Simulator
The browser's own cryptography is the right thing to encrypt with and the wrong thing to learn from, because it takes a key and returns a result and shows nothing in between. These implementations do the opposite and expose every intermediate value, which also makes them unfit for protecting anything.
Four algorithms are laid open here. A block cipher turns sixteen bytes into sixteen other bytes through ten rounds of four operations, and each of those forty-odd states is shown as the grid the specification describes, with the bytes that changed picked out. A hash function grinds sixty-four rounds over eight working variables, and the table of them makes visible something a definition rarely conveys: only two of the eight are recomputed each round, and the rest merely shift along. The two number-theory constructions run on values small enough to check on paper.
Seeing the substitution table derived rather than printed is worth the visit on its own. It is usually presented as a magic square of 256 hex values to be copied into a source file, which invites the belief that the designers picked them by taste. They did not: each entry is the multiplicative inverse of its index in a finite field, followed by a fixed affine transformation, and both halves have a purpose — the inverse is highly non-linear, and the affine step removes the fixed points that a bare inverse would leave. This page computes the table from that definition at load, so what you see is the construction, not a transcription.
The two public-key pieces use deliberately tiny numbers. Multiplying two primes of two digits each gives a modulus a person can factor in their head, and that is the point: every step from the primes to the private exponent is arithmetic you can follow, and the only thing separating this from a real key is the size of the numbers. The key-agreement view makes the same trade, and shows the property that surprises people the first time — two parties end up holding the same number without either of them ever sending it, and a watcher who saw every message cannot compute it.
A warning belongs on the page and is repeated here. These implementations branch on secret data, allocate as they go and make no attempt at constant-time behaviour, so their timing leaks what they are working on. They have no padding scheme, no authentication, no nonce discipline and no key management. Textbook RSA, which is what the third view shows, is deterministic and therefore not safe for real messages even at a proper key size. Anything that needs to actually protect something belongs in the Text Encryptor, which calls the browser's audited implementation.
What makes the difference between a teaching implementation and a wrong one is testing against the published answers, which is how these are held in place. The block cipher reproduces the worked example in the federal standard, including its round keys and the intermediate states of the first round. The hash reproduces three published digests, including the empty message. The key agreement is checked to reach the same secret from both sides across a hundred pairs of private values. A change that broke any of them would fail the test suite before it reached this page.