Giter Club home page Giter Club logo

Comments (8)

6fj avatar 6fj commented on May 20, 2024

Hi @BeStrongok ,

Yes, we are using the same idea here, please check https://github.com/secretflow/spu/blob/beta/spu/hal/ring.cc#L141-L146.

from spu.

BeStrongok avatar BeStrongok commented on May 20, 2024

Thanks for your reply, but i haven't find the implementation code of the function _msb, dose you directly reveal the difference x - y and get the msb of the revealed result?

from spu.

icavan avatar icavan commented on May 20, 2024

Thanks for your reply, but i haven't find the implementation code of the function _msb, dose you directly reveal the difference x - y and get the msb of the revealed result?

We should not reveal any value here.

Currently, some protocols adopt the arithmetic shares to boolean shares (A2B) procedure. Thus you could get any bit, including the MSB. Some protocol, say cheetah, has a dedicated MSB implementation. Check here.

A more wise way is to directly perform a carry-out circuit calculation which has a similar procedure as the A2B routine. The carry-out circuit will be supported soon.

from spu.

BeStrongok avatar BeStrongok commented on May 20, 2024

Cool!! I will learn this code. I'm confused that the shares is generated randomly, so it cannot be used for comparison locally, after A2B procedure, we need to reveal the MSB bit, is my understanding correct?

from spu.

icavan avatar icavan commented on May 20, 2024

Cool!! I will learn this code. I'm confused that the shares is generated randomly, so it cannot be used for comparison locally, after A2B procedure, we need to reveal the MSB bit, is my understanding correct?

The MSB is also kept in secret sharing form, either boolean or arithmetic. Everything has to be confidential inside a generic secure multiparty computation protocol. Once you've decided to open the secret, you need to reveal it explicitly.

from spu.

BeStrongok avatar BeStrongok commented on May 20, 2024

Cool!! I will learn this code. I'm confused that the shares is generated randomly, so it cannot be used for comparison locally, after A2B procedure, we need to reveal the MSB bit, is my understanding correct?

The MSB is also kept in secret sharing form, either boolean or arithmetic. Everything has to be confidential inside a generic secure multiparty computation protocol. Once you've decided to open the secret, you need to reveal it explicitly.

Thanks for your guidance, i understand. After A2B procedure, parties can get the secret shares of MSB locally, once we want to open this secret, we need to reveal it explicitly, we can't directly reveal it in the source code implicitly.

from spu.

BeStrongok avatar BeStrongok commented on May 20, 2024

Thanks for your reply, but i haven't find the implementation code of the function _msb, dose you directly reveal the difference x - y and get the msb of the revealed result?

We should not reveal any value here.

Currently, some protocols adopt the arithmetic shares to boolean shares (A2B) procedure. Thus you could get any bit, including the MSB. Some protocol, say cheetah, has a dedicated MSB implementation. Check here.

A more wise way is to directly perform a carry-out circuit calculation which has a similar procedure as the A2B routine. The carry-out circuit will be supported soon.

Hi~
I noticed that you will implement carry-out circuit calculation, i read the corresponding paper and find that the protocol BitLTL needs log(k) communication rounds, which is not effecient enough, especially handling larger amount of data.
I'm wondering that is there any protocol can be implemented with constant round complexity?
The paper is Improved Primitives for Secure Multiparty Integer Computation.

from spu.

rivertalk avatar rivertalk commented on May 20, 2024

Hi @BeStrongok

Carry-out circuit is supported in the latest SPU implementation (for ABY3 protocol), but it's only helps to reduce the total number of communication data, not communication rounds, the rounds is still log(k).

AFAIK, at least log(k) rounds is required :(

from spu.

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.