AES vs DES – Phân tích theo William Stallings
AES (Advanced Encryption Standard) thay thế DES (Data Encryption Standard) từ năm 2001 sau cuộc thi công khai của NIST. Theo Stallings, AES vượt trội hơn DES ở các khía cạnh sau:
1. Độ dài khóa (Key Length) – Yếu tố quyết định
| Thuật toán | Khóa hiệu lực | Không gian khóa | Trạng thái |
|---|---|---|---|
| DES | 56 bit | 256 ≈ 7.2×1016 | Đã bị phá (1997-1998, EFF Deep Crack ~22h) |
| 3DES (TDEA) | 112 bit (2-key) / 168 bit (3-key) | 2112 / 2168 | Vẫn chấp nhận cho legacy (NIST SP 800-131A: disallowed sau 2023) |
| AES-128 | 128 bit | 2128 ≈ 3.4×1038 | An toàn trước quantum (Grover: 264 ops) |
| AES-192 | 192 bit | 2192 | An toàn lâu dài |
| AES-256 | 256 bit | 2256 ≈ 1.1×1077 | Tiêu chuẩn Top Secret (NSA Suite B) |
2. Kiến trúc thuật toán – Feistel vs Substitution-Permutation Network (SPN)
- DES: Dùng Feistel Network – chia block 64-bit thành 2 nửa 32-bit, mỗi round chỉ xử lý nửa, hoán vị. Đặc điểm: encryption & decryption cấu trúc giống nhau.
- AES: Dùng SPN (Substitution-Permutation Network) – xử lý cả block 128-bit cùng lúc qua các phép: SubBytes (S-box), ShiftRows, MixColumns, AddRoundKey. Ưu: diffusion nhanh hơn, song song hóa tốt trên CPU hiện đại (AES-NI), phần cứng (FPGA/ASIC).
3. Số vòng lặp (Rounds) & Key Schedule
- DES: 16 rounds, key schedule đơn giản (hoán vị + dịch chuyển) – dễ related-key attack.
- AES:
- AES-128: 10 rounds
- AES-192: 12 rounds
- AES-256: 14 rounds
- Key Expansion: sinh round key từ master key qua Rcon, S-box, XOR – kháng related-key attack tốt hơn DES/3DES (tuy AES-256 có weak key schedule theoretical, nhưng chưa khai thác thực tế).
4. Hiệu năng (Performance)
- Phần mềm: AES nhanh hơn DES/3DES gấp 3-10 lần (tùy arch) nhờ table lookup (T-tables) & AES-NI (x86), ARMv8 Crypto Extensions.
- Phần cứng: AES cực gọn nhẹ (gate count thấp) – phù hợp IoT, smart card, TLS acceleration.
- Block size: AES 128-bit vs DES 64-bit – AES giảm collision probability trong mode CTR/GCM (birthday bound 264 blocks).
5. Kháng cryptanalysis (Cryptanalytic Resistance)
| Tấn công | DES/3DES | AES |
|---|---|---|
| Brute-force | 56-bit: broken. 3DES 112-bit: borderline. | 128-bit+: infeasible (classical & quantum Grover). |
| Differential / Linear | DES: s-box thiết kế kém (NSA strengthened nhưng vẫn yếu). | AES: S-box tối ưu (max non-linearity, min differential uniformity). |
| Related-key | 3DES: weak. | AES-128/192: strong. AES-256: theoretical weakness (Birukov-Khovratovich 2009) – không thực tế. |
| Side-channel (Timing, Power, Cache) | DES/3DES: dễ bị. | AES: có implement constant-time, bitsliced, masking, threshold implementation. |
| Quantum (Shor/Grover) | Shor breaks RSA/ECC, không ảnh hưởng symmetric. Grover giảm sqrt(key space). | AES-128 → 264 (rủi ro). AES-256 → 2128 (an toàn). |
6. Chế độ vận hành (Modes of Operation)
- DES/3DES: ECB, CBC, CFB, OFB, CTR – CBC phổ biến nhưng padding oracle (POODLE, Lucky13).
- AES: GCM (Galois/Counter Mode) – AEAD (Authenticated Encryption with Associated Data) – hiệu năng cao, song song, chuẩn TLS 1.2/1.3, IPsec, SSH. CCM, OCB, EAX, SIV cũng dùng.
7. Kết luận của Stallings
"AES is not only more secure than DES and 3DES, but also more efficient and flexible. Its variable key length, 128-bit block size, and SPN structure make it the cipher of choice for decades to come."
— William Stallings, Cryptography and Network Security: Principles and Practice, 7th/8th Ed.
8. Khuyến nghị thực tế 2024
- Mặc định: AES-256-GCM (TLS 1.3, IPsec, SSH, WireGuard, age, Signal Protocol).
- Legacy system: 3DES → migrate ngay (PCI-DSS 4.0 cấm 3DES sau 2023).
- Embedded/IoT hạn chế: AES-128-CCM/GCM (hardware acceleration).
- Post-Quantum: Theo dõi NIST PQC (Kyber, Dilithium) – symmetric key vẫn dùng AES-256.