summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/ciphers
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/ciphers')
-rw-r--r--libtomcrypt/src/ciphers/aes/aes.c10
-rw-r--r--libtomcrypt/src/ciphers/des.c1
-rw-r--r--libtomcrypt/src/ciphers/twofish/twofish.c1
3 files changed, 1 insertions, 11 deletions
diff --git a/libtomcrypt/src/ciphers/aes/aes.c b/libtomcrypt/src/ciphers/aes/aes.c
index 55f6333..74798e8 100644
--- a/libtomcrypt/src/ciphers/aes/aes.c
+++ b/libtomcrypt/src/ciphers/aes/aes.c
@@ -122,10 +122,9 @@ static ulong32 setup_mix2(ulong32 temp)
*/
int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
{
- int i;
+ int i, j;
ulong32 temp, *rk;
#ifndef ENCRYPT_ONLY
- int j;
ulong32 *rrk;
#endif
LTC_ARGCHK(key != NULL);
@@ -149,9 +148,7 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s
LOAD32H(rk[2], key + 8);
LOAD32H(rk[3], key + 12);
if (keylen == 16) {
- #ifndef ENCRYPT_ONLY
j = 44;
- #endif
for (;;) {
temp = rk[3];
rk[4] = rk[0] ^ setup_mix(temp) ^ rcon[i];
@@ -164,9 +161,7 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s
rk += 4;
}
} else if (keylen == 24) {
- #ifndef ENCRYPT_ONLY
j = 52;
- #endif
LOAD32H(rk[4], key + 16);
LOAD32H(rk[5], key + 20);
for (;;) {
@@ -187,9 +182,7 @@ int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *s
rk += 6;
}
} else if (keylen == 32) {
- #ifndef ENCRYPT_ONLY
j = 60;
- #endif
LOAD32H(rk[4], key + 16);
LOAD32H(rk[5], key + 20);
LOAD32H(rk[6], key + 24);
@@ -735,7 +728,6 @@ int ECB_TEST(void)
*/
void ECB_DONE(symmetric_key *skey)
{
- (void)skey;
}
diff --git a/libtomcrypt/src/ciphers/des.c b/libtomcrypt/src/ciphers/des.c
index 6005e84..e505b14 100644
--- a/libtomcrypt/src/ciphers/des.c
+++ b/libtomcrypt/src/ciphers/des.c
@@ -1871,7 +1871,6 @@ void des_done(symmetric_key *skey)
*/
void des3_done(symmetric_key *skey)
{
- (void)skey;
}
diff --git a/libtomcrypt/src/ciphers/twofish/twofish.c b/libtomcrypt/src/ciphers/twofish/twofish.c
index 8f81bdd..9e6d0d4 100644
--- a/libtomcrypt/src/ciphers/twofish/twofish.c
+++ b/libtomcrypt/src/ciphers/twofish/twofish.c
@@ -684,7 +684,6 @@ int twofish_test(void)
*/
void twofish_done(symmetric_key *skey)
{
- (void)skey;
}
/**