CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.

Slides:



Advertisements
Similar presentations
“Advanced Encryption Standard” & “Modes of Operation”
Advertisements

Block Ciphers and the Data Encryption Standard
Cryptography and Network Security Chapter 6 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 3 Block Ciphers and the Data Encryption Standard
Cryptography and Network Security Chapter 6. Chapter 6 – Block Cipher Operation Many savages at the present day regard their names as vital parts of themselves,
Cryptography1 CPSC 3730 Cryptography Chapter 6 Triple DES, Block Cipher Modes of Operation.
Symmetric Encryption Algorithms CS-480b Dick Steflik Text – Network Security Essentials – Wm. Stallings Lecture slides by Lawrie Brown Edited by Dick Steflik.
Cryptography1 CPSC 3730 Cryptography Chapter 3 DES.
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.
Chapter 3 – Block Ciphers and the Data Encryption Standard Jen-Chang Liu, 2004 Adopted from lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 6
Cryptography and Network Security Chapter 3. Chapter 3 – Block Ciphers and the Data Encryption Standard All the afternoon Mungo had been working on Stern's.
Lecture 23 Symmetric Encryption
CSCE 790G: Computer Network Security Chin-Tser Huang University of South Carolina.
Chapter 3 – Block Ciphers and the Data Encryption Standard
Cryptography and Network Security Chapter 3 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 3 – Block Ciphers and the Data Encryption Standard
Modes of Operation. Topics  Overview of Modes of Operation  EBC, CBC, CFB, OFB, CTR  Notes and Remarks on each modes.
Dr. Lo’ai Tawalbeh 2007 Chapter 3: Block Ciphers and the Data Encryption Standard Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
Information Security and Management 3. Block Ciphers and the Data Encryption Standard Chih-Hung Wang Fall
Cryptography and Network Security Chapter 3. Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types of cryptographic.
Applied Cryptography Example: AES. Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know what the key is it's.
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Chapter 20 Symmetric Encryption and Message Confidentiality.
Cryptography and Network Security Block Ciphers and DES, and modes of operation M. Sakalli Reviewed, from Stallings.
Cryptography and Network Security
Cryptography and Network Security Chapter 3 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Scott CH Huang COM 5336 Cryptography Lecture 2 Symmetric Cryptography Scott CH Huang COM 5336 Cryptography Lecture 2.
Data Security and Encryption (CSE348) 1. Lecture # 6 2.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Chapter 2 (B) – Block Ciphers and Data Encryption Standard.
CSCE 815 Network Security Lecture 4 DES again. Outline History of DES DES revisited.
Chapter 3 Block Ciphers and the Data Encryption Standard.
Symmetric Encryption Algorithms. Symmetric Cipher Model Plaintext Encryption Algorithm Secret Key (known to sender and receiver) Ciphertext Decryption.
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.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Cryptography and Network Security Chapter 6 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 3 – Block Ciphers and the Data Encryption Standard.
Cryptography and Network Security. Chapter 3 – Block Ciphers and the Data Encryption Standard All the afternoon Mungo had been working on Stern's code,
Lecture 23 Symmetric Encryption
Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,
Computer and Network Security Rabie A. Ramadan Lecture 3.
Module :MA3036NI Symmetric Encryption -4 Lecture Week 5.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Data Security and Encryption (CSE348) 1. Lecture # 7 2.
Cryptography and Network Security 2 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
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.
1 Block Ciphers (DES) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
Modern Block Ciphers and the Data Encryption Standard (DES)
Depart. of Computer Science and Engineering
Fall 2002CS 395: Computer Security1 Chapter 3: Modern Block Ciphers and the Data Encryption Standard.
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.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
Modes of Operation block ciphers encrypt fixed size blocks – eg. DES encrypts 64-bit blocks with 56-bit key need some way to en/decrypt arbitrary amounts.
Cryptography and Network Security Chapter 3 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Computer and Network Security
CSCE 715: Network Systems Security
Cryptography and Network Security Chapter 3
Cryptography and Network Security
Block Ciphers and the Data Encryption Standard (DES)
Block vs Stream Ciphers
Chapter -2 Block Ciphers and the Data Encryption Standard
Presentation transcript:

CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina

08/31/20102 Block Ciphers One of the most widely used types of cryptographic algorithms Provide confidentiality and/or authentication services E.g. DES (Data Encryption Standard)

