ECE 545 – Introduction to VHDL ECE 645—Project 2 Project Options.

Slides:



Advertisements
Similar presentations
ECE 645 – Computer Arithmetic Lecture 11: Advanced Topics and Final Review ECE 645—Computer Arithmetic 4/22/08.
Advertisements

Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Public Key Cryptosystems - RSA Receiver Sender Eavesdroppe r p q p q p q p and q prime.
Data encryption with big prime numbers
Capstone Project Presentation A Tool for Cryptography Problem Generation CSc 499 Mark Weston Winter 2006.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Efficient generation of cryptographically strong elliptic curves Shahar Papini Michael Krel Instructor : Barukh Ziv 1.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions.
Digital Kommunikationselektronik TNE027 Lecture 3 1 Multiply-Accumulator (MAC) Compute Sum of Product (SOP) Linear convolution y[n] = f[n]*x[n] = Σ f[k]
Spring 2006EE VLSI Design II - © Kia Bazargan 368 EE 5324 – VLSI Design II Kia Bazargan University of Minnesota Part IX: CORDIC Algorithms.
An Expandable Montgomery Modular Multiplication Processor Adnan Abdul-Aziz GutubAlaaeldin A. M. Amin Computer Engineering Department King Fahd University.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Distributed Arithmetic: Implementations and Applications
Computer Arithmetic Integers: signed / unsigned (can overflow) Fixed point (can overflow) Floating point (can overflow, underflow) (Boolean / Character)
GPGPU platforms GP - General Purpose computation using GPU
Peter Lam Discrete Math CS.  Sometimes Referred to Clock Arithmetic  Remainder is Used as Part of Value ◦ i.e Clocks  24 Hours in a Day However, Time.
The RSA Algorithm Rocky K. C. Chang, March
ECE 448: Lab 4 FIR Filters.
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.
Software Security Seminar - 1 Chapter 11. Mathematical Background 발표자 : 안병희 Applied Cryptography.
Introduction to Modular Arithmetic and Public Key Cryptography.
1 Network Security Lecture 6 Public Key Algorithms Waleed Ejaz
ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.
CPSC 3730 Cryptography and Network Security
1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Information Security and Management 4. Finite Fields 8
CS1Q Computer Systems Lecture 9 Simon Gay. Lecture 9CS1Q Computer Systems - Simon Gay2 Addition We want to be able to do arithmetic on computers and therefore.
Copyright, Yogesh Malhotra, PhD, 2013www.yogeshmalhotra.com SPECIAL PURPOSE FACTORING ALGORITHMS Special Purpose Factoring Algorithms For special class.
Implementation of Finite Field Inversion
Implementing RSA Encryption in Java
Advanced Algebraic Algorithms on Integers and Polynomials Prepared by John Reif, Ph.D. Analysis of Algorithms.
ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.
Gaj1P230/MAPLD 2004 Elliptic Curve Cryptography over GF(2 m ) on a Reconfigurable Computer: Polynomial Basis vs. Optimal Normal Basis Representation Comparative.
Factorization of a 768-bit RSA modulus Jung Daejin Lee Sangho.
Mohammad Reza Najafi Main Ref: Computer Arithmetic Algorithms and Hardware Designs (Behrooz Parhami) Spring 2010 Class presentation for the course: “Custom.
June 2007 Computer Arithmetic, Function EvaluationSlide 1 VI Function Evaluation Topics in This Part Chapter 21 Square-Rooting Methods Chapter 22 The CORDIC.
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
8.6. Knapsack Ciphers. The Concept At the core of the Knapsack cipher is the Knapsack problem: At the core of the Knapsack cipher is the Knapsack problem:
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
ECE 734 Project Implementation of Multiple Constant Multiplication Algorithms for FIR Filters Hamid Shojaei.
The Fast Fourier Transform and Applications to Multiplication
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CORDIC (Coordinate rotation digital computer) Ref: Y. H. Hu, “CORDIC based VLSI architecture.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Implementing and Optimizing a Direct Digital Frequency Synthesizer on FPGA Jung Seob LEE Xiangning YANG.
CORDIC Algorithm COordinate Rotation DIgital Computer Method for Elementary Function Evaluation (e.g., sin(z), cos(z), tan -1 (y)) Originally Used for.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
ECE 645 Spring 2007 PROJECT 2 Specification. Topic Options.
Copyright © 2004, Dillon Engineering Inc. All Rights Reserved. An Efficient Architecture for Ultra Long FFTs in FPGAs and ASICs  Architecture optimized.
CORDIC Algorithm COordinate Rotation DIgital Computer
Recursive Architectures for 2DLNS Multiplication RESEARCH CENTRE FOR INTEGRATED MICROSYSTEMS - UNIVERSITY OF WINDSOR 11 Recursive Architectures for 2DLNS.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
Chapter 6 Discrete-Time System. 2/90  Operation of discrete time system 1. Discrete time system where and are multiplier D is delay element Fig. 6-1.
Introduction to Elliptic Curve Cryptography CSCI 5857: Encoding and Encryption.
ELEC692 VLSI Signal Processing Architecture Lecture 12 Numerical Strength Reduction.
Reconfigurable Computing - Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound,
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Efficient Montgomery Modular Multiplication Algorithm Using Complement and Partition Techniques Speaker: Te-Jen Chang.
Motivation Basis of modern cryptosystems
RSA Algorithm Date: 96/10/17 Wun-Long Yang. Outline Introduction to RSA algorithm RSA efficient implementation & profiling.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
Number-Theoretic Algorithms
CORDIC (Coordinate rotation digital computer)
UNIVERSITY OF MASSACHUSETTS Dept
Elliptic Curve Cryptography over GF(2m) on a Reconfigurable Computer:
Multiplier-less Multiplication by Constants
Z TRANSFORM AND DFT Z Transform
Mathematical Background: Extension Finite Fields
Presentation transcript:

ECE 545 – Introduction to VHDL ECE 645—Project 2 Project Options

2 Project 2 Overview Project 2 will involve the FPGA implementation of a complex digital arithmetic function The project will have an application in either cryptography or signal processing Due to the scope of the project, students should be in groups of 3 The specification and scope of the project will be an interactive process between groups and the instructor

3 Project Options Each group will involve the FPGA implementation of one of the following projects: Cryptography related 1.Trial division sieve 2.Elliptic curve method of factoring 3.RSA encryption & decryption with Montgomery multipliers based on carry save adders Signal processing related 4.Iterative and pipeline CORDIC (coordinate rotation digital computer) processors 5.Finite impulse response filter architectures for FPGA implementations 6.Direct digital frequency synthesis

Cryptography Projects Background ECE 645 – Computer Arithmetic

5 RSA Public Key Cryptosystem M C = f(M) = M e mod N C M = f -1 (C) = C d mod N PUBLIC KEY PRIVATE KEY N = P  Q P, Q - large prime numbers e  d  1 mod ((P-1)(Q-1))

6 RSA Keys PUBLIC KEY PRIVATE KEY { e, N } { d, P, Q } N = P  Q e  d  1 mod ((P-1)(Q-1)) P, Q - large prime numbers

7 Polynomial Selection Linear Algebra Square Root RelationCollection Sieving Cofactoring 200 bit numbers & 350 bit Trial division ECM method Factoring 1024-bit RSA keys using Number Field Sieve (NFS)

Topic 1: Trial Division Sieve ECE 645 – Computer Arithmetic

9 RSA Keys PUBLIC KEY PRIVATE KEY { e, N } { d, P, Q } N = P  Q e  d  1 mod ((P-1)(Q-1)) P, Q - large prime numbers

10 Topic 1: Trial Division Sieve (1) Given: Inputs: Variables: 1.Integers N 1, N 2, N 3,.... each of the size of k-bits Constants: 2. Factor base = set of all primes smaller smaller than a certain bound B = { p 1 =2, p 2 =3, p 3 =5,..., p t ≤ B } Parameters of interest: 4 ≤ k ≤ ≤ B ≤ 10 5

