spring 2010 cs419
play

Spring 2010: CS419 Computer Security Vinod Ganapathy Lecture 3 - PowerPoint PPT Presentation

Spring 2010: CS419 Computer Security Vinod Ganapathy Lecture 3 Material from Chapter 2 in textbook and Lecture 2 handout (Chapter 8, Bishops book) Slides adapted from Matt Bishop, William Stallings and Lawrie Brown Modern Block Ciphers


  1. Spring 2010: CS419 Computer Security Vinod Ganapathy Lecture 3 Material from Chapter 2 in textbook and Lecture 2 handout (Chapter 8, Bishop’s book) Slides adapted from Matt Bishop, William Stallings and Lawrie Brown

  2. Modern Block Ciphers • now look at modern block ciphers • one of the most widely used types of cryptographic algorithms • provide secrecy /authentication services • focus on DES (Data Encryption Standard) • to illustrate block cipher design principles

  3. Block vs Stream Ciphers • block ciphers process messages in blocks, each of which is then en/decrypted • like a substitution on very big characters – 64­bits or more • stream ciphers process messages a bit or byte at a time when en/decrypting • many current ciphers are block ciphers • broader range of applications

  4. Block Cipher Principles • most symmetric block ciphers are based on a Feistel Cipher Structure • needed since must be able to decrypt ciphertext to recover messages efficiently • block ciphers look like an extremely large substitution • would need table of 2 64 entries for a 64­bit block • instead create from smaller building blocks • using idea of a product cipher

  5. Ideal Block Cipher

  6. Claude Shannon and Substitution­ Permutation Ciphers • Claude Shannon introduced idea of substitution­ permutation (S­P) networks in 1949 paper • form basis of modern block ciphers • S­P nets are based on the two primitive cryptographic operations seen before: – substitution (S­box) – permutation (P­box) • provide confusion & diffusion of message & key

  7. Confusion and Diffusion • cipher needs to completely obscure statistical properties of original message • a one­time pad does this • more practically Shannon suggested combining S & P elements to obtain: • diffusion – dissipates statistical structure of plaintext over bulk of ciphertext • confusion – makes relationship between ciphertext and key as complex as possible

  8. Feistel Cipher Structure • Horst Feistel devised the feistel cipher – based on concept of invertible product cipher • partitions input block into two halves – process through multiple rounds which – perform a substitution on left data half – based on round function of right half & subkey – then have permutation swapping halves • implements Shannon’s S­P net concept

  9. Feistel Cipher Structure

  10. Feistel Cipher Design Elements • block size • key size • number of rounds • subkey generation algorithm • round function • fast software en/decryption • ease of analysis

  11. Feistel Cipher Decryption

  12. Data Encryption Standard (DES) • most widely used block cipher in world • adopted in 1977 by NBS (now NIST) – as FIPS PUB 46 • encrypts 64­bit data using 56­bit key • has widespread use • has been considerable controversy over its security

  13. DES History • IBM developed Lucifer cipher – by team led by Feistel in late 60’s – used 64­bit data blocks with 128­bit key • then redeveloped as a commercial cipher with input from NSA and others • in 1973 NBS issued request for proposals for a national cipher standard • IBM submitted their revised Lucifer which was eventually accepted as the DES

  14. Overview of the DES • A block cipher: – encrypts blocks of 64 bits – outputs 64 bits of ciphertext • A product cipher – basic unit is the bit – performs both substitution and transposition (permutation) on the bits • Cipher consists of 16 rounds (iterations) each with a round key generated from the user­supplied key

  15. Generation of Round Keys key • Round keys are 48 bits each PC­1 C0 D0 LSH LSH PC­2 K1 C1 D1 LSH LSH PC­2 K16

  16. DES Key Schedule • forms subkeys used in each round – initial permutation of the key (PC1) which selects 56­bits in two 28­bit halves – 16 stages consisting of: • rotating each half separately either 1 or 2 places depending on the key rotation schedule K • selecting 24­bits from each half & permuting them by PC2 for use in round function F • note practical use issues in h/w vs s/w

  17. Encipherment input IP L 0 R 0 ⊕ f K 1 R 1 = L 0 ⊕ f (R 0 , K 1 ) L 1 = R 0 L 16 = R 15 ­ f (R 15 , K 16 R 16 = L 15 ) IP Ğ1 output

  18. Initial Permutation IP • first step of the data computation • IP reorders the input data bits • even bits to LH half, odd bits to RH half • quite regular in structure (easy in h/w) • example: IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)

  19. DES Round Structure • uses two 32­bit L & R halves • as for any Feistel cipher can describe as: L i = R i –1 R i = L i –1 ⊕ F( R i –1 , K i ) • F takes 32­bit R half and 48­bit subkey: – expands R to 48­bits using perm E – adds to subkey using XOR – passes through 8 S­boxes to get 32­bit result – finally permutes using 32­bit perm P

  20. The f Function

  21. DES Decryption • decrypt must unwind steps of data computation • with Feistel design, do encryption steps again using subkeys in reverse order (SK16 … SK1) – IP undoes final FP step of encryption – 1st round with SK16 undoes 16th encrypt round – …. – 16th round with SK1 undoes 1st encrypt round – then final FP undoes initial encryption IP – thus recovering original data value

  22. Strength of DES – Key Size • 56­bit keys have 2 56 = 7.2 x 10 16 values • brute force search looks hard • recent advances have shown is possible – in 1997 on Internet in a few months – in 1998 on dedicated h/w (EFF) in a few days – in 1999 above combined in 22hrs! • still must be able to recognize plaintext • must now consider alternatives to DES

  23. Strength of DES – Analytic Attacks • now have several analytic attacks on DES • these utilize some deep structure of the cipher – by gathering information about encryptions – can eventually recover some/all of the sub­key bits – if necessary then exhaustively search for the rest • generally these are statistical attacks • include – differential cryptanalysis – linear cryptanalysis – related key attacks

  24. Strength of DES – Timing Attacks • attacks actual implementation of cipher • use knowledge of consequences of implementation to derive information about some/all subkey bits • specifically use fact that calculations can take varying times depending on the value of the inputs to it • particularly problematic on smartcards

  25. Differential Cryptanalysis • A chosen ciphertext attack – Requires 2 47 plaintext, ciphertext pairs • Revealed several properties – Small changes in S­boxes reduce the number of pairs needed – Making every bit of the round keys independent does not impede attack

  26. Differential Cryptanalysis • one of the most significant recent (public) advances in cryptanalysis • known by NSA in 70's • Murphy, Biham & Shamir published in 90’s • powerful method to analyse block ciphers • used to analyse most current block ciphers with varying degrees of success

  27. Differential Cryptanalysis • have some input difference giving some output difference with probability p • if find instances of some higher probability input / output difference pairs occurring • can infer subkey that was used in round • then must iterate process over many rounds (with decreasing probabilities)

  28. DES Modes • Electronic Code Book Mode (ECB) – Encipher each block independently • Cipher Block Chaining Mode (CBC) – Xor each block with previous ciphertext block – Requires an initialization vector for the first one • Encrypt­Decrypt­Encrypt Mode (2 keys: k , k ′ ) – c = DES k (DES k ′ –1 (DES k ( m ))) • Encrypt­Encrypt­Encrypt Mode (3 keys: k , k ′ , k ′′ ) – c = DES k (DES k ′ (DES k ′′ ( m )))

  29. CBC Mode Encryption init. vector … m 1 m 2 ⊕ ⊕ DES DES … c 1 c 2 … sent sent

  30. CBC Mode Decryption init. vector … c 1 c 2 DES DES … ⊕ ⊕ m 1 m 2 …

  31. Self­Healing Property • Initial message – 3231343336353837 3231343336353837 3231343336353837 3231343336353837 • Received as (underlined 4c should be 4b) – ef7c4cb2b4ce6f3b f6266e3a97af0e2c 746ab9a6308f4256 33e60b451b09603d • Which decrypts to – efca61e19f4836f1 3231333336353837 3231343336353837 3231343336353837 – Incorrect bytes underlined – Plaintext “heals” after 2 blocks

  32. Current Status of DES • Design for computer system, associated software that could break any DES­enciphered message in a few days published in 1998 • Several challenges to break DES messages solved using distributed computing • NIST selected Rijndael as Advanced Encryption Standard, successor to DES – Designed to withstand attacks that were successful on DES

  33. Next topic: Public­key cryptography

  34. Public­Key Cryptography (PKC) • Two keys – Private key known only to individual – Public key available to anyone • Public key, private key inverses • Idea – Confidentiality: encipher using public key, decipher using private key – Integrity/authentication: encipher using private key, decipher using public one • Proposed by Whitfield Diffie and Martin Hellman in 1976

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend