Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/octra-labs/pvac_hfhe_cpp/llms.txt

Use this file to discover all available pages before exploring further.

This benchmark suite provides a comprehensive evaluation of PVAC-HFHE’s performance characteristics. The results compare our early proof of concept implementation against production-optimized FHE libraries from OpenFHE.
PVAC-HFHE is currently a research proof of concept without production optimizations. These benchmarks are provided for hypothesis testing, bounty programs, and academic evaluation.

Key findings

Even as an unoptimized proof of concept, PVAC-HFHE demonstrates significant performance advantages for scalar arithmetic operations:

Performance advantages

MetricImprovement
Scalar multiplication vs BFV (shallow)2.9x faster
Scalar multiplication vs BFV (leveled)7.4x faster
Scalar multiplication vs CKKS14.3x faster
Scalar addition10-87x faster
Dot product7.5-7.8x faster
Ciphertext size (fresh)6-85x smaller

Scalar operations

Multiplication (ct × ct):
  • PVAC-HFHE: 2.47 ms
  • BFV shallow: 7.23 ms (2.9x slower)
  • BFV leveled: 18.28 ms (7.4x slower)
  • BGV: 17.61 ms (7.1x slower)
  • CKKS: 35.23 ms (14.3x slower)
Addition (ct + ct):
  • PVAC-HFHE: 0.012 ms
  • BFV: 0.124 ms (10x slower)
  • BGV: 0.552 ms (46x slower)
  • CKKS: 1.050 ms (87x slower)

Ciphertext size

Fresh ciphertext sizes demonstrate PVAC-HFHE’s efficiency:
SchemeModeSizevs PVAC
PVAC-HFHEscalar42 KB1.0x
BFVshallow256 KB6x larger
BFVleveled1024 KB24x larger
BGVleveled1792 KB43x larger
CKKSleveled3584 KB85x larger
PVAC-HFHE works with arbitrary uint64 values, while BFV requires NTT-friendly primes (p-1 divisible by 2×ring_dim).

Proof of concept limitations

These limitations are specific to the current PoC implementation and are primarily due to unoptimized code paths and debugging systems.
MetricLimitation
Deep circuits (d ≥ 3)2-30x slower
Ciphertext growthExponential with depth
SIMD throughput146x slower
Key generation22x slower
Encryption8x slower

Deep circuit performance

At shallow depths (d=1, d=2), PVAC-HFHE maintains its performance advantage. However, the PoC exhibits exponential degradation at deeper circuit depths, while RLWE schemes maintain near-constant performance through modulus switching:
DepthPVAC-HFHEBFVBGVCKKSFastest
d12.68 ms19.54 ms17.40 ms35.85 msPVAC 7.3x
d210.34 ms14.38 ms15.11 ms31.22 msPVAC 1.4x
d331.46 ms13.98 ms14.39 ms30.71 msBFV 2.3x
d497.11 ms13.84 ms11.10 ms21.83 msBGV 8.7x
d5285.83 ms11.37 ms9.50 ms18.93 msBGV 30x

Ciphertext growth with depth

DepthTimeSizeGrowth
d0-42 KB1.0x
d12.68 ms34 KB0.8x
d210.34 ms136 KB3.2x
d331.46 ms441 KB10.5x
d497.11 ms1359 KB32x
d5285.83 ms4112 KB98x
PVAC-HFHE ciphertext size exceeds BFV leveled at depth 4.

Comparison with bit-level FHE

For 64-bit integer operations, PVAC-HFHE demonstrates dramatic speedups compared to bit-level schemes:

TFHE-rs comparison

OperationPVAC-HFHE (PoC)TFHE-rs CPUTFHE-rs GPUvs CPUvs GPU
Addition0.012 ms109 ms8.97 ms9083x747x
Subtraction0.012 ms109 ms8.97 ms9083x747x
Multiplication2.47 ms402 ms31.9 ms163x13x
While the comparison with bit-level FHE demonstrates significant performance differences, it’s important to note that these schemes solve different problems. Bit-level schemes excel at arbitrary boolean circuits, while PVAC-HFHE is optimized for scalar arithmetic.

Use case recommendations

Based on these benchmarks, PVAC-HFHE (even as a PoC) is well-suited for:
  • Shallow computation circuits (depth 1-2)
  • Scalar arithmetic operations on 64-bit integers
  • Applications requiring small ciphertext sizes
  • Dot products and vector operations
  • Polynomial evaluation (degree ≤ 3)
For deep circuits (depth ≥ 3) or SIMD batch processing, production RLWE schemes currently offer better performance.

Next steps

Build docs developers (and LLMs) love