Encryption CS 465 January 9, 2006 Tim van der Horst.

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

Lect. 8 : Advanced Encryption Standard
Origins  clear a replacement for DES was needed Key size is too small Key size is too small The variants are just patches The variants are just patches.
Chap. 5: Advanced Encryption Standard (AES) Jen-Chang Liu, 2005 Adapted from lecture slides by Lawrie Brown.
Chapter 3  Symmetric Key Cryptosystems 1 Overview  Modern symmetric-key cryptosystems o Data Encryption Standard (DES)  Adopted in 1976  Block size.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography Introduction Last Updated: Aug 20, 2013.
The Advanced Encryption Standard (AES) Simplified.
Sukesh Jain – Media Informatics
Advanced Encryption Standard
Cryptography and Network Security
Algorithm Scheme. AddRoundKey Each round uses four different words from the expanded key array. Each column in the state matrix is XORed with a different.
This Lecture: AES Key Expansion Equivalent Inverse Cipher Rijndael performance summary.
Advanced Encryption Standard(AES) Presented by: Venkata Marella Slide #9-1.
AES clear a replacement for DES was needed
Advanced Encryption Standard. This Lecture Why AES? NIST Criteria for potential candidates The AES Cipher AES Functions and Inverse Functions AES Key.
Cryptography and Network Security (AES) Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/18/2009 INCS 741: Cryptography 10/18/20091Dr.
RIJNDAEL Arta Doci University Of Colorado.
The Design of Improved Dynamic AES and Hardware Implementation Using FPGA 游精允.
Introduction to Modern Cryptography Lecture 3 (1) Finite Groups, Rings and Fields (2) AES - Advanced Encryption Standard.
Cryptography and Network Security Chapter 5. Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know.
Cryptography and Network Security Chapter 5 Fourth Edition by William Stallings.
ICS 454 Principles of Cryptography Advanced Encryption Standard (AES) (AES) Sultan Almuhammadi.
Lecture 23 Symmetric Encryption
CS470, A.SelcukAfter the DES1 Block Ciphers After the DES CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
Encryption Schemes Second Pass Brice Toth 21 November 2001.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Chapter 5 Advanced Encryption Standard. Origins clear a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
Cryptography and Network Security
Cryptography and Network Security
Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know what the key is it's virtually indecipherable."
DARPA AES Finalist Algorithm: The Rijndael Block Cipher Mel Tsai University of California at Berkeley.
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
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.
AES Background and Mathematics CSCI 5857: Encoding and Encryption.
FORESEC Academy FORESEC Academy Security Essentials (IV)
Information Security Lab. Dept. of Computer Engineering 122/151 PART I Symmetric Ciphers CHAPTER 5 Advanced Encryption Standard 5.1 Evaluation Criteria.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Rijndael Advanced Encryption Standard. Overview Definitions Definitions Who created Rijndael and the reason behind it Who created Rijndael and the reason.
Chapter 20 Symmetric Encryption and Message Confidentiality.
 Cryptography is the science of using mathematics to encrypt and decrypt data.  Cryptography enables you to store sensitive.
CS555Spring 2012/Topic 101 Cryptography CS 555 Topic 10: Block Cipher Security & AES.
AES: Rijndael 林志信 王偉全. Outline Introduction Mathematical background Specification Motivation for design choice Conclusion Discussion.
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
Advanced Encryption Standard Dr. Shengli Liu Tel: (O) Cryptography and Information Security Lab. Dept. of Computer.
Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion.
Network Security Lecture 3 Secret Key Cryptography
The Advanced Encryption Standard Part 1: Overview
Understanding Cryptography by Christof Paar and Jan Pelzl Chapter 4 – The Advanced Encryption Standard (AES) ver. October 28, 2009.
Le Trong Ngoc Security Fundamentals (2) Encryption mechanisms 4/2011.
Encryption / Decryption on FPGA Midterm Presentation Written by: Daniel Farcovich ID Saar Vigodskey ID Advisor: Mony Orbach Summer.
Last Updated: Aug 25, Implement AES Use the FIPS 197 spec as your guide o Avoid looking at code on the Internet o Challenge yourself to implement.
Practical Aspects of Modern Cryptography Josh Benaloh & Brian LaMacchia.
Triple DES.
School of Computer Science and Engineering Pusan National University
The Advanced Encryption Standard: Rijndael
Cryptography Introduction
AES Objectives ❏ To review a short history of AES
Advanced Encryption Standard (Symmetric key Algorithm)
CS 465 AES Last Updated: Sep 7, 2017.
The Encryption Standards
Introduction to Modern Cryptography
Advanced Encryption Standard
Presentation transcript:

Encryption CS 465 January 9, 2006 Tim van der Horst

What is Encryption? Transform information such that its true meaning is hidden  Requires “special knowledge” to retrieve the information Examples  AES, 3DES, RC4, ROT-13, …

Types of Encryption Schemes Ciphers ClassicalModern Rotor Machines SubstitutionPublic KeyTranspositionSecret Key BlockStream Steganography

