privacy-scaling-explorations / zk-kit

A monorepo of reusable libraries for zero-knowledge technologies.
https://zkkit.pse.dev
MIT License
282 stars 68 forks source link

Compare performance of the EdDSAPoseidon (and BabyJubjub) algorithm in JS and Rust in Node.js and browser #328

Open cedoor opened 2 weeks ago

cedoor commented 2 weeks ago

Description

There is an implementation of EdDSA with Poseidon and BabyJubjub in TS/JS: https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/eddsa-poseidon.

There is no EdDSA Poseidon (and BabyJubjub) implementation in Rust yet. Once the issue (https://github.com/privacy-scaling-explorations/zk-kit.rust/issues/9) is completed, there will be a crate for it on zk-kit.rust.

The idea of this issue is to compare the performance of this algorithm written in TS/JS and Rust (compiled to wasm) in Node.js and browser.

Resources

Guide to convert the Rust implementation to wasm: https://rustwasm.github.io/docs/book/

Library to create benchmarks in Node.js and browser: https://github.com/tinylibs/tinybench

Some-of-the-things commented 1 week ago

So, just to clarify, this issue can't be picked up until https://github.com/privacy-scaling-explorations/zk-kit.rust/issues/9 is complete? Perhaps it would be worth my compiling the documentation for the TS/JS part in the interim, if that is of interest?

cedoor commented 1 week ago

Hey @Some-of-the-things, what documentation do you mean?

https://github.com/privacy-scaling-explorations/zk-kit.rust/issues/9 is available as a good first issue again btw.

Some-of-the-things commented 5 days ago

@cedoor I'd assumed that the result will need documenting to share findings. Thanks for the heads up: I'll take a look at that one...