-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Thank you for this nice implementation of SSS!
I'd like to bring a few issues to your attention:
-
Your choice of prime excludes 189 secret values in the range (0..2^256-1). Now, chances are tiny that any slice of s is >= your prime, but how about checking, or slicing by p, instead of 2^256, just in case?
-
What if my random secret just happens to have trailing zeros? Would those not be lost in mergeIntToByte()? I guess that warrants at least a documentation, or maybe encoding the length of the secret in some form.
-
Thank you for not reusing the polynomial coefficients a_1 .. a_{k-1} across the different pieces of large secrets. That would have ruined the day :-)
-
Suggestion: In the literature, people use x=1..n without adverse effects. This would almost halve the size of your output.
Putting these points up for discussion here. Do you think they are valid, and might warrant a code change?
Germano