ขั้นตอน Key Generation ของ DES
DES: Block Cipher Algorithm Plaintext 64 บิต → Ciphertext ด้วย Key 48 บิต Symmetric Key Algorithm (คีย์เดียวกันเข้ารหัส/ถอดรหัส) DES: 64-bit Plaintext → 64-bit Ciphertext ถอดรหัส: 64-bit Ciphertext → 64-bit Plaintext ใช้ Cipher Key 56-bit เดียวกัน
ลักษณะสำคัญ
Algorithm คงที่และเป็น Public Knowledge แต่ Actual Key เป็น Shared Secret ระหว่าง Sender/Receiver พัฒนา: ยืด Key เป็น 128 บิต, Multi-pass DES (หลายรอบ ปกติ 3 รอบ หลาย Keys)
ประวัติ
DES มาจากโครงการวิจัย IBM ช่วงปลาย 1960s → Cipher ชื่อ LUCIFER 1970s เรียบเรียง LUCIFER ใหม่ หลาย Innovation
ขั้นตอนสร้างคีย์
- Round Key Generator: สร้าง Sixteen 48-bit Keys จาก 56-bit Cipher Key คีย์ให้มา 64-bit (8 Parity Bits) ตัดทิ้งก่อนสร้างคีย์จริง
- Parity Bit Drop: ตัด Parity Bits (บิตที่ 8, 16, 24, 32...64) จาก 64-bit Key → Permute ตามกฎ (Parity Bit Drop Table) เหลือ 56 บิต
- 56 บิตนี้ใช้สร้างคีย์
- หลัง Permute: แบ่ง 2 ส่วน ละ 28 บิต แต่ละส่วน Shift Left 1 หรือ 2 บิต ขึ้นกับรอบ
- รอบ 1, 2, 9, 16: Shift 1 บิต รอบอื่น: Shift 2 บิต รวม 2 ส่วน → 56 บิต
- Compression D-box: บีบ 56 บิต → 48 บิต ใช้เป็น Round Key
Parity Bit Drop Table (ตัวอย่าง)
| 57 | 49 | 41 | 33 | 25 | 17 | 09 | 01 |
| 58 | 50 | 42 | 34 | 26 | 18 | 10 | 02 |
| 59 | 51 | 43 | 35 | 27 | 19 | 11 | 03 |
| 60 | 52 | 44 | 36 | 63 | 55 | 47 | 39 |
| 31 | 23 | 15 | 07 | 62 | 54 | 46 | 38 |
| 30 | 22 | 14 | 06 | 61 | 53 | 45 | 37 |
| 29 | 21 | 13 | 05 | 28 | 20 | 12 | 04 |