11 Topic 1: Trial Division Sieve (2) Required: Outputs: For each integer N i : A list of primes from the factor base that divides N i, and the number of times each prime divides N i. For example if N i = p 1 e1 · p 2 e2 · p 3 e3 · M i, where M i is not divisible by any prime belonging to a factor base, then the output is {p 1, e1}, {p 2, e2}, {p 3, e3}

12 Topic 1: Trial Division Sieve (3) Example: Constants: k=10, B=5 Factor base = {2, 3, 5} Variables: N 1 = 408 = 2 3 · 3 · 17 N 2 = 630 = 2 · 3 2 · 5 · 7 Outputs: {2, 3}, {3, 1} {2, 1}, {3, 2}, {5, 1}

Topic 2: Elliptic Curve Method of Factoring ECE 645 – Computer Arithmetic

14 P=(6,19) Q=(7,12) R=P+Q=(13,7) A Addition P=(3,13) 2P=P+P=(7,11) D Doubling  P: Elliptic Curves

15 Inputs : N – number to be factored E – elliptic curve P 0 – point of the curve E : initial point B 1 – smoothness bound for Phase1 B 2 – smoothness bound for Phase2 Outputs: q - factor of N, 1 < q ≤ N or FAIL ECM Algorithm

16 precomputations postcomputations main computations ECM Algorithm Phase 1

17 postcomputations main computations ECM Algorithm Phase 2

18 ECM k·P P+Q2P x·y mod Nx+y mod Nx-y mod N Top level Medium level Point addition Low level Moduar multiplication Modular addition Modular subtraction Scalar multiplication Point doubling Elliptic curve point operations Modular arithmetic (ring operations) Functional units Control unit Host computer Hierarchy of Elliptic Curve Operations

Topic 3: RSA Encryption & Decryption with Montgomery Multipliers based on Carry Save Adders ECE 645 – Computer Arithmetic

20 M C = f(M) = M e mod N C M = f -1 (C) = C d mod N PUBLIC KEY PRIVATE KEY N = P  Q P, Q - large prime numbers e  d  1 mod ((P-1)(Q-1)) RSA as a Trap-Door One-Way Function

21 Right-to-left binary exponentiation Left-to-right binary exponentiation E = (e L-1, e L-2, …, e 1, e 0 ) 2 Y = 1; S = X; for i=0 to L-1 { if (e i == 1) Y = Y  S mod N; S = S 2 mod N; } Y = 1; for i=L-1 downto 0 { Y = Y 2 mod N; if (e i == 1) Y = Y  X mod N; } Exponentiation: Y = X E mod N

22 C = A  B mod M A Integer domain Montgomery domain A’ = A  2 k mod M B B’ = B  2 k mod M C’ = MP(A’, B’, M) = = A’  B’  2 -k mod M = = (A  2 k )  (B  2 k )  2 -k mod M = = A  B  2 k mod M C’ = C  2 k mod M C = A  B A, B, M – k-bit numbers Montgomery Modular Multiplication

23 A’ = MP(A, 2 2k mod M, M) C = MP(C’, 1, M) A A’ C C’ Montgomery Modular Multiplication

24 = MPMP CPCP P dPdP mod = MQMQ CQCQ Q dQdQ C P = C mod P d P = d mod (P-1) C Q = C mod Q d Q = d mod (Q-1) = mod C M d N M = M P ·R Q + M Q ·R P mod N where R P = (P -1 mod Q) ·P = P Q-1 mod N R Q = (Q -1 mod P) ·Q= Q P-1 mod N Fast Modular Exponentiation using Chinese Remainder Theorem

Topic 4: Iterative and Pipeline CORDIC (Coordinate Rotation Digital Computer) Processors ECE 645 – Computer Arithmetic

26 - If we have a computationally efficient way of rotating a vector, we can evaluate cos, sin, and tan –1 functions Rotation by an arbitrary angle is difficult, so we: Perform psuedorotations that require simpler operations Use special angles to synthesize the desired angle z z =   (1) +   (2)   (m) Key ideas in CORDIC COordinate Rotation DIgital Computer used this method in 1950s; modern electronic calculators also use it Rotations and Pseudo-Rotations in CORDIC

