-
Notifications
You must be signed in to change notification settings - Fork 28
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
Change to use curve25519-voi's VRF #633
Conversation
`make build` passed. The tendermint/tendermint master uses curve25519 at ed25519.go. Therefore, curve25519-voi should be used from the viewpoint of reducing implementation complexity and cost management. Also, curve25519-voi is based on ed25519-dalek and is more optimized than ref10 in cofactor processing.
6f40a0e
to
d07203f
Compare
29def21
to
217d922
Compare
I think this proposal is very great. The libsodium vrf was not modified in the very long times. And it has compile and linking issue because it is c++. So it is very good suggestion. But migration should be considered since the vrf function is not compatible. |
Oh neat more people using my library. Ok, I'm glad people think the code is legible.
It is the same IETF draft, my implementation just significantly post-dates when algorand did theirs, so it was after the spec changes broke compatibility. My implementation provides v7-v10 and v11+, while your libsodium fork implements v3. The incompatibility comes from all the changes made to v7 of the draft. |
Thank you very much for your comment!!! The code is legible and the comments are polite and helpful. I really appreciate your explanation!!! @Yawning |
50ad616
to
0bc1441
Compare
0bc1441
to
c975e06
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #633 +/- ##
==========================================
- Coverage 66.21% 66.04% -0.17%
==========================================
Files 277 275 -2
Lines 36992 36930 -62
==========================================
- Hits 24494 24391 -103
- Misses 10725 10772 +47
+ Partials 1773 1767 -6
|
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.
Thank you!! I fixed as pointed out. PTAL @ulbqb |
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
* draft: Use curve25519-voi's vrf function `make build` passed. The tendermint/tendermint master uses curve25519 at ed25519.go. Therefore, curve25519-voi should be used from the viewpoint of reducing implementation complexity and cost management. Also, curve25519-voi is based on ed25519-dalek and is more optimized than ref10 in cofactor processing. * fix: Delete r2ishiguro and libsodium * refactor: Mark unused parameters * comment: fix the comment for `VRFVerify` * fix: Leave the necessary jobs in coverage.yml and delete one unnecessary file * fix: delete unnecessary line and describe length of proof for curve25519-voi * typo * fix: remove an unnecessary line
Overview
The curve25519-voi ed25519 function is also referenced in cometbft/cometbft main or tendermint/tendermint master and is used for signing.
This library also implements VRF. Therefore, it is desirable to use this function for the VRF function.
This change removes libsodium, r2ishiguro, and all other unnecessary VRF libraries.
Ref:
https://github.com/oasisprotocol/curve25519-voi/blob/master/primitives/ed25519/extra/ecvrf/ecvrf.go
Advantages of using curve25519-voi
Briefly describe the advantages of using curve25519-voi's VRF.
Furthermore, by specifying VerifyOption, compatible with validation formulas according to FIPS 186-5, RFC 8032, and ZIP-215.
Background applied to master branch of Tendermint
Prior to this PR, for tendermint/tendermint master branch, hdevalence/ed25519consensus library was an implementation of ed25519 whose library was used for the signature scheme. This is also used in Ostracon. Tendermint seems to have applied curve25519-voi because of its improved batch processing algorithm, performance, and so on.
Refs
curve25519-voi is also refrenced here by
cometBFT/cometBFT
https://github.com/cometbft/cometbft/blob/main/p2p/conn/secret_connection.go#L18
Closes: #620