Lines Matching refs:tfm
81 struct crypto_cipher *tfm = ctx->cipher; in crypto_ccm_setkey() local
93 crypto_cipher_clear_flags(tfm, CRYPTO_TFM_REQ_MASK); in crypto_ccm_setkey()
94 crypto_cipher_set_flags(tfm, crypto_aead_get_flags(aead) & in crypto_ccm_setkey()
96 err = crypto_cipher_setkey(tfm, key, keylen); in crypto_ccm_setkey()
97 crypto_aead_set_flags(aead, crypto_cipher_get_flags(tfm) & in crypto_ccm_setkey()
104 static int crypto_ccm_setauthsize(struct crypto_aead *tfm, in crypto_ccm_setauthsize() argument
164 static void compute_mac(struct crypto_cipher *tfm, u8 *data, int n, in compute_mac() argument
179 crypto_cipher_encrypt_one(tfm, odata, odata); in compute_mac()
188 crypto_cipher_encrypt_one(tfm, odata, odata); in compute_mac()
203 static void get_data_to_compute(struct crypto_cipher *tfm, in get_data_to_compute() argument
221 compute_mac(tfm, data_src, n, pctx); in get_data_to_compute()
240 crypto_cipher_encrypt_one(tfm, odata, odata); in get_data_to_compute()
432 static int crypto_ccm_init_tfm(struct crypto_tfm *tfm) in crypto_ccm_init_tfm() argument
434 struct crypto_instance *inst = (void *)tfm->__crt_alg; in crypto_ccm_init_tfm()
436 struct crypto_ccm_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_ccm_init_tfm()
454 align = crypto_tfm_alg_alignmask(tfm); in crypto_ccm_init_tfm()
456 tfm->crt_aead.reqsize = align + in crypto_ccm_init_tfm()
467 static void crypto_ccm_exit_tfm(struct crypto_tfm *tfm) in crypto_ccm_exit_tfm() argument
469 struct crypto_ccm_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_ccm_exit_tfm()
716 static int crypto_rfc4309_init_tfm(struct crypto_tfm *tfm) in crypto_rfc4309_init_tfm() argument
718 struct crypto_instance *inst = (void *)tfm->__crt_alg; in crypto_rfc4309_init_tfm()
720 struct crypto_rfc4309_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_rfc4309_init_tfm()
732 tfm->crt_aead.reqsize = sizeof(struct aead_request) + in crypto_rfc4309_init_tfm()
740 static void crypto_rfc4309_exit_tfm(struct crypto_tfm *tfm) in crypto_rfc4309_exit_tfm() argument
742 struct crypto_rfc4309_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_rfc4309_exit_tfm()