Code Monkey home page Code Monkey logo

Comments (9)

lorepieri8 avatar lorepieri8 commented on August 23, 2024 1

I recently used a binary adder and multiplier for some experiments

The formatting is pretty bad, can you fix it? I would like to give it a look.

from nufhe.

fjarri avatar fjarri commented on August 23, 2024

If you mean implementing these operations via logic gates, there is an example implementation in numeric_functions.py. The problem is that even not considering the overheads, it turns out to be quite slow. The other way is to increase message space in ciphertexts, or connect with another FHE scheme working on integers - we are investigating the possibilities here, but there is nothing definite yet.

from nufhe.

mominbuet avatar mominbuet commented on August 23, 2024

I recently used a binary adder and multiplier for some experiments

from nufhe.

InnovativeInventor avatar InnovativeInventor commented on August 23, 2024

I created a more efficient binary adder here: https://github.com/InnovativeInventor/homomorphic-encryption/blob/master/poc.py (should take less steps).

from nufhe.

jon-chuang avatar jon-chuang commented on August 23, 2024

@InnovativeInventor What is the speed of modular addition of a long (2^15) vector of 32-64-bit integers?

from nufhe.

InnovativeInventor avatar InnovativeInventor commented on August 23, 2024

@jon-chuang Are you talking about addition modulo n, for a natural number n? I'm not quite understanding what you're asking me to benchmark here.

from nufhe.

jon-chuang avatar jon-chuang commented on August 23, 2024

@InnovativeInventor I was talking about modular addition. However, I have run your code and noted its still too slow even though GPU accelerated (5s for a single add). This must be the cost of bootstrapping on the gate level.

from nufhe.

jon-chuang avatar jon-chuang commented on August 23, 2024

@InnovativeInventor Actually, how certain are you that the code you wrote is the best performance you could get? For instance, could you get better performance if you used circuit rather than gate bootstrapping?

Actually, your circuit has depth n, but presumably you should be able to get a depth log n evaluation, am I right? Isn't there a more efficient alternative to ripple-carry addition as is implemented in your script? For instance, carry-lookahead adder?

Although, I am not too familiar with the underlying TFHE scheme.

from nufhe.

InnovativeInventor avatar InnovativeInventor commented on August 23, 2024

@jon-chuang A carry-lookahead adder will leak information, I think.

I'm not completely sure, but I think any efficiency improvements at the algorithm level will leak information or take longer (it may be possible to prove this, idk). Let me know if I'm wrong.

from nufhe.

Related Issues (20)

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.