Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

ed25519-zebra #8055

Closed
burdges opened this issue Feb 5, 2021 · 10 comments · Fixed by #11781
Closed

ed25519-zebra #8055

burdges opened this issue Feb 5, 2021 · 10 comments · Fixed by #11781
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@burdges
Copy link

burdges commented Feb 5, 2021

Are we using the prehashed variant of ed25519 anyplace? If not, then we should replace ed25519-dalek with ed25519-zebra, which better supports batch verification.

Ain't clear if ed25519-zebra ever wants features not required by zcash, so maybe we should do something else if we use the prehashed variant of ed25519 somewhere. I once pointed @tomaka to its existence

@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Feb 5, 2021
@burdges
Copy link
Author

burdges commented Feb 21, 2021

Related lib https://github.com/hdevalence/ed25519consensus for the Go implementation

@burdges
Copy link
Author

burdges commented Feb 21, 2021

We never use the prehashed variant in substrate or polkadiot according to grep -r --include "*.rs" _prehashed . so..

We should go ahead and switch to ed25519-zebra whenever convenient.

@tomaka
Copy link
Contributor

tomaka commented Feb 26, 2021

If I understand correctly, ed25519-zebra is a slightly-non-standard flavour of ed25519 that is more strict (and thus better)?

@burdges
Copy link
Author

burdges commented Feb 26, 2021

It's less strict and thus better. :)

@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@burdges
Copy link
Author

burdges commented Jul 7, 2021

It's being worked on..

@stale stale bot removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@gilescope
Copy link
Contributor

Is this something the other polkadot implementations will also want to switch over to? (i.e. should there be some linked issues?)

@burdges
Copy link
Author

burdges commented Jul 30, 2021

Yes! We definitely need all implementations to migrate to an equivalent ed25519. It's straightforward to modify an ed25519 to be equivalent, just multiply by the cofactor when checking the verification equation. Thanks for bringing this up.

@burdges
Copy link
Author

burdges commented Jun 30, 2022

We still need this, which requires updating #8764.

We now need to understand the difference between ed25519-zebra and ed25519-consensus, which forked after 3 Dec 2020 --- commit ZcashFoundation/ed25519-zebra@0e7a96a

https://github.com/penumbra-zone/ed25519-consensus/commits/main
https://github.com/ZcashFoundation/ed25519-zebra/commits/main

I'm personally inclined to stick with zebra because zcash is a more established player. Also, we switched schnorrkel back off curve25519-dalek-ng recently, non-ng has many open issues & pulls https://github.com/dalek-cryptography/curve25519-dalek/issues but at least it has them so everyone knows the status of things.

@burdges
Copy link
Author

burdges commented Jun 30, 2022

We'll stick with ed25519-zebra so #8764 needs to be updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
3 participants