Lecture 5 Block Diagrams Modes of Operation of Block Ciphers.

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

Block Cipher Modes of Operation and Stream Ciphers
ECE454/CS594 Computer and Network Security
ECE 448 – FPGA and ASIC Design with VHDLGeorge Mason University ECE 448: Lab 2 Implementing Sequential Logic in VHDL.
“Advanced Encryption Standard” & “Modes of Operation”
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
Modern Symmetric-Key Ciphers
Modern Symmetric-Key Ciphers
Modern Symmetric-Key Ciphers
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Cryptography1 CPSC 3730 Cryptography Chapter 6 Triple DES, Block Cipher Modes of Operation.
1 Lect. 9 : Mode of Operation. 2 Modes of Operation – ECB Mode  Electronic Code Book Mode Break a message into a sequence of plaintext blocks Each plaintext.
Modes of Operation CS 795. Electronic Code Book (ECB) Each block of the message is encrypted with the same secret key Problems: If two identical blocks.
Chapter 3 – Block Ciphers and the Data Encryption Standard Jen-Chang Liu, 2004 Adopted from lecture slides by Lawrie Brown.
Lecture 23 Symmetric Encryption
CS470, A.SelcukModes of Operation1 Encrypting with Block Ciphers CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Encryption Schemes Second Pass Brice Toth 21 November 2001.
Hybrid Cipher encryption Plain Text Key Cipher Text Key Plain Text IV Hybrid Cipher decryption Hybrid Cipher Note: IV used in encryption is not used in.
CN8816: Network Security1 Confidentiality, Integrity & Authentication Confidentiality - Symmetric Key Encryption Data Integrity – MD-5, SHA and HMAC Public/Private.
Block Cipher Transmission Modes CSCI 5857: Encoding and Encryption.
Modes of Operation. Topics  Overview of Modes of Operation  EBC, CBC, CFB, OFB, CTR  Notes and Remarks on each modes.
symmetric key cryptography
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.
THE FAMILY OF BLOCK CIPHERS “SD-(n,k)” S. Markovski D. Gligoroski V. Dimitrova A. Mileva.
Lecture 4: Using Block Ciphers
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
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
3DES and Block Cipher Modes of Operation CSE 651: Introduction to Network Security.
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Chapter 9: Algorithms Types and Modes Dulal C. Kar Based on Schneier.
Encryption Types & Modes Chapter 9 Encryption Types –Stream Ciphers –Block Ciphers Encryption Modes –ECB - Electronic Codebook –CBC - Cipher Block Chaining.
More About DES Cryptography and Network Security Reference: Sec 3.1 of Stallings Text.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers.
1.1 Chapter 8 Encipherment Using Modern Symmetric-Key Ciphers Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
Introduction to Computer Security ©2004 Matt Bishop Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester
Chapter 9 Encrypting Volumes. FIGURE 9.0.F01: A hard drive volume with full-disk encryption (FDE).
Modes of Usage Dan Fleck CS 469: Security Engineering These slides are modified with permission from Bill Young (Univ of Texas) 11 Coming up: Modes of.
Modes of Operation INSTRUCTOR: DANIA ALOMAR. Modes of Operation A block cipher can be used in various methods for data encryption and decryption; these.
1 Symmetric-Key Encryption CSE 5351: Introduction to Cryptography Reading assignment: Chapter 3 Read sections first (skipping 3.2.2)
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.
Lecture 23 Symmetric Encryption
Exam 1 Review CS461/ECE422 Fall Exam guidelines A single page of supplementary notes is allowed  8.5x11. Both sides. Write as small as you like.
Ln Lou Modern Cyphers. 0. Security System Key Plain Text Cipher Text Encryption (K × P → C) Decryption (K × C → P)
1 Symmetric key cryptography: DES DES: Data Encryption Standard US encryption standard [NIST 1993] 56-bit symmetric key, 64 bit plaintext input How secure.
RTL Design Methodology Transition from Pseudocode & Interface
1 Symmetric-Key Encryption CSE 5351: Introduction to Cryptography Reading assignment: Chapter 2 Chapter 3 (sections ) You may skip proofs, but are.
Lecture 5B Block Diagrams HASH Example.
Lecture 4 Page 1 CS 236 Stream and Block Ciphers Stream ciphers convert one symbol of plaintext immediately into one symbol of ciphertext Block ciphers.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
ECE 545 Project 1 Introduction & Specification Part I.
1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
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.
CS480 Cryptography and Information Security
Block Cipher Modes CS 465 Make a chart for the mode comparisons
Implementing Combinational and Sequential Logic in VHDL
Block cipher and modes of encryptions
Algorithm Types & Algorithm Modes
Symmetric-Key Encryption
Block vs Stream Ciphers
Block Ciphers: DES and AES
Counter Mode, Output Feedback Mode
Elect. Codebook, Cipher Block Chaining
Secret-Key Encryption
Presentation transcript:

