Goals for Today. Substitution Permutation Ciphers. Substitution Permutation stages. Encryption Details 8/24/2010

Similar documents
Encryption Details COMP620

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

ECE596C: Handout #7. Analysis of DES and the AES Standard. Electrical and Computer Engineering, University of Arizona, Loukas Lazos

EEC-484/584 Computer Networks

Outline. Data Encryption Standard. Symmetric-Key Algorithms. Lecture 4

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

Week 5: Advanced Encryption Standard. Click

3 Symmetric Key Cryptography 3.1 Block Ciphers Symmetric key strength analysis Electronic Code Book Mode (ECB) Cipher Block Chaining Mode (CBC) Some

Attacks on Advanced Encryption Standard: Results and Perspectives

Cryptography. Submitted to:- Ms Poonam Sharma Faculty, ABS,Manesar. Submitted by:- Hardeep Gaurav Jain

Advanced Encryption Standard and Modes of Operation. Foundations of Cryptography - AES pp. 1 / 50

RSA (material drawn from Avi Kak Lecture 12, Lecture Notes on "Computer and Network Security" Used in asymmetric crypto.

Block Ciphers. Lucifer, DES, RC5, AES. CS 470 Introduction to Applied Cryptography. Ali Aydın Selçuk. CS470, A.A.Selçuk Block Ciphers 1

Block Ciphers. Secure Software Systems

Computer Security. 08. Cryptography Part II. Paul Krzyzanowski. Rutgers University. Spring 2018

Few Other Cryptanalytic Techniques

Computer Security 3/23/18

Introduction to Cryptology. Lecture 17

L3. An Introduction to Block Ciphers. Rocky K. C. Chang, 29 January 2015

Goals of Modern Cryptography

Course Business. Midterm is on March 1. Final Exam is Monday, May 1 (7 PM) Allowed to bring one index card (double sided) Location: Right here

EEC-682/782 Computer Networks I

Cryptography and Network Security

Data Encryption Standard (DES)

Cryptography and Network Security. Sixth Edition by William Stallings

Block Ciphers and Data Encryption Standard. CSS Security and Cryptography

Symmetric Key Encryption. Symmetric Key Encryption. Advanced Encryption Standard ( AES ) DES DES DES 08/01/2015. DES and 3-DES.

Implementation of Full -Parallelism AES Encryption and Decryption

Content of this part

Cryptographic Techniques. Information Technologies for IPR Protections 2003/11/12 R107, CSIE Building

Public Key Cryptography

Lecture 2: Secret Key Cryptography

Chapter 9. Public Key Cryptography, RSA And Key Management

Tuesday, January 17, 17. Crypto - mini lecture 1

Public-key encipherment concept

Some Stuff About Crypto

Jaap van Ginkel Security of Systems and Networks

Applied Cryptography and Computer Security CSE 664 Spring 2018

Fundamentals of Cryptography

CPSC 467b: Cryptography and Computer Security

Crypto Basics. Recent block cipher: AES Public Key Cryptography Public key exchange: Diffie-Hellmann Homework suggestion

Block Ciphers Introduction

Network Security Essentials

Secret Key Cryptography

Comp527 status items. Crypto Protocols, part 2 Crypto primitives. Bart Preneel July Install the smart card software. Today

CPSC 467b: Cryptography and Computer Security

An overview and Cryptographic Challenges of RSA Bhawana

Symmetric Key Cryptography

Cryptography and Network Security. Sixth Edition by William Stallings

CSc 466/566. Computer Security. 6 : Cryptography Symmetric Key

Overview. Public Key Algorithms I

Cryptography and Network Security

CPSC 467: Cryptography and Computer Security

Symmetric Cryptography. CS4264 Fall 2016

Public Key Cryptography

Secret Key Systems (block encoding) Encrypting a small block of text (say 64 bits) General Considerations:

Lecture 5. Encryption Continued... Why not 2-DES?

Public-Key Cryptanalysis

Presented by: Kevin Hieb May 2, 2005

Cryptography Functions

A New hybrid method in watermarking using DCT and AES

Hybrid Key Encryption using Cryptography for Wireless Sensor Networks V-Algorithm

Computational Security, Stream and Block Cipher Functions

Symmetric Key Algorithms. Definition. A symmetric key algorithm is an encryption algorithm where the same key is used for encrypting and decrypting.

AES Advanced Encryption Standard

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

Piret and Quisquater s DFA on AES Revisited

Hybrid Public Key Cryptosystem Combining RSA & DES Algorithms

Study Guide to Mideterm Exam

Lecture 4. Encryption Continued... Data Encryption Standard (DES)

Private-Key Encryption

CSC 474/574 Information Systems Security

CSC 474/574 Information Systems Security

CS6701- CRYPTOGRAPHY AND NETWORK SECURITY UNIT 2 NOTES

L3: Basic Cryptography II. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Chapter 3 Public Key Cryptography

Applied Cryptography Data Encryption Standard

Public Key Algorithms

CSCI 454/554 Computer and Network Security. Topic 3.1 Secret Key Cryptography Algorithms

Public Key Algorithms

ISA 662 Internet Security Protocols. Outline. Prime Numbers (I) Beauty of Mathematics. Division (II) Division (I)

Secret Key Cryptography

H must be collision (2n/2 function calls), 2nd-preimage (2n function calls) and preimage resistant (2n function calls)

Area Optimization in Masked Advanced Encryption Standard

Public-Key Cryptography

Cryptographic Algorithms - AES

AIT 682: Network and Systems Security

Cryptography (DES+RSA) by Amit Konar Dept. of Math and CS, UMSL

Cryptography MIS

The Encryption Standards

Chapter 9 Public Key Cryptography. WANG YANG

in a 4 4 matrix of bytes. Every round except for the last consists of 4 transformations: 1. ByteSubstitution - a single non-linear transformation is a

Lecture 2. Cryptography: History + Simple Encryption,Methods & Preliminaries. Cryptography can be used at different levels

CS Network Security. Module 6 Private Key Cryptography

Introduction to Cryptographic Systems. Asst. Prof. Mihai Chiroiu

18-642: Cryptography 11/15/ Philip Koopman

Lecture 4: Symmetric Key Encryption

CSCE 813 Internet Security Symmetric Cryptography

Lecture 6: Overview of Public-Key Cryptography and RSA

Transcription:

Encryption Details COMP620 Goals for Today Understand how some of the most common encryption algorithms operate Learn about some new potential encryption systems Substitution Permutation Ciphers A Substitution Permutation encryption algorithm typically involves three phases, which are often repeated Substitution the substitution of a bit pattern with another Permutation the rearrangement of the bits Exclusive OR with a key Substitution Permutation stages The K box XORs the input with the key for that round The S box performs a substitution diagram from Cryptography Theory and Practice, 3 rd ed. by Douglas Stinson COMP620 Information Privacy & Security 1

S Box S Box Expansion or Contraction An S box performs a substitution. The substitution can be efficiently implemented by a look up table Example of a 3 bit to 3 bit substitution input 000 001 010 011 100 101 110 111 output 101 010 110 000 111 001 011 100 The number of bits on the input of an S box does not have to match ththe number of bits on the output Example of a 3 bit input with 2 bit output input 000 001 010 011 100 101 110 111 output 10 01 11 01 11 00 10 00 Permutation Expansion The number of bits on the output of a permutation tti does not need to match ththe input Some input bits can go to multiple output bits Stage Keys The key used at each stage is a function of the original ii lkey Before each stage the key is modified to produce a unique key for that stage Some stages might use only some of the key bits COMP620 Information Privacy & Security 2

Data Encryption Standard DES Algorithm Originally developed by IBM Adopted as a standard in 1977 Was the most widely used cryptosystem in the world DES uses a 56 bit key 64 bit blocks of data are encrypted DES is a substitution permutation cipher There are 16 stages The data is split into the left and right half. Each 32 bit half is handled differently The 56 bit key is divided into two 28 bit halves which are used to create unique 48 bit keys for each stage DES Stage DES Key Schedule The 56 bit key is split into two 28 bit halves hl Each half is rotated 1 or 2 bits to the left 48 of the 56 bits are selected for the stage key Each bit is used in 14 of the 16 stages COMP620 Information Privacy & Security 3

DES Effectiveness Triple DES Analysis has found few weaknesses in DES Differential cryptanalysis can find the key with 2 47 chosen plaintext/ciphertext pairs The DES key is too short Brute force attacks can defeat DES To improve security while still using DES, triple DES is usually used. ciphertext = E Key3 (D Key2 (E Key1 (plaintext))) The three keys can be: All different best security using 168 bit keys Key1 = Key3, Key2 different Good with ih112 bit keys All identical same as single DES Advanced Encryption Standard AES is also known as the Rijndael algorithm Selected in 2000 as the new standard after an open international competition Created by Belgian researchers Rijmen and Daemen Available world wide royalty free AES encrypts blocks of 128 bits Keys can be either 128 bits, 194 bits or 256 bits AES operates on a 4 4 array of bytes, termed the state AES Algorithm Initial Stage AddRoundKey Each Stage SubBytes a substitution step ShiftRows rows are shifted cyclically MixColumns each column of the state is multiplied with a fixed polynomial AddRoundKey each byte is XOR with the stage key Final Stage(no MixColumns) SubBytes ShiftRows AddRoundKey COMP620 Information Privacy & Security 4

AddRoundKey Step SubBytes Step Each byte of the data is XOR with the key for that t stage Each byte in the array is updated using an 8 bit substitution btit box, the Rijndael S box. ShiftRows Step This cyclically shifts the bytes in each row by a certain ti offset. MixColumns Step Each column is multiplied by a fixed polynomial. l All four input tbt bytes determine dt the four output bytes. COMP620 Information Privacy & Security 5

AES Implementation It is possible to speed up execution of this cipher by combining SubBytes and ShiftRows with MixColumns, and transforming them into a sequence of table lookups This requires 4KB of lookup tables A stage can now be done with 16 table lookups and 12 XOR, followed dby four XOR in the AddRoundKey step Intel and AMD are adding instructions to the Pentium to perform an AES stage RSA Algorithm RSA is an asymmetric encryption algorithm developed din 1977 by Rivest (author of COMP785 text), Shamir and Adleman Secretly developed by Clifford Cocks in 1973 The most commonly used public key algorithm Now in the public domain RSA Encryption The sender encrypts message m as c = m e mod n c is sent to the receiver The receiver computes m = c d mod n RSA Algorithm Select secret primes p and q and form n = p*q The totient Φ(n) = (p 1)*(q 1) Choose e with gcd( e, Φ(n) ) = 1 Compute d such that d*e = 1 mod Φ(n) The public key is n and e The secret key is d COMP620 Information Privacy & Security 6

RSA Example Let p = 101 and q = 113 n = 11413 = p * q Φ(n) = (p 1)*(q 1) = 11200 Choose e = 3533 (gcd of e and Φ(n)is 1) d = e 1 mod 11200 = 6597 Assume m = 9726 Encryption: c = 9726 3533 mod 11413 = 5761 Decryption: m = 5761 6597 mod 11413 = 9726 Sizes Typically large values of p and q are selected to make it difficult to factor. Therefore n is very large, log 2 n bits in length The pieces of plain text to encrypt, m, must be 0 < m < n The cipher text can be up to log 2 n bits long Another RSA Example Let p = 885320963 and q = 238855417 n = 211463707796206571 Choose e = 9007 d = e 1 mod 11200 = 116402471153538991 Assume m = 30120 c = 113535859035722866 Note that c is much larger than m It requires more space to store c than m RSA Key Concern For n = p*q, if we know the first or last (log 2 n)/4 digits of m, we can efficiently factor n If p has 100 digits, then if we know the first or last 50 bits of p or q, we can factor n Imagine we select p and q by picking a random 50 bit number and multiplying it by 2 50 to get 100 bits. We then add 1 and test for primality until we get a prime We can guess the lowest 50 bits of the number COMP620 Information Privacy & Security 7

Short Theory Review Remember that algorithms can be classified according to the time (ormemory) required for the solution of an n sized problem O(2 n ) exponential O(n x ) O(n 2 ) O(n log n) O(n) linear O(log n) O(1) constant polynomial Oracles In algorithm theory we assume we have an oracle that can guess solutions and will always guess correctly. If you want to find a path through all nodes of a graph, you could ask the oracle what is the next node to traverse. It would take n steps to find the shortest path through an n node graph. Verifying the Solution Once you have a solution from an oracle, you can verify that t it is correct. If you can verify that the solution is correct in polynomial time, the problem is NP hard Non deterministic Polynomial time Known NP Problems Subset Sum problem given a set of integers { 7 7, 3, 2, 5, 8} is there a subset that will sum to zero? Knapsack problem Given a set of items, each with a weight and a value, what is the optimal set to put in a fixed sized box? Boolean Satisfiability problem can the variables of a logical expression be given values that will make the expression true? All polynomial time problems COMP620 Information Privacy & Security 8

Problem Reduction NP Complete If you can convert (or reduce) problem A to problem B, then you know if you can solve problem B, you can always solve problem A The subset sum problem can be reduced to the knapsack problem If you can reduce a known NP hard problem to problem X, then if you can solve problem X in polynomial time, you can solve the NP hard problem in polynomial time. NP Complete is a set of HP hard problems that are all reducable. If you can solve one in polynomial time, you can solve all of them. Some NP Complete Problems Graph coloring Traveling salesman Bin packing Knapsack Hamiltonian graphs Equivalence of ContextFreeLanguages Sudoku Boolean satisfiability Knapsack Problem The knapsack algorithm is an NP Complete problem Consider a set of integers x 0 x n and a number E which is greater than any x i Can you create a set of integers a 0 a n such that COMP620 Information Privacy & Security 9

Easy Knapsack Problem Knapsack Encryption Algorithm The super increasing knapsack algorithm has a linear solution Consider a set of integers x 0 x n such that each x i is greater than the sum of all x i before it. It is easy to solve this problem R. Merkle and M. Hellman devised an asymmetrical ti encryption algorithm based on the knapsack problem. A super increasing set of x i is transformed into a regular knapsack set of x i by a method known only to the secret key holder The public key is the normal knapsack set of x i Knapsack Encryption To encrypt message b, let b=b1b2 bn (in binary format) ) Compute y= b1x1+ b2x2 + + bnxn and send y To decrypt, solve for b i using the super increasing knapsack values Dr. Williams Research I have been working on developing a new asymmetric ti encryption algorithm based on a non computable number No algorithm has yet been devised, but there is no reason to believe that a solution does not exist Flaws have been found in the algorithm COMP620 Information Privacy & Security 10

