Skip to content
Go back

FHE vs Garbled Circuits: Making MLaaS possible through Secure Computation

Edit page

🧠 TL;DR - Why this matters to you?

Machine Learning-as-a-Service (MLaaS) is amazing, until privacy becomes a dealbreaker. How can you use a model without revealing your data? And how can a model owner protect their intellectual property?

Enter Privacy-Preserving Machine Learning (PPML). Using cryptography, we can:

In my recent work, I compared two heavyweights in this space:

Both let MLaaS happen securely, your data and the model stay private, but predictions still happen.


🔍 FHE - Encrypt Everything, Compute Securely

Imagine sending your data in a locked box to a server, and the server can manipulate it without ever opening it. That’s FHE.

Formally:

Enc(x) → Server computes f over Enc(x) → Enc(y)
y = Dec(Enc(y))

⚡ Garbled Circuits - Encrypt the Computation

GC flips the script: instead of encrypting data, you encrypt the neural network itself as a Boolean circuit.

Formally:

GenLabels(x) → x_labels
G(f, labels) → GC, GT
Eval(GC, GT, x_labels) → y_labels
Decode(y_labels) → y

📖 Wanna know more?

Checkout the arXiv paper or complete thesis below.

Paper:

Cheerla, K., Ben Othmane, L., & Morozov, K. (2025). Comparison of Fully Homomorphic Encryption and Garbled Circuit Techniques in Privacy-Preserving Machine Learning Inference [Preprint]. arXiv. arxiv.org/abs/2510.07457v1

If you’d like to reference it:

@article{cheerla2025fhevsgc,
  title={Comparison of Fully Homomorphic Encryption and Garbled Circuit Techniques in Privacy-Preserving Machine Learning Inference},
  author={Cheerla, Kalyan and Ben Othmane, Lotfi and Morozov, Kirill},
  journal={arXiv preprint arXiv:2510.07457},
  year={2025}
}

Thesis:

Cheerla, Kalyan. Comparison of Fully Homomorphic Encryption and Garbled Circuits approaches in Privacy-Preserving Machine Learning, thesis, July 2025; Denton, Texas. (https://digital.library.unt.edu/ark:/67531/metadc2481661/), University of North Texas Libraries, UNT Digital Library, https://digital.library.unt.edu.


🧪 Want to Try It?

Find the complete open-sourced code: 🔗 github.com/kalyancheerla/snni-fhe-gc

It includes:


👋 Final Thoughts

This project started as my Master’s thesis at UNT and turned into a deeper exploration of how cryptography and AI meet in the real world. And if you end up using our work, feel free to cite, share, or reach out.

🔐 Privacy doesn’t have to be a mystery: it just needs better math.


Edit page
Share this post on:

Next Post
Indirect Prompt Injection: Lessons from testing VoxPilot