changeset 151:8fc624ea2521 libtomcrypt

Cleaning up various unused bits (des_*, rijndael, MDS for twofish)
author Matt Johnston <matt@ucc.asn.au>
date Mon, 20 Dec 2004 14:25:33 +0000
parents c2b93763dac9
children b4c6e7f276e9
files aes.c des.c twofish.c
diffstat 3 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aes.c	Sun Dec 19 16:23:32 2004 +0000
+++ b/aes.c	Mon Dec 20 14:25:33 2004 +0000
@@ -38,6 +38,7 @@
 #define ECB_TEST rijndael_test
 #define ECB_KS   rijndael_keysize
 
+#if 0
 const struct _cipher_descriptor rijndael_desc =
 {
     "rijndael",
@@ -45,6 +46,7 @@
     16, 32, 16, 10,
     SETUP, ECB_ENC, ECB_DEC, ECB_TEST, ECB_KS
 };
+#endif
 
 const struct _cipher_descriptor aes_desc =
 {
--- a/des.c	Sun Dec 19 16:23:32 2004 +0000
+++ b/des.c	Mon Dec 20 14:25:33 2004 +0000
@@ -16,6 +16,7 @@
 #define EN0 0 
 #define DE1 1
 
+#if 0
 const struct _cipher_descriptor des_desc =
 {
     "des",
@@ -27,6 +28,7 @@
     &des_test,
     &des_keysize
 };
+#endif
 
 const struct _cipher_descriptor des3_desc =
 {
@@ -1510,6 +1512,7 @@
 }
 #endif
 
+#if 0
 int des_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
 {
     _ARGCHK(key != NULL);
@@ -1528,6 +1531,7 @@
 
     return CRYPT_OK;
 }
+#endif
 
 int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
 {
@@ -1553,6 +1557,7 @@
     return CRYPT_OK;
 }
 
+#if 0
 void des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *key)
 {
     ulong32 work[2];
@@ -1578,6 +1583,7 @@
     STORE32H(work[0],pt+0);
     STORE32H(work[1],pt+4);
 }
+#endif
 
 void des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *key)
 {
@@ -1610,6 +1616,7 @@
     STORE32H(work[1],pt+4);
 }
 
+#if 0
 int des_test(void)
 {
  #ifndef LTC_TEST
@@ -1752,6 +1759,7 @@
     return CRYPT_OK;
   #endif
 }
+#endif
 
 int des3_test(void)
 {
@@ -1789,6 +1797,7 @@
  #endif
 }
 
+#if 0
 int des_keysize(int *desired_keysize)
 {
     _ARGCHK(desired_keysize != NULL);
@@ -1798,6 +1807,7 @@
     *desired_keysize = 8;
     return CRYPT_OK;
 }
+#endif
 
 int des3_keysize(int *desired_keysize)
 {
--- a/twofish.c	Sun Dec 19 16:23:32 2004 +0000
+++ b/twofish.c	Mon Dec 20 14:25:33 2004 +0000
@@ -38,12 +38,14 @@
 #define RS_POLY           0x14D
 
 /* The 4x4 MDS Linear Transform */
+#if 0
 static const unsigned char MDS[4][4] = {
     { 0x01, 0xEF, 0x5B, 0x5B },
     { 0x5B, 0xEF, 0xEF, 0x01 },
     { 0xEF, 0x5B, 0x01, 0xEF },
     { 0xEF, 0x01, 0xEF, 0x5B }
 };
+#endif
 
 /* The 4x8 RS Linear Transform */
 static const unsigned char RS[4][8] = {