Questions about -DINSECURE mode (-F flag)
Hi,
I am using -DINSECURE flag while compiling and -F while running, to do online phase benchmarking. I have two questions:
-
How do I get the size of preprocessing material being used for a particular
.mpcfile? The binary prints the communication in MB. I need a similar number for the preprocessing material it used. -
When I run using -F flag, I notice that it prints
REUSING DATA - ONLY FOR BENCHMARKING. Does it mean that preprocessing material is being reused? How do I prevent this?
Thanks!
- You can run the binary with the
--verboseargument for a detailed output. - Yes. This is allow continuing the online benchmarking when the preprocessing data on disk runs out. You can prevent this by running
./Fake-Offline.x -d <number> ...with<number>being sufficiently high. Try the maximum of the output with--verbose.
Thank you so much for the response!
--verbose prints all the required preprocessing material in terms of number of triples, bit triples, edabits, dabits etc. Can I get this is MB somehow? Or do I have to calculate manually?
For example, in semi-honest case, a bit triple is 3 bits worth of preprocessing per party. However, in malicious case, a bit triple would be 3*(1+2t) bits, where t is the size of tag, assuming it uses BDOZ style shares for bits.
If need to be calculated manually, is it possible to get exact expressions for each of these preprocessing material types?
Thank you once again!
You figures this out by running specific programs like
sint.get_random_triple(size=1000)
This works for triples, dabits, and edabits. For bit triples, use
a = sbit.get_type(1000)
a & a
Thanks!
I ran
sint.get_random_triple(size=1000)
using
python3 compile.py -R 64 comp
./spdz2k-party.x -N 2 --verbose -h 172.31.42.195 -F comp -p 0
and I get 0 MB communication. If I remove -F flag, I suppose that I will get the communication to "generate" these randomness, not the "preprocessing size". Am I right about this? If so, is there any way around?
Indeed, I misunderstood. There is no ready facility computing the storage requirements, so you'll need to work it out yourself. Going back to your earlier question, MP-SPDZ doesn't use BDOZ but FKOS15, so there is only one tag per value.
Awesome, thanks for the help, I have a better understanding now!