| /src/crypto/openssl/crypto/modes/ |
| H A D | gcm128.c | 88 static void gcm_init_4bit(u128 Htable[16], const u64 H[2]) in gcm_init_4bit() 95 Htable[0].hi = 0; in gcm_init_4bit() 96 Htable[0].lo = 0; in gcm_init_4bit() 101 for (Htable[8] = V, i = 4; i > 0; i >>= 1) { in gcm_init_4bit() 103 Htable[i] = V; in gcm_init_4bit() 107 u128 *Hi = Htable + i; in gcm_init_4bit() 110 Hi[j].hi = V.hi ^ Htable[j].hi; in gcm_init_4bit() 111 Hi[j].lo = V.lo ^ Htable[j].lo; in gcm_init_4bit() 115 Htable[8] = V; in gcm_init_4bit() 117 Htable[4] = V; in gcm_init_4bit() [all …]
|
| /src/crypto/openssl/crypto/modes/asm/ |
| H A D | ghash-riscv64-zvkg.pl | 73 my ($Htable,$H,$VAL0,$VAL1,$TMP0) = ("a0","a1","a2","a3","t0"); 82 @{[sd_rev8_rv64i $VAL0, $Htable, 0, $TMP0]} 83 @{[sd_rev8_rv64i $VAL1, $Htable, 8, $TMP0]} 90 my ($Htable,$H,$V0) = ("a0","a1","v0"); 100 @{[vse64_v $V0, $Htable]} # vse64.v v0, (a0) 113 my ($Xi,$Htable) = ("a0","a1"); 122 @{[vle32_v $VS2, $Htable]} 141 my ($Xi,$Htable,$inp,$len) = ("a0","a1","a2","a3"); 150 @{[vle32_v $vH, $Htable]}
|
| H A D | ghash-riscv64.pl | 70 my ($Htable,$H,$VAL0,$VAL1,$TMP0,$TMP1,$TMP2) = ("a0","a1","a2","a3","t0","t1","t2"); 81 @{[sd_rev8_rv64i $VAL0, $Htable, 0, $TMP0]} 82 @{[sd_rev8_rv64i $VAL1, $Htable, 8, $TMP0]} 89 my ($Htable,$H,$VAL0,$VAL1,$TMP0,$TMP1,$TMP2) = ("a0","a1","a2","a3","t0","t1","t2"); 102 sd $VAL0,0($Htable) 103 sd $VAL1,8($Htable) 110 my ($Htable,$H,$TMP0,$TMP1) = ("a0","a1","t0","t1"); 123 sd $TMP0,0($Htable) 124 sd $TMP1,8($Htable) 147 my ($Xi,$Htable,$x0,$x1,$y0,$y1) = ("a0","a1","a4","a5","a6","a7"); [all …]
|
| H A D | ghash-ia64.pl | 255 { .mmi; add $Htbl=256,sp // &Htable[0] 279 dep $Atbl=$xi[1],$Htbl,4,4 //(p17) &Htable[nlo].lo 286 add $Btbl=$xi[1],$Htbl };; //(p17) &Htable[nhi].lo 291 { .mmi; ld8 $Alo=[$Atbl],8 //(p18) Htable[nlo].lo,&Htable[nlo].hi 295 dep $Atbl=$xi[1],$Htbl,4,4 } //(p17) &Htable[nlo].lo 307 add $Btbl=$xi[1],$Htbl };; //(p17) &Htable[nhi] 315 { .mmi; ld8 $Alo=[$Atbl],8 //(p18) Htable[nlo].lo,&Htable[nlo].hi 323 dep $Atbl=$xi[1],$Htbl,4,4 } //(p17) &Htable[nlo].lo 338 add $Btbl=$xi[1],$Htbl };; //(p17) &Htable[nhi] 344 { .mmi; ld8 $Alo=[$Atbl],8 //(p18) Htable[nlo].lo,&Htable[nlo].hi [all …]
|
| H A D | ghash-riscv64-zvkb-zvbc.pl | 68 my ($Htable,$H,$TMP0,$TMP1,$TMP2) = ("a0","a1","t0","t1","t2"); 111 @{[vse64_v $V1, $Htable]} # vse64.v v1, (a0) 124 my ($Xi,$Htable,$TMP0,$TMP1,$TMP2,$TMP3,$TMP4) = ("a0","a1","t0","t1","t2","t3","t4"); 133 ld $TMP0, ($Htable) 134 ld $TMP1, 8($Htable) 245 my ($Xi,$Htable,$inp,$len,$TMP0,$TMP1,$TMP2,$TMP3,$M8,$TMP5,$TMP6) = ("a0","a1","a2","a3","t0","t1"… 253 ld $TMP0, ($Htable) 254 ld $TMP1, 8($Htable)
|
| H A D | ghash-c64xplus.pl | 31 ($Xip,$Htable,$inp,$len)=("A4","B4","A6","B6"); # arguments 59 ADDAD $Htable,2,$Htable 64 LDDW *${Htable}[-1],$H1:$H0 ; H.lo 65 LDDW *${Htable}[-2],$H3:$H2 ; H.hi 91 LDDW *${Htable}[-1],$H1:$H0 ; H.lo 93 LDDW *${Htable}[-2],$H3:$H2 ; H.hi
|
| H A D | ghash-sparcv9.pl | 358 ($Xip,$Htable,$inp,$len)=map("%i$_",(0..3)); 407 ldx [$Htable+8],$Hlo ! load twisted H 408 ldx [$Htable+0],$Hhi 412 ldx [$Htable+16],$V ! (0xE0·i)&0xff=0xA040608020C0E000 463 ldx [$Htable+8],$Hlo ! load twisted H 464 ldx [$Htable+0],$Hhi 468 ldx [$Htable+16],$V ! (0xE0·i)&0xff=0xA040608020C0E000
|
| /src/sys/crypto/openssl/arm/ |
| H A D | ossl_aes_gcm_neon.c | 29 void gcm_init_neon(__uint128_t Htable[16], const uint64_t Xi[2]); 30 void gcm_gmult_neon(uint64_t Xi[2], const __uint128_t Htable[16]); 31 void gcm_ghash_neon(uint64_t Xi[2], const __uint128_t Htable[16], 51 gcm_init_neon(ctx->gcm.Htable, ctx->gcm.H.u); in gcm_init() 93 gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_finish() 102 gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_finish() 135 gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_aad() 142 gcm_ghash_neon(ctx->gcm.Xi.u, ctx->gcm.Htable, aad, i); in gcm_aad() 175 gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_encrypt() 193 gcm_gmult_neon(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_encrypt() [all …]
|
| H A D | ghashv8-armx.S | 35 vst1.64 {q12},[r0]! @ store Htable[0] 62 vst1.64 {q13,q14},[r0]! @ store Htable[1..2]
|
| /src/sys/crypto/openssl/ |
| H A D | ossl_aes_gcm.c | 51 void GCM_init(__uint128_t Htable[16], uint64_t Xi[2]); 52 void GCM_gmult(uint64_t Xi[2], const __uint128_t Htable[16]); 53 void GCM_ghash(uint64_t Xi[2], const __uint128_t Htable[16], const void *in, 76 void GCM_init(__uint128_t Htable[16], uint64_t Xi[2]); 77 void GCM_gmult(uint64_t Xi[2], const __uint128_t Htable[16]); 78 void GCM_ghash(uint64_t Xi[2], const __uint128_t Htable[16], const void *in, 173 GCM_init(ctx->gcm.Htable, ctx->gcm.H.u); in gcm_init_op() 233 GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_aad_op() 240 GCM_ghash(ctx->gcm.Xi.u, ctx->gcm.Htable, aad, i); in gcm_aad_op() 271 GCM_gmult(ctx->gcm.Xi.u, ctx->gcm.Htable); in gcm_encrypt() [all …]
|
| H A D | ossl_aes_gcm.h | 62 __uint128_t Htable[16]; member
|
| /src/sys/crypto/armv8/ |
| H A D | armv8_crypto_wrap.c | 331 const uint8_t iv[static AES_GCM_IV_LEN], const __uint128_val_t *Htable) in armv8_aes_gmac_setup() argument 351 gcm_ghash_v8(s->Xi.u, Htable, authdata, authdatalen - trailer); in armv8_aes_gmac_setup() 357 gcm_ghash_v8(s->Xi.u, Htable, block, AES_BLOCK_LEN); in armv8_aes_gmac_setup() 363 size_t authdatalen, const __uint128_val_t *Htable) in armv8_aes_gmac_finish() argument 369 gcm_ghash_v8(s->Xi.u, Htable, s->lenblock.c, AES_BLOCK_LEN); in armv8_aes_gmac_finish() 398 const __uint128_val_t *Htable) in armv8_aes_encrypt_gcm() argument 405 armv8_aes_gmac_setup(&s, aes_key, authdata, authdatalen, iv, Htable); in armv8_aes_encrypt_gcm() 427 gcm_ghash_v8(s.Xi.u, Htable, block, seglen); in armv8_aes_encrypt_gcm() 435 gcm_ghash_v8(s.Xi.u, Htable, (uint8_t *)to64, in armv8_aes_encrypt_gcm() 448 armv8_aes_gmac_finish(&s, olen, authdatalen, Htable); in armv8_aes_encrypt_gcm() [all …]
|
| H A D | armv8_crypto.h | 51 __uint128_val_t Htable[16]; member 60 void gcm_init_v8(__uint128_val_t Htable[16], const uint64_t Xi[2]); 61 void gcm_gmult_v8(uint64_t Xi[2], const __uint128_val_t Htable[16]); 62 void gcm_ghash_v8(uint64_t Xi[2], const __uint128_val_t Htable[16], const uint8_t *inp, size_t len);
|
| H A D | armv8_crypto.c | 251 gcm_init_v8(ses->Htable, H.u); in armv8_crypto_cipher_setup() 376 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process() 384 crp->crp_aad_length, authbuf, tag, iv, ses->Htable); in armv8_crypto_cipher_process()
|
| /src/crypto/openssl/providers/implementations/ciphers/ |
| H A D | cipher_aes_gcm_siv_hw.c | 176 ossl_polyval_ghash_init(ctx->Htable, (const uint64_t *)ctx->msg_auth_key); in aes_gcm_siv_encrypt() 180 ossl_polyval_ghash_hash(ctx->Htable, S_s, ctx->aad, UP16(ctx->aad_len)); in aes_gcm_siv_encrypt() 183 ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)in, DOWN16(len)); in aes_gcm_siv_encrypt() 188 ossl_polyval_ghash_hash(ctx->Htable, S_s, padding, sizeof(padding)); in aes_gcm_siv_encrypt() 190 ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)len_blk, sizeof(len_blk)); in aes_gcm_siv_encrypt() 242 ossl_polyval_ghash_init(ctx->Htable, (const uint64_t *)ctx->msg_auth_key); in aes_gcm_siv_decrypt() 245 ossl_polyval_ghash_hash(ctx->Htable, S_s, ctx->aad, UP16(ctx->aad_len)); in aes_gcm_siv_decrypt() 248 ossl_polyval_ghash_hash(ctx->Htable, S_s, out, DOWN16(len)); in aes_gcm_siv_decrypt() 253 ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)padding, sizeof(padding)); in aes_gcm_siv_decrypt() 255 ossl_polyval_ghash_hash(ctx->Htable, S_s, (uint8_t *)len_blk, TAG_SIZE); in aes_gcm_siv_decrypt()
|
| H A D | cipher_aes_gcm_siv_polyval.c | 61 void ossl_polyval_ghash_init(u128 Htable[16], const uint64_t H[2]) in ossl_polyval_ghash_init() 74 ossl_gcm_init_4bit(Htable, (u64 *)tmp); in ossl_polyval_ghash_init() 78 void ossl_polyval_ghash_hash(const u128 Htable[16], uint8_t *tag, const uint8_t *inp, size_t len) in ossl_polyval_ghash_hash() 92 ossl_gcm_ghash_4bit((u64 *)out, Htable, (uint8_t *)tmp, 16); in ossl_polyval_ghash_hash()
|
| H A D | cipher_aes_gcm_siv.h | 47 u128 Htable[16]; /* Polyval calculations via ghash */ member 58 void ossl_polyval_ghash_init(u128 Htable[16], const uint64_t H[2]); 59 void ossl_polyval_ghash_hash(const u128 Htable[16], uint8_t *tag, const uint8_t *inp, size_t len);
|
| /src/crypto/openssl/include/crypto/ |
| H A D | modes.h | 105 typedef void (*gcm_init_fn)(u128 Htable[16], const u64 H[2]); 106 typedef void (*gcm_ghash_fn)(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len); 107 typedef void (*gcm_gmult_fn)(u64 Xi[2], const u128 Htable[16]); 126 u128 Htable[16]; member 137 void ossl_gcm_init_4bit(u128 Htable[16], const u64 H[2]); 138 void ossl_gcm_ghash_4bit(u64 Xi[2], const u128 Htable[16], 140 void ossl_gcm_gmult_4bit(u64 Xi[2], const u128 Htable[16]);
|
| H A D | aes_platform.h | 90 void gcm_ghash_p8(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len); 155 void gcm_ghash_v8(u64 Xi[2], const u128 Htable[16], const u8 *inp, size_t len); 276 void gcm_ghash_avx(u64 Xi[2], const u128 Htable[16], const u8 *in, size_t len); 484 void gcm_ghash_rv64i_zvkg(u64 Xi[2], const u128 Htable[16], const u8 *inp,
|
| /src/sys/contrib/openzfs/module/icp/algs/modes/ |
| H A D | gcm.c | 1040 extern void ASMABI gcm_init_htab_avx(uint64_t *Htable, const uint64_t H[2]); 1042 extern void ASMABI gcm_init_vpclmulqdq_avx2(uint128_t Htable[16], 1045 extern void ASMABI gcm_ghash_avx(uint64_t ghash[2], const uint64_t *Htable, 1049 const uint64_t *Htable, const uint8_t *in, size_t len); 1072 size_t, const void *, uint64_t *, const uint64_t *Htable, uint64_t *); 1078 const uint128_t Htable[16], uint8_t Xi[16]); 1082 size_t, const void *, uint64_t *, const uint64_t *Htable, uint64_t *); 1088 const uint128_t Htable[16], uint8_t Xi[16]); 1186 size_t len, const void *key, uint64_t *iv, const uint64_t *Htable, in aesni_gcm_encrypt_avx() argument 1189 (void) Htable; in aesni_gcm_encrypt_avx() [all …]
|