Lines Matching refs:tfm
147 struct crypto_tfm *tfm = crypto_skcipher_tfm(atfm); in sec_alg_skcipher_init_context() local
148 struct sec_alg_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in sec_alg_skcipher_init_context()
227 static int sec_alg_skcipher_setkey(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey() argument
231 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_setkey()
248 sec_alg_skcipher_init_context(tfm, key, keylen, alg); in sec_alg_skcipher_setkey()
253 static int sec_alg_skcipher_setkey_aes_ecb(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_ecb() argument
272 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_ecb()
275 static int sec_alg_skcipher_setkey_aes_cbc(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_cbc() argument
294 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_cbc()
297 static int sec_alg_skcipher_setkey_aes_ctr(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_ctr() argument
316 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_ctr()
319 static int sec_alg_skcipher_setkey_aes_xts(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_xts() argument
325 ret = xts_verify_key(tfm, key, keylen); in sec_alg_skcipher_setkey_aes_xts()
340 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_xts()
343 static int sec_alg_skcipher_setkey_des_ecb(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_des_ecb() argument
346 return verify_skcipher_des_key(tfm, key) ?: in sec_alg_skcipher_setkey_des_ecb()
347 sec_alg_skcipher_setkey(tfm, key, keylen, SEC_C_DES_ECB_64); in sec_alg_skcipher_setkey_des_ecb()
350 static int sec_alg_skcipher_setkey_des_cbc(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_des_cbc() argument
353 return verify_skcipher_des_key(tfm, key) ?: in sec_alg_skcipher_setkey_des_cbc()
354 sec_alg_skcipher_setkey(tfm, key, keylen, SEC_C_DES_CBC_64); in sec_alg_skcipher_setkey_des_cbc()
357 static int sec_alg_skcipher_setkey_3des_ecb(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_3des_ecb() argument
360 return verify_skcipher_des3_key(tfm, key) ?: in sec_alg_skcipher_setkey_3des_ecb()
361 sec_alg_skcipher_setkey(tfm, key, keylen, in sec_alg_skcipher_setkey_3des_ecb()
365 static int sec_alg_skcipher_setkey_3des_cbc(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_3des_cbc() argument
368 return verify_skcipher_des3_key(tfm, key) ?: in sec_alg_skcipher_setkey_3des_cbc()
369 sec_alg_skcipher_setkey(tfm, key, keylen, in sec_alg_skcipher_setkey_3des_cbc()
711 struct crypto_tfm *tfm = crypto_skcipher_tfm(atfm); in sec_alg_skcipher_crypto() local
712 struct sec_alg_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in sec_alg_skcipher_crypto()
872 static int sec_alg_skcipher_init(struct crypto_skcipher *tfm) in sec_alg_skcipher_init() argument
874 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_init()
878 crypto_skcipher_set_reqsize(tfm, sizeof(struct sec_request)); in sec_alg_skcipher_init()
890 static void sec_alg_skcipher_exit(struct crypto_skcipher *tfm) in sec_alg_skcipher_exit() argument
892 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_exit()
903 static int sec_alg_skcipher_init_with_queue(struct crypto_skcipher *tfm) in sec_alg_skcipher_init_with_queue() argument
905 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_init_with_queue()
908 ret = sec_alg_skcipher_init(tfm); in sec_alg_skcipher_init_with_queue()
915 sec_alg_skcipher_exit(tfm); in sec_alg_skcipher_init_with_queue()
923 static void sec_alg_skcipher_exit_with_queue(struct crypto_skcipher *tfm) in sec_alg_skcipher_exit_with_queue() argument
925 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_exit_with_queue()
928 sec_alg_skcipher_exit(tfm); in sec_alg_skcipher_exit_with_queue()