Finite Fields. SOLUTIONS Network Coding - Prof. Frank H.P. Fitzek

Similar documents
A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Chapter 4 Mathematics of Cryptography

Finite Fields. Mike Reiter

Chapter 4 Finite Fields

Fields in Cryptography. Çetin Kaya Koç Winter / 30

Mathematical Foundations of Cryptography

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

Math 261 Exercise sheet 5

Polynomials. Chapter 4

GF(2 m ) arithmetic: summary

Homework 8 Solutions to Selected Problems

COMPUTER ARITHMETIC. 13/05/2010 cryptography - math background pp. 1 / 162

Math /Foundations of Algebra/Fall 2017 Numbers at the Foundations: Real Numbers In calculus, the derivative of a function f(x) is defined

Homework #2 solutions Due: June 15, 2012

LECTURE NOTES IN CRYPTOGRAPHY

MTH310 EXAM 2 REVIEW

Galois Fields and Hardware Design

1. Algebra 1.5. Polynomial Rings

How does the computer generate observations from various distributions specified after input analysis?

Elliptic Curves I. The first three sections introduce and explain the properties of elliptic curves.

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

Rings. EE 387, Notes 7, Handout #10

ADDITONAL MATHEMATICS

CSCE 564, Fall 2001 Notes 6 Page 1 13 Random Numbers The great metaphysical truth in the generation of random numbers is this: If you want a function

Chapter 4. Remember: F will always stand for a field.

17 Galois Fields Introduction Primitive Elements Roots of Polynomials... 8

Ch 7 Summary - POLYNOMIAL FUNCTIONS

EE 229B ERROR CONTROL CODING Spring 2005

Lecture 6: Finite Fields (PART 3) PART 3: Polynomial Arithmetic. Theoretical Underpinnings of Modern Cryptography

Lecture 7: Polynomial rings

Solutions to Assignment 1

3.4. ZEROS OF POLYNOMIAL FUNCTIONS

Section VI.33. Finite Fields

3 The fundamentals: Algorithms, the integers, and matrices

Today. Polynomials. Secret Sharing.

2a 2 4ac), provided there is an element r in our

Introduction to finite fields

6A The language of polynomials. A Polynomial function follows the rule. Degree of a polynomial is the highest power of x with a non-zero coefficient.

, a 1. , a 2. ,..., a n

Warm-Up. Use long division to divide 5 into

Cyclic codes. Vahid Meghdadi Reference: Error Correction Coding by Todd K. Moon. February 2008

Finite Fields and Error-Correcting Codes

Homework 9 Solutions to Selected Problems

Introduction to Modern Cryptography. (1) Finite Groups, Rings and Fields. (2) AES - Advanced Encryption Standard

Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

Lecture Notes. Advanced Discrete Structures COT S

Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4

Information Theory. Lecture 7

2-4 Zeros of Polynomial Functions

Frequency Domain Finite Field Arithmetic for Elliptic Curve Cryptography

Dividing Polynomials: Remainder and Factor Theorems

Integer-Valued Polynomials

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R.

4 Number Theory and Cryptography

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Basic Concepts in Number Theory and Finite Fields

Continuing discussion of CRC s, especially looking at two-bit errors

We say that a polynomial is in the standard form if it is written in the order of decreasing exponents of x. Operations on polynomials:

PETERSON'S TABLE OF IRREDUCIBLE POLYNOMIALS OVER GF(2)

Math 109 HW 9 Solutions

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Discussion 6A Solution

Simplifying Rational Expressions and Functions

The final is cumulative, but with more emphasis on chapters 3 and 4. There will be two parts.

Section 4.1: Polynomial Functions and Models

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i

Find two positive factors of 24 whose sum is 10. Make an organized list.

MS 2001: Test 1 B Solutions

EE512: Error Control Coding

Computer Architecture 10. Residue Number Systems

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

Secondary Math 3 Honors - Polynomial and Polynomial Functions Test Review

Error Detection & Correction

Mathematics for Business and Economics - I. Chapter 5. Functions (Lecture 9)

