Lines Matching refs:hash

77 static void set_subkey(unsigned char *hash)  in set_subkey()  argument
79 *(u64 *)&hash[0] = be64_to_cpup((__be64 *)&hash[0]); in set_subkey()
80 *(u64 *)&hash[8] = be64_to_cpup((__be64 *)&hash[8]); in set_subkey()
87 static void set_aad(struct gcm_ctx *gctx, struct Hash_ctx *hash, in set_aad() argument
96 gcm_ghash_p10(nXi, hash->Htable+32, aad, i); in set_aad()
105 gcm_ghash_p10(gctx->aad_hash, hash->Htable+32, nXi, 16); in set_aad()
110 memcpy(hash->Htable, gctx->aad_hash, 16); in set_aad()
114 struct Hash_ctx *hash, u8 *assoc, unsigned int assoclen) in gcmp10_init() argument
118 aes_p10_encrypt(hash->H, hash->H, rdkey); in gcmp10_init()
119 set_subkey(hash->H); in gcmp10_init()
120 gcm_init_htable(hash->Htable+32, hash->H); in gcmp10_init()
138 set_aad(gctx, hash, assoc, assoclen); in gcmp10_init()
141 static void finish_tag(struct gcm_ctx *gctx, struct Hash_ctx *hash, int len) in finish_tag() argument
150 memcpy(hash->Htable, gctx->ivtag, 16); in finish_tag()
163 gcm_ghash_p10(hash->Htable, hash->Htable+32, aclen, 16); in finish_tag()
166 hash->Htable[i] ^= gctx->ivtag[i]; in finish_tag()
208 struct Hash_ctx *hash = PTR_ALIGN((void *)hashbuf, PPC_ALIGN); in p10_aes_gcm_crypt() local
245 gcmp10_init(gctx, iv, (unsigned char *) &ctx->enc_key, hash, assoc, assoclen); in p10_aes_gcm_crypt()
267 &ctx->enc_key, gctx->iv, hash->Htable); in p10_aes_gcm_crypt()
272 &ctx->enc_key, gctx->iv, hash->Htable); in p10_aes_gcm_crypt()
284 finish_tag(gctx, hash, total_processed); in p10_aes_gcm_crypt()
289 scatterwalk_map_and_copy(hash->Htable, req->dst, req->assoclen + cryptlen, in p10_aes_gcm_crypt()
296 if (crypto_memneq(otag, hash->Htable, auth_tag_len)) { in p10_aes_gcm_crypt()
297 memzero_explicit(hash->Htable, 16); in p10_aes_gcm_crypt()