Definition: Homomorphic encryption (HE) is a family of crypto schemes that let you compute directly on encrypted data. When you decrypt the result, you get the same output as if you had run the math on the plaintext. In AI, this means you can, for example, run a model on data that the model's operator never sees in the clear.
The basic idea
Normal encryption protects data while it moves and while it is stored. But as soon as a service needs to compute on the data, it has to decrypt it. The data then sits open in the memory of someone else's system. Homomorphic encryption closes that gap:
- The data owner encrypts the data on their own system.
- The service provider computes on the encrypted data (the ciphertexts).
- Only the data owner can read the result, using the private key.
Modern schemes add a set amount of "noise" to each ciphertext. Each step of math makes the noise grow. If it grows too large, decryption fails. This leads to three levels:
| Level | What it can compute | Examples |
|---|---|---|
| Partially homomorphic (PHE) | One type of step, as often as you like (add or multiply) | Paillier (add), ElGamal and textbook RSA (multiply) |
| Somewhat homomorphic (SHE) | Add and multiply, but only up to a set circuit depth | Lattice-based schemes without bootstrapping |
| Fully homomorphic (FHE) | Any kind of math, because "bootstrapping" resets the noise | BGV, BFV, CKKS, TFHE |
CKKS matters most for AI. It does approximate math on real numbers, which suits neural networks. TFHE is a good fit for bitwise steps and non-linear functions. Well-known libraries are Microsoft SEAL, OpenFHE and Zama's tools (TFHE-rs, Concrete ML).
Use cases in AI
- Encrypted inference: a customer lets a cloud model sort their data without showing it. This could be sensor readings, financial figures or medical features. The provider also protects its model, because it never has to hand it over.
- Secure aggregation: in federated learning, some schemes can add up model updates while they are still encrypted. The server never sees what a single client sent.
- Data partnerships: several companies analyze shared metrics together, for fraud detection or benchmarks. None of them has to show its raw data to the others.
- Encrypted search and matching: you can compare how similar two items are while both stay encrypted. Examples are embeddings or biometric features.
Training large models fully under FHE is, as a rule, not practical today.
Limits and risks
- Computing cost: homomorphic steps are many orders of magnitude slower than plaintext math. Ciphertexts are also much larger. This limits model size and speed.
- Model changes: you often have to replace non-linear activation functions with polynomials, or quantize the model. This can lower accuracy.
- Wrong settings: values such as the polynomial degree and the modulus set both the security level and whether results are correct. Poor choices weaken security, and you will not see any sign of it.
- No proof of integrity: homomorphic encryption keeps data secret. But it does not prove that the provider really ran the agreed computation.
- Outputs can leak: someone who sends many queries and sees the decrypted outputs may still learn about the model.
- Key management: whoever holds the private key can decrypt everything. Where you store keys, how you rotate them and who can access them is critical.
There is a plus side. Common FHE schemes are based on lattice problems (Learning with Errors). These are seen as resistant to known quantum attacks. They come from the same family of math as the post-quantum standard ML-KEM.
Getting started
- Be clear about what you want to protect: Should the provider be unable to see the data? Should the model be protected? Or both? Your answer shows whether homomorphic encryption is the right tool.
- Compare other options: trusted execution environments (confidential computing), secure multi-party computation (MPC) or differential privacy are often faster and simpler. A mix is often the best fit.
- Start with a pilot: pick a small model with a clear speed target, such as logistic regression or a compact decision tree.
- Use proven libraries: rely on open-source libraries that are kept up to date and list their security settings. Never build your own crypto.
- Add keys to your crypto plan: define who owns them, where they are stored (for example in an HSM) and when they are rotated.
Data protection view
Homomorphic encryption is a technical measure in the sense of Art. 25 and Art. 32 GDPR. Encrypted personal data is still personal data for the controller who holds the key. Is it still personal data for a provider who has no key? That depends on the case. Assess it with your data protection officer.
Conclusion
Homomorphic encryption gives the strictest answer to one question: how can a third party compute on data without seeing it? It is also the hardest answer to put into practice. For selected AI uses with a clear scope, it works today. SecTepe can help you judge whether it is the right method for your case.
More terms in “AI & Machine Learning”
- Adversarial Machine Learning
- AI Backup and Model Recovery
- AI Certification
- AI Data Protection Impact Assessment (AI DPIA)
- AI Forensics
- AI Governance for Managing Directors
- AI Governance Framework
- AI Incident Response Playbook
- AI Monitoring and Anomaly Detection
- AI Penetration Testing
- AI Phishing Detection
- AI Poisoning