ECE 448 – FPGA and ASIC Design with VHDLGeorge Mason University ECE 448: Lab 2 Implementing Sequential Logic in VHDL.

Slides:



Advertisements
Similar presentations
1 KCipher-2 KDDI R&D Laboratories Inc.. ©KDDI R&D Laboratories Inc. All rights Reserved. 2 Introduction LFSR-based stream ciphers Linear recurrence between.
Advertisements

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.
Computer Security Set of slides 4 Dr Alexei Vernitski.
Block Cipher Modes of Operation and Stream Ciphers
ECE454/CS594 Computer and Network Security
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
“Advanced Encryption Standard” & “Modes of Operation”
CS470, A.SelcukStream Ciphers1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
1 Introduction to Practical Cryptography Lectures 3/4 Stream Ciphers.
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
Syed Safi Uddin Qadri BETL/F07/0112 GSM Stream Cipher Algorithm Presented To Sir Adnan Ahmed Siddiqui.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Encryption/Decyprtion using RC4 Vivek Ramachandran.
Digital Kommunikationselektroink TNE027 Lecture 6 (Cryptography) 1 Cryptography Algorithms Symmetric and Asymmetric Cryptography Algorithms Data Stream.
WEP 1 WEP WEP 2 WEP  WEP == Wired Equivalent Privacy  The stated goal of WEP is to make wireless LAN as secure as a wired LAN  According to Tanenbaum:
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Stream Ciphers.
Announcements: Matlab: tutorial available at Matlab: tutorial available at
1 The AES block cipher Niels Ferguson. 2 What is it? Block cipher: encrypts fixed-size blocks. Design by two Belgians. Chosen from 15 entries in a competition.
An Expandable Montgomery Modular Multiplication Processor Adnan Abdul-Aziz GutubAlaaeldin A. M. Amin Computer Engineering Department King Fahd University.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
CS470, A.SelcukModes of Operation1 Encrypting with Block Ciphers CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
Practical Techniques for Searches on Encrypted Data Yongdae Kim Written by Song, Wagner, Perrig.
Block Cipher Transmission Modes CSCI 5857: Encoding and Encryption.
Códigos y Criptografía Francisco Rodríguez Henríquez A Short Introduction to Stream Ciphers.
One-Time Pad Or Vernam Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
Stream Ciphers Making the one-time pad practical.
A Survey of Authentication Protocol Literature: Version 1.0 Written by John Clark and Jeremy Jacob Presented by Brian Sierawski.
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
The Misuse of RC4 in Microsoft Office A paper by: Hongjun Wu Institute for Infocomm Research, Singapore ECE 578 Matthew Fleming.
Stream Cipher July 2011.
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.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
Modes of Operation INSTRUCTOR: DANIA ALOMAR. Modes of Operation A block cipher can be used in various methods for data encryption and decryption; these.
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
Wired Equivalent Privacy (WEP): The first ‘confidentiality’ algorithm for the wireless IEEE standard. PRESENTED BY: Samuel Grush and Barry Preston.
Introduction to Experiment 7 Sorting Using PicoBlaze ECE 448 Spring 2010.
Lecture 5 Block Diagrams Modes of Operation of Block Ciphers.
A High-Speed Hardware Implementation of the LILI-II Keystream Generator Paris Kitsos...in cooperation with Nicolas Sklavos and Odysseas Koufopavlou Digital.
Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,
Homework #1 J. H. Wang Oct. 2, 2013.
RTL Design Methodology Transition from Pseudocode & Interface
Lecture 5B Block Diagrams HASH Example.
Lecture 3 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram.
Stream Cipher Introduction Pseudorandomness LFSR Design
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
ECE 545 Project 1 Introduction & Specification Part I.
Slide 1 Vitaly Shmatikov CS 378 Stream Ciphers. slide 2 Stream Ciphers uRemember one-time pad? Ciphertext(Key,Message)=Message  Key Key must be a random.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 2 – Stream Ciphers These slides were.
Block Cipher Modes Last Updated: Aug 25, ECB Mode Electronic Code Book Divide the plaintext into fixed-size blocks Encrypt/Decrypt each block independently.
Implementing Combinational
RTL Design Methodology Transition from Pseudocode & Interface
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 2 – Stream Ciphers.
Cryptography CS 555 Topic 15: Stream Ciphers.
Implementing Combinational and Sequential Logic in VHDL
Cryptography Lecture 15.
Sequential Logic for Synthesis Simulation using ModelSim
Implementing Combinational
Implementing Combinational and Sequential Logic in VHDL
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology Transition from Pseudocode & Interface
CH 6. Stream Ciphers Information Security & IoT Lab 김해용
Information and Computer Security CPIS 312 Lab 4 & 5
Cryptography Lecture 15.
Counter Mode, Output Feedback Mode
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

ECE 448 – FPGA and ASIC Design with VHDLGeorge Mason University ECE 448: Lab 2 Implementing Sequential Logic in VHDL

