示例#1
0
 def recombine(self, shares, x_recomb):
     xs, ys = zip(*shares)
     p = LagrangePolynomial(shares, self.field.zero(), self.field.one())
     return p.evaluate(x_recomb)
示例#2
0
 def recombine_polynomial(self, shares):
     xs, ys = zip(*shares)
     p = LagrangePolynomial(shares, self.field.zero(), self.field.one())
     return p.get_polynomial()