encryptogroup / MOTION

An efficient, user-friendly, modular, and extensible framework for mixed-protocol secure multi-party computation with two or more parties
MIT License
85 stars 40 forks source link

Support for HyCC #40

Open benakhtarvt opened 1 year ago

benakhtarvt commented 1 year ago

I know you mentioned in your paper that you supported the HyCC with your MOTION code. It seems that it is still being cleaned up based off the documentation on the repository. I am currently a grad student working with MOTION for research and was wondering if it would be possible to have access to the HyCC adapter. It would be greatly appreciated.

jonasschiller commented 9 months ago

Hi, I would be hoping for the same thing.

robinhundt commented 9 months ago

Hi, maintenance for MOTION is unfortunately slow at the moment. The MOTION2NX fork has code for a HyCC adapter here https://github.com/encryptogroup/MOTION2NX/blob/975a80d2d32c193969b596a9a05211c8881e0752/src/contrib/hycc/hycc_adapter.h . However, as far as I know, MOTION2NX does not compile at the moment. I'm not sure whether it would be easier to fix MOTION2NX and get it to compile, or if it is straightforward to just integrate the HyCCAdapter of MOTION2NX into this main repository of MOTION.

robinhundt commented 9 months ago

Another option would be to use FUSE (https://github.com/encryptogroup/FUSE) as the intermediate format between HyCC and MOTION. @norakh can probably provide input on whether this conversion is currently working.

norakh commented 9 months ago

The HyCC Adapter from MOTION2NX is iirc a bit buggy and might need some more work to add into MOTION. I am working on an example in FUSE which I will add here once I am done that is hopefully easier to use and works.

jonasschiller commented 9 months ago

Thank you both for your replies. As i was looking at the examples in MOTION i saw that the AES one is already using a bristol format circuit similar to some operations such as the division. Can I just follow this structure with a Bristol Circuit from HyCC?

norakh commented 9 months ago

Sure, if that's already sufficient for your use case and you have the Bristol Format examples from HyCC at hand, this should do it.

jonasschiller commented 8 months ago

Thanks for all your help! Do you know if there is a way to access the return of a Bristol Format algorithm similar to the AES example in the check function during the computation and not only after the results are opened?

robinhundt commented 8 months ago

Yes, you can use the ShareWrappe::Evaluate (source) function which returns a concatenated ShareWrapper of the outputs of Bristol circuit. These have not been opened, so they are indeed shares of the output. You can then use the ShareWrappers to perform additional operations on the output.