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

Using edaBits in low level C++ interface #1498

Open
nakkstar123 opened this issue Sep 14, 2024 · 3 comments
Open

Using edaBits in low level C++ interface #1498

nakkstar123 opened this issue Sep 14, 2024 · 3 comments

Comments

@nakkstar123
Copy link

Hi,

Is there a way to use edaBits from the C++ low level interface? Utils/mixed-example.cpp has a MixedProtocolSetup which uses daBits but it's not clear how to use edaBits.

For example, how would I modify Utils/paper-example.cpp to use edaBits so that the operations are still performed using arithmetic shares but instead of opening in the last stage, parties output corresponding authenticated binary shares of the result (perhaps to feed this as input somewhere else, outside MP-SPDZ.)

Thanks in advance.

@mkskeller
Copy link
Member

You can use preprocessing.get_edabit_no_count(strict, n_bits) to get edaBits. However, you will still need to implement the conversion using edaBits as this is done in the compiler when using the high-level interface.

@nakkstar123
Copy link
Author

Thanks! Is there a way to obtain the compiled C++ file when using the high-level interface (if it is readable) so I can reference it to implement the conversion? Otherwise, can you point me to relevant source files that will help?

@mkskeller
Copy link
Member

The high-level interface isn't compiled to C++ but to a specific instruction format. You can find an introduction in the documentation. For a specific program, you can use ./compile.py -a or Scripts/decompile.py to get the instructions in a human-readable format.

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

No branches or pull requests

2 participants