diff libtomcrypt/src/modes/lrw/lrw_start.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children
line wrap: on
line diff
--- a/libtomcrypt/src/modes/lrw/lrw_start.c	Thu Feb 08 23:11:40 2018 +0800
+++ b/libtomcrypt/src/modes/lrw/lrw_start.c	Fri Feb 09 21:44:05 2018 +0800
@@ -5,8 +5,6 @@
  *
  * The library is free for all purposes without any express
  * guarantee it works.
- *
- * Tom St Denis, [email protected], http://libtom.org
  */
 #include "tomcrypt.h"
 
@@ -19,9 +17,9 @@
 
 /**
   Initialize the LRW context
-  @param cipher        The cipher desired, must be a 128-bit block cipher 
+  @param cipher        The cipher desired, must be a 128-bit block cipher
   @param IV            The index value, must be 128-bits
-  @param key           The cipher key 
+  @param key           The cipher key
   @param keylen        The length of the cipher key in octets
   @param tweak         The tweak value (second key), must be 128-bits
   @param num_rounds    The number of rounds for the cipher (0 == default)
@@ -32,19 +30,19 @@
               const unsigned char *IV,
               const unsigned char *key,       int keylen,
               const unsigned char *tweak,
-                             int  num_rounds, 
+                             int  num_rounds,
                    symmetric_LRW *lrw)
 {
    int           err;
-#ifdef LRW_TABLES
+#ifdef LTC_LRW_TABLES
    unsigned char B[16];
    int           x, y, z, t;
 #endif
 
-  LTC_ARGCHK(IV    != NULL);
-  LTC_ARGCHK(key   != NULL);
-  LTC_ARGCHK(tweak != NULL);
-  LTC_ARGCHK(lrw   != NULL);
+   LTC_ARGCHK(IV    != NULL);
+   LTC_ARGCHK(key   != NULL);
+   LTC_ARGCHK(tweak != NULL);
+   LTC_ARGCHK(lrw   != NULL);
 
 #ifdef LTC_FAST
    if (16 % sizeof(LTC_FAST_TYPE)) {
@@ -69,7 +67,7 @@
    /* copy the IV and tweak */
    XMEMCPY(lrw->tweak, tweak, 16);
 
-#ifdef LRW_TABLES
+#ifdef LTC_LRW_TABLES
    /* setup tables */
    /* generate the first table as it has no shifting (from which we make the other tables) */
    zeromem(B, 16);
@@ -88,8 +86,8 @@
          }
          lrw->PC[x][y][0]  = gcm_shift_table[t<<1];
          lrw->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1];
-     }
-  }
+      }
+   }
 #endif
 
    /* generate first pad */
@@ -98,6 +96,6 @@
 
 
 #endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */