Home | History | Annotate | Download | only in modes

Lines Matching full:htable

88 static void gcm_init_4bit(u128 Htable[16], uint64_t H[2]) {
91 Htable[0].hi = 0;
92 Htable[0].lo = 0;
96 Htable[8] = V;
98 Htable[4] = V;
100 Htable[2] = V;
102 Htable[1] = V;
103 Htable[3].hi = V.hi ^ Htable[2].hi, Htable[3].lo = V.lo ^ Htable[2].lo;
104 V = Htable[4];
105 Htable[5].hi = V.hi ^ Htable[1].hi, Htable[5].lo = V.lo ^ Htable[1].lo;
106 Htable[6].hi = V.hi ^ Htable[2].hi, Htable[6].lo = V.lo ^ Htable[2].lo;
107 Htable[7].hi = V.hi ^ Htable[3].hi, Htable[7].lo = V.lo ^ Htable[3].lo;
108 V = Htable[8];
109 Htable[9].hi = V.hi ^ Htable[1].hi, Htable[9].lo = V.lo ^ Htable[1].lo;
110 Htable[10].hi = V.hi ^ Htable[2].hi, Htable[10].lo = V.lo ^ Htable[2].lo;
111 Htable[11].hi = V.hi ^ Htable[3].hi, Htable[11].lo = V.lo ^ Htable[3].lo;
112 Htable[12].hi = V.hi ^ Htable[4].hi, Htable[12].lo = V.lo ^ Htable[4].lo;
113 Htable[13].hi = V.hi ^ Htable[5].hi, Htable[13].lo = V.lo ^ Htable[5].lo;
114 Htable[14].hi = V.hi ^ Htable[6].hi, Htable[14].lo = V.lo ^ Htable[6].lo;
115 Htable[15].hi = V.hi ^ Htable[7].hi, Htable[15].lo = V.lo ^ Htable[7].lo;
118 /* ARM assembler expects specific dword order in Htable. */
128 V = Htable[j];
129 Htable[j].hi = V.lo;
130 Htable[j].lo = V.hi;
134 V = Htable[j];
135 Htable[j].hi = V.lo << 32 | V.lo >> 32;
136 Htable[j].lo = V.hi << 32 | V.hi >> 32;
150 static void gcm_gmult_4bit(uint64_t Xi[2], const u128 Htable[16]) {
163 Z.hi = Htable[nlo].hi;
164 Z.lo = Htable[nlo].lo;
176 Z.hi ^= Htable[nhi].hi;
177 Z.lo ^= Htable[nhi].lo;
196 Z.hi ^= Htable[nlo].hi;
197 Z.lo ^= Htable[nlo].lo;
227 static void gcm_ghash_4bit(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
244 Z.hi = Htable[nlo].hi;
245 Z.lo = Htable[nlo].lo;
257 Z.hi ^= Htable[nhi].hi;
258 Z.lo ^= Htable[nhi].lo;
278 Z.hi ^= Htable[nlo].hi;
279 Z.lo ^= Htable[nlo].lo;
305 void gcm_gmult_4bit(uint64_t Xi[2], const u128 Htable[16]);
306 void gcm_ghash_4bit(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
310 #define GCM_MUL(ctx, Xi) gcm_gmult_4bit(ctx->Xi.u, ctx->Htable)
312 #define GHASH(ctx, in, len) gcm_ghash_4bit((ctx)->Xi.u, (ctx)->Htable, in, len)
324 void gcm_init_clmul(u128 Htable[16], const uint64_t Xi[2]);
325 void gcm_gmult_clmul(uint64_t Xi[2], const u128 Htable[16]);
326 void gcm_ghash_clmul(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
334 void gcm_init_avx(u128 Htable[16], const uint64_t Xi[2]);
335 void gcm_gmult_avx(uint64_t Xi[2], const u128 Htable[16]);
336 void gcm_ghash_avx(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp, size_t len);
341 void gcm_gmult_4bit_mmx(uint64_t Xi[2], const u128 Htable[16]);
342 void gcm_ghash_4bit_mmx(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
345 void gcm_gmult_4bit_x86(uint64_t Xi[2], const u128 Htable[16]);
346 void gcm_ghash_4bit_x86(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
354 void gcm_init_neon(u128 Htable[16],const uint64_t Xi[2]);
355 void gcm_gmult_neon(uint64_t Xi[2], const u128 Htable[16]);
356 void gcm_ghash_neon(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
364 #define GCM_MUL(ctx, Xi) (*gcm_gmult_p)(ctx->Xi.u, ctx->Htable)
367 #define GHASH(ctx, in, len) (*gcm_ghash_p)(ctx->Xi.u, ctx->Htable, in, len)
412 gcm_init_avx(ctx->Htable, ctx->H.u);
416 gcm_init_clmul(ctx->Htable, ctx->H.u);
422 gcm_init_4bit(ctx->Htable, ctx->H.u);
437 gcm_init_neon(ctx->Htable,ctx->H.u);
441 gcm_init_4bit(ctx->Htable, ctx->H.u);
448 gcm_init_4bit(ctx->Htable, ctx->H.u);
459 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
534 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
536 void (*gcm_ghash_p)(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
604 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
606 void (*gcm_ghash_p)(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
764 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
766 void (*gcm_ghash_p)(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
930 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
932 void (*gcm_ghash_p)(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
1040 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;
1042 void (*gcm_ghash_p)(uint64_t Xi[2], const u128 Htable[16], const uint8_t *inp,
1149 void (*gcm_gmult_p)(uint64_t Xi[2], const u128 Htable[16]) = ctx->gmult;