Fundamentals of Cryptography

MSc course · AzTU Cybersecurity Department · Fall 2026 · Teaching Assistant: Ali Huseynli

Interactive algorithm explainers

Step-by-step visual walkthroughs of the algorithms covered in lectures. They run in the browser, no installation needed.

Classical ciphers

Classical · shift cipher
Caesar cipher
Shift every letter by k on a cipher wheel, and break it by trying all 26 keys.
Classical · multiply and shift
Affine cipher
c = (a·p + b) mod 26: why a must have no common factor with 26, and how a⁻¹ decrypts.
Classical · polyalphabetic
Vigenère cipher
A key word gives a new shift for every letter: the Vigenère table, and why the repeating key is its weakness.
Classical · one-time pad
Vernam cipher
XOR every bit with a random key: perfect secrecy, and what goes wrong when a key is used twice.
Cryptanalysis · Kasiski 1863
Breaking Vigenère
Repeated pieces give the key length; then every column is a Caesar cipher, broken by letter frequencies.

Stream ciphers

LFSR · building block
LFSR, step by step
Taps, feedback and period; the LFSR as a stream cipher; and how Berlekamp–Massey breaks one LFSR from 2n bits.
A5/1 · GSM
A5/1 interactive demo
How GSM turns a 64-bit key and a frame number into keystream.

Block ciphers

Lecture 04 · DES
DES, the flow
Feistel rounds, the inside of f, S-boxes and the key schedule.
AES · FIPS-197
AES, step by step
SubBytes, ShiftRows, MixColumns, AddRoundKey, the key expansion and diffusion.
PRESENT · lightweight
PRESENT, step by step
The 4-bit S-box, the bit permutation, the 80/128-bit key schedule and diffusion.
Dipper · lightweight SPN–ARX
Dipper, step by step
GIFT S-boxes, word rotations, modular additions with carries, the bit permutation and the key schedule.
Modes · ECB to GCM
Modes of operation, step by step
How a block cipher encrypts a whole message: ECB, CBC, CTR, CFB, OFB and GCM, why an IV is needed, bit errors and four real attacks.

Public-key cryptography

RSA · public key
RSA, step by step
Why public keys exist, the maths behind RSA, real 2048-bit keys, factoring, and the attacks that make padding necessary.
Discrete log · Diffie–Hellman
Discrete log, step by step
Diffie–Hellman, groups and generators, the man in the middle, three ways to attack the log, Pohlig–Hellman and ElGamal.
Coming soon
Digital signatures
RSA and (EC)DSA signatures, signing and verification.