Skip to content

RingCrypt v0.1.0 — CKKS + GPU NTT

Choose a tag to compare

@jesedv jesedv released this 03 Aug 02:03
· 11 commits to main since this release

RingCrypt v0.1.0 — CKKS + GPU NTT

NTT Core — iterative Cooley-Tukey radix-2 NTT/INTT, RLWE negacyclic multiply mod x^N+1, Barrett modmul
CKKS Scheme — canonical embedding (FFT + ζ-twist), RLWE encrypt/decrypt, homomorphic add + multiply
GPU Runtime — wgpu compute shaders (Vulkan/Metal/DX12), NTT verified bit-exact on RTX 3060
Secret Sharing — threshold private mean over p = 2³¹−1
Browser Demo — WASM landing page, NTT + CKKS live self-tests

21 tests · 601 self-test checks · MIT license · All verified


Quick start

# CLI — self-test + benchmark
tar xzf ringcrypt-linux-x86_64.tar.gz
./ringcrypt

# GPU benchmark (RTX 3060+)
./gpu-bench

# From source
git clone https://github.com/jesedv/ringcrypt
cd ringcrypt
cargo run --release
cargo test --workspace

CKKS parameters

Parameter Value
N (degree) 128
Slots 64 complex
Modulus Q 2⁶⁴ − 2³² + 1
Scale Δ 2²⁴ (~7 decimal digits)
Secret key Ternary (−1, 0, 1)

GPU benchmark (RTX 3060, Vulkan)

N GPU CPU
256 1741 µs 7 µs PASS
512 1783 µs 17 µs PASS
1024 1814 µs 34 µs PASS
2048 1840 µs 81 µs PASS
4096 1891 µs 178 µs PASS

All bit-exact with CPU reference.

Examples

# Encrypted average over 5 parties
cargo run --release --example encrypted_average

# Encrypted dot product
cargo run --release --example encrypted_dot_product

Live demo

https://ringcrypt.jesed.dev