Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> การเขียนโปรแกรม

ขั้นตอนการสร้างคีย์ของ DES ในความปลอดภัยข้อมูล

ขั้นตอน 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

ขั้นตอนสร้างคีย์

  1. Round Key Generator: สร้าง Sixteen 48-bit Keys จาก 56-bit Cipher Key คีย์ให้มา 64-bit (8 Parity Bits) ตัดทิ้งก่อนสร้างคีย์จริง
  2. Parity Bit Drop: ตัด Parity Bits (บิตที่ 8, 16, 24, 32...64) จาก 64-bit Key → Permute ตามกฎ (Parity Bit Drop Table) เหลือ 56 บิต
  3. 56 บิตนี้ใช้สร้างคีย์
  4. หลัง Permute: แบ่ง 2 ส่วน ละ 28 บิต แต่ละส่วน Shift Left 1 หรือ 2 บิต ขึ้นกับรอบ
  5. รอบ 1, 2, 9, 16: Shift 1 บิต รอบอื่น: Shift 2 บิต รวม 2 ส่วน → 56 บิต
  6. Compression D-box: บีบ 56 บิต → 48 บิต ใช้เป็น Round Key

Parity Bit Drop Table (ตัวอย่าง)

5749413325170901
5850423426181002
5951433527191103
6052443663554739
3123150762544638
3022140661534537
2921130528201204