aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/noekeon/noekeon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/noekeon/noekeon.cpp')
-rw-r--r--src/block/noekeon/noekeon.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/block/noekeon/noekeon.cpp b/src/block/noekeon/noekeon.cpp
index a24153a29..f9a54482b 100644
--- a/src/block/noekeon/noekeon.cpp
+++ b/src/block/noekeon/noekeon.cpp
@@ -84,16 +84,16 @@ const byte Noekeon::RC[] = {
/*
* Noekeon Encryption
*/
-void Noekeon::encrypt_n(const byte in[], byte out[], u32bit blocks) const
+void Noekeon::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
u32bit A0 = load_be<u32bit>(in, 0);
u32bit A1 = load_be<u32bit>(in, 1);
u32bit A2 = load_be<u32bit>(in, 2);
u32bit A3 = load_be<u32bit>(in, 3);
- for(u32bit j = 0; j != 16; ++j)
+ for(size_t j = 0; j != 16; ++j)
{
A0 ^= RC[j];
theta(A0, A1, A2, A3, &EK[0]);
@@ -122,16 +122,16 @@ void Noekeon::encrypt_n(const byte in[], byte out[], u32bit blocks) const
/*
* Noekeon Encryption
*/
-void Noekeon::decrypt_n(const byte in[], byte out[], u32bit blocks) const
+void Noekeon::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
- for(u32bit i = 0; i != blocks; ++i)
+ for(size_t i = 0; i != blocks; ++i)
{
u32bit A0 = load_be<u32bit>(in, 0);
u32bit A1 = load_be<u32bit>(in, 1);
u32bit A2 = load_be<u32bit>(in, 2);
u32bit A3 = load_be<u32bit>(in, 3);
- for(u32bit j = 16; j != 0; --j)
+ for(size_t j = 16; j != 0; --j)
{
theta(A0, A1, A2, A3, &DK[0]);
A0 ^= RC[j];
@@ -167,7 +167,7 @@ void Noekeon::key_schedule(const byte key[], u32bit)
u32bit A2 = load_be<u32bit>(key, 2);
u32bit A3 = load_be<u32bit>(key, 3);
- for(u32bit j = 0; j != 16; ++j)
+ for(size_t j = 0; j != 16; ++j)
{
A0 ^= RC[j];
theta(A0, A1, A2, A3);