(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestRecoveryOfRandomSignature(t *testing.T) { |
| 177 | pubkey1, _ := generateKeyPair() |
| 178 | msg := csprngEntropy(32) |
| 179 | |
| 180 | for i := 0; i < TestCount; i++ { |
| 181 | // recovery can sometimes work, but if so should always give wrong pubkey |
| 182 | pubkey2, _ := RecoverPubkey(msg, randSig()) |
| 183 | if bytes.Equal(pubkey1, pubkey2) { |
| 184 | t.Fatalf("iteration: %d: pubkey mismatch: do NOT want %x: ", i, pubkey2) |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | func TestRandomMessagesAgainstValidSig(t *testing.T) { |
| 190 | pubkey1, seckey := generateKeyPair() |
nothing calls this directly
no test coverage detected