diff libtomcrypt/src/modes/lrw/lrw_setiv.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 6dba84798cd5
children
line wrap: on
line diff
--- a/libtomcrypt/src/modes/lrw/lrw_setiv.c	Tue Jan 23 23:27:40 2018 +0800
+++ b/libtomcrypt/src/modes/lrw/lrw_setiv.c	Sat Feb 17 19:29:51 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"
 
@@ -27,7 +25,7 @@
 int lrw_setiv(const unsigned char *IV, unsigned long len, symmetric_LRW *lrw)
 {
    int           err;
-#ifdef LRW_TABLES
+#ifdef LTC_LRW_TABLES
    unsigned char T[16];
    int           x, y;
 #endif
@@ -51,12 +49,12 @@
        return CRYPT_OK;
    }
 
-#ifdef LRW_TABLES
+#ifdef LTC_LRW_TABLES
    XMEMCPY(T, &lrw->PC[0][IV[0]][0], 16);
    for (x = 1; x < 16; x++) {
 #ifdef LTC_FAST
        for (y = 0; y < 16; y += sizeof(LTC_FAST_TYPE)) {
-           *((LTC_FAST_TYPE *)(T + y)) ^= *((LTC_FAST_TYPE *)(&lrw->PC[x][IV[x]][y]));
+           *(LTC_FAST_TYPE_PTR_CAST(T + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][IV[x]][y]));
        }
 #else
        for (y = 0; y < 16; y++) {
@@ -65,8 +63,8 @@
 #endif
    }
    XMEMCPY(lrw->pad, T, 16);
-#else     
-   gcm_gf_mult(lrw->tweak, IV, lrw->pad); 
+#else
+   gcm_gf_mult(lrw->tweak, IV, lrw->pad);
 #endif
 
    return CRYPT_OK;
@@ -74,6 +72,6 @@
 
 
 #endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */