Lines Matching refs:tfm
87 struct crypto_aead *tfm; in validate_hmac_cipher_null() local
90 tfm = crypto_aead_reqtfm(req); in validate_hmac_cipher_null()
94 crypto_aead_authsize(tfm)) != 0) in validate_hmac_cipher_null()
408 static int otx2_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_xts_setkey() argument
411 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx2_cpt_skcipher_xts_setkey()
416 ret = xts_verify_key(tfm, key, keylen); in otx2_cpt_skcipher_xts_setkey()
440 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_des_setkey() argument
443 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_des_setkey()
457 static int cpt_aes_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_aes_setkey() argument
460 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_aes_setkey()
488 static int otx2_cpt_skcipher_cbc_aes_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_cbc_aes_setkey() argument
491 return cpt_aes_setkey(tfm, key, keylen, OTX2_CPT_AES_CBC); in otx2_cpt_skcipher_cbc_aes_setkey()
494 static int otx2_cpt_skcipher_ecb_aes_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_ecb_aes_setkey() argument
497 return cpt_aes_setkey(tfm, key, keylen, OTX2_CPT_AES_ECB); in otx2_cpt_skcipher_ecb_aes_setkey()
500 static int otx2_cpt_skcipher_cbc_des3_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_cbc_des3_setkey() argument
503 return cpt_des_setkey(tfm, key, keylen, OTX2_CPT_DES3_CBC); in otx2_cpt_skcipher_cbc_des3_setkey()
506 static int otx2_cpt_skcipher_ecb_des3_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_ecb_des3_setkey() argument
509 return cpt_des_setkey(tfm, key, keylen, OTX2_CPT_DES3_ECB); in otx2_cpt_skcipher_ecb_des3_setkey()
532 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); in otx2_cpt_enc_dec_init() local
533 struct crypto_alg *alg = tfm->__crt_alg; in otx2_cpt_enc_dec_init()
548 static void otx2_cpt_skcipher_exit(struct crypto_skcipher *tfm) in otx2_cpt_skcipher_exit() argument
550 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx2_cpt_skcipher_exit()
578 struct crypto_tfm *tfm = crypto_aead_tfm(atfm); in cpt_aead_init() local
579 struct crypto_alg *alg = tfm->__crt_alg; in cpt_aead_init()
655 static int otx2_cpt_aead_cbc_aes_sha1_init(struct crypto_aead *tfm) in otx2_cpt_aead_cbc_aes_sha1_init() argument
657 return cpt_aead_init(tfm, OTX2_CPT_AES_CBC, OTX2_CPT_SHA1); in otx2_cpt_aead_cbc_aes_sha1_init()
660 static int otx2_cpt_aead_cbc_aes_sha256_init(struct crypto_aead *tfm) in otx2_cpt_aead_cbc_aes_sha256_init() argument
662 return cpt_aead_init(tfm, OTX2_CPT_AES_CBC, OTX2_CPT_SHA256); in otx2_cpt_aead_cbc_aes_sha256_init()
665 static int otx2_cpt_aead_cbc_aes_sha384_init(struct crypto_aead *tfm) in otx2_cpt_aead_cbc_aes_sha384_init() argument
667 return cpt_aead_init(tfm, OTX2_CPT_AES_CBC, OTX2_CPT_SHA384); in otx2_cpt_aead_cbc_aes_sha384_init()
670 static int otx2_cpt_aead_cbc_aes_sha512_init(struct crypto_aead *tfm) in otx2_cpt_aead_cbc_aes_sha512_init() argument
672 return cpt_aead_init(tfm, OTX2_CPT_AES_CBC, OTX2_CPT_SHA512); in otx2_cpt_aead_cbc_aes_sha512_init()
675 static int otx2_cpt_aead_ecb_null_sha1_init(struct crypto_aead *tfm) in otx2_cpt_aead_ecb_null_sha1_init() argument
677 return cpt_aead_init(tfm, OTX2_CPT_CIPHER_NULL, OTX2_CPT_SHA1); in otx2_cpt_aead_ecb_null_sha1_init()
680 static int otx2_cpt_aead_ecb_null_sha256_init(struct crypto_aead *tfm) in otx2_cpt_aead_ecb_null_sha256_init() argument
682 return cpt_aead_init(tfm, OTX2_CPT_CIPHER_NULL, OTX2_CPT_SHA256); in otx2_cpt_aead_ecb_null_sha256_init()
685 static int otx2_cpt_aead_ecb_null_sha384_init(struct crypto_aead *tfm) in otx2_cpt_aead_ecb_null_sha384_init() argument
687 return cpt_aead_init(tfm, OTX2_CPT_CIPHER_NULL, OTX2_CPT_SHA384); in otx2_cpt_aead_ecb_null_sha384_init()
690 static int otx2_cpt_aead_ecb_null_sha512_init(struct crypto_aead *tfm) in otx2_cpt_aead_ecb_null_sha512_init() argument
692 return cpt_aead_init(tfm, OTX2_CPT_CIPHER_NULL, OTX2_CPT_SHA512); in otx2_cpt_aead_ecb_null_sha512_init()
695 static int otx2_cpt_aead_gcm_aes_init(struct crypto_aead *tfm) in otx2_cpt_aead_gcm_aes_init() argument
697 return cpt_aead_init(tfm, OTX2_CPT_AES_GCM, OTX2_CPT_MAC_NULL); in otx2_cpt_aead_gcm_aes_init()
700 static void otx2_cpt_aead_exit(struct crypto_aead *tfm) in otx2_cpt_aead_exit() argument
702 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in otx2_cpt_aead_exit()
715 static int otx2_cpt_aead_gcm_set_authsize(struct crypto_aead *tfm, in otx2_cpt_aead_gcm_set_authsize() argument
718 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in otx2_cpt_aead_gcm_set_authsize()
723 tfm->authsize = authsize; in otx2_cpt_aead_gcm_set_authsize()
731 static int otx2_cpt_aead_set_authsize(struct crypto_aead *tfm, in otx2_cpt_aead_set_authsize() argument
734 tfm->authsize = authsize; in otx2_cpt_aead_set_authsize()
739 static int otx2_cpt_aead_null_set_authsize(struct crypto_aead *tfm, in otx2_cpt_aead_null_set_authsize() argument
742 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in otx2_cpt_aead_null_set_authsize()
745 tfm->authsize = authsize; in otx2_cpt_aead_null_set_authsize()
760 sdesc->shash.tfm = alg; in alloc_sdesc()
943 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in create_aead_ctx_hdr() local
944 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in create_aead_ctx_hdr()
947 int mac_len = crypto_aead_authsize(tfm); in create_aead_ctx_hdr()
962 memcpy(fctx->enc.encr_iv, req->iv, crypto_aead_ivsize(tfm)); in create_aead_ctx_hdr()
1034 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in create_hmac_ctx_hdr() local
1035 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in create_hmac_ctx_hdr()
1213 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in cpt_aead_enc_dec() local
1214 struct otx2_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in cpt_aead_enc_dec()
1233 create_aead_output_list(req, enc, crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()
1238 crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()
1240 crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()