You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Symmetric encryption uses a single shared key for both encryption and decryption. It is the workhorse of modern cryptography — fast, efficient, and used to protect the vast majority of data at rest and in transit.
graph LR
subgraph Sender
P1["Plaintext"] --> E["AES Encrypt + Key"]
E --> C1["Ciphertext"]
end
subgraph Receiver
C2["Ciphertext"] --> D["AES Decrypt + Key"]
D --> P2["Plaintext"]
end
Both parties must possess the same secret key. The fundamental challenge is: how do you securely share the key?
| Feature | Block Cipher | Stream Cipher |
|---|---|---|
| Processing | Encrypts fixed-size blocks (e.g., 128 bits) | Encrypts one bit or byte at a time |
| Speed | Slightly slower per byte | Very fast, especially in hardware |
| Use case | File encryption, disk encryption, TLS | Real-time communications, wireless |
| Examples | AES, DES, 3DES, Blowfish | ChaCha20, RC4 (deprecated) |
DES was adopted as a US federal standard in 1977:
DES uses a Feistel structure where each round:
graph TD
L0["L0"] --> XOR["XOR"]
R0["R0"] --> F["F(R0, K1)"]
F --> XOR
R0 --> L1["L1 = R0"]
XOR --> R1["R1 = L0 XOR F(R0, K1)"]
To extend DES's life, 3DES applies DES three times with two or three different keys:
Ciphertext=DES_Encrypt(K3,DES_Decrypt(K2,DES_Encrypt(K1,Plaintext)))AES is the gold standard for symmetric encryption, adopted by NIST in 2001 after a public competition won by the Rijndael algorithm (by Joan Daemen and Vincent Rijmen).
| Property | Value |
|---|---|
| Block size | 128 bits |
| Key sizes | 128, 192, or 256 bits |
| Rounds | 10 (128-bit), 12 (192-bit), or 14 (256-bit) |
| Structure | Substitution-permutation network (SPN) |
Each AES round performs four operations:
graph TD
P["Plaintext"] --> A0["AddRoundKey (initial)"]
A0 --> R["SubBytes / ShiftRows / MixColumns / AddRoundKey (x 9/11/13 rounds)"]
R --> SB["SubBytes"]
SB --> SR["ShiftRows"]
SR --> AF["AddRoundKey (final)"]
AF --> C["Ciphertext"]
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.