Coder Social home page Coder Social logo

tfhe-py's Introduction

TFHE-py

Python implementation of the Fully Homomorphic Encryption (FHE) scheme TFHE: Fast Fully Homomorphic Encryption over the Torus.

You can see example usages in the Jupyter Notebook and the tests directory.

The starting point of this implementation was the code written by NuCypher for their NuFHE library. More specifically the code in commit 17f3b62 was used which itself seems to be a port of their Julia version nucypher/TFHE.jl which looks like a port (see this commit) of the original tfhe/tfhe codebase that's written in C / C++.

Setup

  1. git clone <url>
  2. asdf install
  3. pipenv install -e .
  4. pipenv shell
  5. python tests/e2e_half_adder_test.py
  6. pipenv run test
  7. pipenv run coverage
  8. pipenv scripts

Optional: Update the properties marked with TODO: in the .vscode/settings.json file. To get the correct paths run which <package> within a Pipenv shell.

Useful Commands

asdf install

pipenv install -e .
pipenv install [-d] <name>[~=<version>]
pipenv shell
pipenv scripts
pipenv run <command>

python <path>

flake8 <path>

pylint <path> --recursive true

mypy <path>

pytest [-s] [-v] [-k <pattern>] [<path>]

coverage html
coverage report -m

py-spy record -o profile.svg --pid <pid>
py-spy record -o profile.svg -- python <path>
py-spy top -- python <path>

Useful Resources

(T)FHE

Python

tfhe-py's People

Contributors

pmuens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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