{"id":13490076,"url":"https://github.com/zama-ai/concrete","last_synced_at":"2025-05-13T19:17:06.875Z","repository":{"id":38359047,"uuid":"300205799","full_name":"zama-ai/concrete","owner":"zama-ai","description":"Concrete: TFHE Compiler that converts python programs into FHE equivalent","archived":false,"fork":false,"pushed_at":"2025-04-25T07:21:17.000Z","size":44833,"stargazers_count":1343,"open_issues_count":28,"forks_count":162,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-04-25T08:31:09.017Z","etag":null,"topics":["compiler","crypto","cryptography","encryption","fhe","fully-homomorphic-encryption","gdpr","homomorphic-encryption","homomorphic-encryption-library","llvm","mlir","privacy","python","security","tfhe"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zama-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-01T08:32:30.000Z","updated_at":"2025-04-22T17:40:24.000Z","dependencies_parsed_at":"2024-01-16T17:51:37.343Z","dependency_job_id":"959ca02c-ebe2-4201-bbb3-0c36e2a42c46","html_url":"https://github.com/zama-ai/concrete","commit_stats":{"total_commits":3830,"total_committers":57,"mean_commits":67.19298245614036,"dds":0.839425587467363,"last_synced_commit":"4d2eb7327b3326878bcb5b4c33f3baa52e0caa2d"},"previous_names":[],"tags_count":446,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fconcrete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fconcrete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fconcrete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zama-ai%2Fconcrete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zama-ai","download_url":"https://codeload.github.com/zama-ai/concrete/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250785786,"owners_count":21487108,"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":["compiler","crypto","cryptography","encryption","fhe","fully-homomorphic-encryption","gdpr","homomorphic-encryption","homomorphic-encryption-library","llvm","mlir","privacy","python","security","tfhe"],"created_at":"2024-07-31T19:00:40.371Z","updated_at":"2025-04-28T10:41:58.804Z","avatar_url":"https://github.com/zama-ai.png","language":"C++","funding_links":[],"categories":["Libraries and solutions","Cryptography","C++","Implementation","Toolkits","6. Privacy-Preserving Technologies","4.1 FHE Libraries","Awesome Privacy Engineering [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)","Libraries","Privacy, Security \u0026 Governance"],"sub_categories":["Homomorphic Encryption","FHE","6.3 Homomorphic Encryption","[Sunscreen](https://sunscreen.tech/)"],"readme":"\u003cp align=\"center\"\u003e\n\u003c!-- product name logo --\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/zama-ai/concrete/assets/157474013/d4680525-2371-454e-97d3-ba39c809a074\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/zama-ai/concrete/assets/157474013/95d02fb1-de48-4bb7-b175-d536bb13091c\"\u003e\n  \u003cimg width=600 alt=\"Zama Concrete\"\u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n\u003chr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://docs.zama.ai/concrete\"\u003e 📒 Documentation\u003c/a\u003e | \u003ca href=\"https://zama.ai/community\"\u003e 💛 Community support\u003c/a\u003e | \u003ca href=\"https://github.com/zama-ai/awesome-zama\"\u003e 📚 FHE resources by Zama\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/zama-ai/concrete/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/zama-ai/concrete?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/concrete/blob/main/LICENSE.txt\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-BSD--3--Clause--Clear-%23ffb243?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/zama-ai/bounty-program\"\u003e\u003cimg src=\"https://img.shields.io/badge/Contribute-Zama%20Bounty%20Program-%23ffd208?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://slsa.dev\"\u003e\u003cimg alt=\"SLSA 3\" src=\"https://slsa.dev/images/gh-badge-level3.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## About\n\n### What is Concrete\n**Concrete** is an open-source FHE Compiler that simplifies the use of fully homomorphic encryption (FHE). Built on TFHE technology and leveraging LLVM, Concrete makes writing FHE programs accessible to developers without deep cryptography expertise.\n\n#### Key Features\n- 🚀 Simple Python API for FHE operations\n- 🔒 Built-in security guarantees\n- ⚡ GPU acceleration support\n- 🛠 Automatic parameter selection\n- 📊 Built-in performance analysis tools\n- 🔄 Seamless integration with existing Python code\n\nFully Homomorphic Encryption (FHE) enables performing computations on encrypted data directly without the need to decrypt it first. FHE allows developers to build services that ensure privacy for all users. FHE is also an excellent solution against data breaches as everything is performed on encrypted data. Even if the server is compromised, no sensitive data will be leaked.\n\nConcrete is a versatile library that can be used for a variety of purposes. For instance, [Concrete ML](https://github.com/zama-ai/concrete-ml) is built on top of Concrete to simplify Machine-Learning oriented use cases.\n\u003cbr\u003e\u003c/br\u003e\n\n\n\n## Table of Contents\n- **[Getting Started](#getting-started)**\n   - [Installation](#installation)\n   - [A simple example](#a-simple-example)\n- **[Resources](#resources)**\n   - [Concrete deep dive](#concrete-deep-dive)\n   - [Tutorials](#tutorials)\n   - [Documentation](#documentation)\n- **[Working with Concrete](#working-with-concrete)**\n   - [Citations](#citations)\n   - [Contributing](#contributing)\n   - [License](#license)\n- **[Support](#support)**\n\u003cbr\u003e\u003c/br\u003e\n\n\n## Getting Started\n\n### System Requirements\n- Python 3.8 - 3.12\n- 8GB RAM minimum (16GB recommended)\n- x86_64 or ARM64 processor\n\n###  Installation\nWe provide multiple installation methods to suit your needs:\n\n#### 1. PyPI Installation (Recommended)\nFor CPU-only version:\n```shell\npip install -U pip wheel setuptools\npip install concrete-python\n```\n\nFor GPU-accelerated version:\n```shell\npip install -U pip wheel setuptools\npip install concrete-python --index-url https://pypi.zama.ai/gpu\n```\n\n#### 2. Docker Installation\n```shell\n# CPU version\ndocker pull zamafhe/concrete-python:v2.0.0\n\n# GPU version\ndocker pull zamafhe/concrete-python:v2.0.0-gpu\n```\n\n#### Version Matrix\n\n| Concrete Version | Python Version | CUDA Support |\n|-----------------|----------------|--------------|\n| 2.0.0           | 3.8 - 3.12     | ≥ 11.8      |\n| 1.1.0           | 3.8 - 3.10     | ≥ 11.7      |\n\n*Find more detailed installation instructions in [this part of the documentation](https://docs.zama.ai/concrete/getting-started/installing)*\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n### A simple example\nTo compute on encrypted data, you first need to define the function you want to compute, then compile it into a Concrete Circuit, which you can use to perform homomorphic evaluation.\nHere is the full example:\n\n```python\nfrom concrete import fhe\n\ndef add(x, y):\n    return x + y\n\ncompiler = fhe.Compiler(add, {\"x\": \"encrypted\", \"y\": \"encrypted\"})\n\ninputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1), (3, 2), (6, 1), (1, 7), (4, 5), (5, 4)]\n\nprint(f\"Compilation...\")\ncircuit = compiler.compile(inputset)\n\nprint(f\"Key generation...\")\ncircuit.keygen()\n\nprint(f\"Homomorphic evaluation...\")\nencrypted_x, encrypted_y = circuit.encrypt(2, 6)\nencrypted_result = circuit.run(encrypted_x, encrypted_y)\nresult = circuit.decrypt(encrypted_result)\n\nassert result == add(2, 6)\n```\n*This example is explained in more detail [in this part of the documentation](https://docs.zama.ai/concrete/get-started/quick_start).*\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e[!Note]\n\u003e**Zama 5-Question Developer Survey**\n\u003e\n\u003eWe want to hear from you! Take 1 minute to share your thoughts and helping us enhance our documentation and libraries. **[👉 Click here](https://www.zama.ai/developer-survey)** to participate. \n\n## Resources\n\n### Concrete deep dive\n- [Part I: Concrete, Zama's Fully Homomorphic Compiler](https://www.zama.ai/post/zama-concrete-fully-homomorphic-encryption-compiler)\n- [Part II: The Architecture of Concrete, Zama's Fully Homomorphic Encryption Compiler Leveraging MLIR](https://www.zama.ai/post/the-architecture-of-concrete-zama-fully-homomorphic-encryption-compiler-leveraging-mlir)\n\u003cbr\u003e\u003c/br\u003e\n\n### Tutorials\n- [[Video tutorial] Dive into Concrete - Zama's Fully Homomorphic Encryption Compiler](https://www.zama.ai/post/video-tutorial-dive-into-concrete-zamas-fully-homomorphic-encryption-compiler)\n- [[Video tutorial] How To Get Started With Concrete - Zama's Fully Homomorphic Encryption Compiler](https://www.zama.ai/post/how-to-started-with-concrete-zama-fully-homomorphic-encryption-compiler)\n- [The Encrypted Game of Life in Python Using Concrete](https://www.zama.ai/post/the-encrypted-game-of-life-using-concrete-python)\n- [Encrypted Key-value Database Using Homomorphic Encryption](https://www.zama.ai/post/encrypted-key-value-database-using-homomorphic-encryption)\n\n*Explore more useful resources in [Concrete tutorials](https://docs.zama.ai/concrete/v/main-1/tutorials/see-all-tutorials) and [Awesome Zama repo](https://github.com/zama-ai/awesome-zama?tab=readme-ov-file#concrete). If you have built awesome projects using Concrete, please let us know and we will be happy to showcase them here!*\n\n\n\n### Documentation\n\nFull, comprehensive documentation is available at [https://docs.zama.ai/concrete](https://docs.zama.ai/concrete).\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n\n\n## Working with Concrete\n\n### Citations\nTo cite Concrete in academic papers, please use the following entry:\n\n```text\n@Misc{Concrete,\n  title={{Concrete: TFHE Compiler that converts python programs into FHE equivalent}},\n  author={Zama},\n  year={2022},\n  note={\\url{https://github.com/zama-ai/concrete}},\n}\n```\n### Contributing\n\nThere are two ways to contribute to Concrete. You can:\n- [Open issues](https://github.com/zama-ai/concrete/issues/new/choose) to report bugs and typos, or to suggest new ideas\n- Request to become an official contributor by emailing hello@zama.ai.\n\nBecoming an approved contributor involves signing our Contributor License Agreement (CLA). Only approved contributors can send pull requests (PRs), so get in touch before you do!\n\nAdditionally, you can contribute to advancing the FHE space with Zama by participating in our [Bounty Program and Grant Programs](https://github.com/zama-ai/bounty-and-grant-program)!\n\u003cbr\u003e\u003c/br\u003e\n\n### License\nThis software is distributed under the **BSD-3-Clause-Clear** license. Read [this](LICENSE.txt) for more details.\n\n#### FAQ\n\n**Is Zama’s technology free to use?**\n\u003eZama’s libraries are free to use under the BSD 3-Clause Clear license only for development, research, prototyping, and experimentation purposes. However, for any commercial use of Zama's open source code, companies must purchase Zama’s commercial patent license.\n\u003e\n\u003eEverything we do is open source and we are very transparent on what it means for our users, you can read more about how we monetize our open source products at Zama in [this blog post](https://www.zama.ai/post/open-source).\n\n**What do I need to do if I want to use Zama’s technology for commercial purposes?**\n\u003eTo commercially use Zama’s technology you need to be granted Zama’s patent license. Please contact us at hello@zama.ai for more information.\n\n**Do you file IP on your technology?**\n\u003eYes, all Zama’s technologies are patented.\n\n**Can you customize a solution for my specific use case?**\n\u003eWe are open to collaborating and advancing the FHE space with our partners. If you have specific needs, please email us at hello@zama.ai.\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n## Support\n\n\u003ca target=\"_blank\" href=\"https://community.zama.ai/c/concrete/7\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/zama-ai/concrete/assets/157474013/204c349f-b9c7-41d6-b93a-48ecd6977ff6\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/zama-ai/concrete/assets/157474013/588b6aae-9677-463a-8542-209bb8106366\"\u003e\n  \u003cimg alt=\"Support\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\n🌟 If you find this project helpful or interesting, please consider giving it a star on GitHub! Your support helps to grow the community and motivates further development.\n\n\n\u003cp align=\"right\"\u003e\n  \u003ca href=\"#about\" \u003e ↑ Back to top \u003c/a\u003e\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Fconcrete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzama-ai%2Fconcrete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzama-ai%2Fconcrete/lists"}