{"id":27688545,"url":"https://github.com/fairmath/openfhe-rs","last_synced_at":"2025-04-25T10:03:11.090Z","repository":{"id":228815090,"uuid":"773704173","full_name":"fairmath/openfhe-rs","owner":"fairmath","description":"OpenFHE-rs - a Rust interface for the OpenFHE library; documentation https://openfhe-rust-wrapper.readthedocs.io/","archived":false,"fork":false,"pushed_at":"2025-02-26T10:51:24.000Z","size":267,"stargazers_count":46,"open_issues_count":7,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-15T02:04:38.146Z","etag":null,"topics":["cryptography","fhe","fhevm"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/openfhe","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fairmath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-18T08:49:26.000Z","updated_at":"2025-04-12T10:00:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"226722cc-d12b-40c3-afac-72127bdd3491","html_url":"https://github.com/fairmath/openfhe-rs","commit_stats":null,"previous_names":["fairmath/openfhe-rs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fairmath%2Fopenfhe-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fairmath%2Fopenfhe-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fairmath%2Fopenfhe-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fairmath%2Fopenfhe-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fairmath","download_url":"https://codeload.github.com/fairmath/openfhe-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250796313,"owners_count":21488706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","fhe","fhevm"],"created_at":"2025-04-25T10:01:36.564Z","updated_at":"2025-04-25T10:03:11.073Z","avatar_url":"https://github.com/fairmath.png","language":"C++","funding_links":[],"categories":["C++","Libraries","OpenFHE Software Interfaces"],"sub_categories":[],"readme":"# About OpenFHE-rs\n\n☀️ *OpenFHE-rs is a joint project by [FairMath](https://fairmath.xyz/) \u0026 [OpenFHE](https://www.openfhe.org/).*\n\n---\n[![Discord](https://img.shields.io/discord/1163764915803279360?logo=discord\u0026label=Fair%20Math)](https://discord.com/invite/NfhXwyr9M5)\n[![Twitter](https://img.shields.io/twitter/follow/FairMath)](https://twitter.com/FairMath)\n\n🔔 *Keep in mind that the library is WIP and may contain some unpolished interfaces. If you encounter any issues or have any suggestions, feel free to ping us on our Discord server or open a new issue in the [GitHub repository](https://github.com/fairmath/openfhe-rs/tree/master).*\n\n---\n\nOpenFHE-rs is a Rust interface for the OpenFHE library, which is renowned for its comprehensive suite of Fully Homomorphic Encryption (FHE) schemes,\nall implemented in C++.\nBy providing a Rust wrapper for OpenFHE, we aim to make these advanced FHE capabilities easily accessible to Rust developers.\n\nWhether you're developing secure data processing applications or privacy-focused tools, OpenFHE-rs enables you to leverage the powerful encryption technologies of OpenFHE seamlessly within your Rust projects.\n\n# Installation\n\nTo use OpenFHE-rs, you'll need to install several dependencies and follow the installation steps for both the core OpenFHE library and the Rust crate.\n\n## Prerequisites\n    \nEnsure you have the following dependencies installed:\n\n* `CMake \u003e= 3.5.1`\n* `G++ \u003e= 11.4`\n* `Rust \u003e= 1.78`\n* `Git`\n\n## Installation process\n### Core OpenFHE library installation\n\nTo build and install the OpenFHE library, follow the steps below or refer to [OpenFHE's installation documentation](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/installation.html).\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/openfheorg/openfhe-development.git\ncd openfhe-development\n```\n\n2. Configure CMake\n\n```bash\ncmake -B ./build -DBUILD_SHARED=ON .\n```\n\n3. Build and install the C++ OpenFHE library\n\n```bash\nmake -C ./build -j$(nproc)\nmake -C ./build install\n```\n\n4. Update the cache for the linker\n\n```bash\nsudo ldconfig\n```\n\n## Configuring your project to use the crate\n\nTo use the OpenFHE crate in your Rust project, add it as a dependency from [crates.io](https://crates.io/crates/openfhe):\n\n```bash\ncargo add openfhe\n```\n\nYou also need to add a small piece of code for the core dependencies' configuration in your `build.rs` file:\n\n```rs\nfn main\n{\n    // linking openFHE\n    println!(\"cargo::rustc-link-arg=-L/usr/local/lib\");\n    println!(\"cargo::rustc-link-arg=-lOPENFHEpke\");\n    println!(\"cargo::rustc-link-arg=-lOPENFHEbinfhe\");\n    println!(\"cargo::rustc-link-arg=-lOPENFHEcore\");\n    // linking OpenMP\n    println!(\"cargo::rustc-link-arg=-fopenmp\");\n    // necessary to avoid LD_LIBRARY_PATH\n    println!(\"cargo::rustc-link-arg=-Wl,-rpath=/usr/local/lib\");\n}\n```\n\nTo build and run a complete working example, go to the [crate_usage](https://github.com/fairmath/openfhe-rs/tree/master/crate_usage) directory\n(assuming that the OpenFHE library is already installed),\n\n1. Build the application\n```bash\ncargo build\n```\n\n2. Run\n```bash\ncargo run\n```\n\n# Custom crate installation from the source\n\nYou can adjust the installation process by building the crate manually.\nIn that case, you need to clone the Fair Math's [openfhe-rs](https://github.com/fairmath/openfhe-rs) repo to your local machine and build it:\n\n1. Clone the repository\n```bash\ngit clone https://github.com/fairmath/openfhe-rs.git\ncd openfhe-rs\n```\n\n2. Build the library\n```bash\ncargo build\n```\n\n3. Run tests\n```bash\ncargo test -- --test-threads=1\n```\n\n4. Run the examples\n```bash\ncargo run --example function_evaluation\ncargo run --example polynomial_evaluation\ncargo run --example simple_integers\ncargo run --example simple_real_numbers\n```\n\n# Contributing\n\nContributions are always welcome!\nIf you find bugs, have feature requests, or want to contribute code, please open an issue or pull request on the [GitHub repository](https://github.com/fairmath/openfhe-rs/tree/master).\n\n# License\n\n`OpenFHE-rs` is licensed under the **BSD 2-Clause License**.\nSee the [LICENSE](LICENSE) file for more details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffairmath%2Fopenfhe-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffairmath%2Fopenfhe-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffairmath%2Fopenfhe-rs/lists"}