Obliv-C is a simple GCC wrapper that makes it easy to embed secure computation protocols inside regular C programs.

The idea is simple: if you are performing a multi-party distributed computation with sensitive data, just write it in our Obliv-C langauge and compile/link it with your project. The result will be a secure multi-party cryptographic protocol that performs this operation without revealing any of the inputs or intermediate values of the computation to any of the parties. Only the outputs are finally shared.


This repository includes the implementation of Obliv-C and several example applications and benchmarks.


Introduction to Obliv-C (Samuel Havron)


Samee Zahur and David Evans. Obliv-C: A Language for Extensible Data-Oblivious Computation, Cryptology ePrint Archive: Report 2015:1153 [PDF], November 2015.

Samee Zahur and David Evans. Poster: Obliv-C: a Fast, Lightweight Language for Garbled Circuits. 36th IEEE Symposium on Security and Privacy (“Oakland”). 18-20 May 2015 (Poster).

Projects Using Obliv-C


Samee Zahur, Mike Rosulek, and David Evans. Two Halves Make a Whole: Reducing Data Transfer in Garbled Circuits using Half Gates. In EuroCrypt 2015. Sofia, Bulgaria. 26-30 April 2015. [PDF, 28 pages] [Code]


Samee Zahur, Xiao Wang, Mariana Raykova, Adrià Gascón, Jack Doerner, David Evans, Jonathan Katz. Revisiting Square-Root ORAM Efficient Random Access in Multi-Party Computation In 37th IEEE Symposium on Security and Privacy (“Oakland”). San Jose, CA. 23-25 May 2016.

Secure Stable Matching

Jack Doerner, David Evans, abhi shelat. Secure Stable Matching at Scale. In 23rd ACM Conference on Computer and Communications Security (CCS). Vienna, Austria. 24-28 October 2016.

Absentminded Crypto Kit

Jack Doerner. Library of oblivious implementations of cryptographic primitives implemented in Obliv-C. Includes big integer math, hash functions, sorting, graph algorithms, oblivious data structures, and ORAM implementations. [Code: https://bitbucket.org/jackdoerner/absentminded-crypto-kit]

Secure Deep Learning

Bargav Jayaraman (Accenture Technology Labs, Bangalore → now at UVA)

Scientific Data Analysis

Private Linear Regression
Samuel Havron


Samee Zahur. Obliv-C: A Simple C Extension for SMC, iDash Privacy & Security Workshop 2015. (Won award for fasted “Hamming Distance” execution.)

David Evans. Multi-Party Computation for the Masses (includes video). CROSSING Conference 2015: Where Quantum Physics, Cryptography, System Security and Software Engineering Meet. Darmstadt. 1 June 2015

Samee Zahur. Obliv-C: A Lightweight Compiler for Data-Oblivious Computation (includes video). Applied Multi-Party Computation. Microsoft Research, Redmond, WA. 20 February 2014.


Samee Zahur, Project Founder and Leader (now at Google)

Darion Cassel, Undergraduate Researcher
Jack Doerner, Wizard of Oblivion
David Evans, Faculty Advisor
Samuel Havron, Undergraduate Researcher
Bargav Jayaraman, PhD Student

Contributors: Natnatee (“Ko”) Dokmai, Richard Li, Michael Mahoney, Xiao Wang.