Introduction To Cryptography and Data Security: 1.1 Literature Recommendations
Introduction To Cryptography and Data Security: 1.1 Literature Recommendations
Security
Course Textbook:
Introduction to Cryptography with Coding Theory. Wade Trappe and Lawrence C. Wash-
Reference Books:
2. Cryptography: Theory and Practice. Doug Stinson. Chapman & Hall/CRC, 3rd
Edition.
2
1.2 Overview
• Private-Key Cryptography:
• Public-Key Cryptography:
In 1976 the first public-key cryptographic scheme was introduced by Diffie-Hellman key ex-
change protocol.
• Hybrid Approach:
In current cryptographic protocols, very often hybrid schemes are are applied which use both
Sometimes these schemes are also referred to as symmetric, single-key and secret-key approaches.
Problem Statement:
Alice and Bob want to communicate over an unsecure channel, e.g. computer network or satellite
link. They want to prevent Oscar, the bad guy, from listening.
Solution:
Use of private-key cryptosystems, which have been around since BC, such that if Oscar reads the
encrypted version y of the message x over an unsecure channel, he will not be able to understand
its content.
• eki and dki are inverse functions : dki (y) = dki (eki (x)) = x for all ki ∈ K
1.4 Cryptanalysis
Definition: The science of recovering the plaintext x from the ciphertext y without the knowledge
1. Oscar knows the cryptosystem, i.e. the encryption and decryption algorithms. Hence, the
security of the cryptosystem does not depend on the obscurity of the algorithm.
2. Oscar does not know the key and the security of the cryptosystem depends on the secrecy of
the key.
1. Ciphertext-Only Attack
Oscar’s knowledge: some pairs (x1 , y1 = ek (x1 )), (x2 , y2 = ek (x2 )) . . . of which he can choose
x1 , x 2 , . . .
Oscar’s knowledge: some pairs (x1 , y1 = ek (x1 )), (x2 , y2 = ek (x2 )) . . . of which he can choose
y1 , y 2 , . . .
Modulo Operation:
Definition: Let a, r, m ∈ Z where Z is the set of all integers, 0 ≤ r < m and m > 0. If m divides
a − r, we write
r = a mod m
or
r ≡ a (mod m)
a − r = q · m, a ≡ r (mod m).
Example:
For a = 42 and m = 9
r := 42 mod 9 returns r = 6.
r = 42 % 9 returns r = 6,
• a + b ≡ c (mod m) where c ∈ Zm
• a × b ≡ d (mod m) where d ∈ Zm
Example: m = 9
Z9 = {0, 1, 2, 3, 4, 5, 6, 7, 8}
6 + 8 = 14 ≡ 5 (mod 9)
6 × 8 = 48 ≡ 3 (mod 9)
1. The additive identity is the element zero “0”, i.e. a + 0 ≡ a (mod m) for any a ∈ Zm .
2. The additive inverse “−a” of “a” is such that a + (−a) ≡ 0 (mod m) for any a ∈ Zm .
6. The multiplicative identity is the element one “1”, i.e. a × 1 ≡ a (mod m) for any a ∈ Zm .
7. The multiplicative inverse “a−1 ” of “a” is such that a × a−1 ≡ 1 (mod m), and an element
• Roughly speaking, a ring is a mathematical structure in which we can add, subtract, multiply
• Definition: If gcd(a, m) = 1, then a and m are “relatively prime” and the multiplicative
Examples:
Example: 38 mod 7 =?
3. The ring Zm , and thus the integer arithmetic with the modulo operation, is of central
integers are represented in a ring Zm where m is typically at least 1024 bits in length.
10
Remember:
Idea: In block ciphers, the message string is divided into blocks (or cells) of equal length and each
all blocks.
11
Shift ciphers are one of the simplest ciphers. In shift ciphers, the letters of the alphabet are assigned
A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25
Let P = C = K = Z26 , x ∈ P, y ∈ C, k ∈ K .
Remark:
Example:
k = 17,
plaintext:
X = x1 , x 2 , . . . , x 6 = A T T A C K .
encryption:
y1 = x1 + k mod 26 = 0 + 17 mod 26 = 17 = R.
y2 = y3 = 19 + 17 mod 26 = 10 = K.
12
y4 = 17 = R.
y5 = 2 + 17 mod 26 = 19 = T .
y6 = 10 + 17 mod 26 = 1 = B.
ciphertext: Y = y1 , y2 , . . . , y6 = R K K R T B .
1. Ciphertext-Only: Try all possible keys (|K| = 26). This is known as “brute force attack ” or
“exhaustive search”. Note that secure cryptosystems require a sufficiently large key space.
The minimum requirement today is |K| > 280 , however for long-term security |K| ≥ 2100 is
recommended.
2. In shift ciphers, the same plaintext maps into the same ciphertext, and therefore it can easily
Let P = C = Z26 .
˙ − b) mod 26 .
• decryption: x = a−1 (y
• restriction: gcd(a, 26) = 1 in order for the affine cipher to work since a−1 does not
always exist.
Answer: a−1 = a11 mod 26 (the proof for this will be covered in Chapter 6) or by trial-and-error