viff

changeset 1088:3da9bd2661a3

Fixed a bug occurring in AES encryption when benchmarking is disabled.
author Marcel Keller <mkeller@cs.au.dk>
date Fri, 23 Jan 2009 14:16:53 +0100
parents 2e3f751f0667
children 992c7eee2b3f
files viff/aes.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/viff/aes.py	Thu Jan 22 20:56:48 2009 +0100
     1.2 +++ b/viff/aes.py	Fri Jan 23 14:16:53 2009 +0100
     1.3 @@ -247,6 +247,8 @@
     1.4          Cleartext and key should be either a string or a list of bytes 
     1.5          (possibly shared as elements of GF256)."""
     1.6  
     1.7 +        start = time.time()
     1.8 +
     1.9          assert len(cleartext) == 4 * self.n_b, "Wrong length of cleartext."
    1.10          assert len(key) == 4 * self.n_k, "Wrong length of key."
    1.11  
    1.12 @@ -257,7 +259,6 @@
    1.13          key = [key[4*i:4*i+4] for i in xrange(self.n_k)]
    1.14  
    1.15          if (benchmark):
    1.16 -            start = time.time()
    1.17              global preparation, communication
    1.18              preparation = 0
    1.19              communication = 0