pub fn create(poly: &Polynomial, num_coefficients: usize) -> ThresholdEcdsaResult<Self> {
        let curve = EccCurve::new(poly.curve_type());
        let g = curve.generator_g()?;

        let mut points = Vec::with_capacity(num_coefficients);

        for coeff in poly.get_coefficients(num_coefficients)? {
            points.push(g.scalar_mul(&coeff)?);
        }

        Ok(Self::new(points))
    }
/// Create a new simple commitment
///
/// The polynomial must have at most num_coefficients coefficients
Create a new simple commitment
The polynomial must have at most num_coefficients coefficients
Create a new simple commitment The polynomial must have at most num_coefficients coefficients
pub fn create(poly: &Polynomial, num_coefficients: usize) -> ThresholdEcdsaResult<Self> {
        let curve = EccCurve::new(poly.curve_type());
        let g = curve.generator_g()?;
        let mut points = Vec::with_capacity(num_coefficients);
        for coeff in poly.get_coefficients(num_coefficients)? {
            points.push(g.scalar_mul(&coeff)?);
        }
        Ok(Self::new(points))
    }
pub fn create ( poly : & Polynomial , num_coefficients : usize ) -> ThresholdEcdsaResult < Self > { let curve = EccCurve :: new ( poly . curve_type ( ) ) ; let g = curve . generator_g ( ) ? ; let mut points = Vec :: with_capacity ( num_coefficients ) ; for coeff in poly . get_coefficients ( num_coefficients ) ? { points . push ( g . scalar_mul ( & coeff ) ? ) ; } Ok ( Self :: new ( points ) ) }
Create a new simple commitment
The polynomial must have at most num_coefficients coefficients
Create a new simple commitment The polynomial must have at most num_coefficients coefficients
poly
&Polynomial
num_coefficients
usize
poly
&Polynomial
num_coefficients
usize