Home
last modified time | relevance | path

Searched refs:tfm (Results 76 – 100 of 481) sorted by relevance

12345678910>>...20

/openbmc/linux/arch/x86/crypto/
H A Ddes3_ede_glue.c58 des3_ede_enc_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_encrypt()
63 des3_ede_dec_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_decrypt()
112 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_encrypt() local
113 struct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_encrypt()
120 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_decrypt() local
121 struct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_decrypt()
151 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cbc_encrypt() local
152 struct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_encrypt()
231 struct des3_ede_x86_ctx *ctx = crypto_skcipher_ctx(tfm); in cbc_decrypt()
249 struct des3_ede_x86_ctx *ctx = crypto_tfm_ctx(tfm); in des3_ede_x86_setkey()
[all …]
/openbmc/linux/net/mac80211/
H A Daes_ccm.h21 ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, in ieee80211_aes_ccm_encrypt() argument
25 return aead_encrypt(tfm, b_0, aad + 2, in ieee80211_aes_ccm_encrypt()
31 ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, in ieee80211_aes_ccm_decrypt() argument
35 return aead_decrypt(tfm, b_0, aad + 2, in ieee80211_aes_ccm_decrypt()
40 static inline void ieee80211_aes_key_free(struct crypto_aead *tfm) in ieee80211_aes_key_free() argument
42 return aead_key_free(tfm); in ieee80211_aes_key_free()
H A Daes_gcm.h13 static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, in ieee80211_aes_gcm_encrypt() argument
17 return aead_encrypt(tfm, j_0, aad + 2, in ieee80211_aes_gcm_encrypt()
22 static inline int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, in ieee80211_aes_gcm_decrypt() argument
26 return aead_decrypt(tfm, j_0, aad + 2, in ieee80211_aes_gcm_decrypt()
38 static inline void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) in ieee80211_aes_gcm_key_free() argument
40 return aead_key_free(tfm); in ieee80211_aes_gcm_key_free()
/openbmc/linux/drivers/crypto/amlogic/
H A Damlogic-gxl-cipher.c60 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher_do_fallback() local
65 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher_do_fallback()
90 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher()
107 crypto_tfm_alg_name(areq->base.tfm), in meson_cipher()
109 rctx->op_dir, crypto_skcipher_ivsize(tfm), in meson_cipher()
129 ivsize = crypto_skcipher_ivsize(tfm); in meson_cipher()
310 int meson_cipher_init(struct crypto_tfm *tfm) in meson_cipher_init() argument
312 struct meson_cipher_tfm_ctx *op = crypto_tfm_ctx(tfm); in meson_cipher_init()
314 const char *name = crypto_tfm_alg_name(tfm); in meson_cipher_init()
336 void meson_cipher_exit(struct crypto_tfm *tfm) in meson_cipher_exit() argument
[all …]
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c47 sdesc->tfm = xtfm; in sun8i_ss_hashkey()
115 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_init_tfm()
130 crypto_ahash_set_statesize(tfm, in sun8i_ss_hash_init_tfm()
133 crypto_ahash_set_reqsize(tfm, in sun8i_ss_hash_init_tfm()
211 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_final()
255 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_finup()
360 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_need_fallback()
410 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_digest()
496 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_run()
500 int bs = crypto_ahash_blocksize(tfm); in sun8i_ss_hash_run()
[all …]
H A Dsun8i-ss.h288 int sun8i_ss_aes_setkey(struct crypto_skcipher *tfm, const u8 *key,
290 int sun8i_ss_des3_setkey(struct crypto_skcipher *tfm, const u8 *key,
292 int sun8i_ss_cipher_init(struct crypto_tfm *tfm);
293 void sun8i_ss_cipher_exit(struct crypto_tfm *tfm);
301 int sun8i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src,
303 int sun8i_ss_prng_seed(struct crypto_rng *tfm, const u8 *seed, unsigned int slen);
304 int sun8i_ss_prng_init(struct crypto_tfm *tfm);
305 void sun8i_ss_prng_exit(struct crypto_tfm *tfm);
307 int sun8i_ss_hash_init_tfm(struct crypto_ahash *tfm);
308 void sun8i_ss_hash_exit_tfm(struct crypto_ahash *tfm);
/openbmc/linux/drivers/crypto/vmx/
H A Daes_xts.c26 static int p8_aes_xts_init(struct crypto_skcipher *tfm) in p8_aes_xts_init() argument
28 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_init()
40 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) + in p8_aes_xts_init()
46 static void p8_aes_xts_exit(struct crypto_skcipher *tfm) in p8_aes_xts_exit() argument
48 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_exit()
53 static int p8_aes_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, in p8_aes_xts_setkey() argument
56 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_setkey()
59 ret = xts_verify_key(tfm, key, keylen); in p8_aes_xts_setkey()
80 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in p8_aes_xts_crypt() local
81 const struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_crypt()
H A Daes_ctr.c23 static int p8_aes_ctr_init(struct crypto_skcipher *tfm) in p8_aes_ctr_init() argument
25 struct p8_aes_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_ctr_init()
37 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) + in p8_aes_ctr_init()
43 static void p8_aes_ctr_exit(struct crypto_skcipher *tfm) in p8_aes_ctr_exit() argument
45 struct p8_aes_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_ctr_exit()
50 static int p8_aes_ctr_setkey(struct crypto_skcipher *tfm, const u8 *key, in p8_aes_ctr_setkey() argument
53 struct p8_aes_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_ctr_setkey()
92 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in p8_aes_ctr_crypt() local
93 const struct p8_aes_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_ctr_crypt()
/openbmc/linux/crypto/
H A Drsa-pkcs1pad.c110 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_set_pub_key()
131 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_set_priv_key()
151 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_get_max_size()
177 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_encrypt_sign_complete()
229 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_encrypt()
277 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_decrypt_complete()
344 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_decrypt()
377 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_sign()
434 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_verify_complete()
531 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); in pkcs1pad_verify()
[all …]
H A Dzstd.c106 static void *zstd_alloc_ctx(struct crypto_scomp *tfm) in zstd_alloc_ctx() argument
124 static int zstd_init(struct crypto_tfm *tfm) in zstd_init() argument
126 struct zstd_ctx *ctx = crypto_tfm_ctx(tfm); in zstd_init()
137 static void zstd_free_ctx(struct crypto_scomp *tfm, void *ctx) in zstd_free_ctx() argument
143 static void zstd_exit(struct crypto_tfm *tfm) in zstd_exit() argument
145 struct zstd_ctx *ctx = crypto_tfm_ctx(tfm); in zstd_exit()
164 static int zstd_compress(struct crypto_tfm *tfm, const u8 *src, in zstd_compress() argument
167 struct zstd_ctx *ctx = crypto_tfm_ctx(tfm); in zstd_compress()
172 static int zstd_scompress(struct crypto_scomp *tfm, const u8 *src, in zstd_scompress() argument
192 static int zstd_decompress(struct crypto_tfm *tfm, const u8 *src, in zstd_decompress() argument
[all …]
H A Dscompress.c115 struct crypto_acomp *tfm = crypto_acomp_reqtfm(req); in scomp_acomp_comp_decomp() local
116 void **tfm_ctx = acomp_tfm_ctx(tfm); in scomp_acomp_comp_decomp()
175 struct crypto_scomp **ctx = crypto_tfm_ctx(tfm); in crypto_exit_scomp_ops_async()
187 struct crypto_alg *calg = tfm->__crt_alg; in crypto_init_scomp_ops_async()
188 struct crypto_acomp *crt = __crypto_acomp_tfm(tfm); in crypto_init_scomp_ops_async()
189 struct crypto_scomp **ctx = crypto_tfm_ctx(tfm); in crypto_init_scomp_ops_async()
202 tfm->exit = crypto_exit_scomp_ops_async; in crypto_init_scomp_ops_async()
215 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp); in crypto_acomp_scomp_alloc_ctx() local
216 struct crypto_scomp **tfm_ctx = crypto_tfm_ctx(tfm); in crypto_acomp_scomp_alloc_ctx()
234 struct crypto_tfm *tfm = crypto_acomp_tfm(acomp); in crypto_acomp_scomp_free_ctx() local
[all …]
H A Dcmac.c109 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_cmac_digest_init()
121 struct crypto_shash *parent = pdesc->tfm; in crypto_cmac_digest_update()
125 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update() local
143 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_cmac_digest_update()
151 crypto_cipher_encrypt_one(tfm, prev, prev); in crypto_cmac_digest_update()
167 struct crypto_shash *parent = pdesc->tfm; in crypto_cmac_digest_final()
171 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final() local
196 crypto_cipher_encrypt_one(tfm, out, prev); in crypto_cmac_digest_final()
201 static int cmac_init_tfm(struct crypto_shash *tfm) in cmac_init_tfm() argument
204 struct cmac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in cmac_init_tfm()
[all …]
H A Dtea.c42 static int tea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in tea_setkey() argument
45 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_setkey()
57 static void tea_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in tea_encrypt() argument
61 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_encrypt()
89 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in tea_decrypt()
115 static int xtea_setkey(struct crypto_tfm *tfm, const u8 *in_key, in xtea_setkey() argument
118 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_setkey()
134 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_encrypt()
154 struct tea_ctx *ctx = crypto_tfm_ctx(tfm); in xtea_decrypt()
178 struct xtea_ctx *ctx = crypto_tfm_ctx(tfm); in xeta_encrypt()
[all …]
H A Dxctr.c35 struct crypto_cipher *tfm, u32 byte_ctr) in crypto_xctr_crypt_final() argument
44 crypto_cipher_encrypt_one(tfm, keystream, walk->iv); in crypto_xctr_crypt_final()
50 struct crypto_cipher *tfm, u32 byte_ctr) in crypto_xctr_crypt_segment() argument
53 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_xctr_crypt_segment()
61 fn(crypto_cipher_tfm(tfm), dst, walk->iv); in crypto_xctr_crypt_segment()
75 struct crypto_cipher *tfm, u32 byte_ctr) in crypto_xctr_crypt_inplace() argument
78 crypto_cipher_alg(tfm)->cia_encrypt; in crypto_xctr_crypt_inplace()
79 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_xctr_crypt_inplace()
88 fn(crypto_cipher_tfm(tfm), keystream, walk->iv); in crypto_xctr_crypt_inplace()
102 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_xctr_crypt() local
[all …]
H A Dsm4_generic.c31 static int sm4_setkey(struct crypto_tfm *tfm, const u8 *in_key, in sm4_setkey() argument
34 struct sm4_ctx *ctx = crypto_tfm_ctx(tfm); in sm4_setkey()
41 static void sm4_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in sm4_encrypt() argument
43 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm); in sm4_encrypt()
50 static void sm4_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in sm4_decrypt() argument
52 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm); in sm4_decrypt()
H A Dtestmgr.c1277 struct crypto_shash *tfm = desc->tfm; in test_shash_vec_cfg() local
1872 if (IS_ERR(tfm)) { in alloc_shash()
1890 desc->tfm = tfm; in alloc_shash()
1892 *tfm_ret = tfm; in alloc_shash()
2490 struct crypto_aead *tfm = ctx->tfm; in test_aead_vs_generic_impl() local
2682 if (IS_ERR(tfm)) { in alg_test_aead()
3259 if (IS_ERR(tfm)) { in alg_test_skcipher()
3672 if (IS_ERR(tfm)) { in alg_test_cipher()
3736 if (IS_ERR(tfm)) { in alg_test_crc32c()
3755 shash->tfm = tfm; in alg_test_crc32c()
[all …]
H A Dcbc.c26 struct crypto_tfm *tfm; in crypto_cbc_encrypt_segment() local
30 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_segment()
35 fn(tfm, dst, iv); in crypto_cbc_encrypt_segment()
53 struct crypto_tfm *tfm; in crypto_cbc_encrypt_inplace() local
57 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_inplace()
62 fn(tfm, src, src); in crypto_cbc_encrypt_inplace()
101 struct crypto_tfm *tfm; in crypto_cbc_decrypt_segment() local
105 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_decrypt_segment()
109 fn(tfm, dst, src); in crypto_cbc_decrypt_segment()
131 struct crypto_tfm *tfm; in crypto_cbc_decrypt_inplace() local
[all …]
/openbmc/linux/arch/arm64/crypto/
H A Daes-glue.c151 ret = xts_verify_key(tfm, in_key, key_len); in xts_set_key()
288 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_encrypt()
345 skcipher_request_set_tfm(&subreq, tfm); in cts_cbc_decrypt()
563 skcipher_request_set_tfm(&subreq, tfm); in xts_encrypt()
635 skcipher_request_set_tfm(&subreq, tfm); in xts_decrypt()
803 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in cbcmac_setkey()
820 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in cmac_setkey()
825 err = cbcmac_setkey(tfm, in_key, key_len); in cmac_setkey()
850 struct mac_tfm_ctx *ctx = crypto_shash_ctx(tfm); in xcbc_setkey()
855 err = cbcmac_setkey(tfm, in_key, key_len); in xcbc_setkey()
[all …]
/openbmc/linux/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c1121 struct crypto_ahash *tfm; in __safexcel_hmac_setkey() local
1127 if (IS_ERR(tfm)) in __safexcel_hmac_setkey()
1128 return PTR_ERR(tfm); in __safexcel_hmac_setkey()
1136 crypto_ahash_clear_flags(tfm, ~0); in __safexcel_hmac_setkey()
1162 crypto_free_ahash(tfm); in __safexcel_hmac_setkey()
2094 safexcel_ahash_cra_init(tfm); in safexcel_xcbcmac_cra_init()
2104 safexcel_ahash_cra_exit(tfm); in safexcel_xcbcmac_cra_exit()
2491 safexcel_ahash_cra_init(tfm); in safexcel_sha3_cra_init()
2515 safexcel_ahash_cra_exit(tfm); in safexcel_sha3_cra_exit()
2743 ctx->shdesc->tfm = ctx->shpre; in safexcel_hmac_sha3_cra_init()
[all …]
/openbmc/linux/drivers/crypto/nx/
H A Dnx.h145 int nx_crypto_ctx_aes_ccm_init(struct crypto_aead *tfm);
146 int nx_crypto_ctx_aes_gcm_init(struct crypto_aead *tfm);
147 int nx_crypto_ctx_aes_xcbc_init(struct crypto_tfm *tfm);
148 int nx_crypto_ctx_aes_ctr_init(struct crypto_skcipher *tfm);
149 int nx_crypto_ctx_aes_cbc_init(struct crypto_skcipher *tfm);
150 int nx_crypto_ctx_aes_ecb_init(struct crypto_skcipher *tfm);
151 int nx_crypto_ctx_sha_init(struct crypto_tfm *tfm);
152 void nx_crypto_ctx_exit(struct crypto_tfm *tfm);
153 void nx_crypto_ctx_skcipher_exit(struct crypto_skcipher *tfm);
154 void nx_crypto_ctx_aead_exit(struct crypto_aead *tfm);
/openbmc/linux/drivers/infiniband/sw/rxe/
H A Drxe_icrc.c20 struct crypto_shash *tfm; in rxe_icrc_init() local
22 tfm = crypto_alloc_shash("crc32", 0, 0); in rxe_icrc_init()
23 if (IS_ERR(tfm)) { in rxe_icrc_init()
25 PTR_ERR(tfm)); in rxe_icrc_init()
26 return PTR_ERR(tfm); in rxe_icrc_init()
29 rxe->tfm = tfm; in rxe_icrc_init()
48 SHASH_DESC_ON_STACK(shash, rxe->tfm); in rxe_crc32()
50 shash->tfm = rxe->tfm; in rxe_crc32()
/openbmc/linux/include/crypto/internal/
H A Drng.h29 static inline void *crypto_rng_ctx(struct crypto_rng *tfm) in crypto_rng_ctx() argument
31 return crypto_tfm_ctx(&tfm->base); in crypto_rng_ctx()
34 static inline void crypto_rng_set_entropy(struct crypto_rng *tfm, in crypto_rng_set_entropy() argument
37 crypto_rng_alg(tfm)->set_ent(tfm, data, len); in crypto_rng_set_entropy()
/openbmc/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c104 struct crypto_sync_skcipher *tfm, in krb5_encrypt() argument
120 crypto_sync_skcipher_ivsize(tfm)); in krb5_encrypt()
130 skcipher_request_set_sync_tfm(req, tfm); in krb5_encrypt()
159 struct crypto_sync_skcipher *tfm, in krb5_decrypt() argument
175 crypto_sync_skcipher_ivsize(tfm)); in krb5_decrypt()
184 skcipher_request_set_sync_tfm(req, tfm); in krb5_decrypt()
215 struct crypto_ahash *tfm; in make_checksum() local
233 if (IS_ERR(tfm)) in make_checksum()
289 crypto_free_ahash(tfm); in make_checksum()
385 struct crypto_sync_skcipher *tfm = in encryptor() local
[all …]
/openbmc/linux/security/apparmor/
H A Dcrypto.c41 desc->tfm = apparmor_tfm; in aa_calc_hash()
78 desc->tfm = apparmor_tfm; in aa_calc_profile_hash()
104 struct crypto_shash *tfm; in init_profile_hash() local
109 tfm = crypto_alloc_shash("sha1", 0, 0); in init_profile_hash()
110 if (IS_ERR(tfm)) { in init_profile_hash()
111 int error = PTR_ERR(tfm); in init_profile_hash()
115 apparmor_tfm = tfm; in init_profile_hash()
/openbmc/linux/net/bluetooth/
H A Decdh_helper.c44 int compute_ecdh_secret(struct crypto_kpp *tfm, const u8 public_key[64], in compute_ecdh_secret() argument
57 req = kpp_request_alloc(tfm, GFP_KERNEL); in compute_ecdh_secret()
101 int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 private_key[32]) in set_ecdh_privkey() argument
128 err = crypto_kpp_set_secret(tfm, buf, buf_len); in set_ecdh_privkey()
145 int generate_ecdh_public_key(struct crypto_kpp *tfm, u8 public_key[64]) in generate_ecdh_public_key() argument
157 req = kpp_request_alloc(tfm, GFP_KERNEL); in generate_ecdh_public_key()
194 int generate_ecdh_keys(struct crypto_kpp *tfm, u8 public_key[64]) in generate_ecdh_keys() argument
198 err = set_ecdh_privkey(tfm, NULL); in generate_ecdh_keys()
202 return generate_ecdh_public_key(tfm, public_key); in generate_ecdh_keys()

12345678910>>...20