Symmetric Encryption Terms AliceBob Plaintext Ciphertext Key Encryption Algorithm Decryption Algorithm

What can go wrong? Algorithm  Rely on the secrecy of the algorithm Examples: Substitution ciphers  Algorithm is used incorrectly Example: WEP used RC4 incorrectly Key  Too small  Too big

Big numbers Uses really big numbers  1 in 2 61 odds of winning the lotto and being hit by lightning on the same day  2 92 atoms in the average human body  possible keys in a 128-bit key  atoms in the planet  atoms in the sun  atoms in the galaxy  possible keys in a 256-bit key

Thermodynamic Limitations* Physics: To set or clear a bit requires no less than kT k is the Boltzman constant (1.38* erg/ºK) T is the absolute temperature of the system Assuming T = 3.2ºK (ambient temperature of universe) kT = 4.4* ergs Annual energy output of the sun 1.21*10 41 ergs  Enough to cycle through a 187-bit counter Build a Dyson sphere around the sun and collect all energy for 32 year, we could  Enough to cycle through a 192-bit counter. Supernova produces in the neighborhood of ergs  Enough to cycle through a 219-bit counter *From Applied Cryptography

Perfect Encryption Scheme? One-Time Pad (XOR message with key) Example*:  Message: ONETIMEPAD  Key: TBFRGFARFM  Ciphertext: IPKLPSFHGQ  The key TBFRGFARFM decrypts the message to ONETIMEPAD  The key POYYAEAAZX decrypts the message to SALMONEGGS  The key BXFGBMTMXM decrypts the message to GREENFLUID *From Applied Cryptography

Advanced Encryption Standard a.k.a Lab #1 Not “American” Encryption Standard

How was AES created? AES competition  Started in January 1997 by NIST  4-year cooperation between U.S. Government Private Industry Academia Why?  Replace 3DES  Provide an unclassified, publicly disclosed encryption algorithm, available royalty-free, worldwide

The Finalists MARS  IBM RC6  RSA Laboratories Rijndael  Joan Daemen (Proton World International) and  Vincent Rijmen (Katholieke Universiteit Leuven) Serpent  Ross Anderson (University of Cambridge),  Eli Biham (Technion), and  Lars Knudsen (University of California San Diego) Twofish  Bruce Schneier, John Kelsey, and Niels Ferguson (Counterpane, Inc.),  Doug Whiting (Hi/fn, Inc.),  David Wagner (University of California Berkeley), and  Chris Hall (Princeton University) Wrote the book on crypto

Evaluation Criteria (in order of importance) Security Resistance to cryptanalysis, soundness of math, randomness of output, etc. Cost Computational efficiency (speed) Memory requirements Algorithm / Implementation Characteristics Flexibility, hardware and software suitability, algorithm simplicity

Results

The winner: Rijndael AES adopted a subset of Rijndael  Rijndael supports more block and key sizes

Lab #1 Implement AES  Use FIPS 197 as guide Everything in this tutorial but in more detail Pseudocode 20 pages of complete, step by step debugging information

Finite Fields AES uses the finite field GF(2 8 )  b 7 x 7 + b 6 x 6 + b 5 x 5 + b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + b 0 {b 7, b 6, b 5, b 4, b 3, b 2, b 1, b 0 } Byte notation for the element: x 6 + x 5 + x + 1  { } – binary  {63} – hex Has its own arithmetic operations  Addition  Multiplication

Finite Field Arithmetic Addition (XOR) (x 6 + x 4 + x 2 + x + 1) + (x 7 + x + 1) = x 7 + x 6 + x 4 + x 2 { }  { } = { } {57}  {83} = {d4} Multiplication is tricky

Finite Field Multiplication (  ) (x 6 + x 4 + x 2 + x +1) (x 7 + x +1) = x 13 + x 11 + x 9 + x 8 + x 7 + x 7 + x 5 + x 3 + x 2 + x + x 6 + x 4 + x 2 + x +1 = x 13 + x 11 + x 9 + x 8 + x 6 + x 5 + x 4 + x 3 +1 and x 13 + x 11 + x 9 + x 8 + x 6 + x 5 + x 4 + x 3 +1 modulo ( x 8 + x 4 + x 3 + x +1) = x 7 + x Irreducible Polynomial These cancel

Efficient Finite field Multiply There’s a better way  xtime() – very efficiently multiplies its input by {02} Multiplication by higher powers can be accomplished through repeat application of xtime()

Efficient Finite field Multiply Example: {57}  {13} {57}  {02} = xtime({57}) = {ae} {57}  {04} = xtime({ae}) = {47} {57}  {08} = xtime({47}) = {8e} {57}  {10} = xtime({8e}) = {07} {57}  {13} = {57}  ({01}  {02}  {10}) = ({57}  {01})  ({57}  {02})  ({57}  {10}) = {57}  {ae}  {07} = {fe}