6.5 Dividing Polynomials

Section 8.3 Partial Fraction Decomposition

Lecture 2: Number Representations (2)

CHAPTER 2 POLYNOMIALS KEY POINTS

Linear Feedback Shift Registers (LFSRs) 4-bit LFSR

CHAPTER 14. Ideals and Factor Rings

Montgomery Multiplier and Squarer in GF(2 m )

REDUNDANT TRINOMIALS FOR FINITE FIELDS OF CHARACTERISTIC 2

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5)

ECEN 604: Channel Coding for Communications

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

CHAPTER 4: Polynomial and Rational Functions

Modular Multiplication in GF (p k ) using Lagrange Representation

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Conversions between Decimal and Binary

Novel Implementation of Finite Field Multipliers over GF(2m) for Emerging Cryptographic Applications

Math 0320 Final Exam Review

Chapter 4: Radicals and Complex Numbers

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Introduction to Cryptology. Lecture 19

Functions and Equations

Section 6.6 Evaluating Polynomial Functions

Transcription:

Finite Fields In practice most finite field applications e.g. cryptography and error correcting codes utilizes a specific type of finite fields, namely the binary extension fields. The following exercises will introduce you to calculations in binary extension fields. Exercise 1: The Binary Field... Thebinaryfield 2 consistsoftwoelements{0,1}andisofparticularinterestsincethebinaryoperations are easily implemented and represented in software and hardware. In the case of the binary fields, arithmetic operations are performed modulo-2. For addition and multiplication this corresponds to the bitwise exclusive or (XOR) and the bitwise and (AND) operations. (a) Fill in the missing values in the below table. XOR 0 1 0 1 AND 0 1 0 1 Table 1: The finite field 2 consists of elements 0 and 1 which satisfy the addition(xor) and multiplication(and) tables. XOR 0 1 0 0 1 1 1 0 AND 0 1 0 0 0 1 0 1 Exercise 2: The Butterfly Network... (a) The butterfly network shown in the below figure is a famous example of Network Coding. Show how the two bits b 1 and b 2 may be delivered at the two receivers R 1 and R 2 simultaneously using the operations from the binary field (hint: the XOR operation is enough). Each edge may carry 1 bit per time unit. S b 1 b 2 1 2 3 4 R 1 R 2 Page 1

S b 1 b 2 1 2 b 1 3 b 2 b 1 b 1 +b 2 b 2 4 b 1 +b 2 b 1 +b 2 R 1 R 2 Exercise 3: Binary Field Calculations... In practice calculations are typically performed w-bits at a time, where w corresponds to the word size of the hardware used. Typical values of w are {16,32,64} bits. The below table shows an example of XOR and AND between two 8-bit words. 01011001 XOR 00100110 = 01111111 (a) Fill in the missing values in the tables. 00011101 AN D 01100111 = 00000101 11101001 XOR 10100110 = 01111000 AN D 01100111 = Table 2: Addition and multiplication in 2 with 8-bit words. 11101001 XOR 10100110 = 01001111 01111000 AN D 01100111 = 01100000 Exercise 4: The Binary Extension Field... In a previous exercise we found a solution for the butterfly network using the binary field. However, when implementing Network Coding it can in certain cases be necessary to increase the field size in order to find a solution (i.e. the number of elements contained in the field). In the binary field 2 the field size was 2, i.e. there are two elements 0,1. Binary extension fields have the form 2 m, where m 1. A binary extension field contains 2 m elements, all field elements may be represented as binary polynomials of degree at most m 1: 2 m = {f m 1 x m 1 +...+f 2 x 2 +f 1 x+f 0 : f i {0,1}} (1) Page 2

