-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added fuzzer tests #500
Added fuzzer tests #500
Conversation
5b3f446
to
06e5dc1
Compare
06e5dc1
to
7da5f54
Compare
7da5f54
to
234bbc5
Compare
sign/tbls/tbls_test.go
Outdated
suite := bn256.NewSuite() | ||
n := 10 | ||
t := n/2 + 1 | ||
th := n/2 + 1 | ||
|
||
secret := suite.G1().Scalar().Pick(suite.RandomStream()) | ||
priPoly := share.NewPriPoly(suite.G2(), t, secret, suite.RandomStream()) | ||
priPoly := share.NewPriPoly(suite.G2(), th, secret, suite.RandomStream()) | ||
pubPoly := priPoly.Commit(suite.G2().Point().Base()) | ||
sigShares := make([][]byte, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this setup phase really needs to be repeated when fuzzing or whether fuzzing should occur on the message only, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that fuzzing on the parameter n would have been more interesting than using just; I'd say that the cost of repeating these operations is not that expensive and leads some value in increased exploration. But if you feel it's relevant to fuzz only on n I can change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, fuzzing should be repeatable. Given the same "fuzzing corpus of input messages" I should get the same outputs/results in all runs.
Could we change this code so that there is no randomness outside of the fuzzer msg?
Maybe seed the RandomStream
using msg
.
Add a more prominent disclaimer about target audience of this library.
234bbc5
to
f496513
Compare
c85c0ef
to
8f0aa7c
Compare
b717b41
to
5a66cf2
Compare
Please retry analysis of this Pull-Request directly on SonarCloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Should we wait on the big merge first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Quality Gate passedIssues Measures |
This PR adds some fuzzers to sign/tbls and sign/bls. It also reimplements the bls tests which were commented out in the drandmerge fork