Browse Source

added libtomcrypt-1.11

Tom St Denis 19 years ago
parent
commit
64d7ebe166
100 changed files with 403 additions and 138 deletions
  1. 1 1
      Doxyfile
  2. 3 0
      TODO
  3. 4 4
      build.sh
  4. 25 2
      changes
  5. 18 9
      crypt.tex
  6. 2 0
      demos/test.c
  7. 2 0
      demos/timing.c
  8. 72 4
      demos/tv_gen.c
  9. BIN
      doc/crypt.pdf
  10. 3 3
      doc/footer.html
  11. 8 8
      makefile
  12. 9 4
      makefile.icc
  13. 4 4
      makefile.msvc
  14. 14 10
      makefile.shared
  15. 124 0
      notes/lrw_tv.txt
  16. 1 1
      src/ciphers/aes/aes.c
  17. 5 1
      src/ciphers/aes/aes_tab.c
  18. 1 1
      src/ciphers/anubis.c
  19. 1 1
      src/ciphers/blowfish.c
  20. 1 1
      src/ciphers/cast5.c
  21. 1 1
      src/ciphers/des.c
  22. 1 1
      src/ciphers/khazad.c
  23. 1 1
      src/ciphers/noekeon.c
  24. 1 1
      src/ciphers/rc2.c
  25. 1 1
      src/ciphers/rc5.c
  26. 1 1
      src/ciphers/rc6.c
  27. 1 1
      src/ciphers/safer/safer.c
  28. 1 1
      src/ciphers/safer/safer_tab.c
  29. 1 1
      src/ciphers/safer/saferp.c
  30. 1 1
      src/ciphers/skipjack.c
  31. 1 1
      src/ciphers/twofish/twofish.c
  32. 1 1
      src/ciphers/twofish/twofish_tab.c
  33. 1 1
      src/ciphers/xtea.c
  34. 1 1
      src/encauth/ccm/ccm_memory.c
  35. 1 1
      src/encauth/ccm/ccm_test.c
  36. 1 1
      src/encauth/eax/eax_addheader.c
  37. 1 1
      src/encauth/eax/eax_decrypt.c
  38. 1 1
      src/encauth/eax/eax_decrypt_verify_memory.c
  39. 1 1
      src/encauth/eax/eax_done.c
  40. 1 1
      src/encauth/eax/eax_encrypt.c
  41. 1 1
      src/encauth/eax/eax_encrypt_authenticate_memory.c
  42. 1 1
      src/encauth/eax/eax_init.c
  43. 1 1
      src/encauth/eax/eax_test.c
  44. 1 1
      src/encauth/gcm/gcm_add_aad.c
  45. 1 1
      src/encauth/gcm/gcm_add_iv.c
  46. 1 1
      src/encauth/gcm/gcm_done.c
  47. 1 1
      src/encauth/gcm/gcm_gf_mult.c
  48. 1 1
      src/encauth/gcm/gcm_init.c
  49. 1 1
      src/encauth/gcm/gcm_memory.c
  50. 1 1
      src/encauth/gcm/gcm_mult_h.c
  51. 1 1
      src/encauth/gcm/gcm_process.c
  52. 1 1
      src/encauth/gcm/gcm_reset.c
  53. 1 1
      src/encauth/gcm/gcm_test.c
  54. 1 1
      src/encauth/ocb/ocb_decrypt.c
  55. 1 1
      src/encauth/ocb/ocb_decrypt_verify_memory.c
  56. 1 1
      src/encauth/ocb/ocb_done_decrypt.c
  57. 1 1
      src/encauth/ocb/ocb_done_encrypt.c
  58. 1 1
      src/encauth/ocb/ocb_encrypt.c
  59. 1 1
      src/encauth/ocb/ocb_encrypt_authenticate_memory.c
  60. 1 1
      src/encauth/ocb/ocb_init.c
  61. 1 1
      src/encauth/ocb/ocb_ntz.c
  62. 1 1
      src/encauth/ocb/ocb_shift_xor.c
  63. 1 1
      src/encauth/ocb/ocb_test.c
  64. 1 1
      src/encauth/ocb/s_ocb_done.c
  65. 1 1
      src/hashes/chc/chc.c
  66. 1 1
      src/hashes/helper/hash_file.c
  67. 1 1
      src/hashes/helper/hash_filehandle.c
  68. 1 1
      src/hashes/helper/hash_memory.c
  69. 1 1
      src/hashes/helper/hash_memory_multi.c
  70. 1 1
      src/hashes/md2.c
  71. 1 1
      src/hashes/md4.c
  72. 1 1
      src/hashes/md5.c
  73. 1 1
      src/hashes/rmd128.c
  74. 1 1
      src/hashes/rmd160.c
  75. 1 1
      src/hashes/sha1.c
  76. 1 1
      src/hashes/sha2/sha224.c
  77. 1 1
      src/hashes/sha2/sha256.c
  78. 1 1
      src/hashes/sha2/sha384.c
  79. 1 1
      src/hashes/sha2/sha512.c
  80. 1 1
      src/hashes/tiger.c
  81. 1 1
      src/hashes/whirl/whirl.c
  82. 2 2
      src/headers/tomcrypt.h
  83. 4 4
      src/headers/tomcrypt_cfg.h
  84. 1 0
      src/headers/tomcrypt_cipher.h
  85. 5 1
      src/headers/tomcrypt_custom.h
  86. 3 3
      src/headers/tomcrypt_macros.h
  87. 15 1
      src/headers/tomcrypt_math.h
  88. 2 0
      src/headers/tomcrypt_pk.h
  89. 1 1
      src/mac/hmac/hmac_done.c
  90. 1 1
      src/mac/hmac/hmac_file.c
  91. 1 1
      src/mac/hmac/hmac_init.c
  92. 1 1
      src/mac/hmac/hmac_memory.c
  93. 1 1
      src/mac/hmac/hmac_memory_multi.c
  94. 1 1
      src/mac/hmac/hmac_process.c
  95. 1 1
      src/mac/hmac/hmac_test.c
  96. 1 1
      src/mac/omac/omac_done.c
  97. 1 1
      src/mac/omac/omac_file.c
  98. 1 1
      src/mac/omac/omac_init.c
  99. 1 1
      src/mac/omac/omac_memory.c
  100. 1 1
      src/mac/omac/omac_memory_multi.c

