Commit Graph

6 Commits

Author SHA1 Message Date
df091b07c1 More specific validation error when share thresholds mismatch 2018-08-13 21:29:39 +02:00
cb13a9b5db MissingShares should take u8 for required arg 2018-08-13 21:29:39 +02:00
55b7c78a3a Add ErrorKind::ShareParsingInvalidShareThreshold
Ensures that threshold > 2 during the parsing process, since we ensure the same
during the splitting process.
2018-08-13 21:29:39 +02:00
cdcf012a59 Remove DuplicateShareData error and validation
It's possible that two different points have the same data.

To give a concrete example consider the secret polynomial `x^2 + x + s`, where
`s` is the secret byte. Plugging in 214 and 215 (both elements of the cyclic
subgroup of order 2) for `x` will give the same result, `1 + s`.

More broadly, for any polynomial `b*x^t + b*x^(t-1) + ... + x + s`, where `t` is
the order of at least one subgroup of GF(256), for all subgroups of order `t`,
all elements of that subgroup, when chosen for `x`, will produce the same
result.

There are certainly other types of polynomials that have "share collisions."
This type was just easy to find because it exploits the nature of finite fields.
2018-08-13 21:29:39 +02:00
ed867ba938 Remove ShareIdentifierTooBig error and validation
Since id is a `u8` it will never be greater than 255.
2018-08-13 21:29:39 +02:00
40f6190a9b Preliminary implementation of deterministic secret sharing
#32
2018-02-11 22:17:07 +01:00