Git Product home page Git Product logo

cryptodl's Introduction

CryptoDL

How to install

These steps assume your are running Ubuntu.

First step

Clone this repository

Install Dependency Packages

CryptoDL/dependencies/ contains scripts and information to install and build the required dependencies.

Run config_system.sh as root to install the depencies that are availabe via the package manager.

After that run

install_dependencies.sh

from CryptoDL/dependencies/ directory. This downloads and builds dependcies not only availalbe from source or that require specific configuration.

Building CryptoDL

To build CrptoDL simply run

make

in the CryptoDL/Debug directory. This builds a static library libkalypso.a which other projects can link against.

To make linking easier CryptoDL/dependencies/versions.sh creates varialbes that you can use in your build scripts.

An example build script can looks like this. All you need to is set the CRYPTODL_DIR variable to where you coloned the repository.

$(shell $(CRYPTODL_DIR)/dependencies/versions.sh)
-include $(CRYPTODL_DIR)/dependencies/makefile.versions

g++ -std=c++17 -Wall $(INCLUDE_DIRS) $(DEP_INCLUDES) -c example.cpp
g++ -std=c++17 -o "example" example.o $(CRYPTODL_DIR)/Debug/libkalypso.a $(DEP_LIBS) $(DEP_RPATH)

What is this repository for?

This project aims to provide Deep Learning with a privacy preserving computation backend. The privacy preserving computation is based on homomorphic encryption (HE). Homomorphic encryption allows for computation on encrypted data, get an encrypted result without the need to decrypt the data for any of the computation. These properties come with a number of restrictions and things to look out for. We aim to provide a library that provides privacy preserving deep learning for people with a deep learning background without needing to dig into HE, aswell as the abiltity to easily integrate different HE libraries as computation backends.

What is supported at the moment?

Deep Learning

So far we support the following types of layers:

  • 2D Convolutional
  • Fully Connected
  • Fully Connected Recurrent Layer

We support a number of activation functions:

  • Linear
  • Square
  • ReLU ( not useable with the HE backend )
  • Polynomials

We only support inference. Training is not supported and needs to be done with other tools/frameworks. As of now there is no automated way of importing pretrained models. The current suggested workflow is:

  1. Train model using keras
  2. Use provided tools to extract weights
  3. Define model in C++ and import weights Models that are supposed to used with our code may only use these layers and activation functions.

HE Backend

Currently we only support HELib library as a computational backend (other than plaintext).

Limitations

HE places a number of constraints and limitations on the type of computation that can be performed. This is supposed to be a list of the main points to be aware off. It is not meant to be comprehenisve.

  • No Division Division of ciphertexts is not supported
  • No comparison There is no comparison between ciphertext, e.g. no max, min, etc. This means we can not use ReLU, MaxPooling, etc.
  • Limited number of computations Every computation performed on a ciphertext adds some additional noise to the ciphertext. If the noise exceeds some threshold we can not decrypt it correctly anymore. Therefore we can not run an arbitrary number of computations
  • Limited support of Activation functions, Layers Due the constraints mentioned above we can not use every activation function or layer that we normally can. We suggest using poynomials as activation functions.

Contribution guidelines

TBD

Who do I talk to?

Contact: [email protected]

cryptodl's People

Contributors

podschwadt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.