Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not normalize IDs of Shamir's Secret Sharing
We need to ensure that: - all indexes are non-zero, - all indexes are non-zero modulo the curve order, - all indexes are unique modulo the curve order. The first two are guarded in `CheckIndexes` function by: ``` vMod := new(big.Int).Mod(v, ec.Params().N) if vMod.Cmp(zero) == 0 { return nil, errors.New("party index should not be 0") } ``` The last one is guarded by: ``` vModStr := vMod.String() if _, ok := visited[vModStr]; ok { return nil, fmt.Errorf("duplicate indexes %s", vModStr) } visited[vModStr] = struct{}{} ``` `CheckIndexes` was additionally normalizing identifiers mod elliptic curve order. This was not really needed and could cause problems during signing.
- Loading branch information