changeset 1254:fe84468a46ca

Don't use schedule_complex_callbacks() where it decreases performance.
author Marcel Keller <mkeller@cs.au.dk>
date Fri, 25 Sep 2009 19:54:46 +0200
parents 2fc11d4132c5
children 8063a78b8ef5 70c995d31d1a
files viff/active.py viff/aes.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/viff/active.py	Thu Sep 24 14:13:27 2009 +0200
+++ b/viff/active.py	Fri Sep 25 19:54:46 2009 +0200
@@ -517,7 +517,7 @@
         # This is the Deferred we will do processing on.
         triple = self.get_triple(share_x.field)
         triple.addCallback(gather_shares)
-        triple = self.schedule_complex_callback(triple, finish_mul)
+        triple = self.schedule_callback(triple, finish_mul)
         # We add the result to the chains in triple.
         triple.chainDeferred(result)
         return result
--- a/viff/aes.py	Thu Sep 24 14:13:27 2009 +0200
+++ b/viff/aes.py	Fri Sep 25 19:54:46 2009 +0200
@@ -168,14 +168,14 @@
 
         def open_and_exponentiate(random_powers):
             masked_byte = self.runtime.open(byte + random_powers[0])
-            masked_powers = self.runtime.schedule_complex_callback(masked_byte,
+            masked_powers = self.runtime.schedule_callback(masked_byte,
                 lambda masked_byte: self.runtime.powerchain(masked_byte, 7))
-            return self.runtime.schedule_complex_callback(
+            return self.runtime.schedule_callback(
                 masked_powers, add_and_multiply, random_powers)
 
         result = Share(self.runtime, GF256)
         self.runtime.prss_powerchain().chainDeferred(result)
-        result = self.runtime.schedule_complex_callback(result, open_and_exponentiate)
+        result = self.runtime.schedule_callback(result, open_and_exponentiate)
         return result
 
     def invert_by_exponentiation(self, byte):