summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/encauth/gcm/gcm_mult_h.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/encauth/gcm/gcm_mult_h.c')
-rw-r--r--libtomcrypt/src/encauth/gcm/gcm_mult_h.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/libtomcrypt/src/encauth/gcm/gcm_mult_h.c b/libtomcrypt/src/encauth/gcm/gcm_mult_h.c
index 2cda6a4..181d1d1 100644
--- a/libtomcrypt/src/encauth/gcm/gcm_mult_h.c
+++ b/libtomcrypt/src/encauth/gcm/gcm_mult_h.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
*/
/**
@@ -25,7 +23,7 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I)
{
unsigned char T[16];
#ifdef LTC_GCM_TABLES
- int x, y;
+ int x;
#ifdef LTC_GCM_TABLES_SSE2
asm("movdqa (%0),%%xmm0"::"r"(&gcm->PC[0][I[0]][0]));
for (x = 1; x < 16; x++) {
@@ -33,11 +31,12 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I)
}
asm("movdqa %%xmm0,(%0)"::"r"(&T));
#else
+ int y;
XMEMCPY(T, &gcm->PC[0][I[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 *)(&gcm->PC[x][I[x]][y]));
+ *(LTC_FAST_TYPE_PTR_CAST(T + y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&gcm->PC[x][I[x]][y]));
}
#else
for (y = 0; y < 16; y++) {
@@ -46,13 +45,13 @@ void gcm_mult_h(gcm_state *gcm, unsigned char *I)
#endif /* LTC_FAST */
}
#endif /* LTC_GCM_TABLES_SSE2 */
-#else
- gcm_gf_mult(gcm->H, I, T);
+#else
+ gcm_gf_mult(gcm->H, I, T);
#endif
XMEMCPY(I, T, 16);
}
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */