mirror of
https://github.com/arnaucube/ark-curves-cherry-picked.git
synced 2026-01-27 14:13:46 +01:00
Upgrade to work with latest ark-ff (#95)
Co-authored-by: Sun <huachuang20@gmail.com>
This commit is contained in:
@@ -1,27 +1,26 @@
|
||||
use crate::{Fq, Fq3, Fq3Parameters, FQ_ONE, FQ_ZERO};
|
||||
use ark_ff::{
|
||||
field_new,
|
||||
fields::fp6_2over3::{Fp6, Fp6Parameters},
|
||||
fields::fp6_2over3::{Fp6, Fp6Config},
|
||||
CubicExt, MontFp,
|
||||
};
|
||||
|
||||
pub type Fq6 = Fp6<Fq6Parameters>;
|
||||
use crate::{Fq, Fq3, Fq3Config, FQ_ONE, FQ_ZERO};
|
||||
|
||||
pub struct Fq6Parameters;
|
||||
pub type Fq6 = Fp6<Fq6Config>;
|
||||
|
||||
impl Fp6Parameters for Fq6Parameters {
|
||||
type Fp3Params = Fq3Parameters;
|
||||
pub struct Fq6Config;
|
||||
|
||||
impl Fp6Config for Fq6Config {
|
||||
type Fp3Config = Fq3Config;
|
||||
|
||||
/// NONRESIDUE = (0, 1, 0)
|
||||
#[rustfmt::skip]
|
||||
const NONRESIDUE: Fq3 = field_new!(Fq3, FQ_ZERO, FQ_ONE, FQ_ZERO);
|
||||
const NONRESIDUE: Fq3 = CubicExt!(FQ_ZERO, FQ_ONE, FQ_ZERO);
|
||||
|
||||
#[rustfmt::skip]
|
||||
const FROBENIUS_COEFF_FP6_C1: &'static [Fq] = &[
|
||||
field_new!(Fq, "1"),
|
||||
field_new!(Fq, "4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775649"),
|
||||
field_new!(Fq, "4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775648"),
|
||||
field_new!(Fq, "-1"),
|
||||
field_new!(Fq, "1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292650"),
|
||||
field_new!(Fq, "1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292651"),
|
||||
MontFp!(Fq, "1"),
|
||||
MontFp!(Fq, "4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775649"),
|
||||
MontFp!(Fq, "4922464560225523242118178942575080391082002530232324381063048548642823052024664478336818169867474395270858391911405337707247735739826664939444490469542109391530482826728203582549674992333383150446779312029624171857054392282775648"),
|
||||
MontFp!(Fq, "-1"),
|
||||
MontFp!(Fq, "1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292650"),
|
||||
MontFp!(Fq, "1968985824090209297278610739700577151397666382303825728450741611566800370218827257750865013421937292370006175842381275743914023380727582819905021229583192207421122272650305267822868639090213645505120388400344940985710520836292651"),
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user