wsts 14.0.2

Weighted Schnorr Threshold Signatures, based on FROST
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use polynomial::Polynomial;
use rand_core::{CryptoRng, RngCore};

use crate::curve::scalar::Scalar;

/// A verifiable secret share algorithm
pub struct VSS {}

impl VSS {
    /// Construct a random polynomial of the passed degree `n`
    pub fn random_poly<RNG: RngCore + CryptoRng>(n: u32, rng: &mut RNG) -> Polynomial<Scalar> {
        let params: Vec<Scalar> = (0..n + 1).map(|_| Scalar::random(rng)).collect();
        Polynomial::new(params)
    }
}