Skip to content

Commit

Permalink
Peg randomized SSS coefficient length to secret's length
Browse files Browse the repository at this point in the history
  • Loading branch information
goatpig committed Sep 21, 2017
1 parent f893252 commit 7bd9887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion armoryengine/ArmoryUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2623,7 +2623,7 @@ def SplitSecret(secret, needed, pieces, nbytes=None):
# We use randomized coefficients so as to respect SSS security parameters
othernum = []
for i in range(pieces+needed-1):
othernum.append(binary_to_int(SecureBinaryData().GenerateRandom(32).toBinStr()))
othernum.append(binary_to_int(SecureBinaryData().GenerateRandom(nbytes).toBinStr()))

def poly(x):
polyout = ff.mult(a, ff.power(x,needed-1))
Expand Down

0 comments on commit 7bd9887

Please sign in to comment.