Module risc0_zkp::field::baby_bear

source ·
Expand description

Baby bear field.

Support for the finite field of order 15 * 2^27 + 1, and its degree 4 extension field. This field choice allows for 32-bit addition without overflow.

Structs§

  • Definition of this field for operations that operate on the baby bear field and its 4th degree extension.
  • The BabyBear class is an element of the finite field F_p, where P is the prime number 15*2^27 + 1. Put another way, Fp is basically integer arithmetic modulo P.
  • Instances of ExtElem are elements of a finite field F_p^4. They are represented as elements of F_p[X] / (X^4 + 11). This large finite field (about 2^128 elements) is used when the security of operations depends on the size of the field. The field extension ExtElem has Elem as a subfield, so operations on elements of each are compatible. The irreducible polynomial x^4 + 11 was chosen because 11 is the simplest choice of BETA for x^4 + BETA that makes this polynomial irreducible.

Constants§

  • The modulus of the field.

Type Aliases§