1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use crateByteOrder;
/// Extension trait for [`ff::Field`], intended as a place to put optimizable arithmetic operations.
///
/// The idea is future versions of this crate can add provided methods which are useful in dense
/// field arithmetic like `primeorder`'s RCB implementation, and `primefield` can potentially
/// automatically plug in optimized implementations when available.
// TODO(tarcieri): add some methods to this trait, e.g. `add_and_mul`, `mul_and_add`
/// Extension trait for [`ff::PrimeField`] which enables specifying the endianness in which
/// [`ff::PrimeField::Repr`] is encoded.
// TODO(tarcieri): remove this if/whenever zkcrypto/rfcs#4 lands. See also: zkcrypto/ff#158