UPH — Universal Private Helpers

Universal Private Helpers

Audited cryptographic primitives for ZK applications — M31 field arithmetic, FRI verification, BLS12-381, PLONK, Merkle trees, Poseidon hashing.

UPH — Universal Private Helpers

@permissionless-technologies/uph (planned)

UPH is a library of audited, reusable cryptographic primitives extracted from UPP and UPC. One audit, many users.

Status

UPH is planned for extraction once UPP and UPC reach production stability. The primitives already exist — they live in upp-sdk and upc-sdk. UPH formalizes them as a standalone, independently audited package.

The Problem

Today, every ZK project reimplements the same primitives:

  • Merkle trees (with subtle differences in hashing)
  • Field arithmetic (M31, BN254, BLS12-381)
  • Proof verifiers (FRI, DEEP quotients, PLONK)
  • Hash wrappers (Poseidon, Keccak channels)

Most of these implementations are unaudited, maintained by small teams, and subtly incompatible with each other.

The Solution

UPH consolidates the primitives battle-tested across UPP and UPC into a single, audited package:

  • One audit covers all users — every protocol using M31Lib.sol benefits from the same audit
  • Consistent implementation — the same Merkle tree across every protocol
  • Faster developmentnpm install @permissionless-technologies/uph instead of 3,000 lines of Solidity

What's Different from OpenZeppelin

OpenZeppelin provides standard contract patterns (ERC20, access control, proxies). UPH provides cryptographic primitives — the building blocks that sit below protocol logic, closer to the math:

OpenZeppelinUPH
ERC20, ERC721ZK verifiers
Access controlField arithmetic
Proxy patternsHash functions
GovernorMerkle trees

Planned Contents

See Solidity Libraries and TypeScript Utilities for full details.

Solidity: M31/CM31/QM31 field arithmetic, Circle STARK verifier, FRI protocol, DEEP quotients, Keccak channel, BLS12-381 wrapper, PLONK verifier, Merkle verifier.

TypeScript: LeanIMT Merkle tree, Poseidon hash wrappers, stealth address generation, note encryption/decryption, identity derivation.

Circom: MerkleProof(levels), MembershipProof(levels) circuit templates.

Roadmap

MilestoneDescriptionStatus
UPP productionUPP contracts audited and deployedIn progress
UPC productionUPC contracts audited and deployedIn progress
UPH extractionExtract primitives from UPP/UPC into standalone packagePlanned
UPH auditIndependent security audit of extracted primitivesPlanned
UPH v1.0Stable, audited release on npmPlanned

Contributing

UPH will be open-source under AGPL-3.0. The source currently lives in:

  • upp-sdk/src/contracts/ — Solidity STARK verifier libraries
  • upc-sdk/src/contracts/ — Solidity PLONK verifier + BLS12-381
  • upp-sdk/src/utils/ — TypeScript crypto utilities
  • upc-sdk/src/core/ — TypeScript ASP utilities

On this page