diff --git a/src/shamira.py b/src/shamira.py --- a/src/shamira.py +++ b/src/shamira.py @@ -18,6 +18,7 @@ class MalformedShare(SException): pass def _shareByte(secretB,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(secretB)]+[int(b) for b in os.urandom(k-1)] points=[gf256.evaluate(coefs,i) for i in range(1,n+1)] return points