Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบเครือข่าย >> ความปลอดภัยเครือข่าย

AES ตาม Stallings Cryptography and Network Security: ทำไมจึงเป็นมาตรฐานเข้ารหัสที่เลือกใช้?

AES (Advanced Encryption Standard) คืออะไร?

AES คือมาตรฐานการเข้ารหัสบล็อกแบบสมมาตร (Symmetric Block Cipher) ที่ NIST (National Institute of Standards and Technology) เลือกในปี 2001 แทน DES โดยอัลกอริทึมคือ Rijndael ที่พัฒนาโดย Joan Daemen และ Vincent Rijmen นักเข้ารหัสชาวเบลเยียม

ทำไม AES ถูกเลือกเป็นมาตรฐาน? (ตาม Stallings & NIST Criteria)

เกณฑ์AES (Rijndael)เหตุผล
Security (ความปลอดภัย)✅ Excellentทนทานต่อการโจมตีที่รู้จักทั้งหมด (Linear, Differential, Related-key, Side-channel) ไม่มีช่องโหว่เชิงปฏิบัติ
Performance (ประสิทธิภาพ)✅ Excellentเร็วในทั้ง Software และ Hardware รองรับ 8-bit ถึง 64-bit CPU, DSP, Smart Card, ASIC, FPGA
Flexibility (ความยืดหยุ่น)✅ ExcellentKey size 128/192/256 bits, Block size 128 bits (Rijndael รองรับ 128/192/256 ทั้งคู่)
Simplicity (ความเรียบง่าย)✅ Excellentโครงสร้างชัดเจน เข้าใจง่าย วิเคราะห์ง่าย Implement ง่าย ตรวจสอบได้
Memory Efficiency✅ Goodใช้หน่วยความจำน้อย เหมาะ Embedded Systems
Parallelism✅ Goodรองรับการประมวลผลแบบขนาน (Bit-slicing, AES-NI)

คุณสมบัติทางเทคนิคสำคัญ

  • Block Size: 128 bits (16 ไบต์) - คงที่
  • Key Sizes: 128, 192, 256 bits
  • Number of Rounds: 10 (128-bit), 12 (192-bit), 14 (256-bit)
  • Structure: Substitution-Permutation Network (SPN) - ไม่ใช่ Feistel Network (เหมือน DES)
  • Operations ต่อ Round: 1) SubBytes (S-Box), 2) ShiftRows, 3) MixColumns, 4) AddRoundKey
  • Key Expansion: ขยายคีย์จาก Master Key เป็น Round Keys (11, 13, 15 Round Keys)

4 ขั้นตอนหลักในแต่ละ Round

  1. SubBytes: แทนที่แต่ละไบต์ใน State ด้วย S-Box (Non-linear substitution) - ให้ความสับสน (Confusion)
  2. ShiftRows: เลื่อนแถวของ State Matrix - กระจายความสัมพันธ์ (Diffusion)
  3. MixColumns: ผสมคอลัมน์ผ่าน Galois Field (GF(2⁸)) Multiplication - Diffusion แบบแนวตั้ง
  4. AddRoundKey: XOR State กับ Round Key - ผูกคีย์เข้ากับข้อมูล

Round สุดท้าย: ไม่มี MixColumns | Round เริ่มต้น: AddRoundKey เท่านั้น (Whitening)

ทำไม AES ถูกใช้กันอย่างแพร่หลาย? (Why Commonly Used?)

  • มาตรฐานของรัฐบาลสหรัฐ (FIPS 197) - ใช้ปกป้องข้อมูล Confidential/Secret/Top Secret
  • มาตรฐานอุตสาหกรรมโลก - TLS/SSL (HTTPS), IPsec, SSH, Wi-Fi (WPA2/WPA3), SSH, VPN, Disk Encryption (BitLocker, FileVault, LUKS)
  • Hardware Acceleration (AES-NI) - CPU สากล (Intel/AMD/ARM) มีชุดคำสั่ง AES-NI ทำให้เร็วมาก (cycles/byte ต่ำมาก)
  • ทนทานต่อ Quantum (Relative) - AES-256 ถือว่าปลอดภัยต่อ Grover's Algorithm (ต้องใช้ 2¹²⁸ operations)
  • Open/Royalty-free - ไม่มีสิทธิบัตร ใช้ฟรีได้ทุกวัตถุประสงค์

โหมดการทำงาน (Modes of Operation)

ความปลอดภัยของ AES ในปัจจุบัน

  • Brute Force: AES-128 = 2¹²⁸ operations (ไม่เป็นไปได้), AES-256 = 2²⁵⁶ (เป็นไปไม่ได้แม้ Quantum)
  • Cryptanalysis: ไม่มีการโจมตีเชิงปฏิบัติที่แยกสำเร็จ (Best: Related-key attacks บน Reduced-round versions เท่านั้น)
  • Side-channel: Timing, Power, Cache attacks - แก้ได้ด้วย Constant-time Implementation + AES-NI
  • Implementation Flaws: กลายเป็นจุดอ่อนหลัก (Bad RNG, Key Reuse, ECB Mode, Padding Oracle)

สรุป: ทำไม AES จึงเป็นตัวเลือกแรก?

จากมุมมองของ Stallings และ NIST: AES ให้ความสมดุลที่ดีที่สุดระหว่าง Security, Performance, Simplicity, และ Flexibility เป็นอัลกอริทึมที่ผ่านการวิเคราะห์ทางทฤษฎีและปฏิบัติมายาวนาน 20+ ปี ไม่มีช่องโหว่ร้ายแรงพบ และมีการนำไปใช้ในทุกชั้นของสต็อกเทคโนโลยีโลก (Hardware, OS, Protocol, Application) ทำให้เป็น "Gold Standard" ของการเข้ารหัสสมมาตรในยุคปัจจุบัน

โหมดลักษณะใช้เมื่อไหร่
ECBElectronic Codebook❌ ห้ามใช้ (Pattern เห็นได้ชัด)
CBCCipher Block ChainingLegacy, ต้องการ Padding, Sequential
CTRCounterParallelizable, Stream-like, Nonce-based
GCMGalois/Counter Mode (AEAD)✅ แนะนำ - Authenticated Encryption (Confidentiality + Integrity)
CCMCounter with CBC-MAC (AEAD)Constrained Environments (IoT, 802.11i)