diff --git a/src/shamira/core.py b/src/shamira/core.py --- a/src/shamira/core.py +++ b/src/shamira/core.py @@ -19,7 +19,7 @@ def _share_byte(secret_b, k, n): if not k<=n<255: raise InvalidParams("Failed k<=n<255, k={0}, n={1}".format(k, n)) # we might be concerned with zero coefficients degenerating our polynomial, but there's no reason - we still need k shares to determine it is the case - coefs = [int(secret_b)]+[int(b) for b in os.urandom(k-1)] + coefs = [int(b) for b in os.urandom(k-1)]+[int(secret_b)] points = [gf256.evaluate(coefs, i) for i in range(1, n+1)] return points