Mathematical Background: Extension Fields

Slides:



Advertisements
Similar presentations
Finite Fields Rong-Jaye Chen. p2. Finite fields 1. Irreducible polynomial f(x)  K[x], f(x) has no proper divisors in K[x] Eg. f(x)=1+x+x 2 is irreducible.
Advertisements

BCH Codes Hsin-Lung Wu NTPU.
Mathematics of Cryptography Part II: Algebraic Structures
Dividing Polynomials.
Information and Coding Theory Finite fields. Juris Viksna, 2015.
Cryptography and Network Security Chapter 4
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
Chapter 4 – Finite Fields Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic Curve, IDEA, Public.
Mathematics of Cryptography Part I: Modular Arithmetic
Cyclic codes 1 CHAPTER 3: Cyclic and convolution codes Cyclic codes are of interest and importance because They posses rich algebraic structure that can.
CPSC 3730 Cryptography and Network Security
Cryptography and Network Security Introduction to Finite Fields.
By: Hector L Contreras SSGT / USMC
Polynomial Division and the Remainder Theorem Section 9.4.
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
Linear Feedback Shift Register. 2 Linear Feedback Shift Registers (LFSRs) These are n-bit counters exhibiting pseudo-random behavior. Built from simple.
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.
ACTIVITY 31: Dividing Polynomials (Section 4.2, pp )
12/23/ Division and The Remainder Theorem.
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Section 4.3 Polynomial Division; The Remainder and Factor Theorems Copyright ©2013, 2009, 2006, 2001 Pearson Education, Inc.
Cryptography and Network Security Chapter 4 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Polynomial Division Objective: To divide polynomials by long division and synthetic division.
Multiplicative Group The multiplicative group of Z n includes every a, 0
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
Cryptographic Protocols Secret sharing, Threshold Security
3.3 Dividing Polynomials.
CS480 Cryptography and Information Security
Mathematical Background : A quick approach to Group and Field Theory
Dividing Polynomials A review of long division:
Dividing Polynomials.
Section 5.4 – Dividing Polynomials
Chapter4: Finite Fields
Mathematical Background: Groups, Rings, Finite Fields (GF)
Mathematical Background for Cryptography: Modular arithmetic and gcd
Information and Coding Theory
DH Public-Key Exchange
Dividing Polynomials.
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Sample Solution Cryptology Design Fundamentals
4.3 Division of Polynomials
Polynomial Division; The Remainder Theorem and Factor Theorem
Mathematical Background: Prime Numbers
ElGamal Public-Key Systems over GF(p) & GF(2m)
Division of Polynomials
Mathematical Background: Primes and (GF)
Cryptography and Network Security
Finite Fields Rong-Jaye Chen.
I. Finite Field Algebra.
Dividing Polynomials.
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
Sample Solution Cryptology Design Fundamentals
Sample Solution Final exam: Cryptology Design Fundamentals
Cryptology Design Fundamentals
Cryptology Design Fundamentals
CHAPTER 3: Cyclic and convolution codes
Cryptographic Protocols Secret Sharing, Threshold Security
Cryptology Design Fundamentals
Mathematical Background: Groups, Rings, Finite Fields (GF)
Mathematical Background : A quick approach to Group and Field Theory
Mathematical Background: Extension Finite Fields
Mathematical Background: Primes and (GF)
Presentation transcript:

Mathematical Background: Extension Fields Network Security Design Fundamentals ET-IDA-082 Tutorial-4 Mathematical Background: Extension Fields 13.04.2016, v24 Prof. W. Adi

Irreducible Polynomials and extension Fields GF(2m) g(x) is called Irreducible Polynomial of degree m over GF(2) where ai  GF(2) and Factorization is not possible over GF(2) g(x) = The period e of g(x) is the smallest e such that xe = 1 [mod g(x)] e is actually the order of x modulo g(x). e divides 2m -1 If e = 2m -1 the the polynomial is called primitive The reciprocal polynomial is defined as g*(x) = xn g(1/x) The period of the reciprocal polynomial g*(x) is equal to that of g(x) GF (2m ) The ring of polynomials Zg(x) modulo an irreducible polynomial of degree m over GF(2) is an extension field with 2m elements The order of any element in GF(2m) is a divisor of 2m -1 (Lagrange theorem)

