Work in progress · collaborative repository

Merkle Commitments with Poseidon in Rust

A public Rust/arkworks prototype that builds commitments, a Merkle root, and membership proofs—while leaving the threshold check native and explicitly outside zero knowledge.

Repository version: 0.1.0Public history: May 2026Status: work in progressNot production cryptography
Boundary: The threshold comparison is computed natively in Rust, not inside a zero-knowledge circuit. The Poseidon parameters are manual demonstration values. This repository is not production cryptography.

What the prototype does

The program takes four value-and-randomness pairs, hashes each pair into a commitment, builds a Merkle tree over those commitments, computes the root, generates and verifies one membership proof, and separately compares the native sum of hidden values against a threshold.

Flow from values and randomness to commitments, a Merkle tree, root, proof, and separate native sum check

Figure 1. The membership path and the threshold path are separate. The latter is not zero knowledge in the current repository.

My exact role and authorship boundary

The public commit history shows that the initial implementation and core codebase were authored by a collaborator on 5 May 2026. My documented commits on 6 May updated src/hash/poseidon.rs, src/merkle/proof.rs, src/merkle/tree.rs, and the README.

One documented change adds an explicit warning that the Poseidon parameters are placeholder/demo parameters and must not be treated as production cryptographic parameters. Other public changes include source and documentation cleanup. I do not claim sole authorship of the initial implementation.

LanguageRust · edition 2024
Librariesark-ff · ark-bls12-381 · ark-sponge
Repository statusExperimental public prototype

Implementation path

1. Commit values

Each leaf is generated from a field-element value and a field-element randomness term:

commitment = hash(value, randomness)

2. Build a binary Merkle tree

The tree hashes adjacent leaves into parent nodes until one root remains. When a layer has an odd number of nodes, the final node is duplicated.

3. Generate and verify a membership proof

The proof stores sibling field elements along the path. Verification replays the hash order using the leaf index and compares the computed value with the supplied root.

4. Perform a separate native threshold comparison

The example sums the original values directly in Rust and prints whether the sum exceeds a threshold. That comparison reveals the sum to the program and is not a proof statement enforced in an R1CS circuit.

Inspectable evidence

  • Main program: commitment generation, tree construction, membership proof verification, and native sum comparison.
  • Merkle tree implementation: layer construction, proof generation, and proof verification.
  • Poseidon interface: sponge configuration with an explicit non-production warning.
  • Commit history: the public basis for the authorship statement above.

Limitations

  • The threshold check is native, not zero knowledge.
  • The Poseidon round constants and MDS matrix are placeholder demonstration values.
  • Values are field elements without bounded-integer or range constraints.
  • The repository has no published benchmark methodology or performance claims.
  • The public repository does not currently expose a comprehensive test suite.
  • No formal security model, threat model, audit, or production parameter generation is provided.

What can be validated

The source and history are publicly inspectable. The program structure is consistent with the README’s narrow description: it constructs commitments, a tree, a root, and a membership proof, then performs a separate native sum comparison. Nothing on this page claims that the repository proves a private threshold statement.

What a stronger next version requires

  • Move the threshold predicate into an R1CS circuit and prove it without exposing individual values.
  • Add range constraints so field elements represent bounded non-negative balances.
  • Use reviewed parameter generation or standard parameter sets rather than manual constants.
  • Add unit tests, negative proof cases, property tests, benchmarks, and a threat model.
  • Document collaborator contributions and code ownership at file or commit level.

Citation

Anderle, David, and collaborator. “Merkle Poseidon Prototype.” Experimental Rust/arkworks repository, version 0.1.0, May 2026. https://github.com/davidanderle1/merkle-poseidon