You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Returns true iff the coefficient `a_0` of the constant term is zero.
The is_zero_hole and to_zero_hole methods are used for proactive polynomial randomization. however, we aren't doing anything to ensure that h(x) = f(x) + g(x) where g(x) is a zero hole polynomial would yield deg h = deg f. a suggestion is to normalize the polynomial representation to require the leading coefficient to be 1. The roots of a polynomial f(x) and the monic version derived by multiplying the coefficients with the multiplicative inverse of the leading coefficients will be the same, and when we add two polynomials in this representation, we just have to multiply by TWO_INV, which is required by ff::PrimeField, through the coefficient sums.
While the probability of polynomial degree reduction is miniscule, this should be an easy change to avoid the possibility altogether. It would also be reasonable to just comment and say that we're aware of the possibility and that the probability (1/p) of occurrence is deemed sufficiently small / negligible.
The text was updated successfully, but these errors were encountered:
oasis-core/secret-sharing/src/poly/univariate.rs
Line 85 in b0e6bc8
The
is_zero_hole
andto_zero_hole
methods are used for proactive polynomial randomization. however, we aren't doing anything to ensure thath(x) = f(x) + g(x)
whereg(x)
is a zero hole polynomial would yielddeg h = deg f
. a suggestion is to normalize the polynomial representation to require the leading coefficient to be1
. The roots of a polynomialf(x)
and the monic version derived by multiplying the coefficients with the multiplicative inverse of the leading coefficients will be the same, and when we add two polynomials in this representation, we just have to multiply byTWO_INV
, which is required byff::PrimeField
, through the coefficient sums.While the probability of polynomial degree reduction is miniscule, this should be an easy change to avoid the possibility altogether. It would also be reasonable to just comment and say that we're aware of the possibility and that the probability (1/p) of occurrence is deemed sufficiently small / negligible.
The text was updated successfully, but these errors were encountered: