oasis-core
oasis-core copied to clipboard
it's possible to change coefficients but not in a way to increase the degree of a polynomial
https://github.com/oasisprotocol/oasis-core/blob/18da8bc49d92a543795246b8bb7fb574df070eec/secret-sharing/src/poly/univariate.rs#L71
not a bug, but an oddity. the API allows callers to change the coefficients of a polynomial, but not to increase its degree. callers can decrease the degree of a polynomial by setting higher degree coefficients to zero.
callers can decrease the degree of a polynomial
True. This was intentional. The reason for this is that we want to have constant time operations on polynomials. Therefore, the function degree and its usage was removed and replaced with size. In general, the crate has no idea what a degree is.