AES parameters Nb – Number of columns in the State  For AES, Nb = 4 Nk – Number of 32-bit words in the Key  For AES, Nk = 4, 6, or 8 Nr – Number of rounds (function of Nb and Nk)  For AES, Nr = 10, 12, or 14

AES methods Convert to state array Transformations (and their inverses) AddRoundKey SubBytes ShiftRows MixColumns Key Expansion

Convert to State Array Input block: S 0,0 S 0,1 S 0,2 S 0,3 S 1,0 S 1,1 S 1,2 S 1,3 S 2,0 S 2,1 S 2,2 S 2,3 S 3,0 S 3,1 S 3,2 S 3,3 =

AddRoundKey XOR each byte of the round key with its corresponding byte in the state array S 0,0 S 0,1 S 0,2 S 0,3 S 1,0 S 1,1 S 1,2 S 1,3 S 2,0 S 2,1 S 2,2 S 2,3 S 3,0 S 3,1 S 3,2 S 3,3 S’ 0,0 S ’ 0,1 S’ 0,2 S’ 0,3 S’ 1,0 S’ 1,1 S’ 1,2 S’ 1,3 S’ 2,0 S’ 2,1 S’ 2,2 S’ 2,3 S’ 3,0 S’ 3,1 S’ 3,2 S’ 3,3 S 0,1 S 1,1 S 2,1 S 3,1 S’ 0,1 S’ 1,1 S’ 2,1 S’ 3,1 R 0,0 R 0,1 R 0,2 R 0,3 R 1,0 R 1,1 R 1,2 R 1,3 R 2,0 R 2,1 R 2,2 R 2,3 R 3,0 R 3,1 R 3,2 R 3,3 R 0,1 R 1,1 R 2,1 R 3,1 XOR

SubBytes Replace each byte in the state array with its corresponding value from the S-Box CC DD 2266AAEE 3377BBFF 55

ShiftRows Last three rows are cyclically shifted S 0,0 S 0,1 S 0,2 S 0,3 S 1,0 S 1,1 S 1,2 S 1,3 S 2,0 S 2,1 S 2,2 S 2,3 S 3,0 S 3,1 S 3,2 S 3,3 S 1,0 S 3,0 S 3,1 S 3,2 S 2,0 S 2,1

MixColumns Apply MixColumn transformation to each column S 0,0 S 0,1 S 0,2 S 0,3 S 1,0 S 1,1 S 1,2 S 1,3 S 2,0 S 2,1 S 2,2 S 2,3 S 3,0 S 3,1 S 3,2 S 3,3 S’ 0,0 S ’ 0,1 S’ 0,2 S’ 0,3 S’ 1,0 S’ 1,1 S’ 1,2 S’ 1,3 S’ 2,0 S’ 2,1 S’ 2,2 S’ 2,3 S’ 3,0 S’ 3,1 S’ 3,2 S’ 3,3 S 0,1 S 1,1 S 2,1 S 3,1 S’ 0,1 S’ 1,1 S’ 2,1 S’ 3,1 MixColumns() S’ 0,c = ({02}  S 0,c )  ({03}  S 1,c )  S 2,c  S 3,c S’ 1,c = S 0,c  ({02}  S 1,c )  ({03}  S 2,c )  S 3,c S’ 2,c = S 0,c  S 1,c  ({02}  S 2,c )  ({03}  S 3,c ) S’ 3,c = ({03}  S 0,c )  S 1,c  S 2,c  ({02}  S 3,c

Key Expansion Expands the key material so that each round uses a unique round key  Generates Nb(Nr+1) words Filled with just the key Filled with a combination of the previous work and the one Nk positions earlier

Encryption byte state[4,Nb] state = in AddRoundKey(state, keySchedule[0, Nb-1]) for round = 1 step 1 to Nr–1 { SubBytes(state) ShiftRows(state) MixColumns(state) AddRoundKey(state, keySchedule[round*Nb, (round+1)*Nb-1]) } SubBytes(state) ShiftRows(state) AddRoundKey(state, keySchedule[Nr*Nb, (Nr+1)*Nb-1]) out = state First and last operations involve the key Prevents an attacker from even beginning to encrypt or decrypt without the key

Decryption byte state[4,Nb] state = in AddRoundKey(state, keySchedule[Nr*Nb, (Nr+1)*Nb-1]) for round = Nr-1 step -1 downto 1 { InvShiftRows(state) InvSubBytes(state) AddRoundKey(state, keySchedule[round*Nb, (round+1)*Nb-1]) InvMixColumns(state) } InvShiftRows(state) InvSubBytes(state) AddRoundKey(state, keySchedule[0, Nb-1]) out = state

Encrypt and Decrypt Encryption AddRoundKey SubBytes ShiftRows MixColumns AddRoundKey SubBytes ShiftRows AddRoundKey Decryption AddRoundKey InvShiftRows InvSubBytes AddRoundKey InvMixColumns InvShiftRows InvSubBytes AddRoundKey