Harder than Hard The RSA algorithm is secure because it is difficult to factor large numbers. The simple algorithm is Computers are getting faster and mathematicians are getting smarter There are problems that are harder than NP Complete problems No Possible Solution The halting problem is the best known noncomputable problem. You cannot write an algorithm that reads a program and its data and can always tell if the program comes to the end. There are many instances of non computable problems that can be easily solved, but you cannot solve all of them There are several known non computable problems Post correspondence problem Given a set of domino like tiles with symbols on the top and bottom, can a series of tiles be placed side by side so that the string of symbols on the top matches the string of symbols on the bottom Assume you have an infinite number of each type of domino 100 0 1 Solution to Example Simple solution to this instance of the problem requiring seven dominos 100 1 100 100 1 0 0 1 00 1 1 00 100 100 1 100 00 COMP620 Information Privacy & Security 11

More Difficult Problem If you change the bottom number on the last tile so that it only contains one zero, the problem becomes much more difficult. This simple change has a solution, but it requires 75 dominos. 100 0 1 1 100 0 Difficulty How do you know if there is no solution? With the previous problem, had you tried all possible combinations of 74 or less dominos, you would not have found an answer, but one does exist There still exists sets of 3 dominos with 3 or less digit binary numbers where it is unknown if a solution exists Wang tiles When using a set of square tiles with colored edges, can the tiles be arranged without rotation or reflection so that they tile a plane with adjacent tiles having edges of the same color? Assume you have an infinite supply of each tile Tiling Solution COMP620 Information Privacy & Security 12

Periodic and Aperiodic The previous solution has a 2 by 4 block that can be repeated tdforever Some sets of tiles can tile an infinite plane without repeating Aperiodic Tiling Domino Snakes Using tiles similar to Wang Tiles, can a given set of tiles form a path from two given points so that all adjacent tile edges have matching colors? Snake Solution COMP620 Information Privacy & Security 13

Use in Encryption Like the knapsack encryption algorithm, we are looking for a way to transform the tiles from a nearly impossible problem to a simple problem. We have been developing heuristics to identify sets of tiles that do or do not tile the plane or form a snake COMP620 Information Privacy & Security 14