Lines Matching defs:tctx

399 static void vhash_blocks(const struct vmac_tfm_ctx *tctx,
403 const u64 *kptr = tctx->nhkey;
404 const u64 pkh = tctx->polykey[0];
405 const u64 pkl = tctx->polykey[1];
433 struct vmac_tfm_ctx *tctx = crypto_shash_ctx(tfm);
442 err = crypto_cipher_setkey(tctx->cipher, key, keylen);
448 for (i = 0; i < ARRAY_SIZE(tctx->nhkey); i += 2) {
449 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in);
450 tctx->nhkey[i] = be64_to_cpu(out[0]);
451 tctx->nhkey[i+1] = be64_to_cpu(out[1]);
458 for (i = 0; i < ARRAY_SIZE(tctx->polykey); i += 2) {
459 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in);
460 tctx->polykey[i] = be64_to_cpu(out[0]) & mpoly;
461 tctx->polykey[i+1] = be64_to_cpu(out[1]) & mpoly;
468 for (i = 0; i < ARRAY_SIZE(tctx->l3key); i += 2) {
470 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in);
471 tctx->l3key[i] = be64_to_cpu(out[0]);
472 tctx->l3key[i+1] = be64_to_cpu(out[1]);
474 } while (tctx->l3key[i] >= p64 || tctx->l3key[i+1] >= p64);
482 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm);
487 memcpy(dctx->polytmp, tctx->polykey, sizeof(dctx->polytmp));
494 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm);
514 vhash_blocks(tctx, dctx, dctx->partial_words, 1);
522 vhash_blocks(tctx, dctx, (const __le64 *)p, n / VMAC_NHBYTES);
535 static u64 vhash_final(const struct vmac_tfm_ctx *tctx,
549 nh_16(dctx->partial_words, tctx->nhkey, n / 8, rh, rl);
552 poly_step(ch, cl, tctx->polykey[0], tctx->polykey[1],
559 return l3hash(ch, cl, tctx->l3key[0], tctx->l3key[1], partial * 8);
564 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm);
582 hash = vhash_final(tctx, dctx);
588 crypto_cipher_encrypt_one(tctx->cipher, dctx->nonce.bytes,
601 struct vmac_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
608 tctx->cipher = cipher;
614 struct vmac_tfm_ctx *tctx = crypto_tfm_ctx(tfm);
616 crypto_free_cipher(tctx->cipher);