privacy-precompiles

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT

README

Privacy Precompiles

Go cryptographic library implementing EVM privacy precompiles, including:

  • BabyJubJub elliptic curve operations
  • EdDSA over BabyJubJub
  • Poseidon hash function
  • Groth16 zkSNARK verifier (BN254)
  • Shared cryptographic utilities

Module

Install:

go get github.com/privacy-ethereum/privacy-precompiles@latest

Project Structure

babyjubjub/
  add/          # Point addition
  mul/          # Scalar multiplication
  eddsa/        # EdDSA verification
  utils/        # Curve helpers
  validation/   # Point validation

poseidon/       # Poseidon hash implementation

verifier/
  groth16/      # Groth16 verifier logic
  groth16/bn254 # BN254 pairing implementation

common/         # Shared cryptographic utilities
utils/          # General helpers

Development

This repository includes a security-focused Makefile with formatting, static analysis, and vulnerability checks.

Install Development Tools
make tools
Format Code
make fmt
Build
make build
Static Analysis
make vet
make lint
Security Checks
make security
Run Tests
make test
Full CI Pipeline
make ci

Example Usage

import "github.com/privacy-ethereum/privacy-precompiles/babyjubjub/add"
import "github.com/privacy-ethereum/privacy-precompiles/verifier/groth16"

Directories

Path Synopsis
babyjubjub
add
mul
verifier

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL