Skip to content

A Privacy-Preserving Framework Based on TensorFlow

License

Notifications You must be signed in to change notification settings

zhilangtaosha/Rosetta

 
 

Repository files navigation

Rosetta logo

github license


Overview

Rosetta is a privacy-preserving framework based on TensorFlow. It integrates with mainstream privacy-preserving computation technologies, inlcuding crypography, federated learning and trusted execution environment. Rosetta aims to provide privacy-preserving solutions for artificial intellegence without requiring expertise in cryptogprahy, federated learning and trusted execution environment. Rosetta reuses the APIs of TensorFlow and allows to transfer traditional TensorFlow codes into a privacy-preserving manner with minimal changes. E.g., just add the following line.

import latticex.rosetta

The current version integerates the secure multi-party computation protocols for 3 parties. The underlying protocol is SecureNN. It is secure in the semi-honest model with honest majority.

Installation

For now, Rosetta runs on Ubuntu 18.04, and is based on TensorFlow 1.14 with CPUs. Windows is not currently supported.

First, you shoud check that your local system meets our requirement. And then, install the native TensorFlow before building Rosetta from source. After that, you can use an example to check everything runs OK. You can check Deployment Guide for the detailed steps of building from source code and installation.

Usage

The following is a simple example for the famous Millionaires' problem using Rosetta.

import latticex.rosetta as rtt
import tensorflow as tf

#define inputs (from console)
Alice = tf.Variable(rtt.private_console_input(0))
Bob = tf.Variable(rtt.private_console_input(1))

#define computation
res = tf.greater(Alice, Bob)

#run computation
with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    res = sess.run(res)
    # reveal the result
    print('ret:', sess.run(rtt.MpcReveal(res))) 

For more details, please check Tutorials and Examples.

Getting Started

To help you start with your first workable program with Rosetta easily, our Tutorials will lead you to this fantanstic world. In this detailed tutorials, we will assist you learn the basic concepts about Rosetta, then show you how to use the interfaces that we provide by easy-to-understand examples, and finally teach you to build a workable privacy-preserving machine learning model on real datasets.

Hopefully, this tutorial, and more other examples in Examples, will whet your appetite to dive in knowing more about this privacy-preserving framework.

Contributing to Rosetta

Rosetta is an open source project developed under the LPGLv3 license and maintained by LatticeX Foundation. Contributions from individuals and organizations are all welcome. Before beginning, please take a look at our contributing guidelines. You could also open an issue by clicking here.

Documents List

Contact

You could reach us by email, and join Rosetta community on Slack.

License

The Rosetta library is licensed under the GNU Lesser General Public License v3.0.

About

A Privacy-Preserving Framework Based on TensorFlow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 77.2%
  • Python 17.8%
  • CMake 2.9%
  • Shell 1.4%
  • Other 0.7%