Lecture 5 - Cryptography II

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/126

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

127 Terms

1
New cards

Crypto goals

Cryptography aims for confidentiality, integrity, and authentication over insecure channels.

2
New cards

Kerckhoffs’ Principle

Cryptosystems remain secure even when everything except the key is public; no security through obscurity.

3
New cards

Number theory foundation

Primes, FTA, gcd/lcm, modular arithmetic underpin modern cryptography.

4
New cards

Ring Zm

Arithmetic modulo m forms a ring (addition, multiplication closed mod m).

5
New cards

Multiplicative inverses in Zm

An element a has an inverse mod m iff gcd(a, m) = 1.

6
New cards

Group relevance

Groups (especially Z*_p) structure modern cryptographic algorithms.

7
New cards
8
New cards

Cyclic group definition

A group G is cyclic if it has an element of order |G|; this element is a generator.

9
New cards

Generator α property

Every element g in G can be expressed as α^i for some integer i.

10
New cards

Infinite cyclic group example

(Z, +) is cyclic and infinite, generated by 1 or –1.

11
New cards

Finite cyclic group example

(Z/nZ, +) is cyclic of order n, generated by [1] or any [k] with gcd(k,n)=1.

12
New cards

Non-cyclic example

The multiplicative group modulo 8 (Z*₈ = {1,3,5,7}) has no generator.

13
New cards

Shift & Affine recap

Classic symmetric ciphers good for intuition but insecure in real-world applications.

14
New cards
15
New cards

Symmetric cipher idea

A single shared secret key is used for both encryption and decryption.

16
New cards

Symmetric encryption example

Alice encrypts using the shared key; Bob decrypts with the same key over an insecure medium.

17
New cards
18
New cards

Unconditional security

A cryptosystem is unconditionally secure if it cannot be broken even with infinite computational resources.

19
New cards
20
New cards

OTP definition

One-Time Pad is a symmetric cipher that achieves perfect secrecy.

21
New cards

OTP inventor

Described in 1882 by Frank Miller.

22
New cards

OTP basic idea

Key as long as plaintext, key is truly random, XOR for encryption and decryption.

23
New cards

OTP encryption

C = M ⊕ K (bitwise XOR).

24
New cards

OTP decryption

M = C ⊕ K.

25
New cards
26
New cards

Conditional probability refresher

P(B|A) = P(A ∩ B) / P(A); independence if P(B|A) = P(B).

27
New cards
28
New cards

OTP perfect secrecy definition

A system is perfectly secret if P(M=m | C=c) = P(M=m) for all messages and ciphertexts.

29
New cards

OTP perfect secrecy theorem

If K is chosen uniformly at random from all n-bit strings, OTP is perfectly secret.

30
New cards

Setup for proof

M, K, C are n-bit random variables, K uniformly distributed, M ⊥ K.

31
New cards
32
New cards

Perfect secrecy proof step 1

P(C=c) = 1/|K| since all keys lead to unique plaintext-ciphertext pairs.

33
New cards

Perfect secrecy proof step 2

P(M=m ∧ C=c) = P(M=m)/|K|.

34
New cards

Perfect secrecy proof step 3

Bayes rule gives P(M=m | C=c) = P(M=m); ciphertext gives no new information.

35
New cards
36
New cards

Intuition: ciphertext independence

Every possible plaintext is equally likely given a ciphertext because every key is equally likely.

37
New cards
38
New cards

Key pitfall 1

Assuming C and K independent; incorrect—C depends on K.

39
New cards

Key pitfall 2

Non-uniform keys break perfect secrecy.

40
New cards

Key pitfall 3

Message-key dependence breaks perfect secrecy.

41
New cards
42
New cards

OTP equalities recap

C = M ⊕ K, and for fixed m, only one key k = c ⊕ m produces ciphertext c.

43
New cards
44
New cards

Keyspace requirement theorem

In perfectly secret systems, |K| ≥ |M|; number of keys must be at least number of messages.

45
New cards

Keyspace intuition

Each ciphertext must be able to decrypt to each message using some key; else secrecy fails.

46
New cards
47
New cards

OTP failure mode: key reuse

Reusing a pad leaks structure; XOR of two ciphertexts removes the key → dangerous.

48
New cards

Historical note

Venona project succeeded by exploiting OTP key reuse.

49
New cards
50
New cards

OTP security conditions

(1) Key same size as plaintext; (2) key truly random; (3) key never reused; (4) key fully secret.

51
New cards

OTP impracticality

Storage, distribution, randomness, and non-reuse requirements make OTP rarely usable in practice.

52
New cards
53
New cards

Need for algebraic structures

Desire for addition, subtraction, multiplication, division in one structure motivates fields.

54
New cards
55
New cards

Field definition

Set F with + and × such that (F,+) is an additive group, (F−{0},×) is a multiplicative group, and distributive law holds.

56
New cards
57
New cards

Field example: Reals

R with usual + and × forms a field (additive inverse = –a; multiplicative inverse = 1/a).

58
New cards

Integers not a field

Z has no multiplicative inverse for most elements, e.g., 2 has no inverse in Z.

59
New cards
60
New cards

Finite field (Galois field)

Fields with finitely many elements; order must be a prime power p^n.

61
New cards

Characteristic of a finite field

The prime p such that field order = p^n.

62
New cards
63
New cards

Finite field relevance

Symmetric ciphers and ECC operate in finite fields; structure affects security and efficiency.

64
New cards
65
New cards

In-class field examples

Z/6Z is not a field (6 not prime; zero divisors).

66
New cards

Z/11Z is a field (prime modulus).

67
New cards

Z/256Z is a field (256 = 2^8 = prime power).

68
New cards

Ring that is not field

Z/6Z: fails multiplicative inverses for many nonzero elements.

69
New cards
70
New cards

Orders in Z*₁₁

Size = φ(11)=10; element orders divide 10: possible orders={1,2,5,10}.

71
New cards
72
New cards

Subgroup definition

A subgroup H ≤ G is a subset that forms a group under the same operation.

73
New cards

Cyclic subgroup theorem

Each element generates a cyclic subgroup of size equal to its order.

74
New cards

Lagrange’s theorem

For finite group G, |H| divides |G| for any subgroup H.

75
New cards
76
New cards

Shift cipher revisit

Encryption: e_k(x)=x+k mod n.

77
New cards

Affine cipher revisit

Encryption: e(x)=ax+b mod n where gcd(a,n)=1.

78
New cards

Move to exponentiation

It is natural to consider exponentiation in groups after addition and multiplication.

79
New cards
80
New cards

Discrete Logarithm Problem (DLP)

Given g, h in group G, find x such that g^x = h; computation hard in large cyclic groups.

81
New cards

Discrete logarithm notation

x = log_g(h).

82
New cards

Finite cyclic group requirement

DLP defined only when G is finite cyclic.

83
New cards
84
New cards

DLP complexity

Point: exponentiation is easy, discrete log is hard → one-way function.

85
New cards

DLP group settings

Finite fields, prime-order subgroups, elliptic curve groups.

86
New cards
87
New cards

Key distribution problem

Assumed Alice and Bob share a key — but how? Need explicit method.

88
New cards
89
New cards

Diffie–Hellman (DH) key exchange

Protocol allowing two parties to agree on shared secret over insecure channel.

90
New cards

DH parameters

Public p (prime) and g (generator of Z*_p).

91
New cards

DH Alice step

Picks private a, sends A = g^a mod p.

92
New cards

DH Bob step

Picks private b, sends B = g^b mod p.

93
New cards

DH shared secret

K = g^(ab) mod p, computed as B^a or A^b.

94
New cards
95
New cards

DH toy example

p=13, g=2; Alice a=5 → A=6; Bob b=8 → B=9; both compute K=3.

96
New cards
97
New cards

DH real-world key use

Shared value must be processed via a KDF (key derivation function), not used directly.

98
New cards
99
New cards

DH properties

Key establishment works over insecure medium; no prior shared key needed.

100
New cards

DH limitations

Still need O(n²) keys for n people; slow group operations; vulnerable to Man-in-the-Middle attack.