computer security hkust hong kong computer security
play

Computer Security HKUST, Hong Kong Computer Security Cunsheng - PowerPoint PPT Presentation

CUNSHENG DING Computer Security HKUST, Hong Kong Computer Security Cunsheng DING, HKUST COMP4631 CUNSHENG DING Computer Security HKUST, Hong Kong Lecture 07: Several One-Key Block Ciphers Outline of this Lecture One-key


  1. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Computer Security Cunsheng DING, HKUST COMP4631

  2. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Lecture 07: Several One-Key Block Ciphers Outline of this Lecture • One-key stream ciphers • The Data Encryption Standard (DES) • The Triple DES • The Advanced Encryption Standard (AES) • A method for padding messages • The Cipher Block Chaining (CBC) mode Page 1 COMP4631

  3. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong One-key Stream Ciphers A 6-tuple ( M , C , K , E k , D k , u ), where • M , C , K are respectively the plaintext space, ciphertext space, and key space; • Any k ∈ K could be the encryption and decryption key; and • u is a time-variable parameter stored in a memory device. • E k and D k are encryption and decryption transformations with D k ( E k ( m, u ) , u ) = m for each m ∈ M . Remark: The ciphertext c = E k ( m, u ) depends on k , m and u , and is time-dependent, as u is time-variable. We will see one-key stream ciphers today. Page 2 COMP4631

  4. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The Data Encryption Standard in Brief • It is a block cipher with key length 56 bits. • It was designed by IBM in 1976 for the National Bureau of Standards (NBS), with approval from the National Security Agency (NSA). • It had been used as a standard for encryption until 2000. In 2001 a new encryption standard, AES, replaced the DES, because its key length is too short. • Although its wide spread use came to an end, its design idea is still used in most block ciphers. Page 3 COMP4631

  5. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The DES Encryption and Decryption key 56 bits 64 bits 64 bits E_k m_i c_i Encryption process key 56 bits 64 bits 64 bits D_k c_i m_i Decryption process Page 4 COMP4631

  6. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong 1 56−bit key input block IP L0 k1 R0 k1 Round 1 f L1 k2 R1 k2 key Round 2 schedule f algorithm . . . . . . . . . L15 k16 R15 k16 Round 16 f L16 R16 swap Why swap? R16 L16 −1 IP output block Page 5 COMP4631

  7. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong IP -1 (R16||L16) input block Decryption IP R16 k16 L16 Round 1 f R15 k15 L15 Round 2 f . . . . . . k1 R1 L1 Round 16 f R0 L0 swap L0 R0 -1 IP IP -1 (L0||R0) output block Page 6 COMP4631

  8. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong DES Design Criteria Remark: Details of the building blocks and their design criteria are out of the scope of this course, and can be found in the reading materials posted on the course webpage. Further information may be found in: • B. Schneier, Applied Cryptography, 2nd Edition, John Wiley & Sons, 1996, pp. 293–294. • D. Coppersmith, The Data Encryption Standard (DES) and Its Strength Against Attacks, IBM Journal of Research and Development, May 1994. Page 7 COMP4631

  9. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Security of DES Question: Is DES really secure? Answer: It is not regarded as secure only because its key length is too short, in view of today’s hardware technology. So DES has been replaced by the AES – Advanced Encryption Standard (Rijndael). In the public literature there is no practical attack on DES that is based on the structure of DES. But it is possible that some secret organization has a practical attack. • D. Coppersmith, The Data Encryption Standard (DES) and Its Strength Against Attacks, IBM Journal of Research and Development, May 1994. Page 8 COMP4631

  10. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The DES Variants Triple DES: Let E k and D k be the encryption and decryption function of DES. Encryption: c = E k 1 ( D k 2 ( E k 3 ( m ))). Decryption: m = D k 3 ( E k 2 ( D k 1 ( c ))). Key length 168 bits. If k 1 = k 3 � = k 2 , it is called Triple DES with two keys . Other Variants: DES with Independent Subkeys, and CRYPT(3) (used in Unix system), etc. Reference: B. Schneier, Applied Cryptography, 2nd Edition, John Wiley & Sons, 1996, pp. 294–300. Page 9 COMP4631

  11. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The Advanced Encryption Standard (AES) Background: The key length of DES is too short and should be replaced. NIST issued a call for proposals for a new Advanced Encryption Standard in 1997. The basic requirements are: • Its security strength should be equal to or better than 3DES and should be much more efficient. • AES must be a symmetric block cipher with a key length of 128 bits, and support for key lengths 192 and 256 bits. Page 10 COMP4631

  12. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The Advanced Encryption Standard (AES) Rijndael: Many international proposals were received. After three rounds of selection and evaluation, in 2000 Rijndael was selected as the new AES by NIST. Designers: Joan Daemen and Vincent Rijmen from Belgium. • Key lengths: 128, 192, 256 bits. • Plaintext block length: 128 bits. Page 11 COMP4631

  13. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The AES Encryption and Decryption key 128, 192, 256 bits 128 bits 128 bits E_k m_i c_i Encryption process key 128, 192, 256 bits 128 bits 128 bits D_k c_i m_i Decryption process Page 12 COMP4631

  14. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong The Advanced Encryption Standard (AES) References: • J. Daemen and V. Rijmen, The Design of Rijndael, Springer-Verlag, 2001. • W. Stallings, Cryptography and Network Security: Principles and Practices, 3rd Edition, Pearson Education, 2003. Page 13 COMP4631

  15. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Why Padding Messages Question: If you use AES to encrypt your message, you need to break it into blocks, each with 128 bits. However, it is possible that the last block is not a complete block of 128 bits. How would you encrypt the last block? Page 14 COMP4631

  16. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong A Method for Padding Messages original m, three blocks + 1/3 padding 2/3 block extra block ����� ����� ����� ����� length of message Page 15 COMP4631

  17. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Five Modes of Operations for Block Ciphers • Electronic Codebook (ECB) Mode • Cipher Block Chaining (CBC) Mode • Cipher Feedback (CFB) Mode (not introduced in COMP4631) • Output Feedback (OFB) Mode (not introduced in COMP4631) • Counter Mode (not introduced in COMP4631) Page 16 COMP4631

  18. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Assumptions on the Underlying Block Cipher The underlying block cipher ( M , C , K , E k , D k ) maps a plaintext block of n bits into a ciphertext of n bits. Padding the last block if necessary. Let m = m 1 m 2 · · · m h be the message, where the m i are plaintext blocks of n bits, and let c = c 1 c 2 · · · c h be the corresponding ciphertext, where the c i are ciphertext blocks of n bits. Page 17 COMP4631

  19. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Electronic Codebook Mode (ECB) Page 18 COMP4631

  20. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Electronic Codebook Mode: Pictorial Remarks: No internal memory. k m_i c_i E_k encryption D_k c_i m_i k decription Page 19 COMP4631

  21. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Electronic Codebook Mode: Mathematical Encryption: c i = E k ( m i ) for each i . Decryption: m i = D k ( c i ) for each i . Application: secure transmission of single values (e.g., encryption key), not for lengthy message. Remark: Same plaintext block is always encrypted to the same ciphertext block. Page 20 COMP4631

  22. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Cipher Block Chaining Mode (CBC) Page 21 COMP4631

  23. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Cipher Block Chaining Mode: Pictorial Choose any n -bit vector IV as the initial value, and define c 0 = IV . It is stored in a register (memory device) with n bit memory. IV c_i-1 encryption E_k m_i c_i k IV c_i-1 decrption D_k c_i m_i k Page 22 COMP4631

  24. CUNSHENG DING ❁ Computer Security HKUST, Hong Kong Cipher Block Chaining Mode: Mathematical Operation: Set t = n . Choose any n -bit vector IV as the initial value, and define c 0 = IV . Encryption: c i = E k ( m i ⊕ c i − 1 ) for each i ≥ 1. Decryption: m i = D k ( c i ) ⊕ c i − 1 for each i ≥ 1. Application: general-purpose block-oriented transmission, authentication. Page 23 COMP4631

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