Input
Plain Text
Output
Input
Output
Guide
The left panel controls the active cipher variables, the center panel shows plaintext and encrypted output, and the right panel shows break estimates, key information, and explanatory notes.
This project is designed to compare simple classical ciphers against an asymmetric system. It emphasizes how the calculations work, not just what the final ciphertext looks like.
Caesar shifts every alphabetic character by the same fixed amount. The shift chip displays the key letter where A means shift 0, B means shift 1, C means shift 2, and so on.
Calculation steps:
1. Convert each letter to an index from 0 through 25.
2. Add the selected shift.
3. Wrap around the alphabet with modulo 26.
Formula: encrypted_index = (plain_index + shift) mod 26.
Example with shift 3: A becomes D, B becomes E, X becomes A, and Z becomes C.
Because there are only 25 meaningful shifts, brute force is essentially instant.
Vigenere uses a repeating keyword so the shift changes from character to character.
Calculation steps:
1. Repeat the keyword across the plaintext.
2. Convert each keyword letter into a shift value from 0 through 25.
3. Add that shift to the matching plaintext letter.
4. Wrap around the alphabet with modulo 26.
Formula: encrypted_index = (plain_index + keyword_index) mod 26.
Example with keyword MATH: M gives shift 12, A gives shift 0, T gives shift 19, and H gives shift 7, then the pattern repeats.
Vigenere is stronger than Caesar, but repeated-key structure still leaks patterns that can be analyzed.
RSA is an asymmetric encryption system built from two prime numbers. This demo lets you choose those ramdom primes between 1,000,000 and 1,000,000,000 and then builds the public key and private key from the selected pair.
RSA, or asymmetric encryption, is widely used today for secure communication, certificate systems, digital signatures, and key exchange.
To truly be effective, RSA must use very large prime numbers. That is what makes factoring the modulus infeasible even for supercomputers. This demo intentionally uses much smaller values so the calculations stay readable.
RSA calculation steps:
1. Choose two different primes p and q.
2. Compute n = p x q.
3. Compute phi(n) = (p - 1) x (q - 1).
4. Choose a public exponent e such that gcd(e, phi(n)) = 1.
5. Compute the private exponent d so that (d x e) mod phi(n) = 1.
6. The public key is (e, n) and the private key is (d, n).
Encryption formula: ciphertext = plaintext^e mod n.
Decryption formula: plaintext = ciphertext^d mod n.
In this demo, each character code is encrypted separately and shown as a numeric block so you can see the modular arithmetic more clearly.
Caesar: one constant shift applied to every letter.
Vigenere: a repeating sequence of keyword-derived shifts.
RSA: prime selection, modulus n, Euler totient phi(n), a valid public exponent e, a matching private exponent d, and modular exponentiation for encryption.
That means the project is showing the actual transformation process rather than only showing a label and a final output string.
The estimates on the right are simplified intuition tools. They are not formal cryptographic guarantees.
For Caesar and Vigenere, the estimate is roughly tied to the size of the key search space. For RSA in this demo, the estimate is only a very rough stand-in based on the modulus size and should not be treated as a real-world attack benchmark.
Real security depends on algorithm design, key size, implementation quality, padding schemes, and side-channel resistance, not just on one headline number.