[viff-devel] Multiparty AES in less than 3 seconds per block thanks to Twisted hack

Marcel Keller mkeller at cs.au.dk
Sun Mar 8 10:15:24 PDT 2009


> For those who are not on the Twisted mailing list, the reply is here:
> 
>   http://twistedmatrix.com/pipermail/twisted-python/2009-February/019252.html
> 
> There Jean-Paul Calderone says that he doesn't believe in a re-entrent
> reactor, but he does not explain in detail why that it so.

I think there are good reasons not to believe in a re-entrant reactor.

> My guess is that a generally re-entrent reactor could end up doing a lot
> of recursion where each recursion step holds unto a local scope and
> thereby keeps local variables from being reclaimed by the garbage
> collector. A simple loop does not have that problem, so I can understand
> why the Twisted guys will want to keep the design as simple as possible.

Me too, I think I mentioned at some time that I didn't expect them to 
accept my hack.

> I'll try and write a mail to them to explain our problem in more detail.
> Maybe your short patch didn't provide enough information when taken out
> of context.

That may be true. I just thought that I don't want to bother him with 
VIFF code.

>> - It breaks some unit tests. I'm not sure whether it really breaks
>> functionality or just the unit testing tool of Twisted.
> 
> Are these VIFF (trial viff) or Twisted (trial twisted) unit tests? In
> any case, we have to fix this if there in order to keep our sanity :-)

The VIFF unit tests. Though I didn't execute the Twisted unit tests, I 
think that they would success since there no changes to Twisted if the 
loop call is not used.

>> As I said at the meeting, a possibility would be to go multi-threaded.
>> The Twisted maintainer suggested another way but I don't think that
>> that way works for us.
> 
> Do you mean the inlineCallbacks or the coiterate? And why it not work?

As far as I understood it, inlineCallbacks would stop the VIFF code, 
which would make it not asynchronous anymore. Coiterate needs generator 
functions. Maybe I'm wrong but I just consider the VIFF code to be too 
complex to be put in generator functions.


More information about the viff-devel mailing list