Functional Cryptography Game

Pig Pen

One Time Pad

Periodic Cipher

Functional History of Cryptography

A Functional Journey Through Cryptography

Welcome! This interactive page explores the history of secret messages using JavaScript to perform real encryption and decryption for some classic ciphers.

1. Ancient Rome: The Caesar Cipher

Used by Julius Caesar, this cipher shifts each letter by a fixed number of places (the key). Try encrypting and decrypting your own messages!

Challenge 1: Implement Caesar Cipher

Result:

2. Beyond Caesar: Monoalphabetic Substitution

Each letter is consistently replaced by another letter according to a secret key map. This example uses a fixed key for demonstration.

Fixed Key Used:
A=Q, B=W, C=E, D=R, E=T, F=Y, G=U, H=I, I=O, J=P, K=A, L=S, M=D, N=F, O=G, P=H, Q=J, R=K, S=L, T=Z, U=X, V=C, W=V, X=B, Y=N, Z=M

Implementing user-defined keys is possible but adds complexity.

Challenge 2: Use Monoalphabetic Cipher

Result:

3. The "Unbreakable" Cipher: Vigenère

Uses a keyword to apply multiple Caesar shifts, making it resistant to simple frequency analysis. Enter your text and a keyword.

Challenge 3: Implement Vigenère Cipher

Result:

4. Mechanical Marvels and the Digital Age

The Enigma machine (WWII) and modern algorithms like AES and RSA represent further leaps in complexity. Implementing these accurately requires specialized libraries and is beyond the scope of this simple demonstration.

Key Concepts:

  • Symmetric Key (AES): Same key for encryption/decryption. Fast.
  • Asymmetric Key (RSA): Public key to encrypt, private key to decrypt. Secure key exchange.

Modern cryptography relies on deep mathematical principles and computational security.

Experiment with the ciphers above! Notice how complexity increases. Modern crypto secures our digital world.

References / More Information:

Brought to you by RiteUpAI