Lines Matching defs:tfm

1235 static int artpec6_crypto_aead_init(struct crypto_aead *tfm)
1237 struct artpec6_cryptotfm_context *tfm_ctx = crypto_aead_ctx(tfm);
1241 crypto_aead_set_reqsize(tfm,
1247 static int artpec6_crypto_aead_set_key(struct crypto_aead *tfm, const u8 *key,
1250 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(&tfm->base);
1309 struct artpec6_hashalg_context *ctx = crypto_tfm_ctx(areq->base.tfm);
1533 static int artpec6_crypto_aes_ecb_init(struct crypto_skcipher *tfm)
1535 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1537 tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
1543 static int artpec6_crypto_aes_ctr_init(struct crypto_skcipher *tfm)
1545 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1548 crypto_alloc_sync_skcipher(crypto_tfm_alg_name(&tfm->base),
1553 tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
1559 static int artpec6_crypto_aes_cbc_init(struct crypto_skcipher *tfm)
1561 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1563 tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
1569 static int artpec6_crypto_aes_xts_init(struct crypto_skcipher *tfm)
1571 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1573 tfm->reqsize = sizeof(struct artpec6_crypto_request_context);
1579 static void artpec6_crypto_aes_exit(struct crypto_skcipher *tfm)
1581 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1586 static void artpec6_crypto_aes_ctr_exit(struct crypto_skcipher *tfm)
1588 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(tfm);
1591 artpec6_crypto_aes_exit(tfm);
1831 struct artpec6_cryptotfm_context *ctx = crypto_tfm_ctx(areq->base.tfm);
2224 artpec6_crypto_hash_set_key(struct crypto_ahash *tfm,
2227 struct artpec6_hashalg_context *tfm_ctx = crypto_tfm_ctx(&tfm->base);
2239 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm));
2387 static int artpec6_crypto_ahash_init_common(struct crypto_tfm *tfm,
2390 struct artpec6_hashalg_context *tfm_ctx = crypto_tfm_ctx(tfm);
2392 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
2411 static int artpec6_crypto_ahash_init(struct crypto_tfm *tfm)
2413 return artpec6_crypto_ahash_init_common(tfm, NULL);
2416 static int artpec6_crypto_ahash_init_hmac_sha256(struct crypto_tfm *tfm)
2418 return artpec6_crypto_ahash_init_common(tfm, "sha256");
2421 static void artpec6_crypto_ahash_exit(struct crypto_tfm *tfm)
2423 struct artpec6_hashalg_context *tfm_ctx = crypto_tfm_ctx(tfm);