Lecture 5 Block Diagrams Modes of Operation of Block Ciphers

ECE 448 – FPGA and ASIC Design with VHDL Modes of Operation of Block Ciphers

Block vs. stream ciphers Stream cipher Internal state - IS Block cipher KK M 1, M 2, …, M n m 1, m 2, …, m n C 1, C 2, …, C n c 1, c 2, …, c n C i =f K (M i )c i = f K (m i, IS i ) IS i+1 =g K (m i, IS i ) Every block of ciphertext is a function of only one corresponding block of plaintext Every block of ciphertext is a function of the current block of plaintext and the current internal state of the cipher

Typical stream cipher SenderReceiver Pseudorandom Key Generator mimi plaintext cici ciphertext kiki keystream key initialization vector (seed) Pseudorandom Key Generator mimi plaintext cici ciphertext kiki keystream key initialization vector (seed)

Standard modes of operation of block ciphers Block cipher turned into a stream ciphers ECB mode Counter mode CFB mode CBC mode

ECB (Electronic CodeBook) mode

Electronic CodeBook Mode – ECB Encryption M1M1 M2M2 M3M3 E C i = E K (M i ) for i=1..N M N-1 MNMN E E EE... C1C1 C2C2 C3C3 C N-1 CNCN K K K K K

Electronic CodeBook Mode – ECB Decryption C1C1 C2C2 C3C3 D M i = D K (C i ) for i=1..N C N-1 CNCN D D DD... M1M1 M2M2 M3M3 M N-1 MNMN K K K K K

Electronic CodeBook Mode – ECB (simplified block diagram) E K IN OUT CiCi MiMi D K IN OUT CiCi MiMi C i = E K (M i ) M i = D K (C i )

Electronic CodeBook Mode – ECB (combined block diagram) E K IN OUT D K IN OUT bdo bdi bdi = M i for Encryption C i for Decryption bdo = C i for Encryption M i for Decryption

Counter Mode

Counter Mode - CTR Encryption m1m1 m2m2 m3m3 E c i = m i  k i k i = E K (IV+i-1) for i=1..N m N-1 mNmN... E E EE c1c1 c2c2 c3c3 c N-1 cNcN IVIV+1 IV+2 IV+N-2 IV+N-1 k1k1 k2k2 k3k3 k N-1 kNkN K K K K K

Counter Mode - CTR Decryption c1c1 c2c2 c3c3 E m i = c i  k i k i = E K (IV+i-1) for i=1..N c N-1 cNcN... E E EE m1m1 m2m2 m3m3 m N-1 mNmN IVIV+1 IV+2 IV+N-2 IV+N-1 k1k1 k2k2 k3k3 k N-1 kNkN K K K K K

Counter Mode – CTR (simplified block diagram) E K IN OUT counter IV cici mimi E K IN OUT counter IV cici mimi IS 1 = IV c i = E K (IS i )  m i IS i+1 = IS i +1 IS 1 = IV m i = E K (IS i )  c i IS i+1 = IS i +1 IS i

Counter Mode – CTR (combined block diagram) E K IN OUT counter IV bdo bdi IS i bdi = m i for Encryption c i for Decryption bdo = c i for Encryption m i for Decryption

CFB (Cipher FeedBack) Mode

Cipher Feedback Mode - CFB Encryption m1m1 m2m2 m3m3 E m N-1 mNmN... E E EE c1c1 c2c2 c3c3 c N-1 cNcN IV c i = m i  k i k i =E K (c i-1 ) for i=1..N, and c 0 = IV k1k1 k2k2 k3k3 k N-1 kNkN

