changeset 1075:249bba0f9ad0

Wrong assert in add_round_key corrected.
author Marcel Keller <mkeller@cs.au.dk>
date Mon, 12 Jan 2009 15:19:53 +0100
parents 64052822e204
children e77c20718de2
files viff/aes.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/aes.py	Sun Jan 11 13:55:47 2009 +0100
+++ b/viff/aes.py	Mon Jan 12 15:19:53 2009 +0100
@@ -166,7 +166,7 @@
         State should be a list of 4 rows and round_key a list of
         4-byte columns (words)."""
 
-        assert len(round_key) == self.n_k, "Wrong key size."
+        assert len(round_key) == self.n_b, "Wrong key size."
         assert len(round_key[0]) == 4, "Key must consist of 4-byte words."
 
         state[:] = (Matrix(state) + Matrix(zip(*round_key))).rows