Topics in Algebra: Cryptography: Univ.-Prof. Dr. Goulnara ARZHANTSEVA
Topics in Algebra: Cryptography: Univ.-Prof. Dr. Goulnara ARZHANTSEVA
WS 2018
Cryptography principles
Confidentiality / secrecy
Data Integrity
Entity authentication
Non-Repudiation
Non-Repudiation
Cryptography = toolkit
Cryptographic primitive = a basic tool in this toolkit
Examples:
Encryption, hash function, MAC (message authentication code),
digital signature, etc.
?
Encryption key ←→ Decryption key
Symmetric cryptosystem: d = e
Public-key cryptosystem: d cannot be derived from e in a
computationally feasible way
c Univ.-Prof. Dr. Goulnara Arzhantseva Chapter 01: Introduction 11 / 44
Cryptography applications
Securing Internet
WLAN = Wireless Local Area Network
Mobile communications (GSM, etc.)
Payment card transactions
Video broadcasting
Identity Cards
Online Anonimity (Tor, etc.)
Digital currency
File protection
Email security
Messaging security (WhatsApp, Telegram, etc.)
Platform security (iOS, etc.)
c Univ.-Prof. Dr. Goulnara Arzhantseva Chapter 01: Introduction 12 / 44
Breaking encryption algorithms
?
Length ←→ Size
Assumptions:
Assumptions:
In 1 year, 1000 processors testing 1000000 keys per second will test in
total:
∼ 225 · 210 · 220 = 255 keys
Cover time = the time for which a plaintext must be kept secret.
Substitution
Simple Substitution Cipher Vienna −→ Saiffp
Replace each alphabet by another alphabet which is its random
permutation. Key = a permutation of 26 letters. Length = 26
For large enough plaintexts the exhaustive key search is currently not
feasible.
Question 1
Give an example of an application where
(i) entity authentication and data origin authentication are both
required;
(ii) data origin authentication is required but not data integrity.
Question 2
If the given key of a Vigenère Cipher has repeated letters, does it
make it any easier to break?
Question 3
Invent and analyze (length, size, attacks?) an Affine Cipher.
Complexity of multiplication
ak · 2k × cm · 2m , cm =
X X X X
b` · 2` = ak b`
06k 6n−1 06`6n−1 06m62(n−1) k +l=m
230
sec. = 1073.741824 seconds = 17.8956970667 minutes
106
Question 4
How long (in years, days, hours, seconds) it will take 1000000
computers, each processing 1000000 operations per second, to
(1) multiply two 1000-bit numbers together;
(2) perform an exhaustive search for a 128-bit key;
(3) find the correct key (on average) while performing a brute-force
attack on a 128-bit key.
Assumptions:
– the key and the plaintext are independent random variables;
– each key is used for only one encryption.
X
Then: Pr [c = c | p = p] = Pr [k = k ]
{k : p=Dk (c)}
X
Then: Pr [c = c | p = p] = Pr [k = k ]
{k : p=Dk (c)}
Pr [X ] Pr [Y | X ]
Using Bayes’ theorem Pr [X | Y ] = if Pr [Y ] > 0 :
Pr [Y ]
X
Pr [p = p] Pr [k = k ]
{k : p=Dk (c)}
Pr [p = p | c = c] = X
Pr [k = k ] Pr [p = Dk (c)]
{k : c∈C(k )}
Proposition:
TFAE:
1 (P, C, K, E, D) has perfect secrecy;
2 random variables p and c are independent;
3 Pr [c = c | p = p] = Pr [c = c];
4 ∀p1 , p2 ∈ P Pr [c = c | p = p1 ] = Pr [c = c | p = p2 ]
Ek a b
k1 1 2
k2 2 3
k3 3 4
Ek a b
k1 1 2
k2 2 3
k3 3 4
Ek a b
k1 1 2
k2 2 3
k3 3 4
Ek a b
k1 1 2
k2 2 3
k3 3 4
Perfect secrecy implies that ∀i Pr [ki ] = Pr [c], all keys are used with
equal probability. Since there are |K| keys, the probability is 1/|K|.
(⇐) ∀p ∈ P, ∀c ∈ C Pr [c | p] = 1/|K|, hence, we conclude by the
Proposition.
∀p ∈ P, ∀c ∈ C Pr [c | p] = 1/|K|,
Question 5
(1) Does one-time pad remain with perfect secrecy if we reuse the
same key twice?
(2) Has Vigenère Cipher perfect secrecy?
(3) Could we use one-time pads in practice?
Here, x is a plaintext.
Euler’s function φ(n) = the number of positive integers less than n and
relatively prime to n.
n = pq ⇒ φ(n) = (p − 1)(q − 1)
We have that ab = 1 mod φ(n), i.e. ab = tφ(n) + 1 for some t ∈ Z.
n = pq ⇒ φ(n) = (p − 1)(q − 1)
We have that ab = 1 mod φ(n), i.e. ab = tφ(n) + 1 for some t ∈ Z.
(1) Suppose that x ∈ (Z/nZ)∗ , then
n = pq ⇒ φ(n) = (p − 1)(q − 1)
We have that ab = 1 mod φ(n), i.e. ab = tφ(n) + 1 for some t ∈ Z.
(1) Suppose that x ∈ (Z/nZ)∗ , then