summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/modes/lrw/lrw_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/modes/lrw/lrw_start.c')
-rw-r--r--libtomcrypt/src/modes/lrw/lrw_start.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/libtomcrypt/src/modes/lrw/lrw_start.c b/libtomcrypt/src/modes/lrw/lrw_start.c
index f378789..e13d3bd 100644
--- a/libtomcrypt/src/modes/lrw/lrw_start.c
+++ b/libtomcrypt/src/modes/lrw/lrw_start.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, 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 @@ int lrw_start( int cipher,
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 @@ int lrw_start( int cipher,
/* 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 @@ int lrw_start( int cipher,
}
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 @@ int lrw_start( int cipher,
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */