(test *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestPublicCheck(test *testing.T) { |
| 92 | n := 10 |
| 93 | t := n/2 + 1 |
| 94 | |
| 95 | priPoly := NewPriPoly(suite, t, nil, suite.RandomStream()) |
| 96 | priShares := priPoly.Shares(n) |
| 97 | pubPoly := priPoly.Commit(nil) |
| 98 | |
| 99 | for i, share := range priShares { |
| 100 | if !pubPoly.Check(share) { |
| 101 | test.Fatalf("private share %v not valid with respect to the public commitment polynomial", i) |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | func TestPublicRecovery(test *testing.T) { |
| 107 | n := 10 |
nothing calls this directly
no test coverage detected