No description, website, or topics provided.
C OCaml Python Perl Shell CSS Other
Switch branches/tags
Nothing to show
Clone or download
samee Merge pull request #65 from schoppmp/obliv-c
Fix C++ compatibility issue
Latest commit 3d6804c Jun 24, 2018
Failed to load latest commit information.
SCDtoObliv Removing dead code from SCDtoObliv. Sep 10, 2017
bin fix minor build script bug Apr 13, 2018
doc Few more things to delete Jun 21, 2015
lib/perl5 GCC -dumpversion scraper fix Nov 27, 2017
m4 Update ocaml-autoconf macro from upstream Aug 26, 2013
src Merge pull request #65 from schoppmp/obliv-c Jun 24, 2018
test Moving Obliv-C tests to test/oblivc Oct 4, 2017
web fixing web Mar 13, 2016
.gitattributes Simplify makefile Nov 4, 2011
.gitignore Giant merge, finally done Jun 21, 2015
.merlin Add findlib to .merlin Aug 26, 2013 Build doc on travis Mar 10, 2014
.travis.yml Travis CI build scripts Mar 10, 2014
CHANGES Move changelog to file CHANGES Jul 24, 2013
LICENSE-cil Giant merge, finally done Jun 21, 2015
LICENSE-oblivcc Changed LICENSE file Feb 17, 2014 Added missing header files for float circuits. Sep 4, 2017 Giant merge, finally done Jun 21, 2015 Updated README for Fedora 27 Feb 18, 2018
TODO.obliv __obliv_c__bits added, no stupid crlf conversion Jul 13, 2015
_tags Move ocamlutil to src Aug 27, 2013
aclocal.m4 Use ocaml-autoconf macros Jun 17, 2013
cil.odocl Rename Features into Feature Aug 26, 2013
config.guess Update config.sub, config.guess and Jun 17, 2013 Avoid warnings about casting pointers to int Sep 20, 2015 Reintroduce bin/ directory and continue cleanup Jun 17, 2013
config.sub Update config.sub, config.guess and Jun 17, 2013
configure Avoid warnings about casting pointers to int Sep 20, 2015 Avoid warnings about casting pointers to int Sep 20, 2015 Clarified opam install Jun 23, 2015
install-sh Update install-sh Jun 17, 2013 Install cmi, cmx and mli for CIL features Sep 4, 2013
oblivc.vim Fixed vim formatting May 30, 2016 Better automatic remaking Jun 17, 2013

Obliv-C Secure Computation Compiler (oblivcc)

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 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.


Unfortunately, the instructions for Fedora and Mac OS might be a little out of date, since we discovered OPAM is now a dependency (#49). Please ping us if you figured out how to install Obliv-C on those systems.

  1. Installation of dependencies.
  • For Ubuntu: sudo apt-get install ocaml libgcrypt20-dev ocaml-findlib opam m4.
  • For Fedora 27: sudo dnf install glibc-devel.i686 ocaml ocaml-ocamldoc ocaml-findlib ocaml-findlib-devel ocaml-ocamlbuild libgcrypt libgcrypt-devel perl-ExtUtils-MakeMaker perl-Data-Dumper.
  • For Mac OS (with Macports): sudo port install gcc5 ocaml ocaml-findlib opam libgcrypt +devel.
  1. If you are using OPAM as our package manager, and this is the first time you are using it, set it up:

    opam init
    opam switch 4.06.0
    eval `opam config env`
    opam install camlp4 ocamlfind ocamlbuild batteries

    Version 4.06.0 just happened to be the most recent version when we tested. You can check what you have by running opam switch list, and try a more recent one. Note that this step seems to be unnecessary under Fedora.

  2. Git-clone this repository, and compile:

  • For Linux: ./configure && make.
  • For Mac OS (with Macports): CC=/opt/local/bin/gcc-mp-5 CPP=/opt/local/bin/cpp-mp-5 LIBRARY_PATH=/opt/local/lib ./configure && make.
  1. Start using it! The compiler is a GCC wrapper script found in bin/oblivcc. Example codes are in test/oblivc. A language tutorial is found here.

Most of this code was forked from the project CIL (C Intermediate Language). You can diff with the master branch to see which part was added on later.


This repository includes several example programs using Obliv-C in the test/oblivc directory. See obliv-c/test/oblivc/README.txt for details.


Please let us know if you are using Obliv-C. If you have any questions, either open an issue here on GitHub or just send me an email at