mirror of
https://github.com/serai-dex/serai.git
synced 2025-04-23 14:38:14 +00:00
Remove unused generic in frost
This commit is contained in:
parent
0bbf511062
commit
d36fc026dd
1 changed files with 4 additions and 7 deletions
|
@ -78,7 +78,7 @@ pub(crate) struct NonceCommitments<C: Curve> {
|
|||
}
|
||||
|
||||
impl<C: Curve> NonceCommitments<C> {
|
||||
pub(crate) fn new<R: RngCore + CryptoRng, T: Transcript>(
|
||||
pub(crate) fn new<R: RngCore + CryptoRng>(
|
||||
rng: &mut R,
|
||||
secret_share: &Zeroizing<C::F>,
|
||||
generators: &[C::G],
|
||||
|
@ -99,10 +99,7 @@ impl<C: Curve> NonceCommitments<C> {
|
|||
(nonce, NonceCommitments { generators: commitments })
|
||||
}
|
||||
|
||||
fn read<R: Read, T: Transcript>(
|
||||
reader: &mut R,
|
||||
generators: &[C::G],
|
||||
) -> io::Result<NonceCommitments<C>> {
|
||||
fn read<R: Read>(reader: &mut R, generators: &[C::G]) -> io::Result<NonceCommitments<C>> {
|
||||
Ok(NonceCommitments {
|
||||
generators: (0 .. generators.len())
|
||||
.map(|_| GeneratorCommitments::read(reader))
|
||||
|
@ -157,7 +154,7 @@ impl<C: Curve> Commitments<C> {
|
|||
let mut dleq_nonces = vec![];
|
||||
for generators in planned_nonces {
|
||||
let (nonce, these_commitments): (Nonce<C>, _) =
|
||||
NonceCommitments::new::<_, T>(&mut *rng, secret_share, generators);
|
||||
NonceCommitments::new(&mut *rng, secret_share, generators);
|
||||
|
||||
if generators.len() > 1 {
|
||||
dleq_generators.push(generators.clone());
|
||||
|
@ -205,7 +202,7 @@ impl<C: Curve> Commitments<C> {
|
|||
context: &[u8],
|
||||
) -> io::Result<Self> {
|
||||
let nonces = (0 .. generators.len())
|
||||
.map(|i| NonceCommitments::read::<_, T>(reader, &generators[i]))
|
||||
.map(|i| NonceCommitments::read(reader, &generators[i]))
|
||||
.collect::<Result<Vec<NonceCommitments<C>>, _>>()?;
|
||||
|
||||
let mut dleq_generators = vec![];
|
||||
|
|
Loading…
Reference in a new issue