All Labs

Cybersecurity Lab

Investigate how encryption algorithms protect data and what makes them vulnerable. Run brute force simulations, measure crack times for different key lengths, test password strength, and observe the avalanche effect in hash functions.

Guided Experiment: Cracking Caesar

How many attempts will it take to crack a Caesar cipher? Can you predict why this cipher is considered insecure?

Write your hypothesis in the Lab Report panel, then click Next.

Brute Force Simulation

Click Run to start the brute force simulation

The simulation will attempt to crack the cipher and measure timing

Controls

Simulation Trials6

Security Analysis

Keyspace Size
26
Key Length
1 chars
Keyspace=26\text{Keyspace} = 26

Password Strength

Enter a password above to analyze its strength

Avalanche Effect

Original
"HELLO WORLD"
Flipped (1 bit)
"IELLO WORLD"
Hash 1
7dc4eddc045171c89b69562868d773d8008be5f0d998efc8e771779064837758
Hash 2
c6b900f84b780162a74585d443f29cc89b0ca590b38a8d18c8bb991863202d48
121 / 256 bits changed
(47.3% — ideal is ~50%)

Data Table

(0 rows)
#TrialCipherKey LengthTime to Crack(ms)Keyspace SizeSecurity Rating
0 / 500
0 / 500
0 / 500

Reference Guide

Symmetric vs Asymmetric Encryption

Symmetric encryption (Caesar, Vigenère, AES) uses the same key for encryption and decryption. Both parties must share the key securely.

Asymmetric encryption (RSA) uses a public/private key pair. Anyone can encrypt with the public key, but only the private key holder can decrypt. This solves the key distribution problem.

Password Entropy

Entropy measures the unpredictability of a password. Higher entropy means more possible combinations and longer brute force crack times.

H=L×log2(N)H = L \times \log_2(N)

Where L is the password length and N is the character set size (26 for lowercase, 62 for alphanumeric, 95 for all printable ASCII). A password with 80+ bits of entropy is considered strong.

Brute Force Complexity

A brute force attack tries every possible key until finding the correct one. The number of keys to try is the keyspace size.

Keyspace=NL\text{Keyspace} = N^{L}

For a Vigenère cipher with alphabet size 26 and key length L, the keyspace grows exponentially. This is why longer keys provide dramatically better security.

Hash Functions

A hash function maps input of any size to a fixed-size output (the hash or digest). Good hash functions have the avalanche property: changing a single bit in the input changes roughly 50% of the output bits.

Hashes are one-way: you cannot recover the input from the hash. They are used for password storage, digital signatures, and data integrity checks. Common algorithms include SHA-256 and BLAKE2.