Git Product home page Git Product logo

zaccherinij / concrete-numpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from odhran-o-d/concrete-numpy

1.0 0.0 0.0 2.74 MB

Concrete Numpy is a python package that contains the tools data scientists need to compile various numpy functions into their Fully Homomorphic Encryption (FHE) equivalents. Concrete Numpy goes on top of the Concrete Library and its Compiler.

License: Other

Makefile 1.71% Python 96.95% Shell 1.35%

concrete-numpy's Introduction

Concrete Numpy is an open-source set of tools which aims to simplify the use of fully homomorphic encryption (FHE) for data scientists.

With Concrete Numpy, data scientists can implement machine learning models using a subset of numpy that compiles to FHE. They will be able to train models with popular machine learning libraries and then convert the prediction functions of these models to FHE with concrete-numpy.

Links

For end users

Installation

The preferred way to use concrete-numpy is through docker. You can get the concrete-numpy docker image by pulling the latest docker image:

docker pull zamafhe/concrete-numpy:latest

To install Concrete Numpy from PyPi, run the following:

pip install concrete-numpy

You can find more detailed installation instructions in installing.md

A simple example: numpy addition in FHE

import concrete.numpy as hnp
def f(x, y):
    return x + y

inputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1), (3, 2), (6, 1), (1, 7), (4, 5), (5, 4)]

compiler = hnp.NPFHECompiler(
    f, {"x": "encrypted", "y": "encrypted"},
)
circuit = compiler.compile_on_inputset(inputset)

print(circuit.run(3, 4))
# 7
print(circuit.run(1, 2))
# 3
print(circuit.run(7, 7))
# 14
print(circuit.run(0, 0))
# 0

For developers

Project setup

Installation steps are described in project_setup.md. Information about how to use Docker for development are available in docker.md.

Documenting

Some information about how to build the documentation of concrete-numpy are available in documenting.md. Notably, our documentation is pushed to https://docs.zama.ai/concrete-numpy/.

Developing

Some information about our terminology and the infrastructure of concrete-numpy are available in terminology_and_structure.md. An in-depth look at what is done in concrete-numpy is available in compilation.md.

Contributing

Information about how to contribute are available in contributing.md.

License

This software is distributed under the BSD-3-Clause-Clear license. If you have any questions, please contact us at [email protected].

concrete-numpy's People

Stargazers

 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.