if n < 0 or t < 0 or n < t or not secret:
raise ValueError("Invalid parameters specified")
for i in xrange(1, t):
- coef.append(bytes2long(urandom(SECRET_LEN)[::-1]))
+ coef.append(bytes2long(urandom(SECRET_LEN)))
out = []
for i in xrange(1, n + 1):
out.append((i, long2bytes(_horner(t, i, coef))[::-1]))