GithubHelp home page GithubHelp logo

samuelgong / flashe Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 6.0 235.44 MB

[arXiv'21] Additively Symmetric Homomorphic Encryption for Cross-Silo Federated Learning

License: Apache License 2.0

Python 57.48% Shell 6.32% Java 34.11% Jupyter Notebook 2.09%
cross-silo federated-learning homomorphic-encryption

flashe's People

Contributors

samuelgong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flashe's Issues

issue about "jzf_flashe.py"

您好,作者!

issue 1

请问下面这个function的目的是什么?

def chunks_idx(l, n):

issue 2

在下面这个文件中的line 24-26,meaning of the variables

issue 3

请问如果要将您的这个方案应用至deep Learning中,在每个epoch完成后,需要重新设置这两个吗?

flashe.set_iter_index(epoch)
flashe.idx = 0

劳烦,作者回答上述的3个issue。
如果我有表达不清楚的地方,请您指出,谢谢您!

about generate data

您好,在我运行您的代码是,当生成数据是负数的时候,最后的结果是错的
e.g. 我只是简单的将生成的random数,变成了负数
’plaintext = np.random.random(plaintext_length) - 2
最后的结果就不正确了。
image

issue about “element_bits,int_bits,additional_bits"

您好,作者!
很抱歉又一次打扰到您.
在您的代码中:https://github.com/SamuelGong/FLASHE/blob/master/encrypt_test/final_big_table.ipynb 请问element_bits,int_bits,additional_bits分别代表什么? 对这些位数的设置有要求吗?
以及在https://github.com/SamuelGong/FLASHE/blob/master/federatedml/secureprotol/jzf_quantize.py 中 关于 batch_size = int_bits // element_bits 这个又是怎么去理解呢?
期待您的回复!

能否给出不同的明文在同态加密后计算的接口

您好,由于FATE太过庞大,我想在单台计算机上复现您的论文的隐私保护方案。但是在您的final_big_table.ipynb给出的示例代码中的“Addition”步骤计算的是ciphertext_list = [ciphertext] * num_clients,即num_client个ciphertext求和,这里的ciphertext是相同的,而没有给出不同的ciphertext进行求和的接口。请问能否给出不同的明文在同态加密后计算的接口呢,即一个像ckks.sum()那样通用的接口。

如果可能的话麻烦添加以下内容的演示:
存在两个等长的不同向量A,B,A, B中的元素为[-1, 1]之间的小数

  1. 利用flashe加密A, B,得到A_e, B_e;
  2. 演示您的同态加密方案可以在密文状态下进行的不同的计算,如A_e+B_e, A_e-B_e, A_e dot B_e......;
  3. 解密第二步的计算结果,并与明文状态下的计算结果进行比较。

加密算法部分

打扰到您了,请问加密算法是否采用的是AES算法呢?如果是用的AES,可是AES算法应该不是同态的吧。

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.