MCPcopy Create free account
hub / github.com/DOSNetwork/core / TestBLSFailKey

Function TestBLSFailKey

sign/bls/bls_test.go:33–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestBLSFailKey(t *testing.T) {
34 msg := []byte("Hello Boneh-Lynn-Shacham")
35 private, _ := NewKeyPair(suite, random.New())
36 sig, err := Sign(suite, private, msg)
37 require.Nil(t, err)
38 _, public := NewKeyPair(suite, random.New())
39 if Verify(suite, public, msg, sig) == nil {
40 t.Fatal("bls: verification succeeded unexpectedly")
41 }
42}

Callers

nothing calls this directly

Calls 5

NewKeyPairFunction · 0.85
SignFunction · 0.70
VerifyFunction · 0.70
NewMethod · 0.65
FatalMethod · 0.65

Tested by

no test coverage detected