diff options
Diffstat (limited to 'src/block/square/square.cpp')
-rw-r--r-- | src/block/square/square.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp index bb9132e10..c319dab16 100644 --- a/src/block/square/square.cpp +++ b/src/block/square/square.cpp @@ -160,8 +160,11 @@ void Square::key_schedule(const byte key[], size_t) transform(&XEK[4*i]); } - ME.resize(16); - MD.resize(16); + EK.assign(&XEK[4], &XEK[36]); + DK.assign(&XDK[4], &XDK[36]); + + ME.resize(32); + MD.resize(32); for(size_t i = 0; i != 4; ++i) for(size_t j = 0; j != 4; ++j) @@ -171,9 +174,6 @@ void Square::key_schedule(const byte key[], size_t) MD[4*i+j ] = get_byte(j, XDK[i ]); MD[4*i+j+16] = get_byte(j, XEK[i ]); } - - EK.assign(&XEK[4], &XEK[36]); - DK.assign(&XDK[4], &XDK[36]); } /* @@ -212,10 +212,10 @@ void Square::transform(u32bit round_key[4]) */ void Square::clear() { - zeroise(EK); - zeroise(DK); - zeroise(ME); - zeroise(MD); + EK.clear(); + DK.clear(); + ME.clear(); + MD.clear(); } } |