Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths GIEE, NTU ALCom Lab Presenter: 陳炳元.

Slides:



Advertisements
Similar presentations
Lecture 1 RMIT University, Taylor's University Learning Objectives
Advertisements

1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Cryptography and Network Security
Chapter 4 Finite Fields. Introduction of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key concern operations on “numbers”
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Number Theory and Cryptography
Chap6 Relations Def 1: Let A and B be sets. A binary relation from A
Basic Properties of Relations
Algebraic Structures DEFINITIONS: PROPERTIES OF BINARY OPERATIONS Let S be a set and let  denote a binary operation on S. (Here  does not necessarily.
Cryptography and Network Security Chapter 4
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
Chapter II. THE INTEGERS
Congruence of Integers
Introduction Polynomials
Lattice and Boolean Algebra
Reflexive -- First sentence of proof is: (1) Let x  Z (2) Let (x,x)  R. (3) Let (x,x)  I (4) Let x  R.
Finite fields.
Relations Chapter 9.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Equivalence Relations MSU CSE 260. Outline Introduction Equivalence Relations –Definition, Examples Equivalence Classes –Definition Equivalence Classes.
Rings,Fields TS. Nguyễn Viết Đông Rings, Integral Domains and Fields, 2. Polynomial and Euclidean Rings 3. Quotient Rings 2.
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.
Polynomial Datapaths Optimization Using Finite Abstract Algebra(I) Presenter: 陳炳元 Graduate Institute of Electronics Engineering Graduate Institute of Electronics.
Information Security and Management 4. Finite Fields 8
Cryptography and Network Security Introduction to Finite Fields.
By: Hector L Contreras SSGT / USMC
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
Monoids, Groups, Rings, Fields
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
Chapter 4 – Finite Fields
Lesson 1 Using properties of real numbers. A set is a collection of objects  If all the members of one set are also members of a second set, then the.
Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths Namrata Shekhar, Priyank Kalla, Florian Enescu, Sivaram.
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Verification & Synthesis of Arithmetic Datapaths using Finite Ring Algebra Priyank Kalla Priyank Kalla Electrical and Computer Engineering University of.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
SIMULATION BOUNDS FOR EQUIVALENCE VERIFICATION OF ARITHMETIC DATAPATHS WITH FINITE WORD-LENGTH OPERANDS Namrata Shekhar, Priyank Kalla, M. Brandon Meredith.
Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths GIEE, NTU ALCom Lab Presenter: 陳炳元.
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.
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Great Theoretical Ideas in Computer Science.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
Chap. 7 Relations: The Second Time Around
Divisibility and Modular Arithmetic
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Great Theoretical Ideas in Computer Science.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Objectives The student will be able to:
Discrete Math II Howon Kim
Relations Chapter 9.
Foundations of Discrete Mathematics
I. Finite Field Algebra.
Factoring Polynomials.
Rayat Shikshan Sanstha’s S.M.Joshi College, Hadapsar -28
Factoring using the greatest common factor (GCF).
Clements MAΘ October 30th, 2014
TLW use the distributive property to simplify expressions
Mathematical Background: Extension Finite Fields
Presentation transcript:

Exploiting Vanishing Polynomials for Equivalence Verification of Fixed-Size Arithmetic Datapaths GIEE, NTU ALCom Lab Presenter: 陳炳元

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Bit-Vector Arithmetic = %2 m Algebra  Represent integers as a vector of bits  Bit x 0 represents values 0 or 1  Vector X[1:0] = {x 1, x 0 } represents integers  00, 01, 10, 11  Bit-vector of size m : integer values in 0,…, 2 m -1  Vector X[m-1 : 0] represents integers reduced % 2 m

Fixed-Size (m) Data-path: Modeling Control the datapath size: Fixed size bit-vectors ( m ) Bit-vector of size m : integer values in 0,…, 2 m -1 Fixed-size (m) bit-vector arithmetic Polynomials reduced %2 m Algebra over the ring Z 2 m

Anti-Aliasing Function  F 1 [15:0] = 156x x x x x x  F 2 [15:0] = 156x x x x x x Now that polynomially F 1  F 2 because they have different coefficients; But because the datapath size is fixed to 16 bits F 1 [15:0]= F 2 [15:0],or in other words F 1 % 2 16 = F 2 % 2 16

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Binary Relation Let A be a set,R is a subset of A  A,we say that R is a binary relation on A Let R be a binary relation. We sometimes write aRb for (a,b)  R A binary relation R on A is called reflexive if(x,x)  R for all x  A A binary relation R on A is called symmetric if(x,y)  R  (y,x)  R for all x,y  A A binary relation R on A is called transitive if(x,y)  R and (y,z)  R  (x,z)  R for all x,y,z  A

Equivalence Relation A binary relation R on A is called equivalence relation if it is reflexive,symmetric,transitive A equivalence relation R on A.We define the equivalence class of a,[a]={b  A| (a,b)  R } Example: Let A= ,if (a,b)  R  a  b mod n. Then [0],[1],…,[n-1] are all equivalence class

Partition Let A be a set. A partition of A is a collection of disjoint nonempty subsets of A. The equivalence classes of R on A form a partition of A. Lemma1: Let R be an equivalence relation on A. The following statements are equivalence: (1)(a,b)  R (2)[a]=[b] (3)[a]  [b]  {}

Partition Theorem1: Let R be an equivalence relation on A.P={[a]| a  A}  P is partition of A pf: 顯然 Claim:[a]  [b],then [a]  [b]={} If [a]  [b]  {} By the lemma1,we have [a]=[b]  故 P 為 A 之一 partition

Partition Example: Let A= ,if (a,b)  R  a  b mod n. Then corresponding to equivalence class set  n ={[0],[1],…,[n-1]} Note: We sometimes write  n ={0,1,…,n-1}

Binary Operation Let S be a set.  :S  S  S function,then we say that  is a binary operation on S if  is a binary operation on S then we will write a  b rather than  (a,b). (S,  1,  2,…,  K ) is a set S together with k binary operation  1,  2,…,  K on S

Introduction to Rings A ring (R,+, ‧ ) is a set,R together with two binary operation +, ‧ on R called addition and multiplication,satisfying the following properties: (1) (R,+) is an abelin group. We write the identity element 0 (2)Multiplication is associative,means that a  (b  c)=(a  b)  c  a,b,c  R (3)The left and right distributive laws hold,means that a  (b+c)=a  b+a  c and (a+b)  c=a  c+b  c  a,b,c  R

Introduction to Rings Example: 我們在  上定義一個 equivalence relation, 若 (a,b)  R  a  b mod n 對應之 equivalence class set  n ={[0],[1],…,[n-1]}. 在  n 上定義兩個 binary operation +,  by [a]+[b]=[a+b mod n] 與 [a]  [b]=[ab mod n]  (  n +, ‧ ):ring NOTE: (1)  [a],[b]  n,[a]+[b]=[a+b mod n]=[b+a mod n]=[b]+[a] and [a]  [b]=[ab mod n]=[ba mod n]=[b]  [a] (2)  [a]  n,[a]+[0]=]=[a+0 mod n]=[a mod n]=[a] and [a]  [1]=[a  1 mod n]=[a mod n]=[a]

