Skip to content

OpenCircom v0.6.0

Choose a tag to compare

@jose-compu jose-compu released this 21 Feb 13:43
2787ab6

0.6.0

  • Arithmetic: PoEVerify(n) — SNARK-friendly proof-of-exponentiation verification (constrains result = base^exponent in the field; n-bit exponent, no big-int); for field-based accumulators (e.g. witness^element = A). 14 dedicated tests (edge cases, max exponent, 0^0, 1^exp, failure cases).
  • Hashing: PoseidonEncrypt() — symmetric encryption: ciphertext = plaintext + Poseidon(key); decryption off-chain (plaintext = ciphertext − Poseidon(key)). One Poseidon(1) per encrypt; use unique key per message or key+nonce. 6 tests.
  • Identity & credentials: IdentityCommitment() — Semaphore-style commitment = Poseidon(identity, secret). SemaphoreMembership(levels) — prove (identity, secret) in allowlist tree (leaves = Poseidon(1)(commitment)); use with Nullifier for double-signaling prevention. 5 tests.
  • Set membership: AccumulatorMembership(n) — field-based accumulator membership: constrains witness^member = accumulator (wraps PoEVerify). Build A = g^(product of set elements); witness for element e is g^(product/e). 5 tests.
  • String & data: Utf8Validation(n) — validate byte sequence as UTF-8 (state machine, quadratic-only); FixedStringMatch(n) — bytes equal expected; BytesAllInRange(n, lo, hi), ByteInRange(lo, hi) — digits/ASCII range. 9 tests.
  • Test suite expanded across all circuits: 253+ tests (incl. string_data Utf8Validation, FixedStringMatch, BytesAllInRange; PoseidonEncrypt, IdentityCommitment, SemaphoreMembership, AccumulatorMembership; arithmetic, comparators, bitify, divrem, exp, gates, merkle, mimc, mux, muxn, nullifier, poseidon, range/strict, sha256, switcher, utils, substantial circuits, voting). Edge cases, failure paths, and boundary conditions covered.