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 wrap: on
line diff
--- a/viff/aes.py	Fri Jan 30 14:50:47 2009 +0100
+++ b/viff/aes.py	Thu Feb 05 16:14:01 2009 +0100
@@ -112,7 +112,7 @@
 #                bits[j] = 1 - bits[j]
 
             while(len(bits) > 1):
-                bits.append(bits.pop() * bits.pop())
+                bits.append(bits.pop(0) * bits.pop(0))
 
             # b == 1 if byte is 0, b == 0 else
             b = bits[0]
--- a/viff/equality.py	Fri Jan 30 14:50:47 2009 +0100
+++ b/viff/equality.py	Thu Feb 05 16:14:01 2009 +0100
@@ -79,7 +79,7 @@
         # Take the product (this is here the same as the "and") of all
         # the x'es
         while len(x) > 1:
-            x.append(x.pop() * x.pop())
+            x.append(x.pop(0) * x.pop(0))
 
         return x[0]