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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
use ark_std::{
    cmp::{Ord, Ordering, PartialOrd},
    fmt::{Display, Formatter, Result as FmtResult},
    io::{Read, Result as IoResult, Write},
    marker::PhantomData,
    ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign},
    str::FromStr,
};
use num_traits::{One, Zero};

use crate::{
    biginteger::{
        arithmetic as fa, BigInteger as _BigInteger, BigInteger256, BigInteger320, BigInteger384,
        BigInteger448, BigInteger64, BigInteger768, BigInteger832,
    },
    bytes::{FromBytes, ToBytes},
    fields::{FftField, Field, FpParameters, LegendreSymbol, PrimeField, SquareRootField},
};
use ark_serialize::*;

impl_Fp!(Fp64, Fp64Parameters, BigInteger64, BigInteger64, 1, "64");
impl_Fp!(
    Fp256,
    Fp256Parameters,
    BigInteger256,
    BigInteger256,
    4,
    "256"
);
impl_Fp!(
    Fp320,
    Fp320Parameters,
    BigInteger320,
    BigInteger320,
    5,
    "320"
);
impl_Fp!(
    Fp384,
    Fp384Parameters,
    BigInteger384,
    BigInteger384,
    6,
    "384"
);
impl_Fp!(
    Fp448,
    Fp448Parameters,
    BigInteger448,
    BigInteger448,
    7,
    "448"
);
impl_Fp!(
    Fp768,
    Fp768Parameters,
    BigInteger768,
    BigInteger768,
    12,
    "768"
);
impl_Fp!(
    Fp832,
    Fp832Parameters,
    BigInteger832,
    BigInteger832,
    13,
    "832"
);

pub mod fp2;
pub use self::fp2::*;

pub mod fp3;
pub use self::fp3::*;

pub mod fp4;
pub use self::fp4::*;

pub mod fp6_2over3;

pub mod fp6_3over2;
pub use self::fp6_3over2::*;

pub mod fp12_2over3over2;
pub use self::fp12_2over3over2::*;

pub mod quadratic_extension;
pub use quadratic_extension::*;

pub mod cubic_extension;
pub use cubic_extension::*;