# Finite Fields

Finite fields are the mathematical concept underlying elliptic curves which are used heavily in cryptography.

A finite field is a finite set of numbers and operations that satisfy 5 properties. Let us define a finite field of order p as follows:

F_p = \{0,1,2,...\ p-1\}

The set must meet these properties to be considered a finite field.

#### Closed Property

a,b\in F_p => a+b \in F_p

a + 0 = a

#### Multiplicative Identity

1 \times a = a

a \in F_p => -a \in F_p

#### Multiplicative Inverse

Let\ a \ne 0\ and\ a \in F_p => a^{-1} \in F_p

In order to satisfy these properties we must redefine the mathematical operators (addition, subtraction, multiplication, division and exponents) in the context of a finite field.

We will denote the mutated operators for finite fields as follows to avoid confusion with the default operators:

+_f \ \ \ \  -_f\ \ \ \ \times_f\ \ \ \ \div_f\ \ \ \ a^{x_f}

Let\ a,b \in F_p => a+_f \in F_p
a+_fb = (a+b)\%p

#### Subtraction in Finite Fields

Let\ a,b\in F_p => a-_fb\in F_p
a-_fb = (a-b)\%p

#### Inverse in Finite Fields

Let\ a,b \in F_p => -_f a\in F_p
-_fa = (-a)\%p


#### Multiplication in Finite Fields

Let\ a,b \in F_p => a\times_fb\in F_p
a\times _fb = (\sum_{n=0}^{b-1}a_n+_fa_{n+1})\%p

#### Division in Finite Fields

Let\ a,b \in F_p => a\div_fb \in F_p
a\div _fb =  a\times_fb^{(p-2)}

#### Exponentiation in Finite Fields

Let\ a \in F_p
a^{x_f} = a^{x\% (p-1)}\%p