Skip to content

Commit ef20f2e

Browse files
committed
remove unused macros
1 parent 0157bef commit ef20f2e

File tree

6 files changed

+4
-19
lines changed

6 files changed

+4
-19
lines changed

src/ciphers/anubis.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,7 @@ const struct ltc_cipher_descriptor anubis_desc = {
3030
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
3131
};
3232

33-
#define MIN_N 4
3433
#define MAX_N 10
35-
#define MIN_ROUNDS (8 + MIN_N)
36-
#define MAX_ROUNDS (8 + MAX_N)
37-
#define MIN_KEYSIZEB (4*MIN_N)
38-
#define MAX_KEYSIZEB (4*MAX_N)
39-
#define BLOCKSIZE 128
40-
#define BLOCKSIZEB (BLOCKSIZE/8)
41-
4234

4335
/*
4436
* Though Anubis is endianness-neutral, the encryption tables are listed

src/ciphers/khazad.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ const struct ltc_cipher_descriptor khazad_desc = {
3030
};
3131

3232
#define R 8
33-
#define KEYSIZE 128
34-
#define KEYSIZEB (KEYSIZE/8)
35-
#define BLOCKSIZE 64
36-
#define BLOCKSIZEB (BLOCKSIZE/8)
3733

3834
static const ulong64 T0[256] = {
3935
CONST64(0xbad3d268bbb96a01), CONST64(0x54fc4d19e59a66b1), CONST64(0x2f71bc93e26514cd), CONST64(0x749ccdb925871b51),

src/ciphers/twofish/twofish.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ const struct ltc_cipher_descriptor twofish_desc =
3737
};
3838

3939
/* the two polynomials */
40+
#ifndef LTC_TWOFISH_TABLES
4041
#define MDS_POLY 0x169
42+
#endif
43+
#ifndef LTC_TWOFISH_ALL_TABLES
4144
#define RS_POLY 0x14D
45+
#endif
4246

4347
/* The 4x8 RS Linear Transform */
4448
static const unsigned char RS[4][8] = {

src/mac/hmac/hmac_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
#ifdef LTC_HMAC
1717

18-
#define LTC_HMAC_BLOCKSIZE hash_descriptor[hash].blocksize
19-
2018
/*
2119
TEST CASES SOURCE:
2220

src/stream/sober128/sober128_stream.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@
2121

2222
/* don't change these... */
2323
#define N 17
24-
#define FOLD N /* how many iterations of folding to do */
2524
#define INITKONST 0x6996c53a /* value of KONST to use during key loading */
2625
#define KEYP 15 /* where to insert key words */
2726
#define FOLDP 4 /* where to insert non-linear feedback */
2827

29-
#define B(x,i) ((unsigned char)(((x) >> (8*i)) & 0xFF))
30-
3128
static ulong32 BYTE2WORD(const unsigned char *b)
3229
{
3330
ulong32 t;

tests/rsa_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#if defined(LTC_MRSA)
1212

13-
#define RSA_MSGSIZE 78
14-
1513
/* These are test keys [see file test.key] that I use to test my import/export against */
1614
static const unsigned char openssl_private_rsa[] = {
1715
0x30, 0x82, 0x02, 0x5e, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0xcf, 0x9a, 0xde, 0x64, 0x8a,

0 commit comments

Comments
 (0)