data61 / MP-SPDZ

Versatile framework for multi-party computation
Other
944 stars 280 forks source link

How to generate preprocessing data on demand? #1508

Closed GuopengLin closed 1 month ago

GuopengLin commented 1 month ago

Hi Keller,

Is there a way to generate preprocessing data on demand in MP-SPDZ? I notice that the virtual machine generates preprocessing data, such as daBits, in large batches. However, this results in excess data when I only need a single element for secure comparison. Is it possible to produce only the required amount of preprocessing data?

Additionally, I’m unclear about the meaning of the -B option (Batch size for sacrifice, default: 4). What does it control?

mkskeller commented 1 month ago

The current version of MP-SPDZ tries to generate minimal amounts of preprocessing whenever possible. However, some protocols require minimum batch sizes due to a variety of reasons. On of this reasons is needed the bucket sacrifice, which is controlled by the -B option. This is used for edaBit generation and described in the respective paper: https://eprint.iacr.org/2020/338. There is a trade-off between efficiency and required batch size. A smaller bucket size means higher efficiency but also a larger batch size. The possible choices are listed Table 1 of the above paper, and Section 4 explains the results and refers to other papers where the same method applies.