Skip to content

Commit f2fbb60

Browse files
authored
primefield: bound MontyFieldParams on ConstPrimeMontyParams (#1675)
Also replaces `compute_s` with `PrimeParams::s`
1 parent 093df0b commit f2fbb60

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

primefield/src/monty.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ use crate::ByteOrder;
77
use bigint::{
88
ArrayEncoding, ByteArray, Invert, Limb, Reduce, Uint, Word, ctutils,
99
hybrid_array::{Array, ArraySize, typenum::Unsigned},
10-
modular::{ConstMontyForm as MontyForm, ConstMontyParams, FixedMontyParams, Retrieve},
10+
modular::{
11+
ConstMontyForm as MontyForm, ConstMontyParams, ConstPrimeMontyParams, FixedMontyParams,
12+
Retrieve,
13+
},
1114
};
1215
use common::Generate;
1316
use core::{
@@ -25,7 +28,7 @@ use subtle::{
2528

2629
/// Extension trait for defining additional field parameters beyond the ones provided by
2730
/// [`ConstMontyParams`].
28-
pub trait MontyFieldParams<const LIMBS: usize>: ConstMontyParams<LIMBS> {
31+
pub trait MontyFieldParams<const LIMBS: usize>: ConstPrimeMontyParams<LIMBS> {
2932
/// Size of a field element when serialized as bytes.
3033
type ByteSize: ArraySize;
3134

0 commit comments

Comments
 (0)