When I integrate Noir into my Rust, how do I ensure that I am using the right cryptographic functions that Noir uses in Rust? How

So, right now, I am programming a Solana program right now. So, I need to program my code in Rust. I am basically trying to construct a membership proof using Merkle Trees. Namely, I am using BabyJubJub as my scalar field, pedersen hash function as my hash function for leaves in the merkle tree and mimc as the hashing function for inner nodes of the tree.

I am essentially using crypto primitives from Arkworks. From my experience, I notice using cryptographic functions across different libraries, like Pedersen Hash, for Arkworks and other libraries like Circom do not output the exact same values. So, I’m a bit afraid that the Arkworks functions I use would not generate compatible witnessees to my Noir circuits.

That being said, rather than using Arkworks, I would rather use Rust apis that uses the Noir’s cryptographic primitives. Does Noir offer this out of the box easily?

1 Like

try this function

you should be able to install it from github(crates.io version is outdated).

1 Like