viff

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 diff
     1.1 --- a/viff/aes.py	Sun Jan 11 13:55:47 2009 +0100
     1.2 +++ b/viff/aes.py	Mon Jan 12 15:19:53 2009 +0100
     1.3 @@ -166,7 +166,7 @@
     1.4          State should be a list of 4 rows and round_key a list of
     1.5          4-byte columns (words)."""
     1.6  
     1.7 -        assert len(round_key) == self.n_k, "Wrong key size."
     1.8 +        assert len(round_key) == self.n_b, "Wrong key size."
     1.9          assert len(round_key[0]) == 4, "Key must consist of 4-byte words."
    1.10  
    1.11          state[:] = (Matrix(state) + Matrix(zip(*round_key))).rows