Module prio::field[][src]

Expand description

Finite field arithmetic.

Each field has an associated parameter called the “generator” that generates a multiplicative subgroup of order 2^n for some n.

Structs

GF(4293918721), a 32-bit field. The generator has order 2^20.

(NOTE: These parameters are experimental. Applications should expect them to change.) GF(15564440312192434177), a 64-bit field. The generator has order 2^59.

(NOTE: These parameters are experimental. Applications should expect them to change.) GF(779190469673491460259841), an 80-bit field. The generator has order 2^72.

(NOTE: These parameters are experimental. Applications should expect them to change.) GF(74769074762901517850839147140769382401), a 126-bit field. The generator has order 2^118.

Same as Field32, but encoded in little endian for compatibility with Prio v2.

Enums

Possible errors from finite field operations.

Traits

Objects with this trait represent an element of GF(p) for some prime p.

Functions

Generate a vector of uniform random field elements.

Outputs an additive secret sharing of the input.