Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 25 of 197) sorted by relevance

12345678

/linux/include/crypto/
H A Daead.h140 int (*setkey)(struct crypto_aead *tfm, const u8 *key,
142 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
145 int (*init)(struct crypto_aead *tfm);
146 void (*exit)(struct crypto_aead *tfm);
173 (((struct aead_request *)__##name##_desc)->base.tfm = \
177 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument
179 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast()
200 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument
202 return &tfm->base; in crypto_aead_tfm()
205 static inline struct crypto_tfm *crypto_sync_aead_tfm(struct crypto_sync_aead *tfm) in crypto_sync_aead_tfm() argument
[all …]
H A Dkpp.h78 int (*set_secret)(struct crypto_kpp *tfm, const void *buffer,
83 unsigned int (*max_size)(struct crypto_kpp *tfm);
85 int (*init)(struct crypto_kpp *tfm);
86 void (*exit)(struct crypto_kpp *tfm);
114 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) in crypto_kpp_tfm() argument
116 return &tfm->base; in crypto_kpp_tfm()
124 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) in __crypto_kpp_tfm() argument
126 return container_of(tfm, struct crypto_kpp, base); in __crypto_kpp_tfm()
129 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) in crypto_kpp_alg() argument
131 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg()
[all …]
H A Drng.h44 int (*generate)(struct crypto_rng *tfm,
47 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen);
48 void (*set_ent)(struct crypto_rng *tfm, const u8 *data,
94 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument
96 return &tfm->base; in crypto_rng_tfm()
110 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument
112 return __crypto_rng_alg(crypto_rng_tfm(tfm)->__crt_alg); in crypto_rng_alg()
121 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument
123 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng()
140 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument
[all …]
H A Dcryptd.h29 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm);
31 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm);
32 void cryptd_free_skcipher(struct cryptd_skcipher *tfm);
39 struct crypto_ahash *tfm) in __cryptd_ahash_cast() argument
41 return (struct cryptd_ahash *)tfm; in __cryptd_ahash_cast()
47 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm);
50 bool cryptd_ahash_queued(struct cryptd_ahash *tfm);
51 void cryptd_free_ahash(struct cryptd_ahash *tfm);
58 struct crypto_aead *tfm) in __cryptd_aead_cast() argument
60 return (struct cryptd_aead *)tfm; in __cryptd_aead_cast()
[all …]
/linux/security/integrity/ima/
H A Dima_crypto.c88 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local
95 return tfm; in ima_alloc_tfm()
98 if (ima_algo_array[i].tfm && ima_algo_array[i].algo == algo) in ima_alloc_tfm()
99 return ima_algo_array[i].tfm; in ima_alloc_tfm()
101 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm()
102 if (IS_ERR(tfm)) { in ima_alloc_tfm()
103 rc = PTR_ERR(tfm); in ima_alloc_tfm()
107 return tfm; in ima_alloc_tfm()
157 ima_algo_array[i].tfm = ima_shash_tfm; in ima_init_crypto()
161 ima_algo_array[i].tfm = ima_alloc_tfm(algo); in ima_init_crypto()
[all …]
/linux/include/crypto/internal/
H A Dcipher.h37 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) in __crypto_cipher_cast() argument
39 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast()
66 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) in crypto_cipher_tfm() argument
68 return &tfm->base; in crypto_cipher_tfm()
75 static inline void crypto_free_cipher(struct crypto_cipher *tfm) in crypto_free_cipher() argument
77 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher()
109 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) in crypto_cipher_blocksize() argument
111 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize()
114 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) in crypto_cipher_alignmask() argument
116 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask()
[all …]
H A Ddes.h26 static inline int crypto_des_verify_key(struct crypto_tfm *tfm, const u8 *key) in crypto_des_verify_key() argument
33 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in crypto_des_verify_key()
91 static inline int crypto_des3_ede_verify_key(struct crypto_tfm *tfm, in crypto_des3_ede_verify_key() argument
95 crypto_tfm_get_flags(tfm) & in crypto_des3_ede_verify_key()
99 static inline int verify_skcipher_des_key(struct crypto_skcipher *tfm, in verify_skcipher_des_key() argument
102 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des_key()
105 static inline int verify_skcipher_des3_key(struct crypto_skcipher *tfm, in verify_skcipher_des3_key() argument
108 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des3_key()
111 static inline int verify_aead_des_key(struct crypto_aead *tfm, const u8 *key, in verify_aead_des_key() argument
116 return crypto_des_verify_key(crypto_aead_tfm(tfm), key); in verify_aead_des_key()
[all …]
/linux/crypto/
H A Dcipher.c20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, in setkey_unaligned() argument
23 struct cipher_alg *cia = crypto_cipher_alg(tfm); in setkey_unaligned()
24 unsigned long alignmask = crypto_cipher_alignmask(tfm); in setkey_unaligned()
36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen); in setkey_unaligned()
42 int crypto_cipher_setkey(struct crypto_cipher *tfm, in crypto_cipher_setkey() argument
45 struct cipher_alg *cia = crypto_cipher_alg(tfm); in crypto_cipher_setkey()
46 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_cipher_setkey()
52 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey()
54 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey()
58 static inline void cipher_crypt_one(struct crypto_cipher *tfm, in cipher_crypt_one() argument
[all …]
H A Dapi.c371 static void crypto_exit_ops(struct crypto_tfm *tfm) in crypto_exit_ops() argument
373 const struct crypto_type *type = tfm->__crt_alg->cra_type; in crypto_exit_ops()
375 if (type && tfm->exit) in crypto_exit_ops()
376 tfm->exit(tfm); in crypto_exit_ops()
411 struct crypto_tfm *tfm; in __crypto_alloc_tfmgfp() local
415 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask); in __crypto_alloc_tfmgfp()
416 tfm = kzalloc(tfm_size, gfp); in __crypto_alloc_tfmgfp()
417 if (tfm == NULL) in __crypto_alloc_tfmgfp()
420 tfm->__crt_alg = alg; in __crypto_alloc_tfmgfp()
421 refcount_set(&tfm->refcnt, 1); in __crypto_alloc_tfmgfp()
[all …]
H A Djitterentropy-kcapi.c109 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm); in jent_hash_time()
114 desc->tfm = hash_state_desc->tfm; in jent_hash_time()
116 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) { in jent_hash_time()
198 struct crypto_shash *tfm; member
202 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) in jent_kcapi_cleanup() argument
204 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_cleanup()
214 if (rng->tfm) in jent_kcapi_cleanup()
215 crypto_free_shash(rng->tfm); in jent_kcapi_cleanup()
216 rng->tfm = NULL; in jent_kcapi_cleanup()
224 static int jent_kcapi_init(struct crypto_tfm *tfm) in jent_kcapi_init() argument
[all …]
H A Dsimd.c50 static int simd_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in simd_skcipher_setkey() argument
53 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_setkey()
57 crypto_skcipher_set_flags(child, crypto_skcipher_get_flags(tfm) & in simd_skcipher_setkey()
64 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_encrypt() local
65 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_encrypt()
85 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_decrypt() local
86 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_decrypt()
104 static void simd_skcipher_exit(struct crypto_skcipher *tfm) in simd_skcipher_exit() argument
106 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_exit()
111 static int simd_skcipher_init(struct crypto_skcipher *tfm) in simd_skcipher_init() argument
[all …]
/linux/net/mac80211/
H A Daes_cmac.c23 int ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad,
28 SHASH_DESC_ON_STACK(desc, tfm); in ieee80211_aes_cmac()
32 desc->tfm = tfm; in ieee80211_aes_cmac()
66 struct crypto_shash *tfm; in ieee80211_aes_cmac_256()
68 tfm = crypto_alloc_shash("cmac(aes)", 0, 0); in ieee80211_aes_cmac_256()
69 if (!IS_ERR(tfm)) { in ieee80211_aes_cmac_256()
70 int err = crypto_shash_setkey(tfm, key, key_len);
73 crypto_free_shash(tfm); in ieee80211_aes_cmac_key_setup()
78 return tfm; in ieee80211_aes_cmac_key_setup()
25 ieee80211_aes_cmac(struct crypto_shash * tfm,const u8 * aad,const u8 * data,size_t data_len,u8 * mic) ieee80211_aes_cmac() argument
49 ieee80211_aes_cmac_256(struct crypto_shash * tfm,const u8 * aad,const u8 * data,size_t data_len,u8 * mic) ieee80211_aes_cmac_256() argument
74 struct crypto_shash *tfm; ieee80211_aes_cmac_key_setup() local
89 ieee80211_aes_cmac_key_free(struct crypto_shash * tfm) ieee80211_aes_cmac_key_free() argument
[all...]
H A Daead_api.c18 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_encrypt() argument
21 size_t mic_len = crypto_aead_authsize(tfm); in aead_encrypt()
24 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_encrypt()
40 aead_request_set_tfm(aead_req, tfm); in aead_encrypt()
50 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_decrypt() argument
53 size_t mic_len = crypto_aead_authsize(tfm); in aead_decrypt()
56 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_decrypt()
75 aead_request_set_tfm(aead_req, tfm); in aead_decrypt()
89 struct crypto_aead *tfm; in aead_key_setup_encrypt() local
92 tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC); in aead_key_setup_encrypt()
[all …]
H A Daes_gmac.c17 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, in ieee80211_aes_gmac() argument
23 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_gmac()
61 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gmac()
74 struct crypto_aead *tfm; in ieee80211_aes_gmac_key_setup()
77 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gmac_key_setup()
78 if (IS_ERR(tfm)) in ieee80211_aes_gmac_key_setup()
79 return tfm; in ieee80211_aes_gmac_key_setup()
81 err = crypto_aead_setkey(tfm, key, key_len); in ieee80211_aes_gmac_key_setup()
83 err = crypto_aead_setauthsize(tfm, IEEE80211_GMAC_MIC_LEN); in ieee80211_aes_gmac_key_setup()
85 return tfm; in ieee80211_aes_gmac_key_setup()
72 struct crypto_aead *tfm; ieee80211_aes_gmac_key_setup() local
89 ieee80211_aes_gmac_key_free(struct crypto_aead * tfm) ieee80211_aes_gmac_key_free() argument
[all...]
/linux/drivers/crypto/allwinner/sun4i-ss/
H A Dsun4i-ss-cipher.c17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_opti_poll() local
18 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_opti_poll()
20 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_opti_poll()
38 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_opti_poll()
150 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll_fallback() local
151 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll_fallback()
154 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_cipher_poll_fallback()
178 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll() local
179 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll()
184 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll()
[all …]
/linux/net/bluetooth/
H A Dselftest.c141 static int __init test_ecdh_sample(struct crypto_kpp *tfm, const u8 priv_a[32], in test_ecdh_sample() argument
155 ret = set_ecdh_privkey(tfm, priv_a); in test_ecdh_sample()
159 ret = compute_ecdh_secret(tfm, pub_b, dhkey_a); in test_ecdh_sample()
168 ret = set_ecdh_privkey(tfm, priv_b); in test_ecdh_sample()
172 ret = compute_ecdh_secret(tfm, pub_a, dhkey_b); in test_ecdh_sample()
201 struct crypto_kpp *tfm; in test_ecdh() local
208 tfm = crypto_alloc_kpp("ecdh-nist-p256", 0, 0); in test_ecdh()
209 if (IS_ERR(tfm)) { in test_ecdh()
211 err = PTR_ERR(tfm); in test_ecdh()
215 err = test_ecdh_sample(tfm, priv_a_1, priv_b_1, pub_a_1, pub_b_1, in test_ecdh()
[all …]
/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_keys.c305 krb5_cmac_Ki(struct crypto_shash *tfm, const struct xdr_netobj *constant, in krb5_cmac_Ki() argument
309 SHASH_DESC_ON_STACK(desc, tfm); in krb5_cmac_Ki()
314 desc->tfm = tfm; in krb5_cmac_Ki()
377 struct crypto_shash *tfm; in krb5_kdf_feedback_cmac() local
386 tfm = crypto_alloc_shash(gk5e->cksum_name, 0, 0); in krb5_kdf_feedback_cmac()
387 if (IS_ERR(tfm)) { in krb5_kdf_feedback_cmac()
388 ret = PTR_ERR(tfm); in krb5_kdf_feedback_cmac()
391 ret = crypto_shash_setkey(tfm, inkey->data, inkey->len); in krb5_kdf_feedback_cmac()
395 blocksize = crypto_shash_digestsize(tfm); in krb5_kdf_feedback_cmac()
412 ret = krb5_cmac_Ki(tfm, constant, outkey->len, count, &step); in krb5_kdf_feedback_cmac()
[all …]
/linux/samples/tsm-mr/
H A Dtsm_mr_sample.c26 struct crypto_shash *tfm; in sample_report_refresh() local
29 tfm = crypto_alloc_shash(hash_algo_name[HASH_ALGO_SHA512], 0, 0); in sample_report_refresh()
30 if (IS_ERR(tfm)) { in sample_report_refresh()
31 pr_err("crypto_alloc_shash failed: %ld\n", PTR_ERR(tfm)); in sample_report_refresh()
32 return PTR_ERR(tfm); in sample_report_refresh()
35 rc = crypto_shash_tfm_digest(tfm, (u8 *)&sample_report, in sample_report_refresh()
39 crypto_free_shash(tfm); in sample_report_refresh()
52 desc->tfm = crypto_alloc_shash(hash_algo_name[mr->mr_hash], 0, 0); in sample_report_extend_mr()
53 if (IS_ERR(desc->tfm)) { in sample_report_extend_mr()
54 pr_err("crypto_alloc_shash failed: %ld\n", PTR_ERR(desc->tfm)); in sample_report_extend_mr()
[all …]
/linux/fs/smb/server/
H A Dcrypto_ctx.c34 crypto_free_shash(shash->tfm); in free_shash()
41 struct crypto_aead *tfm = NULL; in alloc_aead() local
45 tfm = crypto_alloc_aead("gcm(aes)", 0, 0); in alloc_aead()
48 tfm = crypto_alloc_aead("ccm(aes)", 0, 0); in alloc_aead()
55 if (IS_ERR(tfm)) { in alloc_aead()
56 pr_err("Failed to alloc encrypt aead : %ld\n", PTR_ERR(tfm)); in alloc_aead()
60 return tfm; in alloc_aead()
65 struct crypto_shash *tfm = NULL; in alloc_shash_desc() local
70 tfm = crypto_alloc_shash("cmac(aes)", 0, 0); in alloc_shash_desc()
76 if (IS_ERR(tfm)) in alloc_shash_desc()
[all …]
/linux/drivers/nvme/common/
H A Dauth.c277 shash->tfm = key_tfm; in nvme_auth_transform_key()
310 struct crypto_shash *tfm; in nvme_auth_hash_skey() local
319 tfm = crypto_alloc_shash(digest_name, 0, 0); in nvme_auth_hash_skey()
320 if (IS_ERR(tfm)) in nvme_auth_hash_skey()
323 ret = crypto_shash_tfm_digest(tfm, skey, skey_len, hkey); in nvme_auth_hash_skey()
328 crypto_free_shash(tfm); in nvme_auth_hash_skey()
335 struct crypto_shash *tfm; in nvme_auth_augmented_challenge() local
357 tfm = crypto_alloc_shash(hmac_name, 0, 0); in nvme_auth_augmented_challenge()
358 if (IS_ERR(tfm)) { in nvme_auth_augmented_challenge()
359 ret = PTR_ERR(tfm); in nvme_auth_augmented_challenge()
[all …]
/linux/include/linux/
H A Dbpf_crypto.h8 void (*free_tfm)(void *tfm);
10 int (*setkey)(void *tfm, const u8 *key, unsigned int keylen);
11 int (*setauthsize)(void *tfm, unsigned int authsize);
12 int (*encrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv);
13 int (*decrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv);
14 unsigned int (*ivsize)(void *tfm);
15 unsigned int (*statesize)(void *tfm);
16 u32 (*get_flags)(void *tfm);
/linux/drivers/crypto/
H A Dgeode-aes.c110 static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key, in geode_setkey_cip() argument
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip()
131 (tfm->crt_flags & CRYPTO_TFM_REQ_MASK); in geode_setkey_cip()
136 static int geode_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, in geode_setkey_skcipher() argument
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher()
158 crypto_skcipher_get_flags(tfm) & in geode_setkey_skcipher()
164 geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_encrypt() argument
166 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_encrypt()
179 geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_decrypt() argument
181 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_decrypt()
[all …]
/linux/drivers/crypto/gemini/
H A Dsl3516-ce-cipher.c27 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_need_fallback() local
28 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_need_fallback()
105 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher_fallback() local
106 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher_fallback()
108 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher_fallback()
129 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher() local
130 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher()
133 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher()
146 crypto_tfm_alg_name(areq->base.tfm), in sl3516_ce_cipher()
148 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sl3516_ce_cipher()
[all …]
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c95 int sun8i_ss_hash_init_tfm(struct crypto_ahash *tfm) in sun8i_ss_hash_init_tfm() argument
97 struct sun8i_ss_hash_tfm_ctx *op = crypto_ahash_ctx(tfm); in sun8i_ss_hash_init_tfm()
98 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_init_tfm()
106 op->fallback_tfm = crypto_alloc_ahash(crypto_ahash_alg_name(tfm), 0, in sun8i_ss_hash_init_tfm()
113 crypto_ahash_set_statesize(tfm, in sun8i_ss_hash_init_tfm()
116 crypto_ahash_set_reqsize(tfm, in sun8i_ss_hash_init_tfm()
133 void sun8i_ss_hash_exit_tfm(struct crypto_ahash *tfm) in sun8i_ss_hash_exit_tfm() argument
135 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ss_hash_exit_tfm()
147 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_init() local
148 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ss_hash_init()
[all …]
/linux/arch/s390/crypto/
H A Ddes_s390.c35 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument
38 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_setkey()
41 err = crypto_des_verify_key(tfm, key); in des_setkey()
49 static int des_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, in des_setkey_skcipher() argument
52 return des_setkey(crypto_skcipher_tfm(tfm), key, key_len); in des_setkey_skcipher()
55 static void s390_des_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in s390_des_encrypt() argument
57 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in s390_des_encrypt()
62 static void s390_des_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in s390_des_decrypt() argument
64 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in s390_des_decrypt()
91 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_desall_crypt() local
[all …]

12345678