08/31/20103 Block vs Stream Ciphers Block ciphers divide message into blocks, each of which is then encrypted into ciphertext block of same length Like a substitution on very big characters (64 bits or more) Stream ciphers encrypt message a bit or byte at a time

08/31/20104 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 if block size is 64 bits Instead, create from smaller building blocks using idea of product cipher

08/31/20105 Shannon’s Proposal Cipher needs to completely obscure statistical properties of original message One-time pad does this, but impractical In 1949 Claude Shannon proposed two more practical concepts of confusion and diffusion diffusion – dissipates statistical structure of plaintext over bulk of ciphertext confusion – makes relationship between ciphertext and key as complex as possible

08/31/20106 Substitution-Permutation Networks Modern substitution-transposition product cipher Basis of modern block ciphers Achieve diffusion by performing some permutation followed by applying some function Achieve confusion by applying complex substitution algorithm

08/31/20107 Feistel Cipher Structure Horst Feistel devised the feistel cipher based on concept of invertible product cipher Input block partitioned into two halves process through multiple rounds in each round, first perform a substitution on left data half based on round function of right half & subkey then have permutation swapping halves Implement Shannon’s substitution- permutation network concept

08/31/20108 Feistel Cipher Structure

08/31/20109 Feistel Cipher Design Principles Block size increasing block size improves security, but slows cipher Key size increasing key size improves security, makes exhaustive key searching harder, but may slow cipher Number of rounds increasing number of rounds improves security, but slows cipher Subkey generation greater complexity can make analysis harder, but slows cipher Round function greater complexity can make analysis harder, but slows cipher Fast software en/decryption & ease of analysis are more recent concerns for practical use and testing

08/31/ Feistel Encryption and Decryption

08/31/ Data Encryption Standard (DES) Most widely used block cipher in world First developed by IBM, adopted in 1977 by NBS (now NIST) Its pioneer LUCIFER encrypts 64-bit data block using 128-bit key DES encrypts 64-bit data block using 56-bit key Was controversial because of key size reduction, but encouraged subsequent research in cryptography

08/31/ DES Encryption

08/31/ 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) see textbook Table 3.2 Example: IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)

08/31/ Initial Permutation Table

08/31/ DES Round Structure Uses two 32-bit L & R halves Like any Feistel cipher, can be described as L i = R i–1 R i = L i–1 xor F(R i–1, K i ) Take 32-bit R half and 48-bit subkey expands R to 48 bits using perm E XOR with subkey passes through 8 S-boxes to get 32-bit result finally permutes this using 32-bit perm P

08/31/ Single Round of DES

08/31/ Expansion and Permutation

08/31/ Substitution Boxes (S-box) Have eight S-boxes which map 6 to 4 bits Each S-box works as follows outer bits 1 & 6 (row bits) select one row inner bits 2-5 (col bits) are substituted result is 8 lots of 4 bits, or 32 bits Row selection depends on both data and key feature known as autoclaving (autokeying) Example: S( d ) = 5fd25e03

08/31/ Definition of DES S-box

08/31/ Structure of DES S-boxes

08/31/ DES Key Schedule Derive subkeys used in each round Consist of initial permutation of the key (PC1) which selects 56-bits in two 28-bit halves 16 stages consisting of selecting 24 bits from each half permuting them by PC2 for use in function F rotating each half separately either 1 or 2 places depending on the key rotation schedule K

08/31/ DES Decryption Decryption must unwind steps of data computation With Feistel design, do encryption steps again Use subkeys in reverse order (SK16 … SK1) IP undoes final step (IP -1 ) of encryption 1st round with SK16 undoes 16th encryption round, and proceed until 16th round with SK1 undoes 1st encryption round Final IP -1 undoes initial permutation IP Thus recovering original data value

08/31/ Avalanche Effect Desirable property of encryption algorithm Changing one bit in plaintext or key results in changing approx. half of bits in ciphertext DES exhibits strong avalanche effect

08/31/ Strength of DES – Key Size 56-bit keys have 2 56 = 7.2 x values Brute-force search looks hard But recent advances have shown possibility 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 Alternatives to DES have been proposed and adopted

08/31/ Strength of DES – Timing Attacks Attack actual implementation of cipher Use knowledge of consequences of implementation to derive knowledge of some/all subkey bits Specifically use fact that calculations can take varying times depending on the value of the inputs to it

