Chapter 8 - Post-Quantum Cryptography (PQC)

Updated 5 Oct 2026

CSS454 — Chapter 8: Post-Quantum Cryptography (PQC)

เป้าหมาย: เข้าใจว่าทำไม Crypto แบบเดิมถึงพัง, Quantum มันน่ากลัวแค่ไหน, และ PQC แก้ยังไง


1. Crypto พื้นฐาน (Classical Cryptography)

1.1 สองประเภทหลัก

ประเภทวิธีทำงานตัวอย่าง
Symmetric-KeyAlice กับ Bob ใช้ key เดียวกัน (ต้องแชร์กันก่อน)AES, ChaCha20
Public-KeyAlice ส่งหา Bob ได้เลย โดยไม่ต้องเจอกันRSA, ECC

1.2 Security ของ Classical Crypto

ความปลอดภัยขึ้นอยู่กับ "โจทย์คณิตศาสตร์ที่ยากเกินไปสำหรับคอมพิวเตอร์ทั่วไป"

RSA←Integer FactorizationECC / DH←Discrete Logarithm\text{RSA} \leftarrow \text{Integer Factorization} \qquad \text{ECC / DH} \leftarrow \text{Discrete Logarithm}

อุปมา: Factoring เหมือนได้เลข 300 หลักมาแล้วถามว่า "สองเลขไพรม์อะไรคูณกันได้เลขนี้?" — คอมพิวเตอร์จะใช้เวลานานกว่าอายุของจักรวาล


2. ภัยคุกคามจาก Quantum

2.1 Quantum Computer ต่างจากปกติยังไง?

Classical BitQubit
สถานะ0 หรือ 10 และ 1 พร้อมกัน (Superposition)
สูตร—∥ψ⟩=α∥0⟩+β∥1⟩\|\psi\rangle = \alpha\|0\rangle + \beta\|1\rangle

อุปมา: เหรียญทั่วไปคือหัวหรือก้อย Quantum coin ขณะหมุนอยู่คือ ทั้งสองพร้อมกัน — มันเลือกข้างเดียวตอนที่เราดูมัน (Measurement collapses superposition)

ผลลัพธ์: Quantum computer สามารถ "ลองหลายทางพร้อมกัน" → Exponential speedup ในบางปัญหา

2.2 Algorithm ที่ทำลาย Crypto

Shor's Algorithm (1994)

  • Polynomial-time quantum algorithm
  • แก้ Integer Factorization และ Discrete Logarithm ได้เร็วกว่า Classical แบบ Exponential
  • ผลกระทบ: RSA, ECC, Diffie-Hellman → พังหมด
  • ⚠️ AES ยังปลอดภัย! (อ.บอก)

อุปมา: ล็อคผสมพันล้านหน่วย ปกติลองทีละอัน Shor's เหมือนลองทุกอันพร้อมกันแล้วรู้คำตอบทันที

Grover's Algorithm

  • ให้ Quadratic speedup ในการค้นหาแบบ Unstructured
  • Classical O(N)O(N) → Quantum O(N)O(\sqrt{N})
  • ผล: ทำให้ Symmetric crypto อ่อนลง แต่ไม่แตกเลย

2.3 Timeline ของ Quantum Computer

ปีQubits
19982
201953 (Google — Quantum Supremacy ครั้งแรก)
2023433
20251,000+
2030?1,000,000?

ยังห่างไกลจาก Fault-tolerant quantum computer อยู่มาก ปัญหาคือ: State เปราะบาง, วัดแล้วพังทันที, ต้องการสภาพแวดล้อมพิเศษ


3. ผลกระทบต่อ Algorithm ปัจจุบัน

