IS 302: Information Security and Trust Week 3: From DES to AES 2012.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

Lecture 7 Overview. Advanced Encryption Standard 10, 12, 14 rounds for 128, 192, 256 bit keys – Regular Rounds (9, 11, 13) – Final Round is different.
“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Cryptography and Network Security Chapter 3
The Advanced Encryption Standard (AES) Simplified.
Block Ciphers and the Data Encryption Standard
Advanced Encryption Standard
Chapter 5 Cryptography Protecting principals communication in systems.
Advanced Encryption Standard(AES) Presented by: Venkata Marella Slide #9-1.
Advanced Encryption Standard. This Lecture Why AES? NIST Criteria for potential candidates The AES Cipher AES Functions and Inverse Functions AES Key.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
Cryptography and Network Security (AES) Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/18/2009 INCS 741: Cryptography 10/18/20091Dr.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
ICS 454 Principles of Cryptography Advanced Encryption Standard (AES) (AES) Sultan Almuhammadi.
Lecture 23 Symmetric Encryption
Cryptography Block Ciphers and Feistel Functions.
Encryption Schemes Second Pass Brice Toth 21 November 2001.
CSE 651: Introduction to Network Security
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Data Encryption Standard (DES). Symmetric Cryptography  C = E(P,K)  P = D(C,K)  Requirements  Given C, the only way to obtain P should be with  the.
The Digital Encryption Standard CSCI 5857: Encoding and Encryption.
IS 302: Information Security and Trust Week 2: Encryption Basics 2012.
The Data Encryption Standard - see Susan Landau’s paper: “Standing the test of time: the data encryption standard.” DES - adopted in 1977 as a standard.
symmetric key cryptography
1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.
Classical &ontemporyryptology 1 AESAES Classical &ontemporyryptology 2 Advanced Encryption Standard Since DES was becoming less reliable as new cryptanalysis.
Advance Encryption Standard. Topics  Origin of AES  Basic AES  Inside Algorithm  Final Notes.
Information Security Lab. Dept. of Computer Engineering 122/151 PART I Symmetric Ciphers CHAPTER 5 Advanced Encryption Standard 5.1 Evaluation Criteria.
Network Security Lecture 14 Presented by: Dr. Munam Ali Shah.
Chapter 20 Symmetric Encryption and Message Confidentiality.
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Block ciphers Structure of a multiround block cipher
Cryptography Chapter 7 Part 2 Pages 781 to 812. Symmetric Cryptography Secret Key Figure 7-10 on page 782 Key distribution problem – Secure courier Many.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
Dr. Reuven Aviv, Nov 2008 Conventional Encryption 1 Conventional Encryption & Message Confidentiality Acknowledgements for slides Henric Johnson Blekinge.
Classical &ontemporyryptology 1 Block Cipher Today’s most widely used ciphers are in the class of Block Ciphers Today’s most widely used ciphers are in.
DES Algorithm Data Encryption Standard. DES Features Block cipher, 64 bits per block 64-bit key, with only 56 bits effective ECB mode and CBC mode.
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
 Cryptography is the science of using mathematics to encrypt and decrypt data.  Cryptography enables you to store sensitive.
Advanced Encryption Standard. Origins NIST issued a new version of DES in 1999 (FIPS PUB 46-3) DES should only be used in legacy systems 3DES will be.
Lecture 23 Symmetric Encryption
Cryptography Lecture 17: Advanced Encryption Standard (AES) Piotr Faliszewski.
Fifth Edition by William Stallings
Chapter 2 Symmetric Encryption.
Plaintextciphertext encryption algorithmdecryption algorithm plaintext.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
1 The Data Encryption Standard. 2 Outline 4.1 Introduction 4.4 DES 4.5 Modes of Operation 4.6 Breaking DES 4.7 Meet-in-the-Middle Attacks.
DES: Data Encryption Standard
Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 7 September 9, 2004.
Network Security Lecture 3 Secret Key Cryptography
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
CSE 5/7353 – January 25 th 2006 Cryptography. Conventional Encryption Shared Key Substitution Transposition.
1 CPCS425: Information Security (Topic 5) Topic 5  Symmetrical Cryptography  Understand the principles of modern symmetric (conventional) cryptography.
Triple DES.
Chapter-2 Classical Encryption Techniques.
Lecture 3: Symmetric Key Encryption
Chapter -3 ADVANCED ENCRYPTION STANDARD & BLOCK CIPHER OPERATION
Block Ciphers: DES and AES
SYMMETRIC ENCRYPTION.
Advanced Encryption Standard
Presentation transcript:

IS 302: Information Security and Trust Week 3: From DES to AES 2012

© Yingjiu Li Review –Kerckhoff principle –Attacks to cryptosystem –Caesar, Vigenere, Zimmerman, Vernam cipher –Confusion and diffusion

© Yingjiu Li Modern Symmetric Ciphers DES AES

© Yingjiu Li Block Ciphers vs Stream Ciphers Block ciphers –DES and AES… –For each block, perform multiple rounds of confusion and diffusion operations Stream ciphers –Vernam,… –Bit by bit operations

© Yingjiu Li DES NBS call for proposal IBM’s DES  Horst Feistel’s Lucifer cipher 1976 US Federal standard 1990  DES design is optimal –Almost any change to DES weakens it May 26, 2002, DES was superseded by AES –brute force attack can easily break 56-bit DES key DES  valid till 2030 –extensively used in banking industry

© Yingjiu Li Jeff Moser: guide-to-advanced.html

© Yingjiu Li 20077

8

9

10

© Yingjiu Li One Round in Encoding 56-bits key  bits sub-key 64-bits blocks –Right half  left half –Left half mixed with encrypted right half  right half A round of encoding a block in DES (repeat 16 times) Left half blockRight half block New left half block New right half block substitution permutation Sub key f

© Yingjiu Li Overall Diagram f function

© Yingjiu Li DES procedure visualization Cryptool: –Indiv. procedures  visualization of algorithms  DES –You need Java runtime environment at least version –You also need to download and install the current version of ANIMAL animation software

© Yingjiu Li Multiple DESes Two-Key DES –Total key size is 56x2=112 bits; but the effective key size is only 57 bits only! Triple DES (3DES) –This is a secure solution with effective key size of 112 bits E Data K1 E K2 C E Data K1 D K2 C E K1

© Yingjiu Li DES encryption demo Cryptool  encrypt/decrypt  symmetric (modern) –DES (CBC) –3-DES (CBC)

© Yingjiu Li Security Concerns 56 bit key is too short –Can be broken on average in 2^55 ≈3.6*10^16 trials –Moore’s law: speed of processor doubles per 1.5 yr –1997: 3500 machines broke DES in about 4 months –1998: 1M dollar machine broke DES in about 4 days

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li AES 1997 NIST call Final five –Rijndael(Joan Daemen and Vincent Rijmen),Joan DaemenVincent Rijmen –Serpent(Ross Anderson), –Twofish(Bruce Schneier), –RC6(Don Rivest, Lisa Yin), –MARS (Don Coppersmith, IBM) 2000 Rijndael won 2002 Rijndael became AES

© Yingjiu Li AES vs DES DESAES Date Block size64128 Key length56128, 192, 256 Number of rounds169,11,13 Encryption primitivesSubstitution, permutationSubstitution, shift, bit mixing Cryptographic primitivesConfusion, diffusion DesignOpen Design rationaleClosedOpen Selection processSecretSecret, but accept open public comment SourceIBM, enhanced by NSAIndependent cryptographers

© Yingjiu Li 2007http://en.wikipedia.org/wiki/Advance d_Encryption_Standard 27 High-Level Cipher Algorithm KeyExpansion (one 128/192/256-biy key to 10/12/ bit subkeys) Initial Round –AddRoundKey (cipher key) Steps in each of 9/11/13 rounds (state: 4*4=16-array of bytes = 128 bit-block) –SubBytes — a non-linear substitution step where each byte is replaced with another according to a lookup table. –ShiftRows — a transposition step where each row of the state is shifted cyclically a certain number of steps. –MixColumns — a mixing operation which operates on the columns of the state, combining the four bytes in each column –AddRoundKey — each byte of the state is combined with the round key; each round key is derived from the cipher key using a key schedule. Final Round (no MixColumns) –SubBytes –ShiftRows –AddRoundKey How many rounds in total? How many round keys?

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li

© Yingjiu Li Follow Me Cryptool: AES procedures –Invid. Procedures  visualization of algorithms  AES –Web version: content/uploads/2008/10/rijndael_ingles2004.s wfhttp:// content/uploads/2008/10/rijndael_ingles2004.s wf AES-128-CBC encryption –Encrypt/decrypt  symmetric (modern)  AES

