Lecture 6 - Cryptography III

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

Elliptic curve basic definition

An elliptic curve is not a function but a geometric object: the set of points (x,y) satisfying an equation of the form y² = x³ + ax + b over a field.

2
New cards

Elliptic curve visual property

Over the real numbers, elliptic curves are symmetric across the x-axis and any non-horizontal line intersects them in exactly one or three points.

3
New cards

General elliptic curve definition

Defined by an equation where the x-degree is 3 and y-degree is 2; forms a smooth algebraic curve useful for group operations.

4
New cards
5
New cards

Elliptic curve addition rule

To compute A ⊕ B: draw line through points A and B; it intersects curve at C'; reflect C' across x-axis to get point C = A ⊕ B.

6
New cards

Elliptic curve geometric picture

Line through A and B meets curve at C'; reflection gives the group-sum point C.

7
New cards

Negative of point on EC

For P=(x,y), the negative −P is (x, −y).

8
New cards

Neutral element on EC

The point at infinity O acts as identity: P ⊕ O = P and P ⊕ (−P) = O.

9
New cards

EC group structure

The set E(F_p) union {O} with ⊕ forms an abelian group.

10
New cards
11
New cards

Finite-field elliptic curves

Elliptic curves used in crypto are defined over finite fields F_p, not ℝ.

12
New cards

EC equation over finite fields

Solve y² = x³ + ax + b in F_p; produces a finite set of points.

13
New cards

EC abelian group over F_p

Points + point-at-infinity still form abelian group under defined addition.

14
New cards

Cyclic subgroup requirement

Not all E(F_p) are cyclic; crypto chooses curves where group is cyclic or contains large prime-order cyclic subgroup.

15
New cards

Base point G

On standardized curves, G generates a large prime-order subgroup used for cryptography.

16
New cards
17
New cards

Big picture DLP

DLP appears in multiplicative finite fields (g^x = h) and elliptic curves ([x]G = Q); hard in both if parameters well chosen.

18
New cards

ECDLP definition

Given base point G and Q = [x]G, find scalar x; considered computationally hard.

19
New cards
20
New cards

Finite-field DLP parameters

Work in subgroup of F*_p of size q; public values p,g,h; secret x such that g^x ≡ h mod p.

21
New cards

Safe prime construction

Let p = 2q + 1; pick random u; set g = u^((p−1)/q) mod p such that g ≠ 1.

22
New cards

ECDLP parameters

Elliptic curve E(Fq), base G of prime order r, cofactor h; secret x ∈ Zr such that Q = [x]G.

23
New cards
24
New cards

Why ECC wins

Finite-field DLP has sub-exponential attacks; ECDLP best known attacks are exponential → ECC offers same security with far smaller keys.

25
New cards

ECC performance

256-bit ECC ≈ 3072-bit RSA; lower bandwidth, faster operations.

26
New cards
27
New cards

FF vs EC comparison

Finite field uses multiplication and exponentiation; EC uses point addition and scalar multiplication; both rely on discrete logs but attack surfaces differ.

28
New cards

Scalar multiplication in ECC

Compute [x]G via repeated doubling/addition; fast; hard to invert.

29
New cards
30
New cards

EC point addition formula

For P≠Q: λ = (yq − yp)/(xq − xp); xr = λ² − xp − xq; yr = λ(xp − xr) − y_p mod p.

31
New cards

EC point doubling formula

λ = (3xp² + a)/(2yp); then same formula structure for resulting point.

32
New cards
33
New cards

EC security insight

Computing nP is easy; given P and nP, finding n is hard (ECDLP).

34
New cards
35
New cards

EC small example

Curve y² = x³ + 2x + 3 over F_97; P=(3,6), Q=(10,21); P⊕Q=(49,34) mod 97.

36
New cards
37
New cards

Transition to RSA

Move from discrete-log–based systems to systems based on integer factorization hardness.

38
New cards
39
New cards

Euler phi motivation

Need to know number of invertible elements in Z_m to construct RSA decryption exponent; value given by Φ(m).

40
New cards

Phi function definition

Φ(m) counts integers in {0,…,m−1} relatively prime to m.

41
New cards
42
New cards

Phi example Φ(6)

gcd(1,6)=1 and gcd(5,6)=1 → Φ(6) = 2.

43
New cards

Phi example Φ(5)

All nonzero numbers mod 5 are coprime → Φ(5)=4.