+ 1 - 1
Doxyfile

@@ -23,7 +23,7 @@ PROJECT_NAME           = LibTomCrypt
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.10
+PROJECT_NUMBER         = 1.11
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 

+ 3 - 0
TODO

@@ -0,0 +1,3 @@
+- ECC fixed point accelerator
+- look into X9.63 support [in addition to the LTC style ecc_encrypt_key() not replacing]
+

+ 4 - 4
build.sh

@@ -2,12 +2,12 @@
 echo "$1 ($2, $3)..."
 make clean 1>/dev/null 2>/dev/null
 echo -n "building..."
-CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j3 -f $3 test tv_gen 1>gcc_1.txt 2>gcc_2.txt || (echo "build $1 failed see gcc_2.txt for more information" && cat gcc_2.txt && exit 1)
+CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" make -j4 -f $3 test tv_gen 1>gcc_1.txt 2>gcc_2.txt || (echo "build $1 failed see gcc_2.txt for more information" && cat gcc_2.txt && exit 1)
 echo -n "testing..."
 if [ -a test ] && [ -f test ] && [ -x test ]; then
    ((./test >test_std.txt 2>test_err.txt && ./tv_gen > tv.txt) && echo "$1 test passed." && echo "y" > testok.txt) || (echo "$1 test failed" && cat test_err.txt && exit 1)
    if find *_tv.txt -type f 1>/dev/null 2>/dev/null ; then
-      for f in *_tv.txt; do if (diff $f notes/$f) then true; else (echo "tv_gen $f failed" && rm -f testok.txt && exit 1); fi; done
+      for f in *_tv.txt; do if (diff --ignore-case $f notes/$f) then true; else (echo "tv_gen $f failed" && rm -f testok.txt && exit 1); fi; done
    fi
 fi
 if [ -a testok.txt ] && [ -f testok.txt ]; then
@@ -16,5 +16,5 @@ fi
 exit 1
 
 # $Source: /cvs/libtom/libtomcrypt/build.sh,v $   
-# $Revision: 1.7 $   
-# $Date: 2005/07/23 14:18:31 $ 
+# $Revision: 1.9 $   
+# $Date: 2006/03/18 14:10:55 $ 

+ 25 - 2
changes

