Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FV homomorphic encryption scheme #3276

Merged
merged 65 commits into from
May 29, 2020
Merged

FV homomorphic encryption scheme #3276

merged 65 commits into from
May 29, 2020

Conversation

rav1kantsingh
Copy link
Member

@rav1kantsingh rav1kantsingh commented Mar 30, 2020

#3097 Implementation of FV (Fan-Vercauteren) Homomorphic Encryption scheme.

Implemented:

  • Modulus (PolyModulus, CoeffModulus, PlainModulus)
  • IntegerEncoder
  • KeyGeneration
  • Encrypter
  • Decrypter

@youben11

@iamtrask
Copy link
Member

SO excited about this PR!

@iamtrask iamtrask self-requested a review March 31, 2020 14:52
Copy link
Contributor

@LaRiffle LaRiffle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this is such an incredible job!
I would love to see test examples using the FVTensor you've just created!

Copy link
Member

@youben11 youben11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks promising @IamRavikantSingh 💯 ! Keep the good work going.

syft/frameworks/torch/he/fv/encryption_params.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/encryption_params.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/encryption_params.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/modulus.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/util/numth.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/encryption_params.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/key_generator.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/key_generator.py Outdated Show resolved Hide resolved
@karlhigley karlhigley marked this pull request as draft April 12, 2020 16:35
syft/frameworks/torch/he/fv/context.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decrypter.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/key_generator.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/plaintext.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/util/operations.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/util/operations.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/util/operations.py Outdated Show resolved Hide resolved
@rav1kantsingh rav1kantsingh marked this pull request as ready for review May 17, 2020 10:51
@karlhigley karlhigley removed their request for review May 17, 2020 17:28
Copy link
Member

@youben11 youben11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good overall! My main concern is why elements are considered simple vectors and operations are done element-wise, shouldn't they be polynomials?

syft/frameworks/torch/he/fv/ciphertext.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/context.py Show resolved Hide resolved
syft/frameworks/torch/he/fv/decrypter.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decrypter.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/encrypter.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decrypter.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/key_generator.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/plaintext.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/public_key.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/secret_key.py Outdated Show resolved Hide resolved
@OpenMined OpenMined locked and limited conversation to collaborators May 19, 2020
Currently I am focusing on completing the FV scheme first and after completing the scheme I will start working on FV tensor related work.
@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #3276 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3276   +/-   ##
=======================================
  Coverage   94.74%   94.74%           
=======================================
  Files         180      180           
  Lines       17875    17875           
=======================================
  Hits        16935    16935           
  Misses        940      940           

@rav1kantsingh rav1kantsingh changed the title [WIP] FV homomorphic encryption scheme FV homomorphic encryption scheme May 25, 2020
@rav1kantsingh rav1kantsingh marked this pull request as ready for review May 25, 2020 18:05
syft/frameworks/torch/he/fv/decryptor.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decryptor.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decryptor.py Outdated Show resolved Hide resolved
syft/frameworks/torch/he/fv/decryptor.py Outdated Show resolved Hide resolved
@iamtrask
Copy link
Member

Status on this?

@rav1kantsingh
Copy link
Member Author

Status on this?

This PR can encrypt and decrypt integers using the FV scheme. In crypto-team, we have decided to merge this PR first and then start working on further part of the algorithm. I am waiting for some reviews.
Your review would be great!😃😄

@iamtrask iamtrask merged commit a3a47bd into OpenMined:master May 29, 2020
@iamtrask
Copy link
Member

Let's ship it! Great work!

@rav1kantsingh rav1kantsingh added this to the BFV Tensor in Python milestone Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants