1 / 44

Block Cipher Principles

boonrit@feu.ac.th. Block Cipher Principles. Stream Ciphers and Block Ciphers. stream cipher A symmetric encryption algorithm in which ciphertext output is produced bit-by-bit or byte-by-byte from a stream of plaintext input. block cipher

teryl
Download Presentation

Block Cipher Principles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. boonrit@feu.ac.th Block Cipher Principles

  2. Stream Ciphers and Block Ciphers stream cipher A symmetric encryption algorithm in which ciphertext output is produced bit-by-bit or byte-by-byte from a stream of plaintext input. block cipher A symmetric encryption algorithm in which a block of plaintext bits (typically 64 or 128) is transformed as a whole into a ciphertext block of the same length.

  3. Stream cipher เป็นวิธีการเข้ารหัสที่ละตัว Key This is a Message Encryption EWRKLIH……..

  4. Stream cipher ข้อดีของ stream cipher ความเร็วในการเข้ารหัสและถอดรหัส ความผิดพลาดต่ำ ข้อเสียของ stream cipher เกิดการซ้ำกันของตัวอักษร ง่ายต่อการวิเคราะห์ ง่ายต่อการเปลี่ยนแปลงแก้ไขข้อมูล เช่นจำนวนเงิน

  5. Block cipher เป็นการเข้ารหัสแบบกลุ่ม ทำการแบ่งข้อมูลออกเป็น block แล้วนำไปเข้ารหัส Key This is a Message Encryption EWRKLIH…….. This is a Me sage

  6. Block cipher ข้อดีของ Block cipher การกระจายความซ้ำกันของตัวอักษร ต่อต้านการดัดแปลงต่อเติมข้อมูลใด้ ข้อเสียของ Block cipher ใช้เวลาในการเข้ารหัสนานกว่า มีการเกิดความผิดพลาดต่อเนื่อง

  7. Characteristics of good Cipher ความปลอดภัยของการเข้ารหัสแปรผันตรงกับความยากของการเข้ารหัส ไม่ควรมีข้อจำกัดของการเลือกใช้กุญแจเข้ารหัส กระบวนการนำวิธีการเข้ารหัสไปใช้ต้องสะดวกและง่าย ความผิดพลาดที่จุดใดจุดหนึ่งต้องไม่ขยายไปสู่ส่วนอื่นๆ Cipher text ต้องมีขนาดไม่ใหญ่กว่า Plaintext

  8. Secret key Encryption การเข้ารหัสที่ใช้กุญแจเข้ารหัสและกุญแจถอดรหัสตัวเดียวกัน KeyA KeyB Ciphertext Plaintext Plaintext Encryption Decryption KeyA=KeyB

  9. Secret key Encryption DES(Data Encryption Standard) เข้ารหัสแบบ Block Cipher พัฒนาโดย US Federa Standard Key size >58 Bit ความเร็วในการเข้าและถอดรหัส

  10. Secret key Encryption Triple DES พัฒนาต่อจาก DES มีความปลอดภัยมากกว่า DES Keyขนาดมากกว่า DES AES(Advanced Encryption Standard) มีความปลอดภัยในการเข้าและถอดรหัสมากกว่า DES

  11. Secret key Encryption ข้อดีของ Secret key การเข้ารหัสและถอดรหัสทำได้เร็ว วิธีการพัฒนาการเข้ารหัสและถอดรหัสทำให้ง่าย ข้อเสียของ Secret key การกระจายกุญแจทำได้ยาก มีโอกาสที่จะถูกขโมยกุญแจในการขั้นตอนการส่งกุญแจ

  12. Public key Encryption การเข้ารหัสที่ใช้กุญแจเข้ารหัสและกุญแจถอดรหัสคนละตัวเดียวกัน KeyA KeyB Ciphertext Plaintext Plaintext Encryption Decryption KeyA<>KeyB

  13. Public key Encryption RSA พัฒนาโดย Rivest,Shamir,Adleman Key>1028 Bit กุญแจเข้ารหัสและถอดรหัสคนละตัว

  14. Public key Encryption ข้อดีของ Public key การกระจายกุญแจทำได้ง่าย การขโมยกุญแจในการขั้นตอนการส่งกุญแจไม่มีผลต่อการถอดรหัส ข้อเสียของ Public key การเข้ารหัสและถอดรหัสทำได้ช้า ไม่เหมาะในการเข้ารหัสที่มีข้อมูลที่มีขนาดใหญ่

  15. DES(Data Encryption Standard)

  16. DES เบื้องต้น P10 Shift IP-1 IP P8 fk fK Shift SW SW P8 fK fk IP IP-1 10 bit key 8 bit plaintext 8 bit plaintext 8 bit ciphertext 8 bit ciphertext

  17. DES เบื้องต้น S-DES Key Generation ประกอบด้วย P10 Shift P8

  18. DES เบื้องต้น P10(Permutation) ทำหน้าที่ สลับและเปลี่ยนตำแหน่งบิท P10(k1,k2,k3,k4,k5,k6,k7,k8,k9,k10)=(k3,k5,k2,k7,k4,k10,k1,k9,k8,k6) P10 3 5 2 7 4 10 1 9 8 6 P10 1101101001 0111111000

  19. DES เบื้องต้น Shift ทำการเลื่อนบิทไปทางซ้าย 5 bit 5 bit LeftShift 1 LeftShift 1 5 bit 5 bit LeftShift 10000 01100 00001 11000

  20. DES เบื้องต้น P8(Permutation) ทำหน้าที่ สลับและเปลี่ยนตำแหน่งบิทและลดขนาดของ บิท ลงเหลือ 8 บิท P8 6 3 7 4 8 5 10 9 P8 00100 00011 01000011

  21. The Function fK fK(L,R)=(LF(R,SK),R)

  22. E/P(Expansion/permutation) ทำหน้าที่ ขยายบิทและสลับตำแหน่งบิทใหม่ E/P 4 1 2 3 2 3 4 1 1001 11000011 E/P

  23. S-box ลดขนาดบิท x x x x P0 P1 P2 P3 0111 P0=0,P1=1,P2=1,P3=1

  24. S-box P0,3 P0,3 0 1 2 3 0 0 1 2 3 1 2 0 1 3 2 3 0 1 0 3 2 1 0 3 0 1 2 3 0 1 0 3 2 1 3 2 1 0 2 0 2 1 3 3 3 1 3 2 P1,2 P1,2 S1= S0= S0 11 0100

  25. P4(Permutation) ทำหน้าที่ สลับและเปลี่ยนตำแหน่งบิท P4 2 4 3 1 1001 0101 P4

  26. The switch Function ทำหน้าที่สลับ 4Bit บน กับ 4 Bit ล่าง switch 01101001 10010110

  27. IP(Initial Permutation) เป็นการเอาข้อมูลมาสลับบิทก่อน IP(x) IP 2 6 3 1 4 8 5 7 00101101 00110011 IP

  28. IP-1 (Inverse Permutation) สลับบิทข้อมูลกลับ IP-1(IP(X))=X IP-1 4 1 3 5 7 2 8 6 00101101 IP-1 01100110

  29. General n-bit-n-bit Block Substitution (shown with n = 4) Plaintext Ciphertext 0000 1110 0001 0100 0010 1101 0011 0001 0100 0010 0101 1111 0110 1011 0111 1000 1000 0011 1001 1010 1010 0110 1011 1100 1100 0101 1101 1001 1110 0000 1111 0111

  30. The Data Encryption Standard DES Encryption

  31. DES Encryption

  32. Single Round of DES Algorithm

  33. Permutation Tables for DES

  34. Calculation of F(R, K)

  35. โดยการสลับ และแปลงข้อมูล 6 บิทเหลือ 4 บิท 1 2 3 4 5 6 S Bit 1,6 เลือก Row Bit 2,3,4,5 เลือก Column

  36. ข้อมูล 110010 เข้า S1 10 = Row 2 1001=Column 9 เปิดตาราง S1 110010 S1 1100 (12)

  37. แปลง key 64 Bit เป็นขนาด 56 Bit

  38. แปลง key 56 Bit เป็นขนาด 48 Bit

  39. brute-force attack ค้นหา key

More Related