-
Notifications
You must be signed in to change notification settings - Fork 41
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
Update BatchCompat VRF to audited version of libsodium (and latest draft version) #341
Conversation
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.
Haskell changes look trivial, have not looked at C code.
6d63bea
to
7355eeb
Compare
9d93fd6
to
1479014
Compare
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 am sure the audit by Kudelski was pretty thorough, cause I am not gonna pretend like I reviewed and understood what is going on in the C implementation of the VRF.
But I did read through a good portion of the PR and commented on obvious things that jumped out at me. Didn't find anything serious, just minor suggestions and questions.
Also, I think it would make sense to squash the first three commits in the PR
cardano-crypto-praos/src/Cardano/Crypto/VRF/PraosBatchCompat.hs
Outdated
Show resolved
Hide resolved
cardano-crypto-praos/src/Cardano/Crypto/VRF/PraosBatchCompat.hs
Outdated
Show resolved
Hide resolved
cardano-crypto-praos/cbits/vrf13_batchcompat/crypto_vrf_ietfdraft13.h
Outdated
Show resolved
Hide resolved
cardano-crypto-praos/src/Cardano/Crypto/VRF/PraosBatchCompat.hs
Outdated
Show resolved
Hide resolved
e62d4c1
to
73a9eb4
Compare
@lehins , I have applied the suggested changes. We are now only missing that the update of libsodium is merged into iohk-nix. Just want to check that we are all good on this side to merge before pushing for that merge (just in case we need a final touch on the libsodium fork) 👍 |
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.
Just two tiny related comments, otherwise, yeah, I think it is ready to go.
cardano-crypto-praos/src/Cardano/Crypto/VRF/PraosBatchCompat.hs
Outdated
Show resolved
Hide resolved
Waiting for nix PR to be merged before merging this. |
603cea7
to
4c5bfde
Compare
In the file from libsodium-v1.0.18-stable, the variable CONFIGURED is set to 1. We are currently using the code from stable in treat the variable CONFIGURED as set to 1. https://github.com/jedisct1/libsodium/blob/940ef42797baa0278df6b7fd9e67c7590f87744b/configure\#L19155
Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
4c5bfde
to
30f69ed
Compare
We got a successful audit by Kudelski for the batch verification implementation of VRF proofs, which is implemented in this branch. This PR updates the haskell bindings, and the cbits, to the new design using the audited code. Similarly, we adapt the code in cbits/private to the code available in libsodium/stable v1.0.18, instead of some version of master we had previously. By not being based in master not only we use stable code, but we also remove the following warning we had when compiling:
Similarly, we re-activate the BatchCompat module, which was deactivated in the past due to a lack of external audit.
This closes #337