Cipher Feedback Mode - CFB Decryption m1m1 m2m2 m3m3 E m N-1 mNmN... E E EE c1c1 c2c2 c3c3 c N-1 cNcN IV m i = c i  k i k i =E K (c i-1 ) for i=1..N, and c 0 = IV k1k1 k2k2 k3k3 k N-1 kNkN

Cipher Feedback Mode – CFB (simplified block diagram) E K IN OUT cici mimi E K IN OUT cici mimi IV IS 1 = IV c i = E K (IS i )  m i IS i+1 = c i IV IS i register IS 1 = IV m i = E K (IS i )  c i IS i+1 = c i

Cipher Feedback Mode – CFB (combined block diagram) E K IN OUT bdo bdi IV IS i register bdi = m i for Encryption c i for Decryption bdo = c i for Encryption m i for Decryption bdi

CBC (Cipher Block Chaining) Mode

Cipher Block Chaining Mode - CBC Encryption m1m1 m2m2 m3m3 E IV c i = E K (m i  c i-1 ) for i=1..N c 0 =IV m N-1 mNmN... E E EE c1c1 c2c2 c3c3 c N-1 cNcN

Cipher Block Chaining Mode - CBC Decryption m i = D K (c i )  c i-1 for i=1..N c 0 =IV m1m1 m2m2 m3m3 m N-1 mNmN IV... D D D DD c1c1 c2c2 c3c3 c N-1 cNcN

Cipher Block Chaining Mode – CBC (simplified block diagram) E K IN OUT cici mimi D K IN OUT cici mimi IV IS 1 = IV c i = E K (IS i  m i ) IS i+1 = c i IS 1 = IV m i = D K (c i )  IS i IS i+1 = c i IV IS i register

Cipher Block Chaining Mode – CBC (combined block diagram) E K IN OUT D K IN OUT IV IS i register cici bdi bdo bdi

ECE 448 – FPGA and ASIC Design with VHDL Advanced Encryption Standard (AES) Pseudocode

AES Encryption

AES Decryption

ECE 448 – FPGA and ASIC Design with VHDL AES: Symbols, Block Diagrams, Interfaces

AES_Enc Encryption Only Key scheduling done as a part of initialization

Symbol

Block Diagram – AES_Enc

Block Diagram – Round

Block Diagram – KeyUpdate

AES_Enc: Interface with the Division into the Datapath and Controller

AES_Enc_KOF Encryption Only Key scheduling done On the Fly

Symbol

Block Diagram – AES_Enc_KOF

Block Diagram – Round

Block Diagram – KeyUpdate

AES_Enc_KOF: Interface with the Division into the Datapath and Controller

AES_EncDec Encryption and Decryption Key scheduling done as a part of initialization

Symbol

Block Diagram – AES_EncDec

Block Diagram – Round

Block Diagram – InvRound

Block Diagram – KeyUpdate

AES_EncDec: Interface with the Division into the Datapath and Controller

ECE 448 – FPGA and ASIC Design with VHDL Example of a Hierarchical Block Diagram JH hash function

Top Level

R8/R6

L

ECE 448 – FPGA and ASIC Design with VHDL Example of a Hierarchical Block Diagram BLAKE hash function

Top Level

Permute8

Core8

G_mod

ECE 448 – FPGA and ASIC Design with VHDL Interface of CipherCore Datapath

59 Block Diagram of AEAD

Input Ports (nonce, IV) (only few candidates) (AD, M, C) (we will not use it)

ECE 448 – FPGA and ASIC Design with VHDL Timeline

Thursday 10/15, 12 noon: First draft of block diagrams (Blackboard) Thursday 10/15, 1:00-4:30pm Friday 10/16, 1:00-8:00pm Discussion of draft block diagrams (30 minutes per person, 60 minutes per group, electronic sign-up using Doodle) Project Timeline: Draft Block Diagrams

Thursday 10/22, 12 noon Revised block diagrams due (Blackboard) Thursday 10/22, 1:00-4:30pm Friday 10/23, 1:00-8:00pm Discussion of revised block diagrams (30 minutes per person, 60 minutes per group, electronic sign-up using Doodle) Project Timeline: Revised Block Diagrams