Lines Matching refs:tfm
19 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument
22 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey()
27 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in des_setkey()
35 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in des_setkey()
40 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_encrypt() argument
42 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt()
47 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in crypto_des_decrypt() argument
49 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_decrypt()
54 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, in des3_ede_setkey() argument
57 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey()
62 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in des3_ede_setkey()
70 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in des3_ede_setkey()
75 static void crypto_des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, in crypto_des3_ede_encrypt() argument
78 const struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des3_ede_encrypt()
83 static void crypto_des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, in crypto_des3_ede_decrypt() argument
86 const struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des3_ede_decrypt()