Crypto playground
Cryptography is just arithmetic on bits and bytes. Try each simulator below to see how messages get scrambled and encoded — then use real AES-256, SHA-256 and RSA-2048 running live in your browser.
Crypto cheat sheet — purpose, key size, speed, when to use →AES, SHA-256 and RSA in plain English
Three tools do most of the work in modern security: one locks data with a shared key, one fingerprints data, and one lets strangers exchange secrets safely. Here is what each one actually does.
AES (Advanced Encryption Standard) scrambles data using a single secret key. Anyone with that key can unscramble it; anyone without it sees noise. It works on 16-byte blocks, repeatedly substituting bytes, shuffling rows, mixing columns and mixing in key material — 14 rounds for a 256-bit key. Each round spreads every input bit across the whole block, so one changed letter changes the entire ciphertext.
Where the key comes from: a password is not a key. A function like PBKDF2 stretches your password with a random salt and many thousands of repetitions to produce a proper 256-bit key, which also makes guessing slow.
Why GCM: the "GCM" mode adds an authentication tag. If anyone flips a single bit of the ciphertext, decryption fails loudly instead of returning garbage. It also uses a random IV so encrypting the same message twice gives different output.
Use it for: files, database fields, messages — anywhere both sides can share a secret.
SHA-256 turns any input — one letter or a whole film — into exactly 256 bits (64 hex characters). It is not encryption: there is no key and no way back. The same input always gives the same digest, and it is computationally infeasible to find a different input with the same digest.
The avalanche effect: change one bit of the input and roughly half of the 256 output bits flip. That is what makes a hash a reliable integrity check — a download that has been tampered with will not match.
Passwords: raw SHA-256 is too fast for storing passwords. Real systems use deliberately slow, salted functions like bcrypt, scrypt or Argon2 built on similar ideas.
Use it for: verifying downloads, signing data, blockchain proofs, deduplicating files.
RSA gives you a key pair. The public key can be handed to anybody and only locks data; the private key stays with you and is the only thing that unlocks it. That solves the problem AES cannot: talking securely to someone you have never met and never shared a secret with.
Why it is hard to break: the public key contains a huge number that is the product of two large primes. Multiplying primes is easy; splitting a 2048-bit product back into its primes is not, and factoring it is what an attacker would need to do.
Signatures too: use the keys the other way round — sign with the private key, and anyone can verify with the public key that the message came from you and was not altered.
In practice: RSA is slow and can only encrypt small payloads, so HTTPS uses it (or its faster cousin, elliptic curve) just to agree on an AES key, then AES carries the actual traffic.
Use it for: key exchange, certificates, digital signatures, secure email.
1. The site presents a certificate; your browser checks its signature — public-key cryptography, verified with a hash.
2. Both sides agree on a fresh shared key without ever sending it in the clear — asymmetric work.
3. Every byte of the page is then encrypted with AES-GCM, whose authentication tags rely on hashing to prove nothing was tampered with.