Lines Matching refs:tfm

102 	struct crypto_aead *tfm;
105 tfm = crypto_aead_reqtfm(req);
109 crypto_aead_authsize(tfm)) != 0)
238 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm);
239 struct otx_cpt_enc_ctx *ctx = crypto_tfm_ctx(tfm);
393 static int otx_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm,
396 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm);
401 ret = xts_verify_key(tfm, key, keylen);
422 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key,
425 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm);
438 static int cpt_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
441 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm);
464 static int otx_cpt_skcipher_cbc_aes_setkey(struct crypto_skcipher *tfm,
467 return cpt_aes_setkey(tfm, key, keylen, OTX_CPT_AES_CBC);
470 static int otx_cpt_skcipher_ecb_aes_setkey(struct crypto_skcipher *tfm,
473 return cpt_aes_setkey(tfm, key, keylen, OTX_CPT_AES_ECB);
476 static int otx_cpt_skcipher_cbc_des3_setkey(struct crypto_skcipher *tfm,
479 return cpt_des_setkey(tfm, key, keylen, OTX_CPT_DES3_CBC);
482 static int otx_cpt_skcipher_ecb_des3_setkey(struct crypto_skcipher *tfm,
485 return cpt_des_setkey(tfm, key, keylen, OTX_CPT_DES3_ECB);
488 static int otx_cpt_enc_dec_init(struct crypto_skcipher *tfm)
490 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm);
499 tfm, sizeof(struct otx_cpt_req_ctx) +
505 static int cpt_aead_init(struct crypto_aead *tfm, u8 cipher_type, u8 mac_type)
507 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
549 crypto_aead_set_reqsize_dma(tfm, sizeof(struct otx_cpt_req_ctx));
554 static int otx_cpt_aead_cbc_aes_sha1_init(struct crypto_aead *tfm)
556 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA1);
559 static int otx_cpt_aead_cbc_aes_sha256_init(struct crypto_aead *tfm)
561 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA256);
564 static int otx_cpt_aead_cbc_aes_sha384_init(struct crypto_aead *tfm)
566 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA384);
569 static int otx_cpt_aead_cbc_aes_sha512_init(struct crypto_aead *tfm)
571 return cpt_aead_init(tfm, OTX_CPT_AES_CBC, OTX_CPT_SHA512);
574 static int otx_cpt_aead_ecb_null_sha1_init(struct crypto_aead *tfm)
576 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA1);
579 static int otx_cpt_aead_ecb_null_sha256_init(struct crypto_aead *tfm)
581 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA256);
584 static int otx_cpt_aead_ecb_null_sha384_init(struct crypto_aead *tfm)
586 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA384);
589 static int otx_cpt_aead_ecb_null_sha512_init(struct crypto_aead *tfm)
591 return cpt_aead_init(tfm, OTX_CPT_CIPHER_NULL, OTX_CPT_SHA512);
594 static int otx_cpt_aead_gcm_aes_init(struct crypto_aead *tfm)
596 return cpt_aead_init(tfm, OTX_CPT_AES_GCM, OTX_CPT_MAC_NULL);
599 static void otx_cpt_aead_exit(struct crypto_aead *tfm)
601 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
614 static int otx_cpt_aead_set_authsize(struct crypto_aead *tfm,
617 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
668 tfm->authsize = authsize;
682 sdesc->shash.tfm = alg;
964 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
965 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
968 int mac_len = crypto_aead_authsize(tfm);
980 memcpy(fctx->enc.encr_iv, req->iv, crypto_aead_ivsize(tfm));
1049 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1050 struct otx_cpt_aead_ctx *ctx = crypto_aead_ctx_dma(tfm);
1217 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
1237 crypto_aead_authsize(tfm));
1244 crypto_aead_authsize(tfm));
1248 crypto_aead_authsize(tfm));