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

Slides:



Advertisements
Similar presentations
1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Advertisements

Cryptography and Network Security
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
Equivalence Verification of Polynomial Datapaths with Fixed-Size Bit-Vectors using Finite Ring Algebra Namrata Shekhar, Priyank Kalla, Florian Enescu,
Lattice and Boolean Algebra
Finite fields.
Relations Chapter 9.
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.
FINITE FIELDS 7/30 陳柏誠.
CPSC 3730 Cryptography and Network Security
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
Great Theoretical Ideas in Computer Science.
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
Polynomials. Intro An algebraic expression in which variables involved have only non-negative integral powers is called a polynomial. E.g.- (a) 2x 3 –4x.
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
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.
Great Theoretical Ideas in Computer Science.
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.
1 Discrete and Combinatorial Mathematics R. P. Grimaldi, 5 th edition, 2004 Chapter 5 Relations and Functions.
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.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Cryptography and Network Security Chapter 4 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
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.
Divisibility and Modular Arithmetic
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Great Theoretical Ideas in Computer Science.
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
Polynomials.
Relations Chapter 9.
Great Theoretical Ideas in Computer Science
Advanced Algorithms Analysis and Design
Polynomial Let R be a ring. A polynomial over R is an expression of the form: f (x) = a0 + a1x + a2x2 +…+ anxn where the ai  R called the coefficients.
Relationships between Boolean Function and Symmetric Group
Revision on Polynomials
Foundations of Discrete Mathematics
Objectives The student will be able to:
Great Theoretical Ideas in Computer Science
I. Finite Field Algebra.
Rayat Shikshan Sanstha’s S.M.Joshi College, Hadapsar -28
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 Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite Conclusions and Future Work

Outline Introduction Modeling Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite 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 Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite 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 by 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 Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite 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  Y 0 (x) = 1  Y 1 (x) = (x + 1)  Y 2 (x) = (x + 1)(x + 2) : Product of 2 consecutive numbers  Y 3 (x) = (x + 1)(x + 2)(x + 3) : Product of 3 consecutive numbers  …  Y n (x) = Y n-1 (x) (x + n) : Product of n consecutive numbers

Basis for factorization Theorem2: S n (x) is vanishing in  2 m [X], 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) = Y 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 )  Y k (x)=0 in  2 m [X],0  k  SF(2 m ),2 m /gcd(k!, 2 m ) 為使 2 m /gcd(k!, 2 m )  Y k (x)=0 之 min NOTE: b  Y 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  Y 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 Y n + Σ n-1 a k b k Y 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 Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite 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 Y n, else Continue

Algorithm 3.Reduce according to Theorem3. Divide by Y n-1 to Y 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 Y 4 deg(p) = 2< deg(Y 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 Y 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 Y 4 deg(p) = 2< deg(Y 4 ) = 4 quo = 0,rem=5x 2 +3x + 7 F 4 = 0; Continue 3.k = 3: Divide by Y 3 deg(p) = 2<deg(Y 3 ) = 3 quo= 0, rem = 5x 2 +3x + 7 continue 4.k = 2: Divide by Y 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 Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite Conclusions and Future Work

Multiple Polynomial Definition: (1) Let R be a ring, define the ring R[x 1,…,x n ] of polynomial in the indeterminates x 1,…,x n recursively as follows: R[x 1,…,x n ] = (R[x 1,…,x n-1 ])[x n ] (2) x 1 i1 …x n in is called monomial, ax 1 i1 …x n in is called monomial term, where a 為此 term 之 coefficient (3) The degree of x 1 i1 …x n in is (i1,…,in)  n denote deg(x 1 i1 …x n in )

Multiple Polynomial If R is a commutative and f(x 1,…,x n )  R[x 1,…,x n ], then the mapping  : R  R given by (a 1,…,a n )  (a 1,…,a n ) The mapping is called polyfunction. In this problem,  :  2 n1  …  2 nd  2 m Definition: Let k=(k 1,k 2,…,k d )  n, we define Y k =y k1 (x 1 ) … y kd (x d ), where y ki (x i ) is the falling factor of degree k i in x i

Example F(x 1, x 2 )=x 1 4 x 2 + 2x 1 3 x 2 + 3x 1 2 x 2 + 2x 1 x 2 over  2 2 [x 1,…,x n ] 1.sf(2 2 )=4 2.F=Y (4,1) (x 1, x 2 )=Y 4 (x 1 )Y 1 (x 2 )=0 in  2 2 We wish to generalize these results to analyze polyfunctions over  2 n1  …  2 nd  2 m

Lemma8 (1)   2 ni then Y 2 ni (x i )=0,  i=1, 2, …, d (2)Let n=sf(2 m ) then Y n (x)=0 Take  i =min{2 ni,sf(2 m )},  i=1, 2, …, d then Y  i   2 ni is vanshing polynomial Lemma: Let k=(k 1,k 2,…,k d )  n, then Y k =0  k i  i, for some i

Example F(x 1, x 2 )=x 1 2 x 2 - x 1 x 2 be a polynomial corresponding to the polyfunction  :  2 1  2 2  2 3. We show that F is a vanshing polynomial. 1.sf(2 3 )=4,  1=2,  2=4 2.x 1 2 x 2 - x 1 x 2 =x 1 (x 1 -1) x 2 =Y (2,1) (x 1, x 2 ) 3.k1   1=2 The condition in lemma is satisfied, Hence F is vanshing polynomial

Constraints on the Coefficient Theorem8: The expression c k  Y k =0 in  2 m [X]  2 m /gcd(  i=1 k i !, 2 m ) | c k  c k  2 m  k=(k 1,k 2,…,k d )  n such that k i  i,  i=1,2,…,d d

Example F(x 1, x 2 )=4x 1 x x 1 x 2 be a polynomial corresponding to the polyfunction  :  2 1  2 2  2 3. We show that F is a vanshing polynomial. 1.2 n1 =2, 2 n2 =4, sf(2 3 )=4,  1=2,  2=4, 2.4x 1 x x 1 x 2 =4x 1 x 2 (x 1 -1) = c (1,2) Y (1,2) (x 1, x 2 ) 3.8/gcd( 1!x2!, 8) | c (1,2) 且 k1  1=2, k2  2=4 The condition in lemma is satisfied, Hence F is vanshing polynomial

Deciding Vanishing Polynomials Theorem: Let F be a polynomial representation for the function  from  2 n1  …  2 nd to  2 m. Then F is vanishes  F =  i=1 Q i Y  (i) + Σa k b k Y k  n = SF(2 m ), i.e. the least n such that 2 m |n!  k=(k 1,k 2,…,k d )  n, for each k i =1,2,…,  i  Y  (i) is falling factor of degree  i  Q i is an arbitrary polynomial  a k is an arbitrary integer  b k = 2 m /gcd(k!,2 m ) Theorem8 Lemma8 d

Outline Introduction Modeling Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite Conclusions and Future Work

Example

Outline Introduction Modeling Univariate Vanishing Polynomials Algorithm of Univariate Multi-varite Vanishing Polynomials Algorithm of Multi-varite Conclusions and Future Work

Thank You