Generating EdDSA+Pasta keypairs

Helloes,

I’m trying to build a brand new blockchain (feel free to ask me why, I’m happy to provide info about my project) and I’m prototyping the first node implementation in Rust.

This blockchain will be capable of executing smartcontracts compiled as WebAssembly modules, generating a zk-SNARK proof of their correct execution. I’m quite new to zk-SNARKs but after plenty of exploration I believe the best scheme to use is Halo2, which doesn’t need any trusted setup and also supports recursive proofs, allowing me to implement zk-rollups.

I understand that if I use Halo2 then:

  • EdDSA,
  • Pallas/Vesta (aka Pasta) elliptic curves,
  • and the Poseidon hash function optimized for Pasta curves

are practically mandated choices, as using any other curves and hash functions would cause the size of all SNARK circuits to blow up.

All that being correct, I’m going to use crates like halo2_proofs, halo2_gadgets, as well as ff and pasta_curves. My first question is: where do I find a Rust example that generates an EdDSA keypair? Are the ff and pasta_curves crates sufficient to generate a keypair?

Thanks in advance!


Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments