Using edaBits in low level C++ interface
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.
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.
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?
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.
You can now use the conversion in the compiler from C++ code: https://mp-spdz.readthedocs.io/en/latest/function-export.html
This is super useful, thanks for the addition!