Lines Matching defs:tfm

64 static inline enum cc_key_type cc_key_type(struct crypto_tfm *tfm)
66 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
154 static int cc_cipher_init(struct crypto_tfm *tfm)
156 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
158 container_of(tfm->__crt_alg, struct cc_crypto_alg,
165 crypto_tfm_alg_name(tfm));
172 const char *name = crypto_tfm_alg_name(tfm);
174 /* Alloc hash tfm for essiv */
177 dev_err(dev, "Error allocating hash tfm for ESSIV.\n");
182 /* Alloc fallabck tfm or essiv when key size != 256 bit */
198 crypto_skcipher_set_reqsize(__crypto_skcipher_cast(tfm),
232 static void cc_cipher_exit(struct crypto_tfm *tfm)
234 struct crypto_alg *alg = tfm->__crt_alg;
239 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
243 crypto_tfm_ctx(tfm), crypto_tfm_alg_name(tfm));
246 /* Free hash tfm for essiv */
304 struct crypto_tfm *tfm = crypto_skcipher_tfm(sktfm);
305 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
310 ctx_p, crypto_tfm_alg_name(tfm), keylen);
404 struct crypto_tfm *tfm = crypto_skcipher_tfm(sktfm);
405 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
408 container_of(tfm->__crt_alg, struct cc_crypto_alg,
413 ctx_p, crypto_tfm_alg_name(tfm), keylen);
427 unsigned int flags = crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_MASK;
510 static void cc_setup_readiv_desc(struct crypto_tfm *tfm,
515 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
566 static void cc_setup_state_desc(struct crypto_tfm *tfm,
572 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
610 static void cc_setup_xex_state_desc(struct crypto_tfm *tfm,
616 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
644 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) {
688 static void cc_setup_key_desc(struct crypto_tfm *tfm,
693 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
713 if (cc_key_type(tfm) == CC_POLICY_PROTECTED_KEY) {
720 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) {
753 if (cc_key_type(tfm) == CC_HW_PROTECTED_KEY) {
770 static void cc_setup_mlli_desc(struct crypto_tfm *tfm,
776 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
797 static void cc_setup_flow_desc(struct crypto_tfm *tfm,
803 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
881 struct crypto_tfm *tfm = crypto_skcipher_tfm(sk_tfm);
888 struct cc_cipher_ctx *ctx_p = crypto_tfm_ctx(tfm);
959 cc_setup_state_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len);
961 cc_setup_mlli_desc(tfm, req_ctx, dst, src, nbytes, req, desc, &seq_len);
963 cc_setup_key_desc(tfm, req_ctx, nbytes, desc, &seq_len);
965 cc_setup_xex_state_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len);
967 cc_setup_flow_desc(tfm, req_ctx, dst, src, nbytes, desc, &seq_len);
969 cc_setup_readiv_desc(tfm, req_ctx, ivsize, desc, &seq_len);