As an example consider the field given by 2 3 in the below table, in this case the field will consist of 2 3 = 8 polynomial elements of degree < m. In the binary extension field all polynomial elements can be represented as m bit binary numbers. It is important to notice the correspondence between the binary and polynomial representation. The bits from left to right are the coefficients of the powers of x in increasing order. (a) Fill in the missing values in the below table. GF2 3 Polynomial Binary Decimal 0 000 0 1 001 1 x 010 2 x+1 011 3 x 2 100 4 x 2 +1 101 5 x 2 +x 110 6 x 2 +x+1 111 7 GF2 m Polynomial Binary Decimal x 7 +x 6 +x 4 +x+1 11001001 133 x 4 +x 2 +x 00011001 10 GF2 m Polynomial Binary Decimal x 7 +x 6 +x 4 +x+1 11010011 211 x 7 +x 6 x 3 +1 11001001 201 x 7 +x 2 +1 10000101 133 x 4 +x 2 +x 00010110 22 x 4 +x 3 +1 00011001 25 x 3 +x 00001010 10 (b) In the table what is the required value for m in order to represent the field elements. The value of m must be 8. Exercise 5: Polynomial Addition and Subtraction... Polynomials essentially allow the same arithmetic operations as integers, however when polynomials are used the operations are performed modulo-p(x), where p(x) is an irreducible polynomial instead of a prime integer (e.g. 2 as in the case of the binary field). As with a prime number an irreducible polynomial is one which cannot be factored into products of two polynomials. Ordinary polynomial addition is performed component-wise e.g. for two polynomials with a maximum degree of k: Page 3

f(x) = h(x)+g(x) (2) k f(x) = (h i +g i )x i (3) i=0 In p m we calculate f(x)+g(x) as f(x)+g(x) mod p(x). This uses the usual component-wise addition as given in Equation (??), the only difference is that the coefficient sum is modulo p i.e. h i +g i mod p. As the degree of the resulting polynomial f(x) cannot exceed the degree of the chosen prime polynomial, no further computations are needed. Example Lets consider a w = 8 bit architecture with the two polynomials a(x) = x 7 + x 6 + x 2 and b(x) = x 7 +x 5 +x 3 +x 2 with the binary representation of 11000100 and 10101100 respectively. In the following we use to denote the XOR operation. Addition or subtraction: 11000100 10101100 = 01101000. The result may be confirmed by adding the two polynomials directly: f(x) = (x 7 +x 6 +x 2 )+(x 7 +x 5 +x 3 +x 2 ) (4) = (1 1)x 7 +x 6 +x 5 +x 3 +(1 1)x 2 (5) = x 6 +x 5 +x 3 (6) Where x 6 +x 5 +x 3 has the expected binary representation 01101000. (a) In 2 8 calculate (x 5 +x)+(x 3 +x 2 ) (x 5 +x)+(x 3 +x 2 ) = x 5 +x 3 +x 2 +x (b) In 2 8 calculate (x 7 +x 3 )+(x 7 +x+1) (x 7 +x 3 )+(x 7 +x+1) = x 3 +x+1 (c) In 2 8 calculate (x 3 +x 2 +x+1)+(x+1) (x 3 +x 2 +x+1)+(x+1) = x 3 +x 2 (d) In 2 8 calculate (x 7 +x 6 +x 5 +x 4 +x 3 +x 2 +1)+(x 4 +x 2 +1) (x 7 +x 6 +x 5 +x 4 +x 3 +x 2 +1)+(x 4 +x 2 +1) = x 7 +x 6 +x 5 +x 3 In the binary and binary extension field subtraction and addition are identical (based on the XOR). Subtraction of two field elements can be defined in terms of addition, if a,b then a b = a+( b), where b is the unique field element in such that b+( b) = 0 ( b is called the negative of b). (e) In 2 8 calculate (x 5 +x) (x 3 +x 2 ) Page 4

