block ciphers and des
play

Block Ciphers and DES S-DES DES Details DES Design Other Ciphers - PowerPoint PPT Presentation

CSS441 Block Ciphers Principles DES Block Ciphers and DES S-DES DES Details DES Design Other Ciphers CSS441: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 20


  1. CSS441 Block Ciphers Principles DES Block Ciphers and DES S-DES DES Details DES Design Other Ciphers CSS441: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 20 December 2015 css441y15s2l03, Steve/Courses/2015/s2/css441/lectures/block-ciphers-and-des.tex, r4295 1/50

  2. CSS441 Contents Block Ciphers Principles Block Cipher Principles DES S-DES DES Details The Data Encryption Standard DES Design Other Ciphers Simplified-DES DES Details DES Design Issues and Attacks 3DES, AES and Other Block Ciphers 2/50

  3. CSS441 Stream Ciphers Block Ciphers ◮ Encrypts a digital data stream one bit or one byte at a Principles time DES ◮ One time pad is example; but practical limitations S-DES ◮ Typical approach for stream cipher: DES Details ◮ Key ( K ) used as input to bit-stream generator algorithm DES Design ◮ Algorithm generates cryptographic bit stream ( k i ) used Other Ciphers to encrypt plaintext ◮ Users share a key; use it to generate keystream 3/50

  4. CSS441 Block Ciphers Block Ciphers ◮ Encrypt a block of plaintext as a whole to produce Principles same sized ciphertext DES ◮ Typical block sizes are 64 or 128 bits S-DES ◮ Modes of operation used to apply block ciphers to DES Details DES Design larger plaintexts Other Ciphers 4/50

  5. CSS441 Reversible and Irreversible Mappings Block Ciphers ◮ n -bit block cipher takes n bit plaintext and produces n Principles bit ciphertext DES ◮ 2 n possible different plaintext blocks S-DES ◮ Encryption must be reversible (decryption possible) DES Details DES Design ◮ Each plaintext block must produce unique ciphertext Other Ciphers block ◮ Total transformations is 2 n ! Reversible Mapping Irreversible Mapping Plaintext Ciphertext Plaintext Ciphertext 00 11 00 11 01 10 01 10 10 00 10 01 11 01 11 01 5/50

  6. CSS441 Ideal Block Cipher Block Ciphers ◮ n -bit input maps to 2 n possible input states Principles ◮ Substitution used to produce 2 n output states DES ◮ Output states map to n -bit output S-DES DES Details ◮ Ideal block cipher allows maximum number of possible DES Design encryption mappings from plaintext block Other Ciphers ◮ Problems with ideal block cipher: ◮ Small block size: equivalent to classical substitution cipher; cryptanalysis based on statistical characteristics feasible ◮ Large block size: key must be very large; performance/implementation problems 6/50

  7. CSS441 General Block Substitution Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 7/50

  8. CSS441 Encryption/Decryption Tables Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 8/50

  9. CSS441 Feistel Structure for Block Ciphers Block Ciphers ◮ Feistel proposed applying two or more simple ciphers in Principles sequence so final result is cryptographically stronger DES than component ciphers S-DES ◮ n -bit block length; k -bit key length; 2 k transformations DES Details ◮ Feistel cipher alternates: substitutions, transpositions DES Design Other Ciphers (permutations) ◮ Applies concepts of diffusion and confusion ◮ Applied in many ciphers today ◮ Approach: ◮ Plaintext split into halves ◮ Subkeys (or round keys) generated from key ◮ Round function, F , applied to right half ◮ Apply substitution on left half using XOR ◮ Apply permutation: interchange to halves 9/50

  10. CSS441 Diffusion and Confusion Block Ciphers Diffusion Principles DES ◮ Statistical nature of plaintext is reduced in ciphertext S-DES ◮ E.g. A plaintext letter affects the value of many DES Details ciphertext letters DES Design ◮ How: repeatedly apply permutation (transposition) to Other Ciphers data, and then apply function Confusion ◮ Make relationship between ciphertext and key as complex as possible ◮ Even if attacker can find some statistical characteristics of ciphertext, still hard to find key ◮ How: apply complex (non-linear) substitution algorithm 10/50

  11. CSS441 Feistel Encryption and Decryption Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 11/50

  12. CSS441 Using the Feistel Structure Block Ciphers ◮ Exact implementation depends on various design Principles features DES ◮ Block size, e.g. 64, 128 bits: larger values leads to more S-DES diffusion DES Details ◮ Key size, e.g. 128 bits: larger values leads to more DES Design confusion, resistance against brute force Other Ciphers ◮ Number of rounds, e.g. 16 rounds ◮ Subkey generation algorithm: should be complex ◮ Round function F : should be complex ◮ Other factors include fast encryption in software and ease of analysis ◮ Trade-off: security vs performance 12/50

  13. CSS441 Feistel Example Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 13/50

  14. CSS441 Contents Block Ciphers Principles Block Cipher Principles DES S-DES DES Details The Data Encryption Standard DES Design Other Ciphers Simplified-DES DES Details DES Design Issues and Attacks 3DES, AES and Other Block Ciphers 14/50

  15. CSS441 Data Encryption Standard Block Ciphers ◮ Symmetric block cipher Principles ◮ 56-bit key, 64-bit input block, 64-bit output block DES ◮ One of most used encryption systems in world S-DES ◮ Developed in 1977 by NBS/NIST DES Details ◮ Designed by IBM (Lucifer) with input from NSA DES Design ◮ Principles used in other ciphers, e.g. 3DES, IDEA Other Ciphers ◮ Simplified DES (S-DES) ◮ Cipher using principles of DES ◮ Developed for education (not real world use) 15/50

  16. CSS441 Contents Block Ciphers Principles Block Cipher Principles DES S-DES DES Details The Data Encryption Standard DES Design Other Ciphers Simplified-DES DES Details DES Design Issues and Attacks 3DES, AES and Other Block Ciphers 16/50

  17. CSS441 Simplified DES Block Ciphers ◮ Input (plaintext) block: 8-bits Principles ◮ Output (ciphertext) block: 8-bits DES ◮ Key: 10-bits S-DES DES Details ◮ Rounds: 2 DES Design ◮ Round keys generated using permutations and left shifts Other Ciphers ◮ Encryption: initial permutation, round function, switch halves ◮ Decryption: Same as encryption, except round keys used in opposite order 17/50

  18. CSS441 S-DES Algorithm Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 18/50

  19. CSS441 S-DES Operations Block Ciphers ◮ P10 (permutate) Principles Input : 1 2 3 4 5 6 7 8 9 10 DES Output: 3 5 2 7 4 10 1 9 8 6 S-DES DES Details ◮ P8 (select and permutate) DES Design Input : 1 2 3 4 5 6 7 8 9 10 Other Ciphers Output: 6 3 7 4 8 5 10 9 ◮ P4 (permutate) Input : 1 2 3 4 Output: 2 4 3 1 19/50

  20. CSS441 S-DES Operations Block Ciphers ◮ EP (expand and permutate) Principles Input : 1 2 3 4 DES Output: 4 1 2 3 2 3 4 1 S-DES DES Details ◮ IP (initial permutation) DES Design Input : 1 2 3 4 5 6 7 8 Other Ciphers Output: 2 6 3 1 4 8 5 7 ◮ IP − 1 (inverse of IP) ◮ LS-1 (left shift 1 position) ◮ LS-2 (left shift 2 positions) 20/50

  21. CSS441 S-DES Key Generation Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 21/50

  22. CSS441 S-DES Encryption Details Block Ciphers Principles DES S-DES DES Details DES Design Other Ciphers 22/50

  23. CSS441 S-DES S-Boxes Block Ciphers ◮ S-DES (and DES) perform substitutions using S-Boxes Principles ◮ S-Box considered as a matrix: input used to select DES row/column; selected element is output S-DES ◮ 4-bit input: bit 1 , bit 2 , bit 3 , bit 4 DES Details DES Design ◮ bit 1 bit 4 specifies row (0, 1, 2 or 3 in decimal) Other Ciphers ◮ bit 2 bit 3 specifies column ◮ 2-bit output  01 00 11 10   00 01 10 11  11 10 01 00 10 00 01 11     S 0 = S 1 =     00 10 01 11 11 00 01 00     11 01 11 10 10 01 00 11 23/50

  24. CSS441 S-DES Example Block Ciphers ◮ Plaintext: 01110010 Principles ◮ Key: 1010000010 DES ◮ Ciphertext: 01110111 S-DES DES Details DES Design Other Ciphers 24/50

  25. CSS441 S-DES Summary Block Ciphers ◮ Educational encryption algorithm Principles ◮ S-DES expressed as functions: DES S-DES ciphertext = IP − 1 ( f K 2 ( SW ( f K 1 ( IP ( plaintext ))))) DES Details DES Design plaintext = IP − 1 ( f K 1 ( SW ( f K 2 ( IP ( ciphertext ))))) Other Ciphers ◮ Security of S-DES: ◮ 10-bit key, 1024 keys: brute force easy ◮ If know plaintext and corresponding ciphertext, can we determine key? Very hard 25/50

  26. CSS441 Comparing DES and S-DES Block Ciphers Principles S-DES DES DES ◮ 8-bit blocks S-DES ◮ 64-bit blocks DES Details ◮ 10-bit key: 2 x 8-bit ◮ 56-bit key: 16 x 48-bit DES Design round keys round keys Other Ciphers ◮ IP: 8-bits ◮ IP: 64 bits ◮ F operates on 4 bits ◮ F operates on 32 bits ◮ 2 S-Boxes ◮ 8 S-Boxes ◮ 2 rounds ◮ 16 rounds S-DES encryption: ciphertext = IP − 1 ( f K 2 ( SW ( f K 1 ( IP ( plaintext ))))) DES encryption: ciphertext = IP − 1 ( f K 16 ( SW ( f K 15 ( SW ( . . . ( f K 1 ( IP ( plaintext )))))))) 26/50

  27. CSS441 Contents Block Ciphers Principles Block Cipher Principles DES S-DES DES Details The Data Encryption Standard DES Design Other Ciphers Simplified-DES DES Details DES Design Issues and Attacks 3DES, AES and Other Block Ciphers 27/50

Recommend


More recommend