27 Fig A pseudorotation step in CORDIC Our strategy: Eliminate the terms (1 + tan 2  (i) ) 1/2 and choose the angles  (i) ) so that tan  (i) is a power of 2; need two shift-adds x (i+1) = x (i) cos  (i) – y (i) sin  (i) = (x (i) – y (i) tan  (i) ) / (1 + tan 2  (i) ) 1/2 y (i+1) = y (i) cos  (i) + x (i) sin  (i) = (y (i) + x (i) tan  (i) ) / (1 + tan 2  (i) ) 1/2 z (i+1) = z (i) –  (i) Recall that cos  = 1 / (1 + tan 2  ) 1/2 Rotating a Vector by an Angle

28 Fig A pseudorotation step in CORDIC Pseudorotation: Whereas a real rotation does not change the length R (i) of the vector, a pseudorotation step increases its length to: R (i+1) = R (i) / cos  (i) = R (i) (1 + tan 2  (i) ) 1/2 x (i+1) = x (i) – y (i) tan  (i) y (i+1) = y (i) + x (i) tan  (i) z (i+1) = z (i) –  (i) Pseudorotating a Vector by an Angle

29 CORDIC iteration: In step i, we pseudorotate by an angle whose tangent is d i 2 –i (the angle e (i) is fixed, only direction d i is to be picked) x (i+1) = x (i) – d i y (i) 2 –i y (i+1) = y (i) + d i x (i) 2 –i z (i+1) = z (i) – d i tan –1 2 –i = z (i) – d i e (i) –––––––––––––––––––––––––––––––– i –––––––––––––––––––––––––––––––– –––––––––––––––––––––––––––––––– e (i) in degrees (approximate) e (i) in radians (precise) Table 22.1 Value of the function e (i) = tan –1 2 –i, in degrees and radians, for 0  i  9 Example: 30  angle 30.0  45.0 – – – – = 30.1 Basic CORDIC Iterations

30 Project Task Implement iterative and pipeline solutions to CORDIC in various modes

Topic 5: Finite Impulse Response Filter Architectures for FPGA Implementations ECE 645 – Computer Arithmetic

32 Digital filters are widely used in digital communications and audio/video processing. In particular, finite impulse response (FIR) filters are used for their ease of implementation and stability. FIR Filters

33 As seen above digital filters, boxed in blue, play a crucial role in digital communication chips such as Ethernet transceivers, cable modems, DSL modems, satellite receivers, mobile phones, etc. Example: Gigabit Ethernet

34 x(n) Z -1 h0h0 h1h1 h2h2 h N-1 An FIR filter implements a convolution in the time- domain Critical path of N-tap filter: N-1 adds + 1 multiply Arithmetic complexity of N-tap filter modeled as: N multiplications/sample + N-1 adds/sample y(n) Direct Form Filter

35 Project Task: FIR Architecture Explorations and Optimizations Transpose form Parallel subexpression sharing Canonic signed digit representations using carry- save addition Parallel, word-serial, bit-serial implementation Xilinx DSP multipliers and multiply-accumulate structures

Topic 6: Direct Digital Frequency Synthesis ECE 645 – Computer Arithmetic

37 Direct Digital Frequency Synthesis Direct digital frequency synthesis is used to generate sin and cosine functions for digital communication applications Used in many applications: cell phones, cable modems, satellite receivers, etc.

38 DDFS: Basic Understanding and Architecture Output of DDFS is a sine and cosine waveform k = frequency control word L = accumulator bit width N=2 L =number of slots in ROM D=number of output bits phi(n) = (nk) mod N 1/T = clock frequency f 0 = 1/ (NT) = lowest frequency output (i.e. resolution) f c = kf 0 = k/(NT) = desired frequency, output will be cos(2π f c nT) and sin(2π f c nT) f max = greatest frequency achievable = 1/(2T) = ½ f clk +N slots of ROM k D D Lcos(2π/N * phi(n)) sin(2π/N * phi(n))

39 DDFS: Example Output

40 Project task The ROM-based architecture is simplistic; new architectures which are superior exist Investigate various architectures of DDFS and implement in FPGA