-
Notifications
You must be signed in to change notification settings - Fork 23
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
Arkworks integration and ed25519 upgrade #496
Conversation
…public key from parameters where it's suficient to pass a secret key (e.g. signing)
…rsion in wallet_library
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. I added some suggestions regarding the broken link for the VRF RFC draft version.
Co-authored-by: Hamidreza <[email protected]>
…en our previous custom implementation and the current arkworks implementation
@annenkov did you propagate this PR to concordium-client & the node? |
Yes, I checked |
rust-src/concordium_base/src/curve_arithmetic/arkworks_instances.rs
Outdated
Show resolved
Hide resolved
rust-src/concordium_base/src/curve_arithmetic/arkworks_instances.rs
Outdated
Show resolved
Hide resolved
rust-src/concordium_base/src/curve_arithmetic/arkworks_instances.rs
Outdated
Show resolved
Hide resolved
…mbs (possibly filled with zeros); document restrictions on CAPACITY
rust-src/concordium_base/src/curve_arithmetic/bls12_381_arkworks.rs
Outdated
Show resolved
Hide resolved
… the number of chuncks, not from the imput size. Add more tests
…ks.rs Co-authored-by: eb-concordium <[email protected]>
Purpose
This PR adds generic adapters (as blanket implementation) to the ArkWorks interfaces. The adapters (with some additional configuration traits) are used to replace the BLS12-381 curve with ArkWorks implementation. In addition to that,
ed25519-dalek
is upgraded tov2.0
, which was previously blocked by thepairing
crate and the corresponding BLS implementation (new versions don't expose the target group element typeFp12
, preventing from serializing it, see details here).Changes
ArkGroup<G>
andArkField<F>
wrappers;Field
andPrimeField
traits forArkField<F>
;Curve
traitArkGroup<G>
;BLS12-381
curve, that replaces the current BLS curve implementation from thepairing
crate.ed25519-dalek
signature scheme; thev2.0
API is a bit different, it bundles a secret and verifying (public) key into a signing key and maintains an invariant that the verifying key is always the public key of secret_key; signing does not require passing the verifying key, so it was removed from parameters of the corresponding functions.verifing_key
parameter)Checklist
hard-to-understand areas.