A fork of https://github.com/fairmath/openfhe-rs to add some missing functionality

Hovsep Papoyan 211b5d9bdd Fixing cryptocontext serialize/deserialize specialization issue 1 year ago
examples aeedaafea9 Fixing cxx export issue 1 year ago
src 211b5d9bdd Fixing cryptocontext serialize/deserialize specialization issue 1 year ago
.gitignore 71fed67612 Adding serialization/deserialization 1 year ago
Cargo.toml 82b2dc7be9 Version 0.1.1 1 year ago
LICENSE ef23ff8346 Repository inited. 1 year ago
README.md 2c2940da2e Building from source instruction updated. 1 year ago
build.rs 32ae48879e Adding fopenmp in build.rs 1 year ago

README.md

About OpenFHE-rs

☀️ OpenFHE-rs is a joint project by FairMath & OpenFHE


OpenFHE-rs is a Rust interface for the OpenFHE library. OpenFHE is known for its wide range of Fully Homomorphic Encryption (FHE) schemes, all implemented in C++. We're bringing this capability to Rust developers.

By offering a Rust wrapper for OpenFHE, we make it easier for Rust devs to use advanced FHE schemes in their projects. Whether you're building secure data processing apps or privacy-focused tools, OpenFHE-rs helps you do that with the power of OpenFHE's encryption technology.

Current status

The library is under development and the ETA of the first version is set to Q2 2024.

Installation from source

Install Dependencies

  • CMake >= 3.5.1
  • Clang >= 12.0 or GCC >= 11.4
  • Rust >= 1.78
  • Git

Unix

On Debian systems, everything can be installed with the following command:

sudo apt install build-essential libssl-dev cmake clang git

Installation process

  1. Build and install OpenFHE library. Right now you need to use the Fair Math fork. It contains required features, which will be included in the next planned release (v1.1.5):

    1. Clone the repository
   git clone https://github.com/fairmath/openfhe.git
   cd openfhe
  1. Configure CMake
   cmake -B ${OPENFHE_BUILD:-build} -DBUILD_EXAMPLES=ON -DBUILD_EXTRAS=ON -DBUILD_SHARED=ON .       
  1. Build and install the C++ OpenFHE library
   make -C ${OPENFHE_BUILD:-build} -j$(nproc)
   make -C ${OPENFHE_BUILD:-build} install
  1. Make sure you have rustc with cargo installed first.

  2. Clone the Fair Math openfhe-rs repo to your local machine and build:

    1. Clone the repository

      git clone https://github.com/fairmath/openfhe-rs.git
      cd openfhe-rs
      
      1. Configure your dynamic linker bash sudo ldconfig
    2. Build the library

      cargo build
      
      1. Run tests bash cargo test -- --test-threads=1
    3. Run the examples

   cargo run --example polynomial_evaluation