Problem 4-1: Polynomials over a field Give the corresponding vector representation of the polynomials 1 + x2 + x5 + x9 1 + x3 + x8 + x12 x2 + x5 + x7 x + x9 + x10 1 + x8 1 + x + x2 + x3+ x4 + x5 + x6 + x7 Solution 4-1: LSB MSB 1 + x2 + x5 + x9 = 1 010010001 1 + x3 + x8 + x12 = 1001000010001 x2 + x5 + x7 = 00100101 x + x9 + x10 = 01000000011 1 + x8 = 100000001 1 + x + x2 + x3+ x4 + x5 + x6 + x7 = 11111111

Problem 4-2: Polynomials over a field Compute the following polynomial products over GF(2) (1 + x2 ) (1 + x2 + x5 ) (x3 + x4)(1 + x3 + x8 + x12) X3 (1 + x3 + x5 + x6) Compute the following polynomial products over GF(3) (1 + 2x2 ) (1 + x2 +2x5 ) (x + 2x3)(1 + 2x3 + x8 + x12) Compute the following polynomial products over GF(7) (2 + 4x2 ) (1 + 3x2 + 5x5 ) (3x + 5x3)(6 + 2x3 + 3x8) Solution 4-2: products over GF(2) (1 + x2 ) (1 + x2 + x5 ) = 1 + x2 + x5 + x2 + x4 + x7 = 1 + 2 x2 + x4 + x5 + x7 = 1 + x4 + x5 + x7 (x3 + x4)(1 + x3 + x8 + x12) = x3 + x6 + x11 + x15 + x4 + x7 + x12 + x16 = x3 + x4 + x6 + x7 + x11 + x12 + x15 + x16 X3 (1 + x3 + x5 + x6) = X3 + x6 + x8 + x9

Solution 4-2 cont.: products over GF(3) 1. (1 + 2x2 ) (1 + x2 +2x5 ) = 1 + x2 +2x5 + 2 x2 + 2x4 +4x7 = 1 + 3x2 + + 2x4 +2x5 +4x7 = 1 + 2x4 +2x5 +1x7 2. (x + 2x3)(1 + 2x3 + x8 + x12) = Products over GF(7) (2 + 4x2 ) (1 + 3x2 + 5x5 ) = 2 + 6x2 +10x5 + 4x2 + 12x4 + 20x7 = 2 + 10x2 +12x4 + 10x5 + 20x7 = 2 +3x2 + 5x4 + 3x5 + 6x7 2. (3x2 + 5x3)(6x2 + 2x3 + 3x8) =

Problem 4-3: Polynomials division over a finite field Compute the following polynomial divisions over GF(2) (x12 + x8 + x6 + x2 + 1)  (x5+ x2 +1 ) Solution 4-3: ( x12 + x8 + x6 + x2 + 1)  ( x5+ x2 +1 ) - (x12 + x9 + x7) x7 + x4 + x3 + x2 + 1 x9 + x8 + x7 + x6+ x2 + 1 Q/x) in GF(2): 1+1=2=0 => 1=-1 =>Addition Is equal to subtraction x9 + x6 + x4 x8 + x7 + x4 + x2 + 1 x8 + x5 + x3 x7 + x5 + x4 + x3 + x2 + 1 x7 + x4 + x2 Remainder of the division R/x) x5 + x3 + 1 x5 + x2 + 1 x3 + x2

Solution: Compute gcd [ P1(x) , P2(x) ] = A(x) P1(x) + B(x) P2(x) Problem 4.4: Find the multiplicative inverse of x + 1 modulo x5 + x3 + 1 Solution: Compute gcd [ P1(x) , P2(x) ] = A(x) P1(x) + B(x) P2(x) if gcd =1, then the inverse is B(x) Extended gcd Algorithm: A2 = A1 – q A2 B2 = B1 – q B2 P1(x) P2(x) A1(x) A2(x) B1(x) B2(x) Qx) R(x) x5 + x3 + 1 x + 1 1 1 x4 + x3 1 0 – (x4 + x3 ). 1= x4 + x3 x + 1 1 x +1 1 1 => (x4 + x3 )  (x + 1 ) -1 modulo (x5 + x3 + 1) x5 + x3 + 1=0 x5 = x3 + 1 Check: (x + 1) (x4 + x3 ) = x5+ x4 + x4 + x3  1 modulo (x5 + x3 + 1)

