Home | History | Annotate | Download | only in modes

Lines Matching full:htable

121 static void gcm_init_8bit(u128 Htable[256], u64 H[2])
126 Htable[0].hi = 0;
127 Htable[0].lo = 0;
131 for (Htable[128]=V, i=64; i>0; i>>=1) {
133 Htable[i] = V;
137 u128 *Hi = Htable+i, H0 = *Hi;
139 Hi[j].hi = H0.hi^Htable[j].hi;
140 Hi[j].lo = H0.lo^Htable[j].lo;
145 static void gcm_gmult_8bit(u64 Xi[2], const u128 Htable[256])
218 Z.hi ^= Htable[n].hi;
219 Z.lo ^= Htable[n].lo;
252 #define GCM_MUL(ctx,Xi) gcm_gmult_8bit(ctx->Xi.u,ctx->Htable)
256 static void gcm_init_4bit(u128 Htable[16], u64 H[2])
263 Htable[0].hi = 0;
264 Htable[0].lo = 0;
269 for (Htable[8]=V, i=4; i>0; i>>=1) {
271 Htable[i] = V;
275 u128 *Hi = Htable+i;
278 Hi[j].hi = V.hi^Htable[j].hi;
279 Hi[j].lo = V.lo^Htable[j].lo;
283 Htable[8] = V;
285 Htable[4] = V;
287 Htable[2] = V;
289 Htable[1] = V;
290 Htable[3].hi = V.hi^Htable[2].hi, Htable[3].lo = V.lo^Htable[2].lo;
291 V=Htable[4];
292 Htable[5].hi = V.hi^Htable[1].hi, Htable[5].lo = V.lo^Htable[1].lo;
293 Htable[6].hi = V.hi^Htable[2].hi, Htable[6].lo = V.lo^Htable[2].lo;
294 Htable[7].hi = V.hi^Htable[3].hi, Htable[7].lo = V.lo^Htable[3].lo;
295 V=Htable[8];
296 Htable[9].hi = V.hi^Htable[1].hi, Htable[9].lo = V.lo^Htable[1].lo;
297 Htable[10].hi = V.hi^Htable[2].hi, Htable[10].lo = V.lo^Htable[2].lo;
298 Htable[11].hi = V.hi^Htable[3].hi, Htable[11].lo = V.lo^Htable[3].lo;
299 Htable[12].hi = V.hi^Htable[4].hi, Htable[12].lo = V.lo^Htable[4].lo;
300 Htable[13].hi = V.hi^Htable[5].hi, Htable[13].lo = V.lo^Htable[5].lo;
301 Htable[14].hi = V.hi^Htable[6].hi, Htable[14].lo = V.lo^Htable[6].lo;
302 Htable[15].hi = V.hi^Htable[7].hi, Htable[15].lo = V.lo^Htable[7].lo;
306 * ARM assembler expects specific dword order in Htable.
314 V = Htable[j];
315 Htable[j].hi = V.lo;
316 Htable[j].lo = V.hi;
320 V = Htable[j];
321 Htable[j].hi = V.lo<<32|V.lo>>32;
322 Htable[j].lo = V.hi<<32|V.hi>>32;
335 static void gcm_gmult_4bit(u64 Xi[2], const u128 Htable[16])
346 Z.hi = Htable[nlo].hi;
347 Z.lo = Htable[nlo].lo;
358 Z.hi ^= Htable[nhi].hi;
359 Z.lo ^= Htable[nhi].lo;
375 Z.hi ^= Htable[nlo].hi;
376 Z.lo ^= Htable[nlo].lo;
406 static void gcm_ghash_4bit(u64 Xi[2],const u128 Htable[16],
422 Z.hi = Htable[nlo].hi;
423 Z.lo = Htable[nlo].lo;
434 Z.hi ^= Htable[nhi].hi;
435 Z.lo ^= Htable[nhi].lo;
452 Z.hi ^= Htable[nlo].hi;
453 Z.lo ^= Htable[nlo].lo;
462 u128 Hshr4[16]; /* Htable shifted right by 4 bits */
463 u8 Hshl4[16]; /* Htable shifted left by 4 bits */
504 Z.hi = Htable[cnt].hi;
505 Z.lo = Htable[cnt].lo;
518 Z.hi ^= Htable[nlo].hi;
519 Z.lo ^= Htable[nlo].lo;
536 Z.hi ^= Htable[nlo].hi;
537 Z.lo ^= Htable[nlo].lo;
544 Z.hi ^= Htable[nhi].hi;
545 Z.lo ^= Htable[nhi].lo;
570 void gcm_gmult_4bit(u64 Xi[2],const u128 Htable[16]);
571 void gcm_ghash_4bit(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
574 #define GCM_MUL(ctx,Xi) gcm_gmult_4bit(ctx->Xi.u,ctx->Htable)
576 #define GHASH(ctx,in,len) gcm_ghash_4bit((ctx)->Xi.u,(ctx)->Htable,in,len)
654 void gcm_init_clmul(u128 Htable[16],const u64 Xi[2]);
655 void gcm_gmult_clmul(u64 Xi[2],const u128 Htable[16]);
656 void gcm_ghash_clmul(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
660 void gcm_gmult_4bit_mmx(u64 Xi[2],const u128 Htable[16]);
661 void gcm_ghash_4bit_mmx(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
663 void gcm_gmult_4bit_x86(u64 Xi[2],const u128 Htable[16]);
664 void gcm_ghash_4bit_x86(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
675 void gcm_init_neon(u128 Htable[16],const u64 Xi[2]);
676 void gcm_gmult_neon(u64 Xi[2],const u128 Htable[16]);
677 void gcm_ghash_neon(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
678 void gcm_init_v8(u128 Htable[16],const u64 Xi[2]);
679 void gcm_gmult_v8(u64 Xi[2],const u128 Htable[16]);
680 void gcm_ghash_v8(u64 Xi[2],const u128 Htable[16],const u8 *inp,size_t len);
687 # define GCM_MUL(ctx,Xi) (*gcm_gmult_p)(ctx->Xi.u,ctx->Htable)
690 # define GHASH(ctx,in,len) (*gcm_ghash_p)(ctx->Xi.u,ctx->Htable,in,len)
720 gcm_init_8bit(ctx->Htable,ctx->H.u);
726 gcm_init_clmul(ctx->Htable,ctx->H.u);
732 gcm_init_4bit(ctx->Htable,ctx->H.u);
752 gcm_init_v8(ctx->Htable,ctx->H.u);
759 gcm_init_neon(ctx->Htable,ctx->H.u);
765 gcm_init_4bit(ctx->Htable,ctx->H.u);
770 gcm_init_4bit(ctx->Htable,ctx->H.u);
780 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
859 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
861 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],
921 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
923 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],
1101 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
1103 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],
1284 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
1286 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],
1399 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
1401 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],
1518 void (*gcm_gmult_p)(u64 Xi[2],const u128 Htable[16]) = ctx->gmult;
1909 void (*gcm_ghash_p)(u64 Xi[2],const u128 Htable[16],