(x 5 +x) (x 3 +x 2 ) = x 5 +x 3 +x 2 +x (f) In 2 8 calculate (x 7 +x 3 ) (x 7 +x+1) (x 7 +x 3 ) (x 7 +x+1) = x 3 +x+1 (g) In 2 8 calculate (x 3 +x 2 +x+1) (x+1) (x 3 +x 2 +x+1) (x+1) = x 3 +x 2 (h) In 2 8 calculate (x 7 +x 6 +x 5 +x 4 +x 3 +x 2 +1) (x 4 +x 2 +1) (x 7 +x 6 +x 5 +x 4 +x 3 +x 2 +1) (x 4 +x 2 +1) = x 7 +x 6 +x 5 +x 3 Exercise 6: Polynomial Multiplication... For ordinary polynomial multiplication, the coefficients of f(x) = h(x)g(x) are determined by convolution, the resulting polynomial f(x) is of degree = deg(h)+deg(g): f i = i h j g i j (7) j=0 The product h(x)g(x) in p m can be found by first multiplying h(x) and g(x) using ordinary polynomial multiplication. Then ensuring that the resulting polynomial f(x) has degree < m by reducing it modulo p(x). The modulo operation can be implemented as polynomial long division and then taking the remainder. As for polynomial addition we must also ensure that all resulting coefficients are elements in p by reducing them modulo p. In the following use the irreducible prime polynomial p(x) = x 5 +x 2 +1 Example f(x) = (x 3 +x+1) (x 2 +1) (8) = x 5 +(1 1)x 3 +x 2 +x+1 (9) = x 5 +x 2 +x+1 (10) Since degree of f(x) equal m, we perform the modulo operation using the irreducible polynomial p(x) f(x) = x 5 +x 2 +x+1 mod p(x) (11) f(x) = x (12) The result of the modulo operation can be calculated as the remaineder of polynomial long division with the irreducible polynomial: x 5 +x 2 +1 x 5 +x 2 +x +1 x 5 +x 2 +1 1 qoutient x remainder Page 5

(a) In 2 5 calculate (x 4 +x) (x 3 +x 2 ) f(x) = (x 4 +x) (x 3 +x 2 ) = x 7 +x 6 +x 4 +x 3 Degree of f(x) > 5 so we must perform modulo i.e. long divsion with p(x): x 2 +x qoutient x 5 +x 2 +1 x 7 +x 6 +x 4 +x 3 x 7 +x 4 +x 2 x 6 +x 3 +x 2 x 6 +x 3 +x x 2 +x remainder Finally we therefore get: f(x) = (x 4 +x) (x 3 +x 2 ) mod p(x) = x 7 +x 6 +x 4 +x 3 mod p(x) = x 2 +x In Matlab this may be calculated as: gf(18, 5)*gf(12, 5) The first parameter represents the field element i.g. 18 is the decimal value of x 4 +x and 12 is the decimal value of x 3 +x 2. The second parameter represents the prime polynomial in Matlab decimal 5 represents the polynomial x 5 + x 2 + 1. For this calulation Matlab returns decimal value 6 which represents the polynomial x 2 +x, as we have shown above. (b) In 2 5 calculate (x 3 ) (x 2 +x 1 +1) (x 3 ) (x 2 +x 1 +1) = x 4 +x 3 +x 2 +1 Exercise 7: Polynomial Division... Division can be implemented in terms of multiplication with the inverse element. Division can be defined in terms of multiplication: if a,b then a/b = a (b 1 ), where b 1 is the unique field element in such that b b 1 = 1 (b 1 is called the inverse of b). The inverse of a polynomial may be found using the Extended Euclidean algorithm. (a) In 2 5 calculate (x 4 +x)/(x 3 +x 2 ) given (x 3 +x 2 ) 1 = (x 2 +x+1) (x 4 +x)/(x 3 +x 2 ) = (x 4 +x) (x 3 +x 2 ) 1 = (x 4 +x) (x 2 +x+1) = x 4 +1 (b) In 2 5 verify (x 3 +x 2 ) 1 = (x 2 +x+1) Is true if (x 3 +x 2 ) (x 2 +x+1) = 1 (x 3 +x 2 ) (x 2 +x+1) = x 5 +(1 1)x 4 +(1 1)x 3 +x 2 (13) = x 5 +x 2 (14) Since degree of the resulting polynomial equal m, we perform the modulo operation using the choosen irreducible polynomial p(x) = x 5 +x 2 +1 = x 5 +x 2 mod p(x) (15) = 1 (16) Page 6