Lines Matching refs:tfm

103 	struct crypto_aead *tfm;  in validate_hmac_cipher_null()  local
106 tfm = crypto_aead_reqtfm(req); in validate_hmac_cipher_null()
110 crypto_aead_authsize(tfm)) != 0) in validate_hmac_cipher_null()
239 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); in create_ctx_hdr() local
240 struct otx_cpt_enc_ctx *ctx = crypto_tfm_ctx(tfm); in create_ctx_hdr()
394 static int otx_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_xts_setkey() argument
397 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx_cpt_skcipher_xts_setkey()
402 ret = xts_verify_key(tfm, key, keylen); in otx_cpt_skcipher_xts_setkey()
423 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_des_setkey() argument
426 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_des_setkey()
439 static int cpt_aes_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_aes_setkey() argument
442 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_aes_setkey()
465 static int otx_cpt_skcipher_cbc_aes_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_cbc_aes_setkey() argument
468 return cpt_aes_setkey(tfm, key, keylen, OTX_CPT_AES_CBC); in otx_cpt_skcipher_cbc_aes_setkey()
471 static int otx_cpt_skcipher_ecb_aes_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_ecb_aes_setkey() argument
474 return cpt_aes_setkey(tfm, key, keylen, OTX_CPT_AES_ECB); in otx_cpt_skcipher_ecb_aes_setkey()
477 static int otx_cpt_skcipher_cfb_aes_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_cfb_aes_setkey() argument
480 return cpt_aes_setkey(tfm, key, keylen, OTX_CPT_AES_CFB); in otx_cpt_skcipher_cfb_aes_setkey()
483 static int otx_cpt_skcipher_cbc_des3_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_cbc_des3_setkey() argument
486 return cpt_des_setkey(tfm, key, keylen, OTX_CPT_DES3_CBC); in otx_cpt_skcipher_cbc_des3_setkey()
489 static int otx_cpt_skcipher_ecb_des3_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_ecb_des3_setkey() argument
492 return cpt_des_setkey(tfm, key, keylen, OTX_CPT_DES3_ECB); in otx_cpt_skcipher_ecb_des3_setkey()
495 static int otx_cpt_enc_dec_init(struct crypto_skcipher *tfm) in otx_cpt_enc_dec_init() argument
497 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx_cpt_enc_dec_init()
506 tfm, sizeof(struct otx_cpt_req_ctx) + in otx_cpt_enc_dec_init()
512 static int cpt_aead_init(struct crypto_aead *tfm, u8 cipher_type, u8 mac_type) in cpt_aead_init() argument
514 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in cpt_aead_init()
540 crypto_aead_set_reqsize_dma(tfm, sizeof(struct otx_cpt_req_ctx)); in cpt_aead_init()
578 static int otx_cpt_aead_cbc_aes_sha1_init(struct crypto_aead *tfm) in otx_cpt_aead_cbc_aes_sha1_init() argument
580 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA1); in otx_cpt_aead_cbc_aes_sha1_init()
583 static int otx_cpt_aead_cbc_aes_sha256_init(struct crypto_aead *tfm) in otx_cpt_aead_cbc_aes_sha256_init() argument
585 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA256); in otx_cpt_aead_cbc_aes_sha256_init()
588 static int otx_cpt_aead_cbc_aes_sha384_init(struct crypto_aead *tfm) in otx_cpt_aead_cbc_aes_sha384_init() argument
590 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA384); in otx_cpt_aead_cbc_aes_sha384_init()
593 static int otx_cpt_aead_cbc_aes_sha512_init(struct crypto_aead *tfm) in otx_cpt_aead_cbc_aes_sha512_init() argument
595 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA512); in otx_cpt_aead_cbc_aes_sha512_init()
598 static int otx_cpt_aead_ecb_null_sha1_init(struct crypto_aead *tfm) in otx_cpt_aead_ecb_null_sha1_init() argument
600 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA1); in otx_cpt_aead_ecb_null_sha1_init()
603 static int otx_cpt_aead_ecb_null_sha256_init(struct crypto_aead *tfm) in otx_cpt_aead_ecb_null_sha256_init() argument
605 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA256); in otx_cpt_aead_ecb_null_sha256_init()
608 static int otx_cpt_aead_ecb_null_sha384_init(struct crypto_aead *tfm) in otx_cpt_aead_ecb_null_sha384_init() argument
610 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA384); in otx_cpt_aead_ecb_null_sha384_init()
613 static int otx_cpt_aead_ecb_null_sha512_init(struct crypto_aead *tfm) in otx_cpt_aead_ecb_null_sha512_init() argument
615 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA512); in otx_cpt_aead_ecb_null_sha512_init()
618 static int otx_cpt_aead_gcm_aes_init(struct crypto_aead *tfm) in otx_cpt_aead_gcm_aes_init() argument
620 return cpt_aead_init(tfm, OTX_CPT_AES_GCM, OTX_CPT_MAC_NULL); in otx_cpt_aead_gcm_aes_init()
623 static void otx_cpt_aead_exit(struct crypto_aead *tfm) in otx_cpt_aead_exit() argument
625 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in otx_cpt_aead_exit()
637 static int otx_cpt_aead_set_authsize(struct crypto_aead *tfm, in otx_cpt_aead_set_authsize() argument
640 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in otx_cpt_aead_set_authsize()
691 tfm->authsize = authsize; in otx_cpt_aead_set_authsize()
705 sdesc->shash.tfm = alg; in alloc_sdesc()
895 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in create_aead_ctx_hdr() local
896 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in create_aead_ctx_hdr()
899 int mac_len = crypto_aead_authsize(tfm); in create_aead_ctx_hdr()
911 memcpy(fctx->enc.encr_iv, req->iv, crypto_aead_ivsize(tfm)); in create_aead_ctx_hdr()
980 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in create_hmac_ctx_hdr() local
981 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm); in create_hmac_ctx_hdr()
1148 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in cpt_aead_enc_dec() local
1168 crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()
1175 crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()
1179 crypto_aead_authsize(tfm)); in cpt_aead_enc_dec()