08/31/ Strength of DES – Analytic Attacks Several analytic attacks on DES 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 are statistical attacks differential cryptanalysis linear cryptanalysis related key attacks

08/31/ Block Cipher Design Principles Basic principles are still like Feistel in 1970’s Number of rounds more is better, making exhaustive search the best attack Function F provides “confusion”, is nonlinear, avalanche Key schedule complex subkey creation, key avalanche

08/31/ Modes of Operation Block ciphers encrypt fixed size blocks Given arbitrary amount and type of information to encrypt, we need specific ways to use block ciphers in practice Four were defined for DES in ANSI standard Now have 5 modes for DES and AES

08/31/ Electronic Codebook (ECB) Message is broken into independent blocks which are encrypted Each block is a value which is substituted, like a codebook Each block is encoded independently of the other blocks C i = E K1 (P i ) Uses: secure transmission of single value

08/31/ Electronic Codebook (ECB)

08/31/ Advantages and Limitations of ECB Repetitions in message may show in ciphertext if repetition aligned with message block particularly with graphic data or with messages that change very little, which become a code-book analysis problem Weakness due to encrypted message blocks being independent Main use is sending a few blocks of data

08/31/ Cipher Block Chaining (CBC) Message is broken into blocks that are chained together in the encryption operation Each previous cipher block is chained with current plaintext block Use Initial Vector (IV) to start process C i = E K1 (P i XOR C i-1 ) C -1 = IV Uses: bulk data encryption, authentication

08/31/ Cipher Block Chaining (CBC)

08/31/ Advantages and Limitations of CBC Each ciphertext block depends on all message blocks Thus, a change in message affects all ciphertext blocks after the change as well as the original block Need Initial Vector (IV) known to sender & receiver however if IV is sent in the clear, an attacker can change bits of the first block, and change IV to compensate hence either IV must be a fixed value or it must be sent encrypted in ECB mode before rest of message At end of message, handle possible last short block by padding either with known non-data value (e.g. nulls) or pad last block with count of pad size E.g. [b1 b2 b ] means 3 data bytes followed by 5 bytes of pad+count

08/31/ Cipher FeedBack (CFB) Message is treated as a stream of bits XOR-ed with output of the block cipher to produce ciphertext Ciphertext is also feedback for next stage Standard allows any number of bit (1, 8, 64 or whatever) to be feed back denoted CFB-1, CFB-8, CFB-64 etc Most efficient when using all 64 bits (CFB-64) C i = P i XOR E K1 (C i-1 ) C -1 = IV Uses: stream data encryption, authentication

08/31/ Cipher FeedBack (CFB)

08/31/ Advantages and Limitations of CFB Appropriate when data arrives in bits/bytes Most common stream mode Need to stall while do block encryption after every n-bits Errors propagate for several blocks

08/31/ Output FeedBack (OFB) Message is treated as a stream of bits XOR-ed with output of the block cipher to produce ciphertext Output of block cipher is feedback for next stage Feedback is independent of message Can be computed in advance C i = P i XOR O i O i = E K1 (O i-1 ) O -1 = IV Uses: stream encryption over noisy channels

08/31/ Output FeedBack (OFB)

08/31/ Advantages and Limitations of OFB Used when error feedback is a problem or where need to encrypt before message is available Superficially similar to CFB, but feedback is from the output of cipher and is independent of message Must never reuse the same sequence (key+IV) Sender and receiver must remain in sync, and some recovery method is needed to ensure this occurs Structure is similar to stream ciphers but with the distinction that OFB encrypts one plaintext block every time

08/31/ Counter (CTR) A “new” mode, though proposed early on Similar to OFB, but encrypts counter value rather than any feedback value Must have a different counter value for every plaintext block (never reused) C i = P i XOR O i O i = E K1 (i) Uses: high-speed network encryptions

08/31/ Counter (CTR)

08/31/ Advantages and Limitations of CTR Efficiency can do parallel encryptions in advance of need good for bursty high speed links Random access to encrypted data blocks Provable security (as good as other modes) But must ensure never reuse counter values

Comparison of Modes of Operation 08/31/201044

08/31/ Next Class More symmetric encryption standards Read Chapters 5, 6, 7