Lines Matching refs:tfm

64 static inline enum cc_key_type cc_key_type(struct crypto_tfm *tfm)  in cc_key_type()  argument
66 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_key_type()
154 static int cc_cipher_init(struct crypto_tfm *tfm) in cc_cipher_init() argument
156 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_cipher_init()
158 container_of(tfm->__crt_alg, struct cc_crypto_alg, in cc_cipher_init()
165 crypto_tfm_alg_name(tfm)); in cc_cipher_init()
172 const char *name = crypto_tfm_alg_name(tfm); in cc_cipher_init()
198 crypto_skcipher_set_reqsize(__crypto_skcipher_cast(tfm), in cc_cipher_init()
232 static void cc_cipher_exit(struct crypto_tfm *tfm) in cc_cipher_exit() argument
234 struct crypto_alg *alg = tfm->__crt_alg; in cc_cipher_exit()
239 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_cipher_exit()
243 crypto_tfm_ctx(tfm), crypto_tfm_alg_name(tfm)); in cc_cipher_exit()
304 struct crypto_tfm *tfm = crypto_skcipher_tfm(sktfm); in cc_cipher_sethkey() local
305 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_cipher_sethkey()
310 ctx_p, crypto_tfm_alg_name(tfm), keylen); in cc_cipher_sethkey()
404 struct crypto_tfm *tfm = crypto_skcipher_tfm(sktfm); in cc_cipher_setkey() local
405 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_cipher_setkey()
408 container_of(tfm->__crt_alg, struct cc_crypto_alg, in cc_cipher_setkey()
413 ctx_p, crypto_tfm_alg_name(tfm), keylen); in cc_cipher_setkey()
427 unsigned int flags = crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_MASK; in cc_cipher_setkey()
510 static void cc_setup_readiv_desc(struct crypto_tfm *tfm, in cc_setup_readiv_desc() argument
515 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_readiv_desc()
566 static void cc_setup_state_desc(struct crypto_tfm *tfm, in cc_setup_state_desc() argument
572 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_state_desc()
610 static void cc_setup_xex_state_desc(struct crypto_tfm *tfm, in cc_setup_xex_state_desc() argument
616 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_xex_state_desc()
644 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) { in cc_setup_xex_state_desc()
688 static void cc_setup_key_desc(struct crypto_tfm *tfm, in cc_setup_key_desc() argument
693 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_key_desc()
713 if (cc_key_type(tfm) == CC_POLICY_PROTECTED_KEY) { in cc_setup_key_desc()
720 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) { in cc_setup_key_desc()
753 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) { in cc_setup_key_desc()
770 static void cc_setup_mlli_desc(struct crypto_tfm *tfm, in cc_setup_mlli_desc() argument
776 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_mlli_desc()
797 static void cc_setup_flow_desc(struct crypto_tfm *tfm, in cc_setup_flow_desc() argument
803 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_setup_flow_desc()
881 struct crypto_tfm *tfm = crypto_skcipher_tfm(sk_tfm); in cc_cipher_process() local
888 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm); in cc_cipher_process()
959 cc_setup_state_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len); in cc_cipher_process()
961 cc_setup_mlli_desc(tfm, req_ctx, dst, src, nbytes, req, desc, &seq_len); in cc_cipher_process()
963 cc_setup_key_desc(tfm, req_ctx, nbytes, desc, &seq_len); in cc_cipher_process()
965 cc_setup_xex_state_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len); in cc_cipher_process()
967 cc_setup_flow_desc(tfm, req_ctx, dst, src, nbytes, desc, &seq_len); in cc_cipher_process()
969 cc_setup_readiv_desc(tfm, req_ctx, ivsize, desc, &seq_len); in cc_cipher_process()