Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

ark-ff

This crate defines Finite Field traits and useful abstraction models that follow these traits. Implementations of finite fields with concrete parameters can be found in arkworks-rs/curves under arkworks-rs/curves/<your favourite curve>/src/fields/, which are used for some of the popular curves, such as a specific Fq used in BLS-381.

This crate contains two types of traits:

  • Field traits: These define interfaces for manipulating field elements, such as addition, multiplication, inverses, square roots, and more.
  • Field Parameters: holds the parameters defining the field in question. For extension fields, it also provides additional functionality required for the field, such as operations involving a (cubic or quadratic) non-residue used for constructing the field (NONRESIDUE).

The available field traits are:

  • Field - Interface for the most generic finte field
  • FftField - Exposes methods that allow for performing efficient FFTs on this field's elements
  • PrimeField - Field with p (p prime) elements, later referred to as Fp.
  • SquareRootField - Interface for fields that support square-root operations

The models implemented are:

The above two models serve as abstractions for constructing the extension fields Fp^m directly (i.e. m equal 2 or 3) or for creating extension towers to arrive at higher m. The latter is done by applying the extensions iteratively, e.g. cubic extension over a quadratic extension field.

  • Fp2 - Quadratic extension directly on the prime field, i.e. BaseField == BasePrimeField
  • Fp3 - Cubic extension directly on the prime field, i.e. BaseField == BasePrimeField
  • Fp6_2over3 - Extension tower: quadratic extension on a cubic extension field, i.e. BaseField = Fp3, but BasePrimeField = Fp.
  • Fp6_3over2 - Extension tower, similar to the above except that the towering order is reversed: it's a cubic extension on a quadratic extension field, i.e. BaseField = Fp2, but BasePrimeField = Fp. Only this latter one is exported by default as Fp6.
  • Fp12_2over3over2 - Extension tower: quadratic extension of the Fp6_3over2, i.e. BaseField = Fp6.