Merge pull request #724 from mir-protocol/fix_dthroot_deg1_ext

Fix `DTH_ROOT` for degree 1 extension
This commit is contained in:
wborgeaud 2022-09-19 12:47:39 +02:00 committed by GitHub
commit 11a2099f8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,8 @@ pub trait OEF<const D: usize>: FieldExtension<D> {
}
impl<F: Field> OEF<1> for F {
const W: Self::BaseField = F::ZERO;
const DTH_ROOT: Self::BaseField = F::ZERO;
const W: Self::BaseField = F::ONE;
const DTH_ROOT: Self::BaseField = F::ONE;
}
pub trait Frobenius<const D: usize>: OEF<D> {
@ -80,8 +80,8 @@ pub trait Extendable<const D: usize>: Field + Sized {
impl<F: Field + Frobenius<1> + FieldExtension<1, BaseField = F>> Extendable<1> for F {
type Extension = F;
const W: Self = F::ZERO;
const DTH_ROOT: Self = F::ZERO;
const W: Self = F::ONE;
const DTH_ROOT: Self = F::ONE;
const EXT_MULTIPLICATIVE_GROUP_GENERATOR: [Self; 1] = [F::MULTIPLICATIVE_GROUP_GENERATOR];
const EXT_POWER_OF_TWO_GENERATOR: [Self; 1] = [F::POWER_OF_TWO_GENERATOR];
}