3.1 Vulnerable — โดน Shor's ทำลาย

  • RSA (RSA-2048 ถูก Shor's แตก)
  • ECDSA / ECC
  • DSA / Finite Field Crypto
  • Diffie-Hellman

Impact: PKI ecosystem ใช้ไม่ได้, TLS/VPN โดนเจาะหมด

3.2 Adaptable — ยังใช้ได้ถ้าปรับ Key Size

  • AES → ใช้ AES-256 (ไม่ใช่ 128)
  • SHA-2 / SHA-3 → ใช้ Output ยาวขึ้น

ทำไม AES ยังโอเค? Grover's ให้ Speedup แค่ Square-root ดังนั้น AES-128 เหลือ ~64-bit, AES-256 เหลือ ~128-bit (ยังพอปลอดภัย)

3.3 ⚠️ "Harvest Now, Decrypt Later" Attack

วันนี้:   Attacker ดัก Ciphertext เก็บไว้
อนาคต:  พอมี Quantum Computer → เอามา Decrypt ได้

ข้อมูลที่ Encrypt ตอนนี้ อาจโดน Decrypt ได้ในอนาคต — State secrets, medical records, financial data ล้วนเสี่ยง NIST (USA) เป็นคน Regulate เรื่องนี้


4. Mosca's Theorem — ต้องเป็นห่วงตอนไหน?

If x+y>z, then worry NOW\boxed{\text{If } x + y > z \text{, then worry NOW}}

Variableความหมาย
xxข้อมูลต้องปลอดภัยนานแค่ไหน
yyใช้เวลา Migrate ไปหา Quantum-safe นานแค่ไหน
zzQuantum computer ขนาดใหญ่จะมาเมื่อไหร่

อุปมา: บ้านต้องอยู่ได้อีก 20 ปี (x=20x=20), สร้างใหม่ใช้เวลา 5 ปี (y=5y=5), แผ่นดินไหวมาใน 15 ปี (z=15z=15) → 20+5=25>1520+5=25 > 15 → สายแล้ว!


5. Post-Quantum Cryptography (PQC) คืออะไร?

PQC=Classical algorithm ที่ปลอดภัยต่อ Quantum attack\boxed{\text{PQC} = \text{Classical algorithm ที่ปลอดภัยต่อ Quantum attack}}

  • รันบน คอมพิวเตอร์ธรรมดา ไม่ต้อง Quantum hardware
  • Deploy ได้ด้วย Software upgrade
  • ปลอดภัยต่อทั้ง Classical และ Quantum adversary

ทำไม PQC ถึงใช้เวลานาน?

  • Efficiency: Algorithm ใหม่ต้องเร็วพอใช้งานจริง
  • Confidence: ต้องผ่าน Cryptanalysis หลายปีก่อนเชื่อถือได้
  • Standardization: NIST จัดแข่งขันมาตั้งแต่ปี 2016
  • Interoperability: ต้องทำงานกับ TLS, IKE, VPN ได้

6. ครอบครัวของ PQC

FamilyHard Problemตัวอย่างStatus
Lattice-BasedLWE / RLWEKyber, Dilithium⭐ NIST Standardized
Code-BasedSyndrome DecodingMcElieceFinalist
Hash-BasedHash TreesSPHINCS+NIST Standardized
MultivariateMQ ProblemRainbow❌ Broken
Isogeny-BasedElliptic Curve IsogenySIKE❌ Broken

NIST Standardization Progress

  • Round 3 → Standardized:
    • Public-key encryption: Kyber (Lattice)
    • Signatures: Dilithium, FALCON (Lattice), SPHINCS+ (Hash)
  • Round 4 → 2025:
    • Public-key encryption: HQC (Code-based)

7. Lattice-Based Cryptography — ตัวเลือกที่ดีที่สุด

7.1 Lattice คืออะไร?

อุปมา: กระเบื้องปูพื้น มุมของกระเบื้องทุกก้อนรวมกันเป็น Grid ของจุด = Lattice

นิยามทางคณิตศาสตร์: Lattice คือ Integer combination ทั้งหมดของ Basis vectors

\boxed{\Lambda = \left{ \sum_{i=1}^{n} a_i b_i ;\Big|; a_i \in \mathbb{Z} \right}}

คุณสมบัติ:

  • ใช้ Integer coefficient เท่านั้น (ห้ามมี fraction!)
  • มีจุดอนันต์
  • โครงสร้างซ้ำแบบ Regular

7.2 ตัวอย่างง่ายๆ

ให้ b1=(2,0)b_1 = (2,0) และ b2=(0,3)b_2 = (0,3)

Integer a,ca, cPoint (2a,3c)(2a, 3c)
a=1,c=0a=1, c=0(2,0)(2, 0) ✅
a=1,c=1a=1, c=1(2,3)(2, 3) ✅
a=3,c=3a=3, c=3(6,9)(6, 9) ✅
  • (12,0)(12, 0): a=6a=6 ✅ → อยู่ใน Lattice
  • (5,1)(5, 1): a=2.5a=2.5 ❌ → ไม่อยู่ใน Lattice

7.3 ทำไม Lattice ใน High Dimension ถึงยาก?

ใน Kyber จริง: n=512n = 512 หรือ 768768 dimension → หาว่าจุดไหนอยู่ใน Lattice ยากมาก

อุปมา: ใน 2D หาจุดใกล้สุดบน Grid แค่มองก็รู้ ใน 768 มิติ ทุกทิศทางดูเหมือนห่างพอๆ กัน จำนวนจุดใกล้เคียงระเบิดแบบ Exponential


8. Hard Lattice Problems

8.1 SVP (Shortest Vector Problem)

λ1(Λ)=min⁡v∈Λ∖0∣v∣\boxed{\lambda_1(\Lambda) = \min_{v \in \Lambda \setminus {0}} |v|}

"หา Vector สั้นที่สุดที่ไม่ใช่ศูนย์ใน Lattice" ง่ายใน 2D/3D → ยากแบบ Exponential เมื่อ n=512+n = 512+

8.2 CVP (Closest Vector Problem)

v∈Λ s.t. ∣t−v∣ is minimized\boxed{v \in \Lambda \text{ s.t. } |t - v| \text{ is minimized}}

"ให้จุด tt ที่ไม่ได้อยู่บน Lattice → หาจุด Lattice ที่ใกล้ที่สุด"

8.3 LWE (Learning With Errors)

b=As+e(modq)\boxed{b = As + e \pmod{q}}

Symbolความหมาย
A∈Zqm×nA \in \mathbb{Z}_q^{m \times n}Public matrix (ทุกคนรู้)
s∈Zqns \in \mathbb{Z}_q^nSecret vector (สิ่งที่ต้องซ่อน)
e∈Zqme \in \mathbb{Z}_q^mSmall noise (random error เล็กๆ)
b∈Zqmb \in \mathbb{Z}_q^mPublic output

Given: AA และ bb → Goal: หา ss — ยากมาก!

อุปมา: มีสมการ 1000 ข้อแบบ 3x+5y+7z≈423x + 5y + 7z \approx 42 แต่แต่ละข้อมี Error เล็กๆ ไม่รู้แน่ → หา x,y,zx, y, z ไม่ได้แม้แต่ Quantum!

No noise (e=0e=0): แค่ Linear system → แก้ได้ด้วย Gaussian elimination (ง่าย) With noise (e≠0e \neq 0): กลายเป็น CVP ใน High dimension → ยากแบบ Exponential

LWE security≡hardness of SVP + CVP\boxed{\text{LWE security} \equiv \text{hardness of SVP + CVP}}

LWE ได้รับ Gödel Prize 2018 เพราะปฏิวัติ Cryptography ทั้งทฤษฎีและปฏิบัติ

8.4 SVP vs CVP vs LWE — สรุป

ProblemGivenGoalRole
SVPLattice Λ\Lambdaหา Shortest non-zero vectorCore worst-case hardness
CVPLattice + Target ttหา Closest lattice pointDirect decoding problem
LWEb=As+eb = As + eRecover secret ssFoundation ของ PQ Crypto

ทั้งสามยากแบบ Exponential เมื่อ Dimension เพิ่มขึ้น\boxed{\text{ทั้งสามยากแบบ Exponential เมื่อ Dimension เพิ่มขึ้น}}


9. Module-LWE (MLWE)

พูดง่ายๆ: MLWE = LWE แต่ทำงานบน Polynomial แทน Integer

แทนที่จะเป็น Vector ของ Integer เราทำงานกับ:

  • Vectors of Polynomials
  • บน Ring Rq=Zq[x]/(xn+1)R_q = \mathbb{Z}_q[x]/(x^n + 1)

สมการยังเหมือนเดิม: b=As+e\mathbf{b} = \mathbf{A}\mathbf{s} + \mathbf{e} แต่ A,s,e\mathbf{A}, \mathbf{s}, \mathbf{e} เป็น Polynomial

ทำไมต้องใช้ Polynomial Ring?

  • Structure สูง → คำนวณเร็ว (ใช้ NTT สำหรับ Polynomial multiplication)
  • Key size เล็กกว่า LWE ธรรมดา
  • ยังคง Hardness เหมือน Lattice

"MLWE คือ LWE ที่ฉลาดขึ้นและเร็วขึ้น"


10. CRYSTALS-Kyber (Key Encapsulation)

10.1 Kyber คืออะไร?

  • Based on MLWE
  • ออกแบบสำหรับ Key Encapsulation Mechanism (KEM)
  • ใช้ใน: TLS/SSL, VPN, Secure messaging
  • ⚠️ ไม่ได้ Encrypt ข้อมูลโดยตรง — แค่ตกลง Shared key แล้วใช้ AES

อุปมา KEM: Bob ใส่กุญแจ Padlock บนกล่องว่างแล้วส่งให้ Alice (public key). Alice ใส่โน้ตลับลงไป ล็อกกล่องส่งกลับ (encapsulation). Bob เปิดด้วย Key ของตัว (decapsulation). ตอนนี้ทั้งคู่รู้ Secret เดียวกัน

10.2 KeyGen (Bob — Receiver)

Input:  Security parameters
Output: pk (public key), sk (secret key)
  1. สร้าง Public polynomial matrix: A∈Rqk×k\mathbf{A} \in R_q^{k \times k}
  2. Sample Small secret: s←small\mathbf{s} \leftarrow \text{small}
  3. Sample Small error: e←small\mathbf{e} \leftarrow \text{small}
  4. คำนวณ Public vector: t=As+e\mathbf{t} = \mathbf{As} + \mathbf{e}

pk=(A,t),sk=s\boxed{pk = (\mathbf{A}, \mathbf{t}), \quad sk = \mathbf{s}}

⚠️ ต่างจาก RSA ตรงที่ Receiver (Bob) เป็นคน GenKey ไม่ใช่ Sender!

10.3 Encaps (Alice — Sender)

Input:  pk = (A, t)
Output: Ciphertext c, Shared secret K
  1. เลือก Random message mm
  2. Derive shared secret: K=H(m)K = H(m)
  3. Sample small random: r,e1,e2\mathbf{r}, \mathbf{e_1}, e_2
  4. คำนวณ Ciphertext:

u=ATr+e1(modq)u = A^T r + e_1 \pmod{q} v=tTr+e2+⌊q/2⌋⋅m(modq)v = t^T r + e_2 + \lfloor q/2 \rfloor \cdot m \pmod{q}

c=(u,v)ส่ง c ให้ Bob (ไม่ใช่ K!)\boxed{c = (\mathbf{u}, v)} \quad \text{ส่ง } c \text{ ให้ Bob (ไม่ใช่ } K \text{!)}

10.4 Decaps (Bob — Receiver)

Input:  c = (u, v), sk = s
Output: Shared secret K
  1. คำนวณ: m′=v−uTsm' = v - \mathbf{u}^T \mathbf{s}
  2. Derive: K=H(m′)K = H(m')

ทำไมถึงได้ mm กลับมา?

v−uTs=(tTr+e2+⌊q/2⌋m)−(ATr+e1)Tsv - u^T s = (t^Tr + e_2 + \lfloor q/2 \rfloor m) - (A^Tr + e_1)^T s

Lattice components หักล้างกัน (เพราะ t=As+et = As + e) เหลือแค่ ⌊q/2⌋m\lfloor q/2 \rfloor m + noise เล็กๆ → Round ทิ้งได้

10.5 Full KEM Protocol

Bob (KeyGen)        Alice (Encapsulate)         Bob (Decapsulate)
────────────────    ─────────────────────       ─────────────────
(pk, sk)  ──pk──►  m ← random                  m' = Dec(sk, c)
                   (K', r) = G(m ∥ H(pk))      K = KDF(K'' ∥ H(c))
                   c = Enc(pk, m; r)  ──c──►
                   K = KDF(K' ∥ H(c))

10.6 Hash Chain ใน Kyber

H(pk)=SHA3-256(pk)H(pk) = \text{SHA3-256}(pk) (K′,r)=SHA3-512(m∣H(pk))(K', r) = \text{SHA3-512}(m | H(pk)) K=SHAKE256(K′∣H(c))\boxed{K = \text{SHAKE256}(K' | H(c))}

10.7 Quantum Security ของ Kyber

  • Security ขึ้นกับ MLWE hardness
  • ไม่มี Efficient quantum attack ที่รู้จัก
  • ถ้า Kyber ปลอดภัย → Attacker คำนวณ KK ไม่ได้ แม้มี Quantum computer

Exam คำถาม: Hacker ได้ pkpk ไป ทำไม Kyber ยังปลอดภัย? → เพราะ Attacker ไม่มี sksk และการคำนวณ sksk จาก pkpk กับ tt ต้องแก้ MLWE ซึ่งยากแบบ Exponential


11. CRYSTALS-Dilithium (Digital Signatures)

11.1 Dilithium คืออะไร?

  • Post-Quantum Digital Signature
  • Based on MLWE + Structured lattice problems
  • แทนที่ RSA และ ECDSA
  • ทำงานบน Polynomial ring: Rq=Zq[x]/(xn+1)R_q = \mathbb{Z}_q[x]/(x^n + 1)

อุปมา: ลายเซ็นดิจิตัลเหมือนลายเซ็นมือ ทุกคนยืนยันได้ว่าเราเซ็น แต่ไม่มีใข Forge ได้ Dilithium ทำให้ Quantum-resistant

11.2 Dilithium KeyGen

  1. สร้าง Matrix: A∈Rqk×l\mathbf{A} \in R_q^{k \times l}
  2. Sample small polynomials: s1∈Rql,s2∈Rqk\mathbf{s_1} \in R_q^l, \quad \mathbf{s_2} \in R_q^k
  3. คำนวณ: t=As1+s2\mathbf{t} = \mathbf{A}\mathbf{s_1} + \mathbf{s_2}
  4. แยก t\mathbf{t} เป็น High bits t1\mathbf{t_1} และ Low bits t0\mathbf{t_0}

pk=(A,t1),sk=(s1,s2,t0)\boxed{pk = (\mathbf{A}, \mathbf{t_1}), \quad sk = (\mathbf{s_1}, \mathbf{s_2}, \mathbf{t_0})}

11.3 Dilithium Sign(sk, m)

StepOperation
1Hash message: μ=H(m)\mu = H(m)
2Sample random vector y\mathbf{y}
3คำนวณ: w=Ay\mathbf{w} = \mathbf{A}\mathbf{y}
4Challenge (ผูก Signature กับ Message): c=H(μ,w)c = H(\mu, \mathbf{w})
5Signature vector: z=y+cs1\mathbf{z} = \mathbf{y} + c\mathbf{s_1}

σ=(c,z)\boxed{\sigma = (c, \mathbf{z})}

11.4 Dilithium Verify(pk, m, σ)

StepOperation
1Parse: extract (c,z)(c, \mathbf{z})
2Recompute: μ=H(m)\mu = H(m)
3Recompute: w′=Az−ct\mathbf{w}' = \mathbf{A}\mathbf{z} - c\mathbf{t}
4Recompute: c′=H(μ,w′)c' = H(\mu, \mathbf{w}')

Accept ถ้า c′=c, Reject ถ้าไม่เท่ากัน\boxed{\text{Accept ถ้า } c' = c, \text{ Reject ถ้าไม่เท่ากัน}}


12. Post-Quantum Access Control: Lattice CP-ABE

12.1 Attribute-Based Encryption (ABE) คืออะไร?

อุปมา: โรงพยาบาล File ถูก Encrypt ให้เฉพาะคนที่เป็น "Doctor AND Hospital-A" หรือ "Emergency worker" เท่านั้นที่ Decrypt ได้ โดยกฎนี้ฝังอยู่ใน Encryption เองเลย ไม่ต้องพึ่ง Server

Core Idea: Encrypt ด้วย Access Policy → User Decrypt ได้ก็ต่อเมื่อ Attributes ของตัวเองตรงกับ Policy

ตัวอย่าง Policy: (Doctor AND Hospital-A) OR Emergency

12.2 สี่ Entity

Entityบทบาท
Attribute Authority (AA)Root of Trust สร้าง System params และออก Attribute keys
Data OwnerEncrypt ข้อมูลพร้อม Access policy
Userมี Attribute keys พยายาม Decrypt
Cloud Storageเก็บ Encrypted ciphertext

12.3 Lifecycle

1. Setup → 2. Key Generation → 3. Encryption → 4. Decryption

12.4 Phase 1: Setup (Trapdoor Generation)

(A,TA)←TrapGen(n,m,q)(A, T_A) \leftarrow \text{TrapGen}(n, m, q)

PK=A,MK=TA\boxed{PK = A, \quad MK = T_A}

Trapdoor คืออะไร? Mathematical backdoor — ไม่มี TAT_A → Invert AA ไม่ได้ มี TAT_A → ทำได้ง่าย เหมือนประตูทางเดียว

12.5 Phase 2: Key Generation

Authority ใช้ Lattice trapdoor sampling:

x←SampleD(A,TA,u)x \leftarrow \text{SampleD}(A, T_A, u) Ax=u(modq)และ∣x∣ small\boxed{Ax = u \pmod{q} \quad \text{และ} \quad |x| \text{ small}}

xx ถูก Sample จาก Discrete Gaussian Distribution

12.6 Phase 3: Encryption (LSSS)

Linear Secret Sharing Scheme (M,ρ)(M, \rho):

  • M∈Zql×nM \in \mathbb{Z}_q^{l \times n} = Sharing matrix
  • ρ(i)\rho(i) = Map row ii ไปยัง Attribute

ตัวอย่างสำหรับ (Doctor AND Hospital-A) OR Emergency:

Row iiAttribute
1Doctor
2Hospital-A
3Emergency

C0=ATs+e,C1=M+⌊q2⌋C_0 = A^T\mathbf{s} + \mathbf{e}, \quad C_1 = M + \left\lfloor\frac{q}{2}\right\rfloor

"LSSS ฝัง Access policy ลงใน Encryption โดยแตก Secret เป็น Linear shares ที่ผูกกับ Attribute"

12.7 Phase 4: Decryption

ถ้า User's attributes ตรงกับ Policy:

M=C1−sTAM = C_1 - s^T A

Noise ee เล็กพอที่จะ Cancel ออกได้ → ได้ MM กลับมา

12.8 Advantages vs Challenges

ข้อดี ✅ความท้าทาย ⚠️
Proven post-quantum securityKey size ใหญ่กว่า ECC มาก
Fine-grained access control ระดับ DataComputational overhead สูง
รองรับ AND/OR/Threshold/Role-basedCiphertext expansion ใหญ่
เหมาะกับ Cloud และ IoT

⚠️ Pairing ก็ Vulnerable ต่อ Post-quantum attack เหมือนกัน


13. Manual Kyber Computation (ตัวอย่างโจทย์)

Given:

  • q=17q = 17, A=[35 72]A = \begin{bmatrix} 3 & 5 \ 7 & 2 \end{bmatrix}, s=[2,1]Ts = [2, 1]^T, e=[1,1]Te = [1, 1]^T
  • r=[1,2]Tr = [1, 2]^T, m=1m = 1, e1=[1,0]Te_1 = [1, 0]^T, e2=1e_2 = 1

Step 1: Public key t=As+e(mod17)t = As + e \pmod{17}

As=[3(2)+5(1) 7(2)+2(1)]=[11 16]As = \begin{bmatrix} 3(2)+5(1) \ 7(2)+2(1) \end{bmatrix} = \begin{bmatrix} 11 \ 16 \end{bmatrix} t=[11 16]+[1 1]=[12 0](mod17)t = \begin{bmatrix} 11 \ 16 \end{bmatrix} + \begin{bmatrix} 1 \ 1 \end{bmatrix} = \begin{bmatrix} 12 \ 0 \end{bmatrix} \pmod{17}

Step 2: Ciphertext

u=ATr+e1=[37 52][1 2]+[1 0]=[18 9](mod17)=[1 9]u = A^T r + e_1 = \begin{bmatrix} 3 & 7 \ 5 & 2 \end{bmatrix}\begin{bmatrix} 1 \ 2 \end{bmatrix} + \begin{bmatrix} 1 \ 0 \end{bmatrix} = \begin{bmatrix} 18 \ 9 \end{bmatrix} \pmod{17} = \begin{bmatrix} 1 \ 9 \end{bmatrix}

⌊q/2⌋=⌊17/2⌋=8\lfloor q/2 \rfloor = \lfloor 17/2 \rfloor = 8

v=tTr+e2+8m=12(1)+0(2)+1+8(1)=21(mod17)=4v = t^T r + e_2 + 8m = 12(1)+0(2) + 1 + 8(1) = 21 \pmod{17} = 4

Step 3: Bob computes v−sTu(mod17)v - s^T u \pmod{17}

sTu=2(1)+1(9)=11s^T u = 2(1) + 1(9) = 11 v−sTu=4−11=−7≡10(mod17)v - s^T u = 4 - 11 = -7 \equiv 10 \pmod{17}

Step 4: Recover mm

10≈⌊q/2⌋=8→m=1✓10 \approx \lfloor q/2 \rfloor = 8 \rightarrow m = 1 \checkmark

หากผลใกล้ 0 → m=0m = 0; หากผลใกล้ ⌊q/2⌋\lfloor q/2 \rfloor → m=1m = 1

Step 5: Shared key

K=H(m)=H(1)K = H(m) = H(1)

ความสัมพันธ์ mm กับ KK: KK คือ Hash ของ mm โดย KK ถูกคำนวณจาก mm ผ่าน Hash function


14. สรุปภาพรวม

Classical Crypto     Quantum Threat         PQC Solution
────────────────     ──────────────         ─────────────
RSA (factoring)  ──► Shor's Algorithm  ──►  Kyber (MLWE)
ECDSA (DL prob)  ──► Shor's Algorithm  ──►  Dilithium (MLWE)
AES (brute)      ──► Grover's Algor.  ──►  AES-256 (double key)
Access Control   ──► All pubkey broke ──►  Lattice CP-ABE

Hard problems of the quantum era: LWE, MLWE, SVP, CVP\boxed{\text{Hard problems of the quantum era: LWE, MLWE, SVP, CVP}}

Classical public-key (factoring, discrete log) ถูก Shor's ทำลายหมด → ตัวแทนที่ Quantum-safe (LWE/MLWE) พึ่งพา High-dimensional lattice problems ที่ ไม่มี Quantum algorithm ใดแก้ได้อย่างมีประสิทธิภาพ


CSS454 Computer Security — Chapter 8 Cheat Sheet