Summary

This document provides an introduction to modern block ciphers and Simplified DES. It covers topics such as the basic ideas behind modern block ciphers and how they improve security using techniques like polyalphabetic ciphers and the concept of a block cipher.

Full Transcript

Modern Block Ciphers Introduction to Network Security Basic idea of modern block ciphers From classical ciphers, we learn two techniques that may improve security: Encrypt multiple letters at a time Use multiple ciphertext alphabets (Polyalphabetic ciphers)...

Modern Block Ciphers Introduction to Network Security Basic idea of modern block ciphers From classical ciphers, we learn two techniques that may improve security: Encrypt multiple letters at a time Use multiple ciphertext alphabets (Polyalphabetic ciphers) Combining these two techniques encrypt eight (or more) letters at a time called a block cipher and use an extremely large number of ciphertext alphabets will be called modes of operation 1 What is Simplified DES Developed 1996 as a teaching tool Santa Clara University Prof. Edward Schaefer Takes an 8-bit block plaintext, a 10 –bit key and produces an 8-bit block of ciphertext Decryption takes the 8-bit block of ciphertext, the same 10-bit key and produces the original 8-bit block of plaintext Simplified DES 1) Generate k1, k2 A- Apply P10 on the key B- Shift one to the left C- Apply P8  k1 D- Again, apply p10 on the key E- Shift 3 to the left F- Apply p8 k2 2) Encrypt the plain text A- Apply an initial permutation (IP) B- Find fk1 which is a complex 2-input function C- Apply the switch function which is a simple permutation that swaps the two parts D- Again, find fk2 , but this time on k2 E- Apply inverse permutation (IP-1) 2) Encrypt the plain text (in more details) Then the steps for encryption are: 1. Apply the initial permutation, IP, on P 2. Assume the input from step 1 is in two halves, L and R 3. Expand and permutate R using E/P 4. XOR input from step 3 with K1 5. Input left half of step 4 into S-Box S0 and right half into S-Box S1 fk1 6. Rearrange outputs from step 5 using P4 7. XOR output from step 6 with L half from step 2 8. Now we have the output of step 7 as the left half and the original R as the right half (Switch the halves and move to round 2) 9. E/P with right half 10. XOR output of step 9 with K2 11. Input left half of step 10 into S-Box S0 and right half into S-Box S1 12. Rearrange output from step 11 using P4 fk2 13. XOR output of step 12 with left half from step 8 14. Input output from step 13 and right half from step 8 into inverse IP 1 0 3 2 3 2 1 0 s0 0 2 1 3 3 1 3 2 0 1 2 3 s1 2 0 1 3 3 0 1 0 2 1 0 3 1 0 3 2 3 2 1 0 s 0 2 1 3 0 3 1 3 2 0 1 2 3 2 0 1 3 s 3 0 1 0 1 2 1 0 3 Appendix s0 s1 1 0 3 2 0 1 2 3 3 2 1 0 2 0 1 3 0 2 1 3 3 0 1 0 3 1 3 2 2 1 0 3 Key Generation Operations (A) Apply permutation P10: 10 (B) Apply LS-1 (left shift 1) to each 5-bit group. P10 5 5 (C) Apply permutation P8: LS-1 LS-1 (D) Apply LS-2 (left shift 2) to each 5-bit group. 5 5 1 0 1 0 0 0 0 0 1 0 Key P8 8 1 0 0 0 0 0 1 1 0 0 P10 K1 0 0 0 0 1 1 1 0 0 0 LS-1 LS-2 LS-2 1 0 1 0 0 1 0 0 P8  K1 5 5 1 0 0 0 0 0 1 1 0 0 P8 LS-2 0 0 1 0 0 0 0 0 1 1 8 K2 0 1 0 0 0 0 1 1 P8  K2 S-box Operation 0 1 1 0 0 1 1 1 (1) First and fourth bits give row number S0 Row = 00  0 (2) Second and third bits give column number  2  10 Col = 11  3 (3) Look up number in specified row and column (4) Convert to binary S1 Row = 01  1  3  11 Col = 11  3 S0: S1: 1 0 3 2 0 1 2 3 1 0 1 1 3 2 1 0 2 0 1 3 0 1 1 1 P4 0 2 1 3 3 0 1 0 3 1 3 2 2 1 0 3 1 0 1 0 First 4 bits 1 1 0 1 The function FK( 8-bits ) ---------> ( 8-bits ) 1 1 0 1 0 0 1 0 Let L, R be the left 4 bits and right 4 bits of the input. Then FKey( L , R ) = (L XOR f(R, Key), R) The right half and swap 0 0 1 1 1 1 0 1 IP E/P 4 Encryption Detail 8 K 1 4 4 4 S0 S1 2 2 P4 4 SW The permutation IP E/P 0 1 1 1 0 0 1 0 PT The permutation IP-1 K2 1 0 1 0 1 0 0 1 IP 1 0 1 0 1 0 0 1 (A) Apply expansion/permutation E/P to input 4 bits 1 1 0 0 0 0 1 1 E/P S0 S1 1 0 1 0 0 1 0 0 K1 (B) Add the 8-bit key (use XOR) P4 (C) Pass the left 4 bits through S-box S0 and the 0 1 1 0 0 1 1 1 right 4 bits through S-box S1 0 1 1 0 0 1 1 1 (D) Apply permutation P4: IP -1 S-DES Scheme Encryptio Decryption n P10 8-bit 8-bit plaintext plaintext SHIFT IP IP -1 P8 K1 K1 fk fk SHIFT SW SW K2 P8 K2 fk fk IP -1 IP 8-bit 8-bit ciphertext ciphertext

Use Quizgecko on...
Browser
Browser