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.

PVAC-HFHE Hero Light

What is PVAC-HFHE?

PVAC-HFHE is a fully homomorphic encryption (FHE) library that enables computation on encrypted data without decryption. Built on the assumption of binary parity for learning with noise and arithmetic operations over a 127-bit prime field, it provides a practical implementation for privacy-preserving computation.
This is a proof-of-concept implementation from early 2024, based on research from the Moscow Institute of Physics and Technology (MIPT) on threshold behavior and fractional colorability of random hypergraphs.

Key features

Homomorphic operations

Perform addition, subtraction, and multiplication on encrypted values without exposing plaintext data.

127-bit prime field

Operations over a large prime field provide strong security guarantees while maintaining efficiency.

Syndrome graph construction

Uses a dense random k-uniform hypergraph for efficient cryptographic operations.

Header-only library

Simple integration with just #include <pvac/pvac.hpp> and C++17 compiler support.

Quick example

Here’s a taste of what you can do with PVAC-HFHE:
#include <pvac/pvac.hpp>
using namespace pvac;

// Generate keys
Params prm;
PubKey pk;
SecKey sk;
keygen(prm, pk, sk);

// Encrypt values
Cipher a = enc_value(pk, sk, 42);
Cipher b = enc_value(pk, sk, 17);

// Compute on encrypted data
Cipher sum = ct_add(pk, a, b);  // 42 + 17 = 59
Cipher prod = ct_mul(pk, a, b); // 42 * 17 = 714

// Decrypt results
auto result_sum = dec_value(pk, sk, sum);   // 59
auto result_prod = dec_value(pk, sk, prod); // 714

Use cases

Train and evaluate ML models on encrypted data, enabling secure data collaboration without exposing sensitive information.
Offload computation to untrusted cloud servers while keeping your data encrypted end-to-end.
Perform statistical analysis and aggregations on encrypted datasets without revealing individual values.
Execute queries on encrypted databases, maintaining data privacy even during computation.

Get started

Installation

Set up PVAC-HFHE in your C++17 project in minutes.

Quickstart

Build your first homomorphic encryption application.

Core concepts

Understand the cryptographic foundations of PVAC-HFHE.

API reference

Explore the complete API documentation.

Requirements

PVAC-HFHE has minimal dependencies:
  • C++ Standard: C++17 or later
  • Compiler: GCC 9+, Clang 10+, or MSVC 2019+
  • CPU: x86-64 architecture with PCLMUL support (recommended for optimal performance)
PCLMUL (carry-less multiplication) instructions significantly improve cryptographic operation performance. Most modern x86-64 processors support this feature.

Build docs developers (and LLMs) love