Problem 4-5: Elements order over an extension field Compute the exponents of the element x over GF(25) which is generated by the irreducible polynomial P(x)= (x5+ x2 +1 ) Solution 4-5: If P(x)= x5+ x2 +1 is the modulus then it is equal to zero That is x5+ x2 +1 = 0 Thus x5 = x2 +1 Let us compute the exponents of x over this field: x = x mod (x5+ x2 +1 ) x2= x2 mod (x5+ x2 +1 ) x3= x3 mod (x5+ x2 +1 ) x4= x4 mod (x5+ x2 +1 ) x5= x2 +1 mod (x5+ x2 +1 ) x6= x (x2 +1)= x3 +x mod (x5+ x2 +1 ) x7= x (x3 +x) = ( x4 +x2 ) mod (x5+ x2 +1 ) x8= x5 + x3 = x2 +1 + x3 mod (x5+ x2 +1 ) x9= x4 + x3 + x mod (x5+ x2 +1 ) …. x14 = (x7)2 = ( x4 +x2 )2 = x8 + x4 = x3 + x2 +1 + x4 x15 = ( x3 + x2 +1 + x4 ) x = x4 + x3 +x + x5 = x4 + x3 +x + x2 +1 x16 = (x8)2 = ( x3 +x2 +1 )2 = x6 + x4 +1= x3 + x + x4 +1 = Important notice: In GF (25): the order of any element Is a divisor of 25-1=31 Divisors of 31 are 1 and 31 ! => The order can be either 1 or 31 !

Problem 4-6: Arithmetic in GF(25) Given GF(25) generated by the irreducible polynomial g(x) = x5 + x3 + 1 Design a circuit which multiplies any serial data stream I(x) by the inverse of the polynomial p(x)= x + 1 in GF(25). Check the circuit by multiplying (1 + x2 + x3 ) *(x + 1)-1 Solution 4-6: Compute gcd [ g(x) , p(x) ] = A(x) g(x) + B(x) p(x) if gcd =1, then the multiplicative inverse of p(x) is B(x) Extended gcd Algorithm: A2 = A1 – q A2 B2 = B1 – q B2 P1(x) P2(x) A1(x) A2(x) B1(x) B2(x) Qx) R(x) x5 + x3 + 1 x + 1 1 1 x4 + x3 1 0 – (x4 + x3 ). 1 = (x4 + x3 ) x + 1 1 x +1 1 1 => (x + 1 ) -1  (x4 + x3 ) modulo (x5 + x3 + 1) x5 + x3 + 1=0 x5 = x3 + 1 Check: (x + 1) (x4 + x3 ) = x5+ x4 + x4 + x3  1 modulo (x5 + x3 + 1)

A circuit which multiplies any serial data stream I(x) by the inverse of the polynomial p(x)= x + 1 that is p(x)-1 = x3 + x4 modulo the irreducible polynomial g(x) = x5 + x3 + 1 (x + 1 ) -1  (x4 + x3 ) LSB .. MSB I(x)= 1 + x2 + x3 = 1011 Remainder MSB Check: (1 + x2 + x3)(x4 + x3 ) = x4 + x6 +x7 +x3 + x5 +x6 = x4 + x7 +x3 + x5 = x4 + x2 +1+x3 +x3 + 1 +x3 = x4 + x2 +x3 x5 = 1 +x3 x6 = x +x4 x7 = x2 +x5= x2 +1+x3 Remainder LSB x3 x4 r0 r1 r2 + r3 + r4 1 x3 x5 Clocking in the data stream 1011 States before clocking each input Input 1 register state 00000 Input 1 register state 00011 Input 0 register state 10000 Input 1 register state 01000 Input x register state 00111 g(x) = x5 + x3 + 1 LSB .. MSB Result of multiplication= x2 + x3 +x4

Problem 4-7: ad-hoc Class exercise Select a polynomial as a modulus for GF(28) Compute a primitive element Wich are the possible multiplicative orders in GF(28) How many elements do exist from each possible order Compute other 5 primitive elements Compute one element for each possible multiplicative order Solution 4-7: