Learning Cryptography: Finite Fields

Kerman Kohli
Jun 18 · 6 min read

Background


Introduction

Finite Fields

Prime Field Arithmetic

(3 + 4) mod 5 = 2
(1 + 4) mod 5 = 0
(1 + 2) mod 5 = 3
(4 - 0) mod 5 = 4
(4 - 2) mod 5 = 2
(3 - 0) mod 5 = 1
(0 * 4) mod 5 = 0
(2 * 4) mod 5 = 3
(3 * 4) mod 5 = 2
(4 * 4) mod 5 = 1
(3 * 2) mod 5 = 1
(2 * 3) mod 5 = 1
(1 * 1) mod 5 = 1
(0 * ?) mod 5 = 1 // this doesn’t exist!
GCD(0, 5) = undefined!

Extension Fields

(a2, a1, a0)(0, 0, 0) = 0
(0, 0, 1) = 1
(0, 1, 0) = x
(1, 0, 0) = x²
(0, 1, 1) = x+1
(1, 1, 0) = x²+x
(1, 0, 1) = x²+1
(1, 1, 1) = x²+x+1
A · B = (x²+1)(x²+x+1)
= x⁴+x³+x²+x²+1
= x⁴+x³+(1+1)x²+1
= x⁴+x³+1

Closing


About Loopring

Loopring Protocol

Loopring Official Blog

Kerman Kohli

Written by

Founder Helis Network

Loopring Protocol

Loopring Official Blog