viff

changeset 1130:006bdec768e6

Fixed erroneous use of list.pop().
author Marcel Keller <mkeller@cs.au.dk>
date Thu, 05 Feb 2009 16:14:01 +0100
parents 50056a810951
children cf4920b3ae72
files viff/aes.py viff/equality.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/viff/aes.py	Fri Jan 30 14:50:47 2009 +0100
     1.2 +++ b/viff/aes.py	Thu Feb 05 16:14:01 2009 +0100
     1.3 @@ -112,7 +112,7 @@
     1.4  #                bits[j] = 1 - bits[j]
     1.5  
     1.6              while(len(bits) > 1):
     1.7 -                bits.append(bits.pop() * bits.pop())
     1.8 +                bits.append(bits.pop(0) * bits.pop(0))
     1.9  
    1.10              # b == 1 if byte is 0, b == 0 else
    1.11              b = bits[0]
     2.1 --- a/viff/equality.py	Fri Jan 30 14:50:47 2009 +0100
     2.2 +++ b/viff/equality.py	Thu Feb 05 16:14:01 2009 +0100
     2.3 @@ -79,7 +79,7 @@
     2.4          # Take the product (this is here the same as the "and") of all
     2.5          # the x'es
     2.6          while len(x) > 1:
     2.7 -            x.append(x.pop() * x.pop())
     2.8 +            x.append(x.pop(0) * x.pop(0))
     2.9  
    2.10          return x[0]
    2.11