ZK-PQC Core is a cryptographic service that ensures digital sovereignty by combining post-quantum cryptography (PQC) on lattices with zero-knowledge proofs.
The architecture is designed with a focus on hardcore privacy, cryptographic integrity, and maximum performance, utilizing a multi-tier technology stack: Go for high-load network interaction, Rust for secure memory management and cryptographic primitives, and C/Assembly (AVX-512) for hardware acceleration of lattice mathematics.
The Project has only started. The basic code will appear soon.
The project is organized as a single repository divided into isolated layers.
- Layer 1: Hardware and Mathematics (
sys) Low-level implementation of number-theoretic transformation (NTT) and discrete Gaussian samplers in C using vectorization (AVX-512). - Layer 2: Cryptographic Core (
core) Safe wrappers in Rust. Key management, proof generation (Prover), and validation logic (Verifier). Exported to C-ABI via FFI. - Layer 3: ZKP Circuits (
circuits) Mathematical circuits in Circom for verifying logic (e.g., age or identity verification) without revealing the data itself. - Layer 4: Transport and Business Logic (
service) A network daemon in Go that manages gRPC/HTTP requests, access to the PostgreSQL database, and communication with the core via CGO.
Post-quantum security is based on the mathematics of cryptographic lattices, specifically the Ring Learning with Errors (RLWE) problem. All operations take place in the polynomial factor ring
Public key generation and encryption rely on the matrix-vector equation:
Where
Fast polynomial multiplication (NTT) is performed in
To build and run the node, the following must be installed on the host machine:
- Go 1.22+
- Rust (nightly toolchain) + Cargo
- GCC / Clang (with support for the
-mavx512fand-mavx512dqflags) - Node.js 20+ and the
npmpackage manager - Circom 2.1.6+
- Docker & Docker Compose
- A processor with support for the AVX-512 instruction set (or an emulator for testing)
The build process proceeds “bottom-up”—from compiling the C code and Rust library to running the Go server.
cd zk-pqc-project
go work init ./service
cd core
cargo build --release
cd circuits
npm install
circom age_verification.circom --r1cs --wasm --sym -c
cd service
CGO_ENABLED=1 go run cmd/server/main.go
A multi-stage build is used for complete isolation and fast deployment.
docker-compose up --build -d
zk-pqc-project/
├── api/
│ └── v1/
│ ├── prover.proto
│ ├── types.proto
│ └── verifier.proto
├── circuits/
│ ├── common/
│ ├── inputs/
│ ├── scripts/
│ └── tests/
├── core/
│ ├── benches/
│ ├── src/
│ │ ├── ffi/
│ │ └── math/
│ └── tests/
├── scripts/
├── service/
│ ├── cmd/
│ └── internal/
│ ├── config/
│ ├── crypto/
│ ├── domain/
│ ├── repository/
│ └── transport/
└── sys/
├── include/
├── src/
└── tests/
The service provides gRPC and HTTP/REST interfaces. By default, routes are served on port 8080 (HTTP) and 50051 (gRPC).
curl -X POST http://localhost:8080/api/v1/verify \
-H “Content-Type: application/json” \
-d ‘{“proof”: “base64_encoded_zk_proof”, “public_inputs”: [‘hash_1’, “timestamp”]}’
This code implements the principles of end-to-end encryption (E2EE) and zero-trust.
The service layer (service) operates exclusively with public keys, hashes, and cryptographic proofs. The PostgreSQL database is designed without tables for storing user data in plaintext. Private vectors