viff

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 diff
     1.1 --- a/viff/active.py	Thu Sep 24 14:13:27 2009 +0200
     1.2 +++ b/viff/active.py	Fri Sep 25 19:54:46 2009 +0200
     1.3 @@ -517,7 +517,7 @@
     1.4          # This is the Deferred we will do processing on.
     1.5          triple = self.get_triple(share_x.field)
     1.6          triple.addCallback(gather_shares)
     1.7 -        triple = self.schedule_complex_callback(triple, finish_mul)
     1.8 +        triple = self.schedule_callback(triple, finish_mul)
     1.9          # We add the result to the chains in triple.
    1.10          triple.chainDeferred(result)
    1.11          return result
     2.1 --- a/viff/aes.py	Thu Sep 24 14:13:27 2009 +0200
     2.2 +++ b/viff/aes.py	Fri Sep 25 19:54:46 2009 +0200
     2.3 @@ -168,14 +168,14 @@
     2.4  
     2.5          def open_and_exponentiate(random_powers):
     2.6              masked_byte = self.runtime.open(byte + random_powers[0])
     2.7 -            masked_powers = self.runtime.schedule_complex_callback(masked_byte,
     2.8 +            masked_powers = self.runtime.schedule_callback(masked_byte,
     2.9                  lambda masked_byte: self.runtime.powerchain(masked_byte, 7))
    2.10 -            return self.runtime.schedule_complex_callback(
    2.11 +            return self.runtime.schedule_callback(
    2.12                  masked_powers, add_and_multiply, random_powers)
    2.13  
    2.14          result = Share(self.runtime, GF256)
    2.15          self.runtime.prss_powerchain().chainDeferred(result)
    2.16 -        result = self.runtime.schedule_complex_callback(result, open_and_exponentiate)
    2.17 +        result = self.runtime.schedule_callback(result, open_and_exponentiate)
    2.18          return result
    2.19  
    2.20      def invert_by_exponentiation(self, byte):