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 final outputs are revealed.

This paper motivates and describes Obliv-C:

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

Getting Started

Code: https://github.com/samee/obliv-c

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


Walks through how to install Obliv-C and build your first data-oblivious application using a simple linear regression example application.


Documentation on Obliv-C’s language extensions and library functions.

Rust Wrapper

Calling Obliv-C protocols from Rust programs (Phillipp Schoppmann)

Projects Using Obliv-C

Libraries and Protocols


Jack Doerner and abhi shelat. Scaling ORAM for Secure Computation. In 24th ACM Conference on Computer and Communications Security. Dallas, TX. 31 Oct-3 November 2017. (Best Paper Award)


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.

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]


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]


Oblivious Knuth-Morris-Pratt Sub-String Search

Jesse Nayak (capstone project). Code: https://github.com/jnayak1/kmp-mpc.

Privacy-Preserving Distributed Linear Regression on High-Dimensional Data

Adrià Gascón and Phillipp Schoppmann and Borja Balle and Mariana Raykova and Jack Doerner and Samee Zahur and David Evans. In Privacy Enhancing Technologies Symposium (PETS). Minneapolis, Minnesota, 18 – 21 July 2017. [PDF]

Decentralized Certificate Authorities

Bargav Jayaraman, Hannah Li, David Evans. Decentralized Certificate Authorities. 11 June 2017. (updated 10 October 2017) (The first two authors both contributed as co-equal first authors.) [PDF]

Privacy-Preserving Machine Learning

Lu Tian, Bargav Jayaraman, Quanquan Gu, and David Evans. Aggregating Private Sparse Learning Models Using Multi-Party Computation. In Private Multi‑Party Machine Learning (NIPS 2016 Workshop), Barcelona, 9 December 2016. [PDF]

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. [PDF]

Secure Deep Learning

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

Applications Built with Obliv-C by Others

Blind Justice: Fairness with Encrypted Sensitive Attributes. Niki Kilbertus, Adrià Gascón, Matt J. Kusner, Michael Veale, Krishna P. Gummadi, Adrian Weller. ICML 2018. PDF.

Private Nearest Neighbors Classification in Federated Databases, Phillipp Schoppmann, Adrià Gascón, and Borja Balle.
Cryptology ePrint Archive: Report 2018 / 289. March 2018.

Pretzel: Email encryption and provider-supplied functions are compatible, Trinabh Gupta, Henrique Fingler, Lorenzo Alvisi, and Michael Walfish. ACM SIGCOMM 2017.

SECCOMP - The Secure Spreadsheet, Calctopia, 2017.

Selected Talks

David Evans. Secure Multi-Party Computation: Promises, Protocols, and Practicalities. ECRYPT NET Workshop on Crypto for the Cloud & Implementation, Paris, France, 27 June 2017. [Speaker Deck]

David Evans and Denis Nekipelov. Private Data Analysis using Multi-Party Computation. Federal Trade Commission (joint presentation), 18 August 2016.

David Evans. Memory for Data Oblivious Computation. ShanghaiTech Symposium, 25 June 2016. [Speaker Deck]

David Evans. From Mercury Delay Lines to Magnetic Core Memories: Progress in Oblivious Memories. Workshop on Theory and Practice of Secure Multiparty Computation, Aarhus University, Denmark. 1 June 2016. [Speaker Deck]

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)
Bargav Jayaraman, PhD Student
Nathaniel Grevatt, Undergraduate Researcher

David Evans, Faculty Advisor


Darion Cassel, Undergraduate Researcher (now at CMU)
Natnatee (“Ko”) Dokmai, Undergraduate Researcher (now at Indiana University)
Jack Doerner, Wizard of Oblivion (now at Northeastern)
Samuel Havron, Undergraduate Researcher (now at Cornell)
Hannah Li, Undergraduate at Masters Student (now at Facebook)
Jesse Nayak, Undergraduate Researcher

Other Contributors: Richard Li, Michael Mahoney, Xiao Wang.