summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt')
-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
-rw-r--r--libtomcrypt/src/hashes/helper/hash_file.c1
-rw-r--r--libtomcrypt/src/hashes/helper/hash_filehandle.c1
-rw-r--r--libtomcrypt/src/mac/hmac/hmac_file.c1
-rw-r--r--libtomcrypt/src/misc/crypt/crypt_argchk.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c4
8 files changed, 16 insertions, 5 deletions
diff --git a/libtomcrypt/src/ciphers/aes/aes.c b/libtomcrypt/src/ciphers/aes/aes.c
index 74798e8..55f6333 100644
--- a/libtomcrypt/src/ciphers/aes/aes.c
+++ b/libtomcrypt/src/ciphers/aes/aes.c
@@ -122,9 +122,10 @@ static ulong32 setup_mix2(ulong32 temp)
*/
int SETUP(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
{
- int i, j;
+ int i;
ulong32 temp, *rk;
#ifndef ENCRYPT_ONLY
+ int j;
ulong32 *rrk;
#endif
LTC_ARGCHK(key != NULL);
@@ -148,7 +149,9 @@ 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];
@@ -161,7 +164,9 @@ 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 (;;) {
@@ -182,7 +187,9 @@ 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);
@@ -728,6 +735,7 @@ 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 e505b14..6005e84 100644
--- a/libtomcrypt/src/ciphers/des.c
+++ b/libtomcrypt/src/ciphers/des.c
@@ -1871,6 +1871,7 @@ 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 9e6d0d4..8f81bdd 100644
--- a/libtomcrypt/src/ciphers/twofish/twofish.c
+++ b/libtomcrypt/src/ciphers/twofish/twofish.c
@@ -684,6 +684,7 @@ int twofish_test(void)
*/
void twofish_done(symmetric_key *skey)
{
+ (void)skey;
}
/**
diff --git a/libtomcrypt/src/hashes/helper/hash_file.c b/libtomcrypt/src/hashes/helper/hash_file.c
index a92025c..df31606 100644
--- a/libtomcrypt/src/hashes/helper/hash_file.c
+++ b/libtomcrypt/src/hashes/helper/hash_file.c
@@ -25,6 +25,7 @@
int hash_file(int hash, const char *fname, unsigned char *out, unsigned long *outlen)
{
#ifdef LTC_NO_FILE
+ (void)hash; (void)fname; (void)out; (void)outlen;
return CRYPT_NOP;
#else
FILE *in;
diff --git a/libtomcrypt/src/hashes/helper/hash_filehandle.c b/libtomcrypt/src/hashes/helper/hash_filehandle.c
index be2cbf9..03155ea 100644
--- a/libtomcrypt/src/hashes/helper/hash_filehandle.c
+++ b/libtomcrypt/src/hashes/helper/hash_filehandle.c
@@ -26,6 +26,7 @@
int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outlen)
{
#ifdef LTC_NO_FILE
+ (void)hash; (void)in; (void)out; (void)outlen;
return CRYPT_NOP;
#else
hash_state md;
diff --git a/libtomcrypt/src/mac/hmac/hmac_file.c b/libtomcrypt/src/mac/hmac/hmac_file.c
index b296320..d7c40b1 100644
--- a/libtomcrypt/src/mac/hmac/hmac_file.c
+++ b/libtomcrypt/src/mac/hmac/hmac_file.c
@@ -32,6 +32,7 @@ int hmac_file(int hash, const char *fname,
unsigned char *out, unsigned long *outlen)
{
#ifdef LTC_NO_FILE
+ (void)hash; (void)fname; (void)key; (void)keylen; (void)out; (void)outlen;
return CRYPT_NOP;
#else
hmac_state hmac;
diff --git a/libtomcrypt/src/misc/crypt/crypt_argchk.c b/libtomcrypt/src/misc/crypt/crypt_argchk.c
index c6675ef..a6d2a48 100644
--- a/libtomcrypt/src/misc/crypt/crypt_argchk.c
+++ b/libtomcrypt/src/misc/crypt/crypt_argchk.c
@@ -21,7 +21,7 @@ void crypt_argchk(char *v, char *s, int d)
{
fprintf(stderr, "LTC_ARGCHK '%s' failure on line %d of file %s\n",
v, d, s);
- (void)raise(SIGABRT);
+ abort();
}
#endif
diff --git a/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c b/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c
index b94a50c..8cbcdf3 100644
--- a/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c
+++ b/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c
@@ -40,7 +40,7 @@ int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map)
int i, j, err;
void *mu, *mp;
unsigned long buf;
- int first, bitbuf, bitcpy, bitcnt, mode, digidx;
+ int bitcnt, mode, digidx;
LTC_ARGCHK(k != NULL);
LTC_ARGCHK(G != NULL);
@@ -98,8 +98,6 @@ int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map)
bitcnt = 1;
buf = 0;
digidx = mp_get_digit_count(k) - 1;
- bitcpy = bitbuf = 0;
- first = 1;
/* perform ops */
for (;;) {