Lines Matching refs:ctx

89 	struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
90 struct crypto_skcipher *ctr = ctx->ctr;
91 struct crypto_ahash *mac = ctx->mac;
172 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
198 ahash_request_set_tfm(ahreq, ctx->mac);
287 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
308 skcipher_request_set_tfm(skreq, ctx->ctr);
347 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
373 skcipher_request_set_tfm(skreq, ctx->ctr);
396 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(tfm);
411 ctx->mac = mac;
412 ctx->ctr = ctr;
430 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(tfm);
432 crypto_free_ahash(ctx->mac);
433 crypto_free_skcipher(ctx->ctr);
438 struct ccm_instance_ctx *ctx = aead_instance_ctx(inst);
440 crypto_drop_ahash(&ctx->mac);
441 crypto_drop_skcipher(&ctx->ctr);
571 struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(parent);
572 struct crypto_aead *child = ctx->child;
578 memcpy(ctx->nonce, key + keylen, 3);
589 struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(parent);
600 return crypto_aead_setauthsize(ctx->child, authsize);
608 struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(aead);
609 struct crypto_aead *child = ctx->child;
617 memcpy(iv + 1, ctx->nonce, 3);
671 struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(tfm);
679 ctx->child = aead;
694 struct crypto_rfc4309_ctx *ctx = crypto_aead_ctx(tfm);
696 crypto_free_aead(ctx->child);
780 struct cbcmac_tfm_ctx *ctx = crypto_shash_ctx(parent);
782 return crypto_cipher_setkey(ctx->child, inkey, keylen);
787 struct cbcmac_desc_ctx *ctx = shash_desc_ctx(pdesc);
789 u8 *dg = (u8 *)ctx + crypto_shash_descsize(pdesc->tfm) - bs;
791 ctx->len = 0;
802 struct cbcmac_desc_ctx *ctx = shash_desc_ctx(pdesc);
805 u8 *dg = (u8 *)ctx + crypto_shash_descsize(parent) - bs;
808 unsigned int l = min(len, bs - ctx->len);
810 crypto_xor(dg + ctx->len, p, l);
811 ctx->len +=l;
815 if (ctx->len == bs) {
817 ctx->len = 0;
828 struct cbcmac_desc_ctx *ctx = shash_desc_ctx(pdesc);
831 u8 *dg = (u8 *)ctx + crypto_shash_descsize(parent) - bs;
833 if (ctx->len)
845 struct cbcmac_tfm_ctx *ctx = crypto_tfm_ctx(tfm);
851 ctx->child = cipher;
858 struct cbcmac_tfm_ctx *ctx = crypto_tfm_ctx(tfm);
859 crypto_free_cipher(ctx->child);