Session 2
Session 2
Session 2
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 1 / 15
Outline
3 Cryptanalysis
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 2 / 15
Classification of the field of Cryptology
Cryptology
Cryptography Cryptanalysis
Stream Block
Ciphers Ciphers
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 3 / 15
Basics of Symmetric Cryptology
Trudy
(bad)
y y
Alice x Encryption Unsecured channel Decryption x Bob
(good) e() d() (good)
K K
Secured Channel
Key generator
Encryption: 𝑦 = 𝑒 𝐾 (𝑥)
Decryption: 𝑥 = 𝑑 𝐾 (𝑦)
If same keys are used for encryption and decryption:
𝑑 𝐾 (𝑦) = 𝑑 𝐾 (𝑒 𝐾 (𝑥)) = 𝑥
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 5 / 15
Cryptanalysis
Cryptanalysis
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 6 / 15
Cryptanalysis
Cryptanalysis Classification
Cryptanalysis
Mathematical Brute-Force
Analysis Attack
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 8 / 15
Cryptanalysis
Substitution cipher
Historical cipher
Example for understanding Brute-force and analytical attacks
Encrypts letter rather than bits
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 9 / 15
Cryptanalysis
Example
Ciphertext:
Brute-forte Attack?
Analytical attack?
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 10 / 15
Cryptanalysis
Example
Brute-forte attack: 240 per seconds − > How much time to break the
code?
Analytical: frequency counts
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 11 / 15
Historical cipher system
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 12 / 15
Historical cipher system
plaintext = ictlab
ciphertext = lfwode
What is the rule?
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 13 / 15
Historical cipher system
Let 𝑘, 𝑥, 𝑦 ∈ 0, 1, ..., 25
Encryption: 𝑦 = 𝑒 𝑘 (𝑥) ≡ (𝑥 + 𝑘) mod 26
Decryption: 𝑥 = 𝑑 𝑘 (𝑥) ≡ (𝑦 − 𝑘) mod 26
Question:
Keyspace = ?
Is it secure? (Any attack is possible?)
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 14 / 15
Historical cipher system
Affine Cipher
Nguyen Minh Huong (ICT Department, USTH) ICT Course: Introduction to Cryptography December 26, 2022 15 / 15