fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Optimize MASCOT and the OT extension

Open jot2re opened this issue 7 years ago • 2 comments

We would like to make things go faster. I don't think we should have this task prescribe some specific optimisations, but rather suggest things that should speed things up. The person (or people) doing this task can then do these and other things to speed things up.

jot2re avatar Jan 17 '18 15:01 jot2re

Make sure that MASCOT preprocessing is done in parallel in a multithreaded manner. The code has already been refactored to be able to use the same seed OTs in different preprocessing objects.

jot2re avatar Jan 17 '18 15:01 jot2re

Currently the OT extension, specifically the BristolRotBatch class always initialises a new PRG for each OT in the batch, using the random strings coming from Rot. When using BristolRotBatch with Mascot (and I presume in other cases as well), the length of the random message coming from Rot is the at most the length of the random message required by Mascot. Thus it is actually not necessary to invoke a PRG! Preliminary profiling by @n1v0lg showed that the initialisation of a PRG is in fact a bottleneck. Thus we should check whether the messages returned by BristolRotBatch needs to be longer than the messages gotten from Rot, if not, we simply pass the messages from Rot straight out.

jot2re avatar Jan 17 '18 16:01 jot2re