Shamir's secret sharing scheme is a well known way to convert a secret into a polynomial and distribute points in this polynomial. Some of these points can then be regrouped to reconstruct the original polynomial and subsequently the secret.

The regrouping process can be summarized as finding $p(0)$ in a polynomial knowing only the degree and pairs $(x_i, y_i)$ such that $p(x_i) = y_i$.

My question is: how do I do this efficiently? All implementations I've seen so far are $O(n^2)$ because they recompute the polynomial using Lagrange, with a few optimizations. Are there known faster ways?

  • 2
    $\begingroup$ It's certainly possible in some cases to get $O(n \lg n)$ using the FFT. You might want to explore the possibilities there when the available points aren't a full set of roots of unity. $\endgroup$ Jul 22, 2014 at 9:10

1 Answer 1


Yes. If you choose the evaluation poitns for the polynomial carefully, this problem is the same as correcting erasures in the Reed-Solomon encoding of a message, and there are faster algorithms for that problem.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.