Binary-field arithmetic in coordinates #
A basis over ZMod 2 identifies field elements with bit coordinates. A multiplication table
lists the products of basis vectors; fieldMul uses it to multiply arbitrary coordinate lists.
These operations are shared by affine dispersers, hardness encodings and small-bias spaces.
Main definitions #
Cslib.BinaryField.ofBits,Cslib.BinaryField.fieldOfBits: elements with given coordinates.Cslib.BinaryField.IsMulTable: the specification of a multiplication table.Cslib.BinaryField.fieldMul: multiplication using that table.
Main results #
Cslib.BinaryField.fieldOfBits_fieldMul: correctness of multiplication.Cslib.BinaryField.fieldOfBits_foldl_fieldMul: products computed by a fold.
Multiplication in coordinates: the coordinates of the product of the elements with
coordinates a and b, the sum of the products B u * B w read from the multiplication table
tab of the basis, for the bits a u = b w = 1.
With a multiplication table of the basis B, fieldMul multiplies: the element with
coordinates fieldMul tab a b is the product of those with coordinates a and b.
A fold of products in coordinates, skipping the elements with c x, multiplies the selected
factors.
A fold of products in coordinates multiplies all the factors.