© Yingjiu Li Four Modes of Block Ciphers How are multiple blocks processed? –ECB: Electronic Code Book –CBC: Cipher Block Chaining –CFB: Cipher Feedback –OFB: Output Feedback

© Yingjiu Li Electronic codebook (ECB) mode P1P2 P3 Enc C1C2 C3 K C1C2 C3 Dec P1P2 P3 K

© Yingjiu Li 2007 Cipher-block Chaining (CBC) Mode P1 IVP2 C1 P3 C2 Enc C1C2 C3 K C1C2 C3 Dec P1 IVP2 C1 P3 C2 K P1P2 P3 IVC1C2

© Yingjiu Li Original image ECB vs CBC Which mode would you choose? Which one is semantically secure? Encrypted with ECBEncrypted with CBC

© Yingjiu Li Hands-On Exercise AES Encryption and Decryption –OpenSSL –JCE Download Lab.doc and follow instructions

© Yingjiu Li Introduction:Javax.crypto.Cipher This class provides the functionality of a cryptographic cipher for encryption and decryption Methods: –getInstance(String algorithm ) Generates a Cipher object that implements the specified algorithm. –init(int opmode, Key key ) The cipher is initialized with a key for either encryption or decryption. –doFinal(byte[] input ) Encrypts or decrypts data depending on how this cipher was initialized. Further details:

© Yingjiu Li Example: AES Encryption The following sample encrypts a file “clear.txt”and save the output as a file named “encryptedfile”. // Create a cipher object with algorithm “AES”. Cipher cipher = Cipher.getInstance("AES"); //Set the Cipher object to ENCRYPT MODE //Initialise it with the encryption key “mykey”. //Previous example demostrated how to retrieve this key from a keystore. cipher.init(Cipher.ENCRYPT_MODE, mykey); //Create an input stream to read the file. File clr=new File(“clear.txt”); FileInputStream fi = new FileInputStream(clr); //Get the size of the file. long length = clr.length();…..cont’d

© Yingjiu Li Example: AES Encryption cont’d //Create a byte array with the size of the file. byte[] plaintext = new byte[(int) length]; //Read data into the byte array fi.read(plaintext); //Close file fi.close(); // Now encrypt the text and store it in the byte array ciphertext byte[] ciphertext = cipher.doFinal(plaintext); //Write encrypted text into the output file File enc=new File(“encryptedfile”) FileOutputStream fo = new FileOutputStream(enc); fo.write(ciphertext); fo.close();

© Yingjiu Li Example: AES Decryption The following sample decrypts a file “encryptedfile”and save the output as a file named “decryptedfile”. // Create a cipher object with algorithm “AES” Cipher cipher = Cipher.getInstance("AES"); //Set the Cipher object to DECRYPT MODE //Initialise it with the decryption key “mykey”. //Previous example demostrated how to retrieve this key from a keystore. cipher.init(Cipher.DECRYPT_MODE, mykey); //Create an input stream to read the file. File enc=new File(“encryptedfile”); FileInputStream fi = new FileInputStream(enc); //Get the size of the file. long length = enc.length();…..cont’d

© Yingjiu Li Example: AES Decryption cont’d //Create a byte array with the size of the file. byte[] ciphertext = new byte[(int) length]; //Read data into the byte array fi.read(ciphertext); //Close file fi.close(); // Now decrypt the text and store it in the byte array ciphertext byte[] plaintext = cipher.doFinal(ciphertext); //Write encrypted text into the output file File dec=new File(“decryptedfile”) FileOutputStream fo = new FileOutputStream(dec); fo.write(plaintexttext); fo.close();

© Yingjiu Li Review Questions Which of the following is stream cipher 1)DES 2) AES 3) Vernam What is effective key size for 4-DES 1)112 bits 2) 113 bits 3) 168 bits Increasing key size from 56 bits to 128 bits, how many times more effort an attacker needs to spend in brute force attack? 1)72 2) 2^72 3) 2^184

© Yingjiu Li Individual Assignment 1 (5%) Due in week 4 (please submit hardcopy during week 4 class) –Textbook 1.11 Exercises 3, 12, 15 (pages in 3 rd edition, pages in 4 th edition) –Textbook 2.13 Exercises 1, 13, 17, 19 (pages in 3 rd edition, pages in 4 th edition)