@@ -1,3 +1,26 @@
+April 4th, 2006
+v1.11 -- Removed printf's from lrw_test ... whoops
+      -- lrw_process now checks the return of the cipher ecb encrypt/decrypt calls
+      -- lrw_start was not using num_rounds ...
+      -- Adam Miller reported a bug in the flexi decoder with elements past the end of a sequence.  Fixed.
+      -- Bruce Guenter suggested I use --tag=CC for libtool builds where the compiler may think it's C++.  (I applied this to LTM and TFM)
+      -- Optimized the ECC for TFM a bit by removing the useless "if" statements (most TFM functions don't return error codes)
+         Actually shaved a good chunk of time off and made the code smaller.  By default with TFM the stock LTC point add/dbl functions 
+         will be totally omitted (ECC-256 make key times on a Prescott for old vs. new are 11.03M vs. 9.59M cycles)
+      -- added missing CVS tags to ltc_ecc_mulmod.c
+      -- corrected typo in tomcrypt_cfg.h about what the file has been called 
+      -- corrected my address in the user manual.  A "bit" out of date.
+      -- added lrw_gen to tv_gen
+      -- added GMP plugin, only tested on a AMD64 and x86_32 Gentoo Linux box so be aware
+      -- made testme.sh runs diff case insensitivityly [whatever...] cuz GMP outputs lowercase satan text
+      -- added LDFLAGS to the makefile to allow cross porting linking options
+      -- added lrw_test() to the header file ... whoops
+      -- changed libtomcrypt.org to libtomcrypt.com .... mumble mumble
+      -- Updates to detect __STRICT_ANSI__ which is defined in --std=c99 modes (note -ansi is not supported as it lacks long long) so you can
+         build LTC out of the box with c99 (note: it'll be slower as there is no asm in this case)
+      -- Updated pelican.c and aes_tab.c to undef tables not-required.  The tables are static so both AES and Pelican MAC would have copies.  Save a few KB in the final binary.
+      -- Added LTC_NO_FAST to the makefile.icc to compensate for the fact ICC v9 can't handle it (Pelican MAC fails for instance)
+
 February 11th, 2006
 v1.10 -- Free ecb/cbc/ctr/lrw structures in timing code by calling the "done" function
       -- fixed bug in lrw_process() which would always use the slow update ...
@@ -1413,6 +1436,6 @@ v0.02  -- Changed RC5 to only allow 12 to 24 rounds
 v0.01  -- We will call this the first version.
 
 /* $Source: /cvs/libtom/libtomcrypt/changes,v $ */
-/* $Revision: 1.173 $ */
-/* $Date: 2006/02/11 09:18:11 $ */
+/* $Revision: 1.194 $ */
+/* $Date: 2006/04/05 02:51:41 $ */
 

+ 18 - 9
crypt.tex

@@ -47,11 +47,11 @@
 \def\gap{\vspace{0.5ex}}
 \makeindex
 \begin{document}
-\title{LibTomCrypt \\ Version 1.10}
+\title{LibTomCrypt \\ Version 1.11}
 \author{Tom St Denis \\
 \\
 [email protected] \\
-http://libtomcrypt.org
+http://libtomcrypt.com
 }
 \maketitle
 This text and source code library are both hereby placed in the public domain.  This book has been 
@@ -65,15 +65,15 @@ formatted for A4 paper using the \LaTeX{} {\em book} macro package.
 
 Tom St Denis,
 
-Phone: 1-613-836-3160
+Phone: (647)401-8220
 
-111 Banning Rd 
+3330 South Millway, Unit 20
 
-Kanata, Ontario 
+Mississauga, Ontario
 
-K2L 1C3 
+L5L 3H4
 
-Canada
+Canada   
 \end{flushright}
 \newpage
 \tableofcontents
@@ -5056,6 +5056,15 @@ typedef struct {
    */
    int (*ecc_ptadd)(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp);
 
+   /** ECC GF(p) point double 
+       @param P    The first point
+       @param R    The destination of 2P
+       @param modulus  The modulus
+       @param mp   The "b" value from montgomery_setup()
+       @return CRYPT_OK on success
+   */
+   int (*ecc_ptdbl)(ecc_point *P, ecc_point *R, void *modulus, void *mp);
+
    /** ECC mapping from projective to affine, currently uses (x,y,z) => (x/z^2, y/z^3, 1)
        @param P     The point to map
        @param modulus The modulus
@@ -5181,5 +5190,5 @@ Since the function is given the entire RSA key (for private keys only) CRT is po
 \end{document}
 
 % $Source: /cvs/libtom/libtomcrypt/crypt.tex,v $   
-% $Revision: 1.63 $   
-% $Date: 2006/01/26 19:20:46 $ 
+% $Revision: 1.67 $   
+% $Date: 2006/03/31 14:16:09 $ 

+ 2 - 0
demos/test.c

@@ -9,6 +9,8 @@ int main(void)
    ltc_mp = ltm_desc;
 #elif defined(USE_TFM)
    ltc_mp = tfm_desc;
+#elif defined(USE_GMP)
+   ltc_mp = gmp_desc;
 #else
    extern ltc_math_descriptor EXT_MATH_LIB;
    ltc_mp = EXT_MATH_LIB;

+ 2 - 0
demos/timing.c

@@ -10,6 +10,8 @@ reg_algs();
    ltc_mp = ltm_desc;
 #elif defined(USE_TFM)
    ltc_mp = tfm_desc;
+#elif defined(USE_GMP)
+   ltc_mp = gmp_desc;
 #else
    extern ltc_math_descriptor EXT_MATH_LIB;
    ltc_mp = EXT_MATH_LIB;

+ 72 - 4
demos/tv_gen.c

@@ -102,6 +102,8 @@ void reg_algs(void)
    ltc_mp = ltm_desc;
 #elif defined(USE_TFM)
    ltc_mp = tfm_desc;
+#elif defined(USE_GMP)
+   ltc_mp = gmp_desc;
 #else
    extern ltc_math_descriptor EXT_MATH_LIB;
    ltc_mp = EXT_MATH_LIB;
@@ -675,10 +677,10 @@ void ecc_gen(void)
         fprintf(out, "ECC-%d\n", ltc_ecc_sets[x].size*8);
         mp_set(k, 1);
 
-        mp_read_radix(order,   (char *)ltc_ecc_sets[x].order, 64);
-        mp_read_radix(modulus, (char *)ltc_ecc_sets[x].prime, 64);
-        mp_read_radix(G->x,    (char *)ltc_ecc_sets[x].Gx,    64);
-        mp_read_radix(G->y,    (char *)ltc_ecc_sets[x].Gy,    64);
+        mp_read_radix(order,   (char *)ltc_ecc_sets[x].order, 16);
+        mp_read_radix(modulus, (char *)ltc_ecc_sets[x].prime, 16);
+        mp_read_radix(G->x,    (char *)ltc_ecc_sets[x].Gx,    16);
+        mp_read_radix(G->y,    (char *)ltc_ecc_sets[x].Gy,    16);
         mp_set(G->z, 1);  
 
         while (mp_cmp(k, order) == LTC_MP_LT) {
@@ -695,6 +697,71 @@ void ecc_gen(void)
    fclose(out);
 }
 
+void lrw_gen(void)
+{
+   FILE *out;
+   unsigned char tweak[16], key[16], iv[16], buf[1024];
+   int x, y, err;
+   symmetric_LRW lrw;
+   
+   /* initialize default key and tweak */
+   for (x = 0; x < 16; x++) {
+      tweak[x] = key[x] = iv[x] = x;
+   }
+
+   out = fopen("lrw_tv.txt", "w");
+   for (x = 16; x < (int)(sizeof(buf)); x += 16) {
+       if ((err = lrw_start(find_cipher("aes"), iv, key, 16, tweak, 0, &lrw)) != CRYPT_OK) {
+          fprintf(stderr, "Error starting LRW-AES: %s\n", error_to_string(err));
+          exit(EXIT_FAILURE);
+       }
+
+       /* encrypt incremental */
+       for (y = 0; y < x; y++) {
+           buf[y] = y & 255;
+       }
+
+       if ((err = lrw_encrypt(buf, buf, x, &lrw)) != CRYPT_OK) {
+          fprintf(stderr, "Error encrypting with LRW-AES: %s\n", error_to_string(err));
+          exit(EXIT_FAILURE);
+       }
+
+       /* display it */
+       fprintf(out, "%d:", x);
+       for (y = 0; y < x; y++) {
+          fprintf(out, "%02x", buf[y]);
+       }
+       fprintf(out, "\n");
+
+       /* reset IV */
+       if ((err = lrw_setiv(iv, 16, &lrw)) != CRYPT_OK) {
+          fprintf(stderr, "Error setting IV: %s\n", error_to_string(err));
+          exit(EXIT_FAILURE);
+       }
+
+       /* copy new tweak, iv and key */
+       for (y = 0; y < 16; y++) {
+          key[y]   = buf[y];
+          iv[y]    = buf[(y+16)%x];
+          tweak[y] = buf[(y+32)%x];
+       }
+
+       if ((err = lrw_decrypt(buf, buf, x, &lrw)) != CRYPT_OK) {
+          fprintf(stderr, "Error decrypting with LRW-AES: %s\n", error_to_string(err));
+          exit(EXIT_FAILURE);
+       }
+
+       /* display it */
+       fprintf(out, "%d:", x);
+       for (y = 0; y < x; y++) {
+          fprintf(out, "%02x", buf[y]);
+       }
+       fprintf(out, "\n");
+       lrw_done(&lrw);
+   }
+   fclose(out);
+}      
+
 int main(void)
 {
    reg_algs();
@@ -710,6 +777,7 @@ int main(void)
    printf("Generating BASE64 vectors..."); fflush(stdout); base64_gen(); printf("done\n");
    printf("Generating MATH   vectors..."); fflush(stdout); math_gen();   printf("done\n");
    printf("Generating ECC    vectors..."); fflush(stdout); ecc_gen();    printf("done\n");
+   printf("Generating LRW    vectors..."); fflush(stdout); lrw_gen();    printf("done\n");
    return 0;
 }
 

BIN
doc/crypt.pdf


+ 3 - 3
doc/footer.html

@@ -1,10 +1,10 @@
 <hr width="80%">
-Code by <a href="http://www.libtomcrypt.org/">Tom</a><br>
+Code by <a href="http://www.libtomcrypt.com/">Tom</a><br>
 Docs using <img src="doxygen.png" alt="doxygen" align="middle" border=0>
 <a href="http://jlcooke.ca/tom/hidden_image.png">
 
 <!--
 /* $Source: /cvs/libtom/libtomcrypt/doc/footer.html,v $ */
-/* $Revision: 1.3 $ */
-/* $Date: 2005/05/07 10:09:20 $ */
+/* $Revision: 1.4 $ */
+/* $Date: 2006/03/31 14:15:34 $ */
 -->

+ 8 - 8
makefile

@@ -4,7 +4,7 @@
 # Modified by Clay Culver
 
 # The version
-VERSION=1.10
+VERSION=1.11
 
 # Compiler and Linker Names
 #CC=gcc
@@ -128,8 +128,8 @@ src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_t
 src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \
 src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \
 src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \
-src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/ltm_desc.o src/math/multi.o \
-src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
+src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/gmp_desc.o src/math/ltm_desc.o \
+src/math/multi.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
 src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt.o \
 src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
 src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_find_cipher.o \
@@ -257,16 +257,16 @@ small: library $(SMALLOBJECTS)
 	$(CC) $(SMALLOBJECTS) $(LIBNAME) $(EXTRALIBS) -o $(SMALL) $(WARN)
 	
 tv_gen: library $(TVS)
-	$(CC) $(TVS) $(LIBNAME) $(EXTRALIBS) -o $(TV)
+	$(CC) $(LDFLAGS) $(TVS) $(LIBNAME) $(EXTRALIBS) -o $(TV)
 
 multi: library $(MULTIS)
 	$(CC) $(MULTIS) $(LIBNAME) $(EXTRALIBS) -o $(MULTI)
 
 timing: library testprof/$(LIBTEST) $(TIMINGS)
-	$(CC) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
+	$(CC) $(LDFLAGS) $(TIMINGS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING)
 
 test: library testprof/$(LIBTEST) $(TESTS)
-	$(CC) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
+	$(CC) $(LDFLAGS) $(TESTS) testprof/$(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TEST)
 
 #This rule installs the library and the header files. This must be run
 #as root in order to have a high enough permission to write to the correct
@@ -364,5 +364,5 @@ zipup: no_oops docs
 
 
 # $Source: /cvs/libtom/libtomcrypt/makefile,v $ 
-# $Revision: 1.116 $ 
-# $Date: 2006/01/29 15:53:38 $ 
+# $Revision: 1.119 $ 
+# $Date: 2006/03/22 20:48:57 $ 

+ 9 - 4
makefile.icc

@@ -24,6 +24,11 @@ CC=icc
 # Compilation flags. Note the += does not write over the user's CFLAGS!
 CFLAGS += -c -Isrc/headers/ -Itestprof/ -DINTEL_CC -DLTC_SOURCE
 
+#ICC v9 doesn't support LTC_FAST for things like Pelican MAC
+#Despite the fact I can't see what's wrong with my code
+#Oh well
+CFLAGS += -DLTC_NO_FAST
+
 #The default rule for make builds the libtomcrypt library.
 default:library
 
@@ -115,8 +120,8 @@ src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_t
 src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \
 src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \
 src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \
-src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/ltm_desc.o src/math/multi.o \
-src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
+src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/gmp_desc.o src/math/ltm_desc.o \
+src/math/multi.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
 src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt.o \
 src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
 src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_find_cipher.o \
@@ -269,6 +274,6 @@ install: library
 	install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
 
 # $Source: /cvs/libtom/libtomcrypt/makefile.icc,v $   
-# $Revision: 1.50 $   
-# $Date: 2006/01/29 15:53:38 $ 
+# $Revision: 1.53 $   
+# $Date: 2006/04/02 13:23:20 $ 
 

+ 4 - 4
makefile.msvc

@@ -30,8 +30,8 @@ src/mac/omac/omac_memory_multi.obj src/mac/omac/omac_process.obj src/mac/omac/om
 src/mac/pelican/pelican.obj src/mac/pelican/pelican_memory.obj src/mac/pelican/pelican_test.obj \
 src/mac/pmac/pmac_done.obj src/mac/pmac/pmac_file.obj src/mac/pmac/pmac_init.obj src/mac/pmac/pmac_memory.obj \
 src/mac/pmac/pmac_memory_multi.obj src/mac/pmac/pmac_ntz.obj src/mac/pmac/pmac_process.obj \
-src/mac/pmac/pmac_shift_xor.obj src/mac/pmac/pmac_test.obj src/math/ltm_desc.obj src/math/multi.obj \
-src/math/rand_prime.obj src/math/tfm_desc.obj src/misc/base64/base64_decode.obj \
+src/mac/pmac/pmac_shift_xor.obj src/mac/pmac/pmac_test.obj src/math/gmp_desc.obj src/math/ltm_desc.obj \
+src/math/multi.obj src/math/rand_prime.obj src/math/tfm_desc.obj src/misc/base64/base64_decode.obj \
 src/misc/base64/base64_encode.obj src/misc/burn_stack.obj src/misc/crypt/crypt.obj \
 src/misc/crypt/crypt_argchk.obj src/misc/crypt/crypt_cipher_descriptor.obj \
 src/misc/crypt/crypt_cipher_is_valid.obj src/misc/crypt/crypt_find_cipher.obj \
@@ -132,5 +132,5 @@ timing: demos/timing.c library
 	cl $(CFLAGS) demos/timing.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib $(EXTRALIBS)
 
 # $Source: /cvs/libtom/libtomcrypt/makefile.msvc,v $   
-# $Revision: 1.30 $   
-# $Date: 2006/01/29 15:53:38 $ 
+# $Revision: 1.31 $   
+# $Date: 2006/03/18 03:48:32 $ 

+ 14 - 10
makefile.shared

@@ -6,10 +6,10 @@
 # Tom St Denis
 
 # The version
-VERSION=0:110
+VERSION=0:111
 
 # Compiler and Linker Names
-CC=libtool --mode=compile gcc 
+CC=libtool --mode=compile --tag=CC gcc 
 
 # ranlib tools
 ifndef RANLIB
@@ -20,8 +20,11 @@ endif
 CFLAGS += -c -I./src/headers/ -Wall -Wsign-compare -W -Wshadow -DLTC_SOURCE
 
 # additional warnings (newer GCC 3.4 and higher)
-#CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \
-#			 -Wmissing-declarations -Wpointer-arith 
+ifdef GCC_34
+CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wmissing-prototypes \
+			 -Wmissing-declarations -Wpointer-arith 
+endif
+
 
 ifndef IGNORE_SPEED
 
@@ -122,8 +125,8 @@ src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_t
 src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \
 src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \
 src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \
-src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/ltm_desc.o src/math/multi.o \
-src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
+src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/math/gmp_desc.o src/math/ltm_desc.o \
+src/math/multi.o src/math/rand_prime.o src/math/tfm_desc.o src/misc/base64/base64_decode.o \
 src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt.o \
 src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \
 src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_find_cipher.o \
@@ -233,8 +236,9 @@ $(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
 	libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
 
 install: $(LIBNAME)
-	cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) make -f makefile.shared install
-	libtool --silent --mode=install install -c libtomcrypt.la $(LIBPATH)/libtomcrypt.la
+	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+	cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
+	libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
 	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
 	install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
 
@@ -258,5 +262,5 @@ timing: library testprof/$(LIBTEST) $(TIMINGS)
 	gcc -o $(TIMING) $(TIMINGS) -ltomcrypt_prof -ltomcrypt $(EXTRALIBS)
 
 # $Source: /cvs/libtom/libtomcrypt/makefile.shared,v $   
-# $Revision: 1.45 $   
-# $Date: 2006/01/29 15:53:38 $ 
+# $Revision: 1.51 $   
+# $Date: 2006/03/31 05:46:53 $ 

File diff suppressed because it is too large
+ 124 - 0
notes/lrw_tv.txt


+ 1 - 1
src/ciphers/aes/aes.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /* AES implementation by Tom St Denis

+ 5 - 1
src/ciphers/aes/aes_tab.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /* The precomputed tables for AES */
 /*
@@ -94,6 +94,7 @@ static const ulong32 TE0[256] = {
     0x7bb0b0cbUL, 0xa85454fcUL, 0x6dbbbbd6UL, 0x2c16163aUL,
 };
 
+#ifndef PELI_TAB
 static const ulong32 Te4[256] = {
     0x63636363UL, 0x7c7c7c7cUL, 0x77777777UL, 0x7b7b7b7bUL,
     0xf2f2f2f2UL, 0x6b6b6b6bUL, 0x6f6f6f6fUL, 0xc5c5c5c5UL,
@@ -160,6 +161,7 @@ static const ulong32 Te4[256] = {
     0x41414141UL, 0x99999999UL, 0x2d2d2d2dUL, 0x0f0f0f0fUL,
     0xb0b0b0b0UL, 0x54545454UL, 0xbbbbbbbbUL, 0x16161616UL,
 };
+#endif
 
 #ifndef ENCRYPT_ONLY
 
@@ -528,6 +530,7 @@ static const ulong32 TE3[256] = {
     0xb0b0cb7bUL, 0x5454fca8UL, 0xbbbbd66dUL, 0x16163a2cUL,
 };
 
+#ifndef PELI_TAB
 static const ulong32 Te4_0[] = {
 0x00000063UL, 0x0000007cUL, 0x00000077UL, 0x0000007bUL, 0x000000f2UL, 0x0000006bUL, 0x0000006fUL, 0x000000c5UL, 
 0x00000030UL, 0x00000001UL, 0x00000067UL, 0x0000002bUL, 0x000000feUL, 0x000000d7UL, 0x000000abUL, 0x00000076UL, 
@@ -667,6 +670,7 @@ static const ulong32 Te4_3[] = {
 0x8c000000UL, 0xa1000000UL, 0x89000000UL, 0x0d000000UL, 0xbf000000UL, 0xe6000000UL, 0x42000000UL, 0x68000000UL, 
 0x41000000UL, 0x99000000UL, 0x2d000000UL, 0x0f000000UL, 0xb0000000UL, 0x54000000UL, 0xbb000000UL, 0x16000000UL
 };
+#endif /* pelimac */
 
 #ifndef ENCRYPT_ONLY
 

+ 1 - 1
src/ciphers/anubis.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/ciphers/blowfish.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /**
   @file blowfish.c

+ 1 - 1
src/ciphers/cast5.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
  
  /** 

+ 1 - 1
src/ciphers/des.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/ciphers/khazad.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/ciphers/noekeon.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /**
    @file noekeon.c

+ 1 - 1
src/ciphers/rc2.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /**********************************************************************\
 * To commemorate the 1996 RSA Data Security Conference, the following  *

+ 1 - 1
src/ciphers/rc5.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/ciphers/rc6.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/ciphers/safer/safer.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /*******************************************************************************

+ 1 - 1
src/ciphers/safer/safer_tab.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/ciphers/safer/saferp.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/ciphers/skipjack.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/ciphers/twofish/twofish.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
  /** 

+ 1 - 1
src/ciphers/twofish/twofish_tab.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
  /**

+ 1 - 1
src/ciphers/xtea.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/ccm/ccm_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/encauth/ccm/ccm_test.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/encauth/eax/eax_addheader.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /** 
     @file eax_addheader.c

+ 1 - 1
src/encauth/eax/eax_decrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/eax/eax_decrypt_verify_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/eax/eax_done.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/eax/eax_encrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/eax/eax_encrypt_authenticate_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/eax/eax_init.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/eax/eax_test.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/gcm/gcm_add_aad.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_add_iv.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_done.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_gf_mult.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_init.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_mult_h.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_process.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_reset.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/gcm/gcm_test.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/ocb/ocb_decrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/ocb/ocb_decrypt_verify_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_done_decrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_done_encrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_encrypt.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_encrypt_authenticate_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_init.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/ocb/ocb_ntz.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /**

+ 1 - 1
src/encauth/ocb/ocb_shift_xor.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/ocb_test.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/encauth/ocb/s_ocb_done.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 1 - 1
src/hashes/chc/chc.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 #include "tomcrypt.h"

+ 1 - 1
src/hashes/helper/hash_file.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/helper/hash_filehandle.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/helper/hash_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/helper/hash_memory_multi.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 #include <stdarg.h>

+ 1 - 1
src/hashes/md2.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/md4.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/md5.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/rmd128.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/rmd160.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/sha1.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/sha2/sha224.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /**
    @param sha224.c

+ 1 - 1
src/hashes/sha2/sha256.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/sha2/sha384.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 /** 
    @param sha384.c

+ 1 - 1
src/hashes/sha2/sha512.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/hashes/tiger.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 #include "tomcrypt.h"

+ 1 - 1
src/hashes/whirl/whirl.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 
 /** 

+ 2 - 2
src/headers/tomcrypt.h

@@ -16,8 +16,8 @@ extern "C" {
 #endif
 
 /* version */
-#define CRYPT   0x0110
-#define SCRYPT  "1.10"
+#define CRYPT   0x0111
+#define SCRYPT  "1.11"
 
 /* max size of either a cipher/hash block or symmetric key [largest of the two] */
 #define MAXBLOCKSIZE  128

+ 4 - 4
src/headers/tomcrypt_cfg.h

@@ -37,7 +37,7 @@ void *XMEMSET(void *s, int c, size_t n);
  */
 
 /* detect x86-32 machines somewhat */
-#if defined(INTEL_CC) || (defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__)))
+#if !defined(__STRICT_ANSI__) && (defined(INTEL_CC) || (defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__))))
    #define ENDIAN_LITTLE
    #define ENDIAN_32BITWORD
    #define LTC_FAST
@@ -51,7 +51,7 @@ void *XMEMSET(void *s, int c, size_t n);
 #endif
 
 /* detect amd64 */
-#if defined(__x86_64__)
+#if !defined(__STRICT_ANSI__) && defined(__x86_64__)
    #define ENDIAN_LITTLE
    #define ENDIAN_64BITWORD
    #define LTC_FAST
@@ -59,7 +59,7 @@ void *XMEMSET(void *s, int c, size_t n);
 #endif
 
 /* detect PPC32 */
-#if defined(LTC_PPC32)
+#if !defined(__STRICT_ANSI__) && defined(LTC_PPC32)
    #define ENDIAN_BIG
    #define ENDIAN_32BITWORD
    #define LTC_FAST
@@ -102,7 +102,7 @@ void *XMEMSET(void *s, int c, size_t n);
 /* #define ENDIAN_64BITWORD */
 
 #if (defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE)) && !(defined(ENDIAN_32BITWORD) || defined(ENDIAN_64BITWORD))
-    #error You must specify a word size as well as endianess in mycrypt_cfg.h
+    #error You must specify a word size as well as endianess in tomcrypt_cfg.h
 #endif
 
 #if !(defined(ENDIAN_BIG) || defined(ENDIAN_LITTLE))

+ 1 - 0
src/headers/tomcrypt_cipher.h

@@ -702,6 +702,7 @@ int lrw_decrypt(const unsigned char *ct, unsigned char *pt, unsigned long len, s
 int lrw_getiv(unsigned char *IV, unsigned long *len, symmetric_LRW *lrw);
 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw);
 int lrw_done(symmetric_LRW *lrw);
+int lrw_test(void);
 
 /* don't call */
 int lrw_process(const unsigned char *pt, unsigned char *ct, unsigned long len, int mode, symmetric_LRW *lrw);

+ 5 - 1
src/headers/tomcrypt_custom.h

@@ -257,7 +257,7 @@
 #define MRSA
 
 /* Include Katja (a Rabin variant like RSA) */
-// #define MKAT 
+/* #define MKAT */ 
 
 /* Digital Signature Algorithm */
 #define MDSA
@@ -265,6 +265,10 @@
 /* ECC */
 #define MECC
 
+#if defined(TFM_DESC) && defined(MECC)
+   #define MECC_ACCEL
+#endif   
+
 /* Timing Resistant? */
 /* #define LTC_ECC_TIMING_RESISTANT */
 

+ 3 - 3
src/headers/tomcrypt_macros.h

@@ -242,7 +242,7 @@ asm __volatile__ (             \
 #define RORc(x,n) _lrotr(x,n)
 #define ROLc(x,n) _lrotl(x,n)
 
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM)
+#elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM)
 
 static inline unsigned ROL(unsigned word, int i)
 {
@@ -285,7 +285,7 @@ static inline unsigned RORc(unsigned word, const int i)
 
 #endif
 
-#elif defined(LTC_PPC32)
+#elif !defined(__STRICT_ANSI__) && defined(LTC_PPC32)
 
 static inline unsigned ROL(unsigned word, int i)
 {
@@ -341,7 +341,7 @@ static inline unsigned RORc(unsigned word, const int i)
 
 
 /* 64-bit Rotates */
-#if defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
+#if !defined(__STRICT_ANSI__) && defined(__GNUC__) && defined(__x86_64__) && !defined(LTC_NO_ASM)
 
 static inline unsigned long ROL64(unsigned long word, int i)
 {

+ 15 - 1
src/headers/tomcrypt_math.h

@@ -339,12 +339,22 @@ typedef struct {
    */
    int (*ecc_ptadd)(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp);
 
+   /** ECC GF(p) point double 
+       @param P    The first point
+       @param R    The destination of 2P
+       @param modulus  The modulus
+       @param mp   The "b" value from montgomery_setup()
+       @return CRYPT_OK on success
+   */
+   int (*ecc_ptdbl)(ecc_point *P, ecc_point *R, void *modulus, void *mp);
+
    /** ECC mapping from projective to affine, currently uses (x,y,z) => (x/z^2, y/z^3, 1)
        @param P     The point to map
        @param modulus The modulus
        @param mp    The "b" value from montgomery_setup()
        @return CRYPT_OK on success
-       @remark  The mapping can be different but keep in mind a ecc_point only has three integers (x,y,z) so if you use a different mapping you have to make it fit.
+       @remark  The mapping can be different but keep in mind a ecc_point only has three 
+                integers (x,y,z) so if you use a different mapping you have to make it fit.
    */
    int (*ecc_map)(ecc_point *P, void *modulus, void *mp);
 
@@ -388,6 +398,10 @@ extern const ltc_math_descriptor ltm_desc;
 extern const ltc_math_descriptor tfm_desc;
 #endif
 
+#ifdef GMP_DESC
+extern const ltc_math_descriptor gmp_desc;
+#endif
+
 #if !defined(DESC_DEF_ONLY) && defined(LTC_SOURCE)
 
 #define MP_DIGIT_BIT                 ltc_mp.bits_per_digit

+ 2 - 0
src/headers/tomcrypt_pk.h

@@ -228,11 +228,13 @@ int        ltc_ecc_is_valid_idx(int n);
 
 
 /* point ops (mp == montgomery digit) */
+#ifndef MECC_ACCEL
 /* R = 2P */
 int ltc_ecc_projective_dbl_point(ecc_point *P, ecc_point *R, void *modulus, void *mp);
 
 /* R = P + Q */
 int ltc_ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R, void *modulus, void *mp);
+#endif
 
 /* R = kG */
 int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map);

+ 1 - 1
src/mac/hmac/hmac_done.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/hmac/hmac_file.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/hmac/hmac_init.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/hmac/hmac_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/hmac/hmac_memory_multi.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 #include <stdarg.h>

+ 1 - 1
src/mac/hmac/hmac_process.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/hmac/hmac_test.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/omac/omac_done.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/omac/omac_file.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/omac/omac_init.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/omac/omac_memory.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 

+ 1 - 1
src/mac/omac/omac_memory_multi.c

@@ -6,7 +6,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, [email protected], http://libtomcrypt.org
+ * Tom St Denis, [email protected], http://libtomcrypt.com
  */
 #include "tomcrypt.h"
 #include <stdarg.h>

Some files were not shown because too many files changed in this diff