From d0a534393abf0574747f937e84191256a0328b5a Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Sun, 10 Jan 2016 18:49:13 +0100 Subject: [PATCH 1/2] fix for issue #92 - const is meaningless on cast type --- src/ciphers/camellia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ciphers/camellia.c b/src/ciphers/camellia.c index c152ff7..d17229d 100644 --- a/src/ciphers/camellia.c +++ b/src/ciphers/camellia.c @@ -190,7 +190,7 @@ static ulong64 F(ulong64 x) U = SP1110[(x >> loc(1)) & 0xFF] ^ SP0222[(x >> loc(2)) & 0xFF] ^ SP3033[(x >> loc(3)) & 0xFF] ^ SP4404[(x >> loc(4)) & 0xFF]; D ^= U; - U = D ^ ROR(U, (const int)8); + U = D ^ ROR(U, 8); return ((ulong64)U) | (((ulong64)D) << CONST64(32)); } From af77f1fae91ff8cd24207ebfd592b0bdc4c11e41 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Thu, 14 Jan 2016 22:09:07 +0100 Subject: [PATCH 2/2] RORc instead of ROR --- src/ciphers/camellia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ciphers/camellia.c b/src/ciphers/camellia.c index d17229d..558a585 100644 --- a/src/ciphers/camellia.c +++ b/src/ciphers/camellia.c @@ -190,7 +190,7 @@ static ulong64 F(ulong64 x) U = SP1110[(x >> loc(1)) & 0xFF] ^ SP0222[(x >> loc(2)) & 0xFF] ^ SP3033[(x >> loc(3)) & 0xFF] ^ SP4404[(x >> loc(4)) & 0xFF]; D ^= U; - U = D ^ ROR(U, 8); + U = D ^ RORc(U, 8); return ((ulong64)U) | (((ulong64)D) << CONST64(32)); }