Home
last modified time | relevance | path

Searched refs:tfm (Results 151 – 175 of 481) sorted by relevance

12345678910>>...20

/openbmc/linux/crypto/
H A Dadiantum.c120 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_setkey()
134 crypto_skcipher_get_flags(tfm) & in adiantum_setkey()
162 crypto_skcipher_get_flags(tfm) & in adiantum_setkey()
221 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in adiantum_hash_header() local
250 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in adiantum_hash_message() local
259 hash_desc->tfm = tctx->hash; in adiantum_hash_message()
396 static int adiantum_init_tfm(struct crypto_skcipher *tfm) in adiantum_init_tfm() argument
400 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_init_tfm()
436 crypto_skcipher_set_reqsize(tfm, in adiantum_init_tfm()
448 static void adiantum_exit_tfm(struct crypto_skcipher *tfm) in adiantum_exit_tfm() argument
[all …]
H A Dcrc32c_generic.c59 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_init()
72 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, in chksum_setkey() argument
75 struct chksum_ctx *mctx = crypto_shash_ctx(tfm); in chksum_setkey()
117 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_digest()
122 static int crc32c_cra_init(struct crypto_tfm *tfm) in crc32c_cra_init() argument
124 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in crc32c_cra_init()
H A Dcurve25519-generic.c9 static int curve25519_set_secret(struct crypto_kpp *tfm, const void *buf, in curve25519_set_secret() argument
12 u8 *secret = kpp_tfm_ctx(tfm); in curve25519_set_secret()
26 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); in curve25519_compute_value() local
27 const u8 *secret = kpp_tfm_ctx(tfm); in curve25519_compute_value()
57 static unsigned int curve25519_max_size(struct crypto_kpp *tfm) in curve25519_max_size() argument
/openbmc/linux/include/crypto/internal/
H A Dskcipher.h164 static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) in crypto_skcipher_ctx() argument
166 return crypto_tfm_ctx(&tfm->base); in crypto_skcipher_ctx()
169 static inline void *crypto_skcipher_ctx_dma(struct crypto_skcipher *tfm) in crypto_skcipher_ctx_dma() argument
171 return crypto_tfm_ctx_dma(&tfm->base); in crypto_skcipher_ctx_dma()
224 struct crypto_skcipher *tfm) in crypto_skcipher_walksize() argument
226 return crypto_skcipher_alg_walksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_walksize()
234 skcipher_cipher_simple(struct crypto_skcipher *tfm) in skcipher_cipher_simple() argument
236 struct skcipher_ctx_simple *ctx = crypto_skcipher_ctx(tfm); in skcipher_cipher_simple()
H A Daead.h37 static inline void *crypto_aead_ctx(struct crypto_aead *tfm) in crypto_aead_ctx() argument
39 return crypto_tfm_ctx(&tfm->base); in crypto_aead_ctx()
42 static inline void *crypto_aead_ctx_dma(struct crypto_aead *tfm) in crypto_aead_ctx_dma() argument
44 return crypto_tfm_ctx_dma(&tfm->base); in crypto_aead_ctx_dma()
155 static inline unsigned int crypto_aead_chunksize(struct crypto_aead *tfm) in crypto_aead_chunksize() argument
157 return crypto_aead_alg_chunksize(crypto_aead_alg(tfm)); in crypto_aead_chunksize()
/openbmc/linux/fs/smb/server/
H A Dcrypto_ctx.h45 #define CRYPTO_HMACMD5_TFM(c) ((c)->desc[CRYPTO_SHASH_HMACMD5]->tfm)
47 ((c)->desc[CRYPTO_SHASH_HMACSHA256]->tfm)
48 #define CRYPTO_CMACAES_TFM(c) ((c)->desc[CRYPTO_SHASH_CMACAES]->tfm)
49 #define CRYPTO_SHA256_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA256]->tfm)
50 #define CRYPTO_SHA512_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA512]->tfm)
/openbmc/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes-galois.c29 static int ccp_aes_gcm_setkey(struct crypto_aead *tfm, const u8 *key, in ccp_aes_gcm_setkey() argument
32 struct ccp_ctx *ctx = crypto_aead_ctx_dma(tfm); in ccp_aes_gcm_setkey()
57 static int ccp_aes_gcm_setauthsize(struct crypto_aead *tfm, in ccp_aes_gcm_setauthsize() argument
78 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in ccp_aes_gcm_crypt() local
79 struct ccp_ctx *ctx = crypto_aead_ctx_dma(tfm); in ccp_aes_gcm_crypt()
119 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
149 static int ccp_aes_gcm_cra_init(struct crypto_aead *tfm) in ccp_aes_gcm_cra_init() argument
151 struct ccp_ctx *ctx = crypto_aead_ctx_dma(tfm); in ccp_aes_gcm_cra_init()
156 crypto_aead_set_reqsize_dma(tfm, sizeof(struct ccp_aes_req_ctx)); in ccp_aes_gcm_cra_init()
161 static void ccp_aes_gcm_cra_exit(struct crypto_tfm *tfm) in ccp_aes_gcm_cra_exit() argument
/openbmc/linux/arch/x86/crypto/
H A Daria_gfni_avx512_glue.c55 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx512_ecb_encrypt() local
56 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx512_ecb_encrypt()
63 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx512_ecb_decrypt() local
64 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx512_ecb_decrypt()
69 static int aria_avx512_set_key(struct crypto_skcipher *tfm, const u8 *key, in aria_avx512_set_key() argument
72 return aria_set_key(&tfm->base, key, keylen); in aria_avx512_set_key()
78 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx512_ctr_encrypt() local
79 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx512_ctr_encrypt()
158 static int aria_avx512_init_tfm(struct crypto_skcipher *tfm) in aria_avx512_init_tfm() argument
160 crypto_skcipher_set_reqsize(tfm, in aria_avx512_init_tfm()
H A Daria_aesni_avx2_glue.c68 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx2_ecb_encrypt() local
69 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx2_ecb_encrypt()
76 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx2_ecb_decrypt() local
77 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx2_ecb_decrypt()
82 static int aria_avx2_set_key(struct crypto_skcipher *tfm, const u8 *key, in aria_avx2_set_key() argument
85 return aria_set_key(&tfm->base, key, keylen); in aria_avx2_set_key()
91 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in aria_avx2_ctr_encrypt() local
92 struct aria_ctx *ctx = crypto_skcipher_ctx(tfm); in aria_avx2_ctr_encrypt()
159 static int aria_avx2_init_tfm(struct crypto_skcipher *tfm) in aria_avx2_init_tfm() argument
161 crypto_skcipher_set_reqsize(tfm, sizeof(struct aria_avx2_request_ctx)); in aria_avx2_init_tfm()
H A Dsm4_aesni_avx_glue.c36 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_skcipher_setkey()
77 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_avx_ecb_encrypt() local
78 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_avx_ecb_encrypt()
86 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_avx_ecb_decrypt() local
87 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_avx_ecb_decrypt()
95 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_cbc_encrypt() local
96 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_cbc_encrypt()
130 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_avx_cbc_decrypt()
194 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_cfb_encrypt()
236 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_avx_cfb_decrypt()
[all …]
/openbmc/linux/drivers/crypto/intel/keembay/
H A Dkeembay-ocs-hcu-core.c575 rctx->dig_sz = crypto_ahash_digestsize(tfm); in kmb_ocs_hcu_init()
752 size_t blk_sz = crypto_ahash_blocksize(tfm); in kmb_ocs_hcu_setkey()
831 struct ocs_hcu_ctx *ctx = crypto_tfm_ctx(tfm); in kmb_ocs_hcu_sha_cra_init()
833 __cra_init(tfm, ctx); in kmb_ocs_hcu_sha_cra_init()
840 struct ocs_hcu_ctx *ctx = crypto_tfm_ctx(tfm); in kmb_ocs_hcu_sm3_cra_init()
842 __cra_init(tfm, ctx); in kmb_ocs_hcu_sm3_cra_init()
851 struct ocs_hcu_ctx *ctx = crypto_tfm_ctx(tfm); in kmb_ocs_hcu_hmac_sm3_cra_init()
853 __cra_init(tfm, ctx); in kmb_ocs_hcu_hmac_sm3_cra_init()
863 struct ocs_hcu_ctx *ctx = crypto_tfm_ctx(tfm); in kmb_ocs_hcu_hmac_cra_init()
865 __cra_init(tfm, ctx); in kmb_ocs_hcu_hmac_cra_init()
[all …]
/openbmc/linux/drivers/staging/rtl8192u/ieee80211/
H A Dieee80211_crypt_ccmp.c48 struct crypto_aead *tfm; member
65 if (IS_ERR(priv->tfm)) { in ieee80211_ccmp_init()
67 priv->tfm = NULL; in ieee80211_ccmp_init()
75 if (priv->tfm) in ieee80211_ccmp_init()
76 crypto_free_aead(priv->tfm); in ieee80211_ccmp_init()
87 if (_priv && _priv->tfm) in ieee80211_ccmp_deinit()
88 crypto_free_aead(_priv->tfm); in ieee80211_ccmp_deinit()
205 req = aead_request_alloc(key->tfm, GFP_ATOMIC); in ieee80211_ccmp_encrypt()
292 req = aead_request_alloc(key->tfm, GFP_ATOMIC); in ieee80211_ccmp_decrypt()
332 struct crypto_aead *tfm = data->tfm; in ieee80211_ccmp_set_key() local
[all …]
/openbmc/linux/arch/sparc/crypto/
H A Daes_glue.c168 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
171 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_set_key()
202 return aes_set_key(crypto_skcipher_tfm(tfm), in_key, key_len); in aes_set_key_skcipher()
207 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_aes_encrypt()
214 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_aes_decrypt()
221 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_encrypt() local
222 const struct crypto_sparc64_aes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_encrypt()
244 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_decrypt() local
270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_encrypt() local
294 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_decrypt() local
[all …]
/openbmc/linux/arch/arm64/crypto/
H A Daes-neonbs-glue.c77 struct aesbs_ctx *ctx = crypto_skcipher_ctx(tfm); in aesbs_setkey()
98 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in __ecb_crypt() local
99 struct aesbs_ctx *ctx = crypto_skcipher_ctx(tfm); in __ecb_crypt()
136 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in aesbs_cbc_ctr_setkey()
159 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_encrypt()
182 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_decrypt()
254 struct aesbs_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in aesbs_xts_setkey()
258 err = xts_verify_key(tfm, in_key, key_len); in aesbs_xts_setkey()
273 return aesbs_setkey(tfm, in_key, key_len); in aesbs_xts_setkey()
281 struct aesbs_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in __xts_crypt()
[all …]
/openbmc/linux/drivers/crypto/nx/
H A Dnx.c695 int nx_crypto_ctx_aes_ccm_init(struct crypto_aead *tfm) in nx_crypto_ctx_aes_ccm_init() argument
697 crypto_aead_set_reqsize(tfm, sizeof(struct nx_ccm_rctx)); in nx_crypto_ctx_aes_ccm_init()
702 int nx_crypto_ctx_aes_gcm_init(struct crypto_aead *tfm) in nx_crypto_ctx_aes_gcm_init() argument
704 crypto_aead_set_reqsize(tfm, sizeof(struct nx_gcm_rctx)); in nx_crypto_ctx_aes_gcm_init()
727 int nx_crypto_ctx_sha_init(struct crypto_tfm *tfm) in nx_crypto_ctx_sha_init() argument
732 int nx_crypto_ctx_aes_xcbc_init(struct crypto_tfm *tfm) in nx_crypto_ctx_aes_xcbc_init() argument
746 void nx_crypto_ctx_exit(struct crypto_tfm *tfm) in nx_crypto_ctx_exit() argument
748 struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(tfm); in nx_crypto_ctx_exit()
759 nx_crypto_ctx_exit(crypto_skcipher_ctx(tfm)); in nx_crypto_ctx_skcipher_exit()
762 void nx_crypto_ctx_aead_exit(struct crypto_aead *tfm) in nx_crypto_ctx_aead_exit() argument
[all …]
/openbmc/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c26 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in rk_cipher_need_fallback()
30 unsigned int bs = crypto_skcipher_blocksize(tfm); in rk_cipher_need_fallback()
71 struct rk_cipher_ctx *op = crypto_skcipher_ctx(tfm); in rk_cipher_fallback()
73 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in rk_cipher_fallback()
111 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_aes_setkey() local
112 struct rk_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in rk_aes_setkey()
260 block = crypto_tfm_alg_blocksize(tfm); in rk_cipher_hw_init()
306 int ivsize = crypto_skcipher_ivsize(tfm); in rk_cipher_run()
324 ivsize = crypto_skcipher_ivsize(tfm); in rk_cipher_run()
325 if (areq->iv && crypto_skcipher_ivsize(tfm) > 0) { in rk_cipher_run()
[all …]
/openbmc/linux/drivers/crypto/hisilicon/sec2/
H A Dsec_crypto.c728 ret = sec_skcipher_fbtfm_init(tfm); in sec_skcipher_init()
902 struct crypto_aead *tfm; in GEN_SEC_SETKEY_FUNC() local
918 tfm = crypto_aead_reqtfm(aead_req); in GEN_SEC_SETKEY_FUNC()
1860 ret = sec_skcipher_init(tfm); in sec_skcipher_ctx_init()
1877 sec_skcipher_uninit(tfm); in sec_skcipher_ctx_exit()
1937 ret = sec_aead_init(tfm); in sec_aead_ctx_init()
1946 sec_aead_exit(tfm); in sec_aead_ctx_init()
1958 sec_aead_exit(tfm); in sec_aead_ctx_exit()
1969 ret = sec_aead_init(tfm); in sec_aead_xcm_ctx_init()
1980 sec_aead_exit(tfm); in sec_aead_xcm_ctx_init()
[all …]
/openbmc/linux/crypto/asymmetric_keys/
H A Dx509_public_key.c28 struct crypto_shash *tfm; in x509_get_sig_params() local
44 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in x509_get_sig_params()
45 if (IS_ERR(tfm)) { in x509_get_sig_params()
46 if (PTR_ERR(tfm) == -ENOENT) { in x509_get_sig_params()
50 return PTR_ERR(tfm); in x509_get_sig_params()
53 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in x509_get_sig_params()
54 sig->digest_size = crypto_shash_digestsize(tfm); in x509_get_sig_params()
65 desc->tfm = tfm; in x509_get_sig_params()
97 crypto_free_shash(tfm); in x509_get_sig_params()
/openbmc/linux/drivers/crypto/
H A Dmxs-dcp.c515 tfm->base.crt_flags & CRYPTO_TFM_REQ_MASK); in mxs_dcp_aes_setkey()
550 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in mxs_dcp_run_sha() local
551 struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); in mxs_dcp_run_sha()
620 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in dcp_sha_req_to_buf() local
621 struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); in dcp_sha_req_to_buf()
726 struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); in dcp_sha_init()
756 struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); in dcp_sha_update_fx()
818 struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm); in dcp_sha_import()
842 static int dcp_sha_cra_init(struct crypto_tfm *tfm) in dcp_sha_cra_init() argument
844 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in dcp_sha_cra_init()
[all …]
/openbmc/linux/drivers/crypto/qce/
H A Daead.c188 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in qce_aead_ccm_prepare_buf_assoclen() local
190 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_ccm_prepare_buf_assoclen()
333 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_ccm_prepare_buf()
429 rctx->ivsize = crypto_aead_ivsize(tfm); in qce_aead_async_req_handle()
506 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_crypt()
568 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_ccm_setkey()
597 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_setkey()
653 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_setauthsize()
667 static int qce_aead_init(struct crypto_aead *tfm) in qce_aead_init() argument
669 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); in qce_aead_init()
[all …]
/openbmc/linux/drivers/crypto/starfive/
H A Djh7110-rsa.c313 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_enc()
322 akcipher_request_set_tfm(req, tfm); in starfive_rsa_enc()
344 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_dec()
353 akcipher_request_set_tfm(req, tfm); in starfive_rsa_dec()
478 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_setkey()
529 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_set_pub_key()
536 return starfive_rsa_setkey(tfm, key, keylen, false); in starfive_rsa_set_pub_key()
542 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_set_priv_key()
549 return starfive_rsa_setkey(tfm, key, keylen, true); in starfive_rsa_set_priv_key()
554 struct starfive_cryp_ctx *ctx = akcipher_tfm_ctx(tfm); in starfive_rsa_max_size()
[all …]
/openbmc/linux/drivers/block/zram/
H A Dzcomp.c38 if (!IS_ERR_OR_NULL(zstrm->tfm)) in zcomp_strm_free()
39 crypto_free_comp(zstrm->tfm); in zcomp_strm_free()
41 zstrm->tfm = NULL; in zcomp_strm_free()
51 zstrm->tfm = crypto_alloc_comp(comp->name, 0, 0); in zcomp_strm_init()
57 if (IS_ERR_OR_NULL(zstrm->tfm) || !zstrm->buffer) { in zcomp_strm_init()
136 return crypto_comp_compress(zstrm->tfm, in zcomp_compress()
146 return crypto_comp_decompress(zstrm->tfm, in zcomp_decompress()
/openbmc/linux/drivers/crypto/intel/qat/qat_common/
H A Dqat_comp_algs.c81 struct crypto_acomp *tfm = crypto_acomp_reqtfm(areq); in qat_comp_resubmit() local
90 crypto_tfm_alg_driver_name(crypto_acomp_tfm(tfm)), in qat_comp_resubmit()
181 struct crypto_acomp *tfm = crypto_acomp_reqtfm(areq); in qat_comp_generic_callback() local
199 crypto_tfm_alg_driver_name(crypto_acomp_tfm(tfm)), in qat_comp_generic_callback()
266 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp_tfm); in qat_comp_alg_init_tfm() local
271 if (tfm->node == NUMA_NO_NODE) in qat_comp_alg_init_tfm()
274 node = tfm->node; in qat_comp_alg_init_tfm()
289 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp_tfm); in qat_comp_alg_exit_tfm() local
298 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp_tfm); in qat_comp_alg_rfc1950_init_tfm() local
314 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp_tfm); in qat_comp_alg_compress_decompress() local
[all …]
/openbmc/linux/Documentation/crypto/
H A Dapi-samples.rst15 struct crypto_skcipher *tfm = NULL;
26 * Allocate a tfm (a transformation object) and set the key.
28 * In real-world use, a tfm and key are typically used for many
33 tfm = crypto_alloc_skcipher("xts(aes)", 0, 0);
34 if (IS_ERR(tfm)) {
35 pr_err("Error allocating xts(aes) handle: %ld\n", PTR_ERR(tfm));
36 return PTR_ERR(tfm);
40 err = crypto_skcipher_setkey(tfm, key, sizeof(key));
47 req = skcipher_request_alloc(tfm, GFP_KERNEL);
86 crypto_free_skcipher(tfm);
[all …]
/openbmc/linux/net/ceph/
H A Dcrypto.c29 key->tfm = NULL; in set_secret()
51 key->tfm = crypto_alloc_sync_skcipher("cbc(aes)", 0, 0); in set_secret()
53 if (IS_ERR(key->tfm)) { in set_secret()
54 ret = PTR_ERR(key->tfm); in set_secret()
55 key->tfm = NULL; in set_secret()
59 ret = crypto_sync_skcipher_setkey(key->tfm, key->key, key->len); in set_secret()
140 if (key->tfm) { in ceph_crypto_key_destroy()
141 crypto_free_sync_skcipher(key->tfm); in ceph_crypto_key_destroy()
142 key->tfm = NULL; in ceph_crypto_key_destroy()
222 SYNC_SKCIPHER_REQUEST_ON_STACK(req, key->tfm); in ceph_aes_crypt()
[all …]

12345678910>>...20