-
Notifications
You must be signed in to change notification settings - Fork 158
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
Add VRF algorithm in crypto #491
Conversation
Signed-off-by: NoelBright <noel.n.bright@gmail.com>
add 'Proof' member in SigChainElem. Signed-off-by: NoelBright <noel.n.bright@gmail.com>
Signed-off-by: NoelBright <noel.n.bright@gmail.com>
pb/sigchain.go
Outdated
if err != nil { | ||
return nil, err | ||
} | ||
signature, proof := crypto.GenerateVrf(srcPrivKey, hash[:]) |
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.
since there is no error returned, what if srcPrivKey is invalid?
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.
Only need to be 64 bytes.
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.
done
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.
Looks good to me except for the small comment I made
Add returncode err in GenerateVrf Signed-off-by: NoelBright <noel.n.bright@gmail.com>
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.
Looks good to me. Have we tested this already?
Yes, it has passed my test already. |
Proposed changes in this pull request
Add VRF algorithm in crypto.
Update SigChain and SigChainElem proto structure.
Use new sigchain to relay message.
Type (put an
x
where ever applicable)Checklist
Please put an
x
against the checkboxes. Write a small comment explaining if itsN/A
(not applicable)Extra information
Any extra information related to this pull request.