Introduction to Rings A ring R is called a commutative ring if ab=ba  a,b  R A ring R is called a ring with unity 1 if there is an element 1  0 in R such that 1  a=a=a  1  a  R Example: (1)  Q,R,C:commutative ring with unity 1 where the ring operations are the usual addition and multiplication. (2)Let n be a positive integer. Then the set  n ={0,1,…,n-1},under addition and multiplication modulo n is commutative ring with unity 1.

Introduction to Rings Let (R,+, ‧ ) be a ring,define R[X]={a n x n +a n−1 x n−1 +· · ·+a 1 x+a 0 |  n ,a i  R,  i=1, 2,...,n} is called the ring of polynomials over R In fact,R[X] is ring Example: (  3,+, ‧ ),f(x)=2x 3 +1, g(x)=x+2  f(x)+g(x)= 2x 3 +x and f(x)  g(x)=2x 4 +x 3 +x+2=2x 4 +2x+2

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Vanishing Polynomials Vanishing Polynomial f(x)  2 m [X],  x  2 m  f(x)=0 f(x),g(x)  2 m [X] if(f-g): vanishing means that 2 m | (f-g) n! divides a product of n consecutive numbers 4! divides 99 X 100 X 101 X 102 Find least n  2 m |n! Smarandache Function (SF) SF(2 3 ) = 4, since 2 3 |4! 2 m divides the product of n = SF(2 m ) consecutive numbers

Basic Number Theory Let f(x),g(x)  2 3 [X], if (f-g): vanishing (1)2 3 |(f - g) in  2 3 (2) 2 3 |4! (3) 4! divides the product of 4 consecutive numbers (4)  x  2 3, 4!|(x+1)(x+2)(x+3)(x+4) Write (f-g) as a product of SF(2 m ) = n consecutive numbers

Basis for factorization  S 0 (x) = 1  S 1 (x) = (x + 1)  S 2 (x) = (x + 1)(x + 2) : Product of 2 consecutive numbers  S 3 (x) = (x + 1)(x + 2)(x + 3) : Product of 3 consecutive numbers  …  S n (x) = S n-1 (x) (x + n) : Product of n consecutive numbers

Basis for factorization Theorem2: Factorize into atleast S n (x) to vanish, where n = SF(2 m ). Example: f = x 4 +2x 3 + 3x 2 + 2x  2 3 [X]; SF(2 3 ) = 4 f can be written as a product of 4 consecutive numbers. f= (x+1)(x+2)(x+3)(x+4) = S 4 (x) f is a vanishing polynomial.

Constraints on the Coefficient Example: h(x) = 4x 2 + 4x = 4(x+1)(x+2) = 4  S 2 (x)  2 3 [X]; SF(2 3 ) = 4 h(x) =0  x  2 3 h is a vanishing polynomial. But h(x) not equal to S 4 (x) Theorem3: 2 m /gcd(k!, 2 m )  S k (x)=0 in  2 m [X] NOTE: b  S k (x)=0 in  2 m [X]  2 m /gcd(k!, 2 m ) |b

Constraints on the Coefficient Example: h(x) = 4x 2 + 4x = 4(x+1)(x+2) = 4  S 2 (x)  2 3 [X] 2 3 /gcd(2!, 2 3 ) | 4  h is a vanishing polynomial.

Deciding Vanishing Polynomials Theorem4: Let F be a polynomial in  2 m [X].Then F is vanishes  F = F n S n + Σ n-1 a k b k S k  n = SF(2 m ), i.e. the least n such that 2 m |n!  F n is an arbitrary polynomial in  2 m [x]  a k is an arbitrary integer  b k = 2 m /gcd(k!,2 m ) k=0 Theorem3Theorem2

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Algorithm Procedure zero_Identifi( polynomial, 2 m ) 1.Calculate n = SF(2 m ) 2.k = n: Reduce according to Throrem2 Divide by S n If remainder is zero,then F = F n S n, else Continue

Algorithm 3.Reduce according to Theorem3. Divide by S n-1 to S 0 Check if quotient is a multiple of b k = 2 m /gcd(k!,2 m ) If remainder is zero,then stop. else continue

Example 1 p= 4x 2 + 4x in Z n = SF(2 3 ) = 4 2.k = 4: Divide by S 4 deg(p) = 2< deg(S 4 ) = 4 quo = 0, rem = 4x 2 + 4x F 4 = 0; Continue 3.k = 3: Divide by S 3 deg(p) = 2<deg(S 3 ) = 3 quo= 0, rem = 4x 2 + 4x continue 4.k = 2: Divide by S 2 quo = 4; rem = 0 b 2 = 2 3 /gcd(2!,2 3 ) = 4 a 2 = quo/ b 2 =1  Z p is a vanishing polynomial in Z 2 3

Example 2 p= 5x 2 + 3x + 7 in Z n = SF(2 3 ) = 4 2.k = 4: Divide by S 4 deg(p) = 2< deg(S 4 ) = 4 quo = 0,rem=5x 2 +3x + 7 F 4 = 0; Continue 3.k = 3: Divide by S 3 deg(p) = 2<deg(S 3 ) = 3 quo= 0, rem = 5x 2 +3x + 7 continue 4.k = 2: Divide by S 2 quo = 5; rem = 4x+5 b 2 = 2 3 /gcd(2!,2 3 ) = 4 a 2 = quo/ b 2 =5/4  Z p is not a vanishing polynomial in Z 2 3

Outline Introduction Modeling Vanishing Polynomials Algorithm Conclusions and Future Work

Thank You