Skip to content
Mario Ciavarella
Back to projects

AES.js

Encrypt something, then take the result apart — what a mode does to a picture, and what the cipher does to a single block, step by step.

v0.1.0Aug 2026

View repository

JavaScript · Node.js

Everything below runs on AES.js — the cipher written out in JavaScript, not handed to the browser's own.

Seal a message

A message and a password make one sealed string. Only that password opens it again. Paste a sealed string back into the box, or pick the file, and it opens instead of sealing.

Input

Your message and password stay in the page: the work runs in a worker, off the main thread.

A mode decides what one block knows about the last one. Here the same picture is encrypted twice, with the same key, under two of them.

Under the microscope

Sixteen bytes in a 4×4 grid, filled column by column. Whatever the last step changed lights up.

block · key

State

Round key

Diffusion