📒 Documentation | 💛 Community support | 📚 FHE resources by Zama
This repository contains iOS applications that demonstrate how FHE can help users securely get insights based on their personal data. The applications in this repository run on iPhones and connect to remote services that work with encrypted data. These services are implemented with Concrete ML.
Concrete ML is a Privacy-Preserving Machine Learning (PPML) open-source set of tools built by Zama. It simplifies the use of Fully Homomorphic Encryption (FHE) for data scientists so that they can automatically turn machine learning models into their homomorphic equivalents, and use them without knowledge of cryptography.
The repository implements the Data Vault and several end-user demo applications. Data Vault is the main storage of sensitive information and two example apps that use sensitive data encrypted by the Data Vault.
The Data Vault acts like a secure enclave: it encrypts sensitive user data (sleep, weight, profile info) and stores encrypted result in a shared folder for consumption by other apps. Human readable sensitive data never leaves device or the Data Vault app.
To display the insights or results obtained from encrypted data, end-user applications must request that Data Vault displays the information in secure widgets.
The following demo end-user applications are available:
- FHE Health: Analyzes sleep quality data and provides statistics about the user's weight, producing graphs and insights. The sleep tracking can be done by an iWatch using the dedicated Sleep App.
- FHE Ads: Displays targeted ads based on an encrypted user-profile. Internet advertising relies on behavioral profiling through cookies, but tracking user behavior without encryption has privacy risks. With FHE, a user can manually create their profile and ads can be matched to it without actually exposing the user-profile.
For these demo end-user applications, analysis and processing of the encrypted information is done on Zama's servers. Server side functionality for these end-user applications is implemented in the Server directory.
The Data Vault uses TFHE-rs and Concrete ML Extensions to encrypt and decrypt data.
- macOS 15 Sequoia
- Xcode 16.2 from AppStore or developer.apple.com
- iOS 18.2 SDK (additional download from Xcode)
- Simply unzip `QLAdsExtension/AdImages.zip' in place.
The easiest way to build all dependencies is to execute the dedicated script.
To manually build the libraries follow the instructions in the compilation guide. The main steps are:
Instead of building the TFHE.xcframework
from scratch, you can use a previously built version. Simply save TFHE.xcframework
in the root directory. Inside this framework, there should be:
Info.plist
ios-arm64
ios-arm64-simulator
Now you can open your Xcode IDE, open this directory and start building the apps.
This repo also contains the backend implementations of the end-user applications. See the server readme for more details on how to run these backends.
- Tutorial: Calling a Rust library from Swift
- Minimize Rust binary size
- Using imported C APIs in Swift
- Concrete ML Documentation
This software is distributed under the BSD-3-Clause-Clear license. Read this for more details.
Is Zama’s technology free to use?
Zama’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.
All our work is open source and we strive for full transparency about Zama's IP strategy. To know more about what this means for Zama product users, read about how we monetize our open source products in this blog post.
What do I need to do if I want to use Zama’s technology for commercial purposes?
To commercially use Zama’s technology you need to be granted Zama’s patent license. Please contact us at [email protected] for more information.
Do you file IP on your technology?
Yes, all of Zama’s technologies are patented.
Can you customize a solution for my specific use case?
We are open to collaborating and advancing the FHE space with our partners. If you have specific needs, please email us at [email protected].
🌟 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.