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.solbenefits from the same audit - Consistent implementation — the same Merkle tree across every protocol
- Faster development —
npm install @permissionless-technologies/uphinstead 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:
| OpenZeppelin | UPH |
|---|---|
| ERC20, ERC721 | ZK verifiers |
| Access control | Field arithmetic |
| Proxy patterns | Hash functions |
| Governor | Merkle 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
| Milestone | Description | Status |
|---|---|---|
| UPP production | UPP contracts audited and deployed | In progress |
| UPC production | UPC contracts audited and deployed | In progress |
| UPH extraction | Extract primitives from UPP/UPC into standalone package | Planned |
| UPH audit | Independent security audit of extracted primitives | Planned |
| UPH v1.0 | Stable, audited release on npm | Planned |
Contributing
UPH will be open-source under AGPL-3.0. The source currently lives in:
upp-sdk/src/contracts/— Solidity STARK verifier librariesupc-sdk/src/contracts/— Solidity PLONK verifier + BLS12-381upp-sdk/src/utils/— TypeScript crypto utilitiesupc-sdk/src/core/— TypeScript ASP utilities