Lecture 5B Block Diagrams HASH Example.

Slides:



Advertisements
Similar presentations
1ASM Algorithmic State Machines (ASM) part 1. ASM2 Algorithmic State Machine (ASM) ‏ Our design methodologies do not scale well to real-world problems.
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Give qualifications of instructors: DAP
Chapter 9 Computer Design Basics. 9-2 Datapaths Reminding A digital system (or a simple computer) contains datapath unit and control unit. Datapath: A.
EKT 221 : Digital 2 ASM.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
Lab 10 RT methodology (cont’d) Example 1 – a counter Example 2 – a repetitive-adder multiplier.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 20 Datapath and Control Datapath - performs data transfer and processing operations.
ECE 545 Project 1 Part IV Key Scheduling Final Integration List of Deliverables.
Lecture 9 RTL Design Methodology Sorting Example.
SHA-3 Candidate Evaluation 1. FPGA Benchmarking - Phase Round-2 SHA-3 Candidates implemented by 33 graduate students following the same design.
Chap 8. Sequencing and Control. 8.1 Introduction Binary information in a digital computer –data manipulated in a datapath with ALUs, registers, multiplexers,
Computer Design Basics
1 Hashes and Message Digests. 2 Hash Also known as –Message digest –One-way function Function: input message -> output One-way: d=h(m), but not h’(d)
VHDL Project Specification Naser Mohammadzadeh. Schedule  due date: Tir 18 th 2.
Hash and MAC Functions CS427 – Computer Security
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
1ECE 545 – Introduction to VHDL Project Deliverables.
1 Network Security Lecture 5 Hashes and Message Digests Waleed Ejaz
6.375 Final Presentation Jeff Simpson, Jingwen Ouyang, Kyle Fritz FPGA Implementation of Whirlpool and FSB Hash Algorithms.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Lecture 9 RTL Design Methodology. Structure of a Typical Digital System Datapath (Execution Unit) Controller (Control Unit) Data Inputs Data Outputs Control.
Algorithmic state machines
Datapath - performs data transfer and processing operations The control unit sends: – Control signals – Control outputs The control unit receives: – External.
RTL Design Methodology Transition from Pseudocode & Interface
Lecture 3 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram.
Hao Zheng Comp Sci & Eng USF CDA 4253 FPGA System Design Chapter 5 Finite State Machines.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
1 ECE 545 – Introduction to VHDL Algorithmic State Machines Sorting Example ECE 656 Lecture 8.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
George Mason University Design of Controllers using Algorithmic State Machine (ASM) Charts ECE 545 Lecture 12.
ECE 545 Project 1 Introduction & Specification Part I.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 13.Message Authentication.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Implementing Combinational
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Hash Function Performance Metrics
Computer Design Basics
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
RTL Design Methodology
RTL Design Methodology
Implementing Combinational and Sequential Logic in VHDL
RTL Design Methodology
Project Deliverables ECE 545 – Introduction to VHDL.
Lecture 18 SORTING in Hardware.
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 10 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 9 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 11 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
RTL Design Methodology Transition from Pseudocode & Interface
KU College of Engineering Elec 204: Digital Systems Design
ECE 545 Remaining Tasks.
Computer Design Basics
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
RTL Design Methodology
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
RTL Design Methodology
Presentation transcript:

Lecture 5B Block Diagrams HASH Example

Structure of a Typical Digital System Data Inputs Control & Status Inputs Control Signals Datapath (Execution Unit) Controller (Control Unit) Status Signals Data Outputs Control & Status Outputs

Hardware Design with RTL VHDL Pseudocode Interface Datapath Controller ASM chart Block diagram VHDL code VHDL code

Steps of the Design Process Introduced in Class Today Text description Interface Pseudocode Block diagram of the Datapath Interface divided into Datapath and Controller ASM chart of the Controller RTL VHDL code of the Datapath, Controller, and Top-level Unit Testbench for the Datapath, Controller, and Top-Level Unit Functional simulation and debugging Synthesis and post-synthesis simulation Implementation and timing simulation Experimental testing using FPGA board

Class Exercise 3 HASH FUNCTION

Hash function m message hash function h h(m) hash value arbitrary length m message hash function h h(m) hash value fixed length

Message Authentication Code - MAC Alice Bob IV Message Tag IV Message Tag KAB KAB MAC MAC Tag’ valid = Tag KAB - Secret key of Alice and Bob IV – Initialization Vector

HMAC American standard FIPS 198 Arbitrary hash function and key size  opad = message m KEY’ KEY American standard FIPS 198 Arbitrary hash function and key size  h ipad = KEY” h Tag

Pseudocode (1) h0 := iv0 h1 := iv1 h2 := iv2 h3 := iv3 last_block_stored :=0 while (last_block_stored != 1) do wait until src_ready r := m last_block_stored := last_block a := h0 b := h1 c := h2 d := h3

Pseudocode (2) for i = 0 to 63 do ki := k[i mod 16] ri := r[i mod 4] f := (17*ri) mod 28 e := (2d+1)*f mod 28 d := (4c+2)*c mod 28 c := b <<< 3 b := a >>> i a := e ⊕ ki end for h0 := (h0 + a) mod 28 h1 := (h1 + b) mod 28 h2 := (h2 + c) mod 28 h3 := (h3 + d) mod 28 end while y := h0 || h1 || h2 || h3 done := 1

Notation m: 32-bit message block (input) r: 32-bit register y: 32-bit circuit output (output) iv0..iv3 : 8-bit initialization vectors (constants) a..f, h0..h3, ki, ri : 8-bit intermediate values, treated as 8-bit unsigned integers k[i]: 8-bit round constants: k[0]..k[15], stored in ROM r[i]: bytes of the 32-bit register r, where r[0] represents the least significant byte of r, and r[3] represents the most significant byte of r.

Operations ⊕ : XOR X <<< Y : rotation of X to the left by the number of positions given in Y X >>> Y : rotation of X to the right by the number of X || Y: X concatenated with Y

Interface Table

Timing Requirements Assume that • one clock cycle is used for the once-per-message initialization: h0 = iv0; h1 = iv1; h2 = iv2; h3 = iv3; • one clock cycle is used for the once-per-block initialization: a = h0; b = h1; c = h2; d = h3; • one round of the main for-loop of the pseudocode executes in one clock cycle; there are a total of 64 rounds. • one clock cycle is used for the once-per-block finalization: h0 = h0 + a; h1 = h1 + b; h2 = h2 + c; h3 = h3 + d;

Tasks Draw a block diagram of the Datapath of the HASH circuit, using medium complexity components corresponding to the operations used in the pseudocode. Clearly specify • names, widths and directions of all buses • names, widths and directions of all inputs and outputs of the logic components. Assume that one round of the main for-loop of the pseudocode executes in ONE clock cycle. Minimize the number of control signals to be generated by the Control Unit. Mark the most likely critical path in your circuit.

HASH: Solutions

Block Diagram

Interface with the Division into the Datapath and Controller