arkworks-rs / crypto-primitives

Interfaces and implementations of cryptographic primitives, along with R1CS constraints for them
https://www.arkworks.rs
Apache License 2.0
165 stars 79 forks source link

Add a `test_sponge` public function #112

Open mmagician opened 1 year ago

mmagician commented 1 year ago

For documentation and testing purposes, it would be great to obtain a sponge without much code overhead. The simplest thing to do is to move poseidon_sponge_for_test methods from ark-poly-commit, which are pub(crate) functions for testing there, and to re-expose them under test_sponge in the root module here.

Alternatively this could go into ark-std, similar to test_rng: https://github.com/arkworks-rs/std/blob/4cee4bc18ff6b0159c00d48622181db145938601/src/rand_helper.rs#L37