44
New cards
45
New cards

Phi via prime factorization

If m = p₁^{e₁} p₂^{e₂} … pn^{en}, then Φ(m)=Π (pi^{ei} − pi^{ei−1}).

46
New cards

Phi example Φ(240)

240=2⁴⋅3⋅5 → Φ(240)=64.

47
New cards
48
New cards

Factorization importance

In RSA, computing Φ(N) is easy if you know p,q; hard without factoring → security relies on difficulty of factoring N.

49
New cards
50
New cards

Fermat’s Little Theorem

If p prime, a^p ≡ a mod p; equivalently a^{p−1} ≡ 1 mod p for a≠0.

51
New cards

FLT inverse formula

a^{-1} ≡ a^{p−2} mod p for prime p.

52
New cards

FLT inverse example

Inverse of 2 mod 7 is 2^{5}=32≡4 mod 7.

53
New cards
54
New cards

Euler’s theorem

For gcd(a,m)=1: a^{Φ(m)} ≡ 1 mod m; generalizes FLT.

55
New cards
56
New cards

Euler’s theorem example

m=12,a=5 → Φ(12)=4 → 5⁴=625≡1 mod 12.

57
New cards
58
New cards

FLT special case

Euler’s theorem reduces to FLT when m is prime (Φ(p)=p−1).

59
New cards
60
New cards

GCD motivation

In Z_m, a has inverse mod m iff gcd(a,m)=1; need fast gcd computation → Euclidean algorithm.

61
New cards
62
New cards

GCD intuition

gcd(a,b) is largest integer dividing both; geometric interpretation: largest segment that tiles both lengths.

63
New cards
64
New cards

Naive gcd methods

Enumerating divisors or repeated subtraction too slow; need Euclid’s remainder-based method.

65
New cards
66
New cards

Euclidean algorithm key fact

If a = bq + r, then gcd(a,b) = gcd(b,r); reduces problem size each step.

67
New cards
68
New cards

Euclidean algorithm procedure

Iteratively replace (a,b) with (b,r) until r=0; last nonzero remainder is gcd.

69
New cards
70
New cards

Euclidean algorithm example

gcd(252,105)=21 through repeated division steps.

71
New cards
72
New cards

Extended Euclidean purpose

Finding integers x,y such that ax + by = gcd(a,b); used to compute inverses modulo m.

73
New cards
74
New cards

Bezout identity

For any a,b not both zero, ∃ integers x,y s.t. ax + by = gcd(a,b).

75
New cards
76
New cards

Inverse via Bezout

If gcd(a,m)=1 then ax + my =1 → ax≡1 mod m → x is a^{-1} mod m.

77
New cards
78
New cards

Extended Euclid recursive idea

Compute gcd(b,r), express r = a − bq, back-substitute to get combination ax + by.

79
New cards
80
New cards

Inverse example mod 26

7^{-1} mod 26 found by Euclid + back-substitution → 15.

81
New cards
82
New cards

RSA motivation

Want reversible exponentiation m ↦ m^e mod n with decryption exponent d.

83
New cards
84
New cards

RSA modulus n

Choose primes p,q; let n=pq.

85
New cards
86
New cards

Phi(n) for RSA

Φ(n) = (p−1)(q−1).

87
New cards
88
New cards

Carmichael λ(n)

λ(n) = lcm(p−1,q−1); minimal exponent guaranteeing correctness.

89
New cards
90
New cards

CRT role

If a≡b mod n ⇔ a≡b mod p and mod q; used in RSA correctness proofs.

91
New cards
92
New cards

RSA correctness (Euler version)

If ed ≡ 1 mod Φ(n), then m^{ed} ≡ m mod n for all m.

93
New cards
94
New cards

RSA correctness (Carmichael version)

If ed ≡ 1 mod λ(n), then m^{ed} ≡ m mod n for all m; λ smaller so optimal.

95
New cards
96
New cards

Example showing λ suffices

n=15,p=3,q=5 → Φ(15)=8,λ(15)=4; e=3,d=3 mod 4; correctness still holds.

97
New cards
98
New cards

Choosing e

Valid e satisfies gcd(e,λ(n))=1 (same valid set as gcd(e,Φ(n))=1).

99
New cards
100
New cards

Key takeaway on λ(n)

λ(n) divides Φ(n); using λ produces minimal universal exponent; security from hardness of factoring n.