README.md
January 23, 2025 · View on GitHub
Binary Fields
Binary fields denoted as , i.e. quotient ring of integers modulo ring of 2 integers , are a special class of Finite Fields, with modulus = $2$. Main properties exhibited by Binary fields are:
- Addition corresponds to bitwise XOR
- Multiplication corresponds to bitwise AND
- since, , i.e. negation of a number is itself
This allows for extremely efficient arithmetic that is much more hardware friendly than fields based on other primes.
Binary Extension fields
Finite field with $2^{k}GF(2^k)=F(2)[X]/f(X)f(X)k$. Used extensively in cryptography like AES block cipher and error-correcting codes.
Two ways of representing :
- univariate basis - two ways of representing in univariate basis as well, namely:
- polynomial basis: elements are represented as degree k-1 polynomial by equivalence class , where f(x) is any irreducible in the kth power.
- normal basis: elements are represented as taking powers of an element from the field
- multilinear basis: there’s one other way of representing elements, i.e. Multilinear basis, where elements are represented by monomials: $1,X_0,X_1\cdot X_0,X_2\cdot X_1\cdot X_0,\dots,X_0\dots X_{l-1}GF(2)$.
Extension field using towers
Binius realises binary extension field using towers formalised in Weidemann et al..
Basic idea is to derive sequence of polynomial rings inductively
- start with
- set , namely .
- set
- continue this further with , where is an irreducible in
In practice, Extension Field elements are represented in vector of binary field components of length $2^K\beta_v=\prod_{i=0}^{K-1}(v_iX_i+(1-v_i))v_i={0,1}$.
Let's take an example of K=2, this forms a field extension of 2^{4}. Let's form our basis vector, with :
- : representing in binary form, ,
Now, we have our basis to represents numbers in 2^{4}, taking few examples:
- $10={1,0,1,0}\implies X_0+X_0X_1$
- $7={0,1,1,1}\implies 1+X_0+X_1$
A very nice property of binary fields is defining an element using it's subfield, using it's first and second halves in the subfield:
Arithmetic in Binary Extensions
- Addition, Subtraction is just bitwise XOR
- Negation is the element itself
- Multiplication is done using a hybrid of Karatsuba multiplication
- Inversion is , using Fermat's little theorem