Confusion และ Diffusion ใน Cryptography
Claude Shannon เสนอ 2 หลักการสำคัญ:
Confusion (ความสับสน)
ทำให้ความสัมพันธ์ระหว่าง Ciphertext และ Key ซับซ้อน ไม่สามารถอนุมาน Key จาก Ciphertext ได้ ใช้ Substitution (การแทนที่)
Diffusion (การกระจาย)
กระจายโครงสร้างสถิติของ Plaintext ไปทั่ว Ciphertext การเปลี่ยน 1 บิตใน Plaintext ต้องเปลี่ยนหลายบิตใน Ciphertext ใช้ Permutation/Transposition (การสลับที่)
Diffusion ใน AES
ใช้ ShiftRows และ MixColumns layers MixColumns ใช้ MDS Matrix ให้ Branch Number สูงสุด เหมาะทั้ง Software และ Hardware
Product Cipher
สลับระหว่าง Substitution (Confusion) และ Transposition (Diffusion) หลายรอบ (Rounds) เพื่อให้ได้ Strict Avalanche Criteria (เปลี่ยน 1 บิต input → เปลี่ยน 50% output bits)
ความแตกต่าง DES vs AES
DES: มีช่องโหว่รู้จัก 56-bit key แกะได้
AES: ปลอดภัยกว่า 128/192/256-bit key เป็นมาตรฐานโลก
3DES: ปลอดภัยกว่า DES แต่ช้ากว่า AES
วัตถุประสงค์ของ Diffusion
ทำให้ Ciphertext ไม่แน่ชัด เพิ่ม Redundancy ของ Plaintext ทำให้ยากต่อการอนุมาน Key