Files edited: 150 Brand-hit files before: 163 Brand-hit files after: 28 Substitutions: - Zama Concrete ML -> TorusML - Zama Concrete / Concrete-> Torus - Zama fhEVM / fhEVM -> TorusEVM - Zama TFHE-rs / tfhe-rs -> Lux-FHE (github.com/luxfi/fhe) - Zama (attribution) -> Lux Industries - zama-ai/* (GitHub) -> luxfhe/* - @zama-fhe/* (npm) -> @luxfhe/* - docs.zama.ai -> docs.lux.network - Fhenix / CoFHE -> dropped or rewritten to Lux FHE / TorusEVM coprocessor Text-only changes. No runtime code semantics altered.
2.1 KiB
Private Authentification in FHE
This folder contains an example that shows how to combine TorusML and Lux-FHE workflows through a privacy-preserving, server-side authentication scenario. In this example, access to a remote server is granted via a token, only if the client's encrypted information meets specific criteria. The returned token thus serves as proof of successful authentication — all without ever exposing any sensitive data.
Overview
To determine whether the client meets the specified requirements, the problem is treated as a classification task. In this example, a decision tree model is used for that purpose and TorusML handles the encrypted inference part, while training is performed on clear data.
The process involves the following steps:
On the developer side:
- Train the decision tree model on clear data
- Compile the model to an FHE circuit using the Lux-FHE ciphertext format
- Deploy the model using TorusML APIs. To know more about it, please refer to the Client-Server Guide and the Client-Server Notebook
On the client Side:
- Encrypt the client's information using a private key and send it to the server.
On the server side:
- Use TorusML to predict whether the client's information is valid. If the prediction is positive, the user is authenticated; otherwise, authentication is denied.
- Use Lux-FHE for the post-processing part to generate a random token (known only to the server) and multiply it by the output of the decision.
- Return the result, the encrypted token if the user is authenticated; otherwise, an encrypted zero vector.
On the client side:
- Decrypt the server's response and send it back to the server to finalize the authentication process.
Installation
- First, create a virtual env and activate it:
python -m venv .venv
source .venv/bin/activate
- Then, install required packages:
pip install -r requirements.txt --ignore-installed