Part 1: Introduction to Experiment 2: Stream Cipher Trivium Part 2: Example: Programmable LFSR-based Pseudorandom Number Generator Part 3: Hands-on Session: Simulation using ModelSim Agenda for today

Part 1 Introduction to Experiment 2 Stream Cipher Trivium

Secret-Key Ciphers key of Alice and Bob - K AB Alice Bob Network Encryption Decryption

Cipher Message / Ciphertext Ciphertext / Message Cryptographic Key m bits k bits Encrypt/Decrypt 1 bit

Block vs. stream ciphers Stream cipher memory 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, m i-1, …, m 2, m 1 ) Every block of ciphertext is a function of only one corresponding block of plaintext Every block of ciphertext is a function of the current and all proceeding blocks of plaintext

Typical stream cipher SenderReceiver Pseudorandom Key Generator mimi plaintext cici ciphertext kiki keystream Key - K Initialization Vector - IV Pseudorandom Key Generator mimi plaintext cici ciphertext kiki keystream Key - K Initialization Vector - IV

Example c i = m i  k i mikicimikici message keystream ciphertext m i = c i  k i cikimicikimi ciphertext keystream message

Common Building Blocks of Pseudorandom Key Generators Linear Feedback Shift Register (LFSR) Non-linear Feedback Shift Register (NFSR)

LFSR = Linear Feedback Shift Register Example of a simple 5-stage LFSR sisi s i+1 s i+2 s i+3 s i+4 s i+5 s i+5 = s i + s i+1 + s i+3 + is used to denote XOR Notation: 1 register stage = D flip-flop

NFSR = Non-Linear Feedback Shift Register Example of a simple 5-stage NFSR bibi b i+1 b i+2 b i+3 b i+4 b i+5 b i+5 = b i b i+1 + b i+3 + is used to denote XOR b m b n is used to denote b m AND b n

eSTREAM - Contest for a new stream cipher standard, PROFILE 1 Stream cipher suitable for software implementations optimized for high speed Minimum key size bits Initialization vector – 64 bits or 128 bits PROFILE 2 Stream cipher suitable for hardware implementations with limited memory, number of gates, or power supply Minimum key size - 80 bits Initialization vector – 32 bits or 64 bits

One of the 3 winners of the contest 80 Bit Key and IV Hardware Oriented Very simple (“trivial”) internal structure Parallelizable up to 64 bits/clock cycle Trivium Stream Cipher

Trivium – Internal Structure t3t3 t2t2 t1t1 s 91 s 92 s 171 s 175 s 176 s 264 s 286 s 287 s 69 Shift Register AND XOR u3u3 u1u1 u2u2

Pseudocode of the Keystream Generation for i = 1 to N do t1 ← s66 + s93 t2 ← s162 + s177 t3 ← s243 + s288 zi ← t1 + t2 + t3 u1 ← t1 + s91 · s92 + s171 u2 ← t2 + s175 · s176 + s264 u3 ← t3 + s286 · s287 + s69 (s1, s2,..., s93) ← (u3, s1,..., s92) (s94, s95,..., s177) ← (u1, s94,..., s176) (s178, s279,..., s288) ← (u2, s178,..., s287) end for

Initialization Key is placed in registers s1-s80 IV is placed in registers s Remaining bits are 0 except for which are 1 Run for 4 complete cycles discarding keystream

Pseudocode of the Initialization

Requested Interface & Control Unit

Extra Credit Parallelized Architecture of Trivium

Parallelization of Trivium Approach: Duplicate logic in feedback loops (XOR and AND gates) Shift by two (or more) positions per clock cycle Goal: Encrypt two (or more) bits of a message per clock cycle Requires generating two (or more) bits of the corresponding keystream per clock cycle

Pseudocode of the Keystream Generation in a parallelized version of Trivium A 2-bit output per clock cycle for i = 1 to N/2 do t1 <- s66 + s93 t2 <- s162 + s177 t3 <- s243 + s288 t1_1 <- s65 + s92 t2_1 <- s161 + s176 t3_1 <- s242 + s287 zi <- (t1 + t2 + t3) || (t1_1 + t2_1 + t3_1) u1 <- t1 + s91 + s92 + s171 u2 <- t1 + s175 + s176 + s264 u3 <- t1 + s286 + s287 + s69 u1_1 <- t1_1 + s90 + s91 + s170 u2_1 <- t2_1 + s174 + s175 + s263 u3_1 <- t3_1 + s285 + s286 + s68 (s1,s2,...,s93) <- (u3_1,u3,s1,...,s91) (s94,s95,...,s177) <- (u1_1,u1,s94,...,s175) (s178,s279,...,s288) <- (u2_1,u2,s178,...,s286) end for

Part 2 Example: Programmable LFSR-based Pseudorandom Number Generator

c0c0 c1c1 c L-2 c L-1 sin Current_state LFSR with the Programmable Feedback Logic See source codes available on the lab web page

Part 3 Hands-on Session on Simulation using ModelSim