Home
last modified time | relevance | path

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

12

/net/mac80211/
Daes_gcm.c18 int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, in ieee80211_aes_gcm_encrypt() argument
23 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_gcm_encrypt()
38 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gcm_encrypt()
47 int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad, in ieee80211_aes_gcm_decrypt() argument
52 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_gcm_decrypt()
71 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gcm_decrypt()
85 struct crypto_aead *tfm; in ieee80211_aes_gcm_key_setup_encrypt() local
88 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gcm_key_setup_encrypt()
89 if (IS_ERR(tfm)) in ieee80211_aes_gcm_key_setup_encrypt()
90 return tfm; in ieee80211_aes_gcm_key_setup_encrypt()
[all …]
Daes_ccm.c21 int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, in ieee80211_aes_ccm_encrypt() argument
27 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_ccm_encrypt()
42 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_ccm_encrypt()
52 int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, in ieee80211_aes_ccm_decrypt() argument
58 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_ccm_decrypt()
77 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_ccm_decrypt()
91 struct crypto_aead *tfm; in ieee80211_aes_key_setup_encrypt() local
94 tfm = crypto_alloc_aead("ccm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_key_setup_encrypt()
95 if (IS_ERR(tfm)) in ieee80211_aes_key_setup_encrypt()
96 return tfm; in ieee80211_aes_key_setup_encrypt()
[all …]
Daes_gmac.c20 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, in ieee80211_aes_gmac() argument
26 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_gmac()
49 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gmac()
62 struct crypto_aead *tfm; in ieee80211_aes_gmac_key_setup() local
65 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gmac_key_setup()
66 if (IS_ERR(tfm)) in ieee80211_aes_gmac_key_setup()
67 return tfm; in ieee80211_aes_gmac_key_setup()
69 err = crypto_aead_setkey(tfm, key, key_len); in ieee80211_aes_gmac_key_setup()
71 err = crypto_aead_setauthsize(tfm, GMAC_MIC_LEN); in ieee80211_aes_gmac_key_setup()
73 return tfm; in ieee80211_aes_gmac_key_setup()
[all …]
Daes_cmac.c38 static void aes_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, in aes_cmac_vector() argument
67 crypto_cipher_encrypt_one(tfm, cbc, cbc); in aes_cmac_vector()
72 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_cmac_vector()
90 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_cmac_vector()
95 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, in ieee80211_aes_cmac() argument
110 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN); in ieee80211_aes_cmac()
113 void ieee80211_aes_cmac_256(struct crypto_cipher *tfm, const u8 *aad, in ieee80211_aes_cmac_256() argument
128 aes_cmac_vector(tfm, 3, addr, len, mic, CMAC_TLEN_256); in ieee80211_aes_cmac_256()
134 struct crypto_cipher *tfm; in ieee80211_aes_cmac_key_setup() local
136 tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_cmac_key_setup()
[all …]
Dwep.c134 int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_encrypt_data() argument
140 if (IS_ERR(tfm)) in ieee80211_wep_encrypt_data()
146 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_encrypt_data()
148 crypto_cipher_encrypt_one(tfm, data + i, data + i); in ieee80211_wep_encrypt_data()
195 int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_decrypt_data() argument
201 if (IS_ERR(tfm)) in ieee80211_wep_decrypt_data()
204 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_decrypt_data()
206 crypto_cipher_decrypt_one(tfm, data + i, data + i); in ieee80211_wep_decrypt_data()
Daes_cmac.h16 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad,
18 void ieee80211_aes_cmac_256(struct crypto_cipher *tfm, const u8 *aad,
20 void ieee80211_aes_cmac_key_free(struct crypto_cipher *tfm);
Daes_gcm.h16 int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad,
18 int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, u8 *j_0, u8 *aad,
22 void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm);
Daes_ccm.h20 int ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
23 int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
26 void ieee80211_aes_key_free(struct crypto_aead *tfm);
Dkey.h91 struct crypto_aead *tfm; member
96 struct crypto_cipher *tfm; member
102 struct crypto_aead *tfm; member
113 struct crypto_aead *tfm; member
Dkey.c435 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc()
437 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc()
438 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc()
453 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc()
455 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc()
456 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc()
476 key->u.aes_cmac.tfm = in ieee80211_key_alloc()
478 if (IS_ERR(key->u.aes_cmac.tfm)) { in ieee80211_key_alloc()
479 err = PTR_ERR(key->u.aes_cmac.tfm); in ieee80211_key_alloc()
495 key->u.aes_gmac.tfm = in ieee80211_key_alloc()
[all …]
Daes_gmac.h20 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce,
22 void ieee80211_aes_gmac_key_free(struct crypto_aead *tfm);
Dtkip.h16 int ieee80211_tkip_encrypt_data(struct crypto_cipher *tfm,
27 int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
Dwep.h21 int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
26 int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
Dtkip.c225 int ieee80211_tkip_encrypt_data(struct crypto_cipher *tfm, in ieee80211_tkip_encrypt_data() argument
234 return ieee80211_wep_encrypt_data(tfm, rc4key, 16, in ieee80211_tkip_encrypt_data()
242 int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm, in ieee80211_tkip_decrypt_data() argument
300 res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); in ieee80211_tkip_decrypt_data()
Dwpa.c466 return ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, b_0, aad, pos, len, in ccmp_encrypt_skb()
543 key->u.ccmp.tfm, b_0, aad, in ieee80211_crypto_ccmp_decrypt()
699 return ieee80211_aes_gcm_encrypt(key->u.gcmp.tfm, j_0, aad, pos, len, in gcmp_encrypt_skb()
771 key->u.gcmp.tfm, j_0, aad, in ieee80211_crypto_gcmp_decrypt()
967 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_encrypt()
1010 ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_256_encrypt()
1050 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_decrypt()
1100 ieee80211_aes_cmac_256(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_256_decrypt()
1158 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, in ieee80211_crypto_aes_gmac_encrypt()
1203 if (ieee80211_aes_gmac(key->u.aes_gmac.tfm, aad, nonce, in ieee80211_crypto_aes_gmac_decrypt()
/net/wireless/
Dlib80211_crypt_ccmp.c55 struct crypto_cipher *tfm; member
63 static inline void lib80211_ccmp_aes_encrypt(struct crypto_cipher *tfm, in lib80211_ccmp_aes_encrypt() argument
66 crypto_cipher_encrypt_one(tfm, ct, pt); in lib80211_ccmp_aes_encrypt()
78 priv->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in lib80211_ccmp_init()
79 if (IS_ERR(priv->tfm)) { in lib80211_ccmp_init()
80 priv->tfm = NULL; in lib80211_ccmp_init()
88 if (priv->tfm) in lib80211_ccmp_init()
89 crypto_free_cipher(priv->tfm); in lib80211_ccmp_init()
99 if (_priv && _priv->tfm) in lib80211_ccmp_deinit()
100 crypto_free_cipher(_priv->tfm); in lib80211_ccmp_deinit()
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c56 struct crypto_skcipher *tfm, in krb5_encrypt() argument
65 SKCIPHER_REQUEST_ON_STACK(req, tfm); in krb5_encrypt()
67 if (length % crypto_skcipher_blocksize(tfm) != 0) in krb5_encrypt()
70 if (crypto_skcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_encrypt()
72 crypto_skcipher_ivsize(tfm)); in krb5_encrypt()
77 memcpy(local_iv, iv, crypto_skcipher_ivsize(tfm)); in krb5_encrypt()
82 skcipher_request_set_tfm(req, tfm); in krb5_encrypt()
95 struct crypto_skcipher *tfm, in krb5_decrypt() argument
104 SKCIPHER_REQUEST_ON_STACK(req, tfm); in krb5_decrypt()
106 if (length % crypto_skcipher_blocksize(tfm) != 0) in krb5_decrypt()
[all …]
/net/xfrm/
Dxfrm_ipcomp.c50 struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); in ipcomp_decompress() local
51 int err = crypto_comp_decompress(tfm, start, plen, scratch, &dlen); in ipcomp_decompress()
144 struct crypto_comp *tfm; in ipcomp_compress() local
150 tfm = *this_cpu_ptr(ipcd->tfms); in ipcomp_compress()
151 err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); in ipcomp_compress()
269 struct crypto_comp *tfm = *per_cpu_ptr(tfms, cpu); in ipcomp_free_tfms() local
270 crypto_free_comp(tfm); in ipcomp_free_tfms()
283 struct crypto_comp *tfm; in ipcomp_alloc_tfms() local
286 tfm = this_cpu_read(*pos->tfms); in ipcomp_alloc_tfms()
288 if (!strcmp(crypto_comp_name(tfm), alg_name)) { in ipcomp_alloc_tfms()
[all …]
/net/ceph/
Dcrypto.c26 key->tfm = NULL; in set_secret()
48 key->tfm = crypto_alloc_skcipher("cbc(aes)", 0, CRYPTO_ALG_ASYNC); in set_secret()
50 if (IS_ERR(key->tfm)) { in set_secret()
51 ret = PTR_ERR(key->tfm); in set_secret()
52 key->tfm = NULL; in set_secret()
56 ret = crypto_skcipher_setkey(key->tfm, key->key, key->len); in set_secret()
136 crypto_free_skcipher(key->tfm); in ceph_crypto_key_destroy()
137 key->tfm = NULL; in ceph_crypto_key_destroy()
216 SKCIPHER_REQUEST_ON_STACK(req, key->tfm); in ceph_aes_crypt()
232 skcipher_request_set_tfm(req, key->tfm); in ceph_aes_crypt()
Dcrypto.h15 struct crypto_skcipher *tfm; member
/net/ipv4/
Dtcp_fastopen.c36 crypto_free_cipher(ctx->tfm); in tcp_fastopen_ctx_free()
48 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in tcp_fastopen_reset_cipher()
50 if (IS_ERR(ctx->tfm)) { in tcp_fastopen_reset_cipher()
51 err = PTR_ERR(ctx->tfm); in tcp_fastopen_reset_cipher()
56 err = crypto_cipher_setkey(ctx->tfm, key, len); in tcp_fastopen_reset_cipher()
59 crypto_free_cipher(ctx->tfm); in tcp_fastopen_reset_cipher()
85 crypto_cipher_encrypt_one(ctx->tfm, foc->val, path); in __tcp_fastopen_cookie_gen()
/net/bluetooth/
Damp.c137 struct crypto_shash *tfm; in hmac_sha256() local
144 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in hmac_sha256()
145 if (IS_ERR(tfm)) { in hmac_sha256()
146 BT_DBG("crypto_alloc_ahash failed: err %ld", PTR_ERR(tfm)); in hmac_sha256()
147 return PTR_ERR(tfm); in hmac_sha256()
150 ret = crypto_shash_setkey(tfm, key, ksize); in hmac_sha256()
156 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in hmac_sha256()
163 shash->tfm = tfm; in hmac_sha256()
171 crypto_free_shash(tfm); in hmac_sha256()
/net/sctp/
Dauth.c451 struct crypto_shash *tfm = NULL; in sctp_auth_init_hmacs() local
485 tfm = crypto_alloc_shash(sctp_hmac_list[id].hmac_name, 0, 0); in sctp_auth_init_hmacs()
486 if (IS_ERR(tfm)) in sctp_auth_init_hmacs()
489 ep->auth_hmacs[id] = tfm; in sctp_auth_init_hmacs()
709 struct crypto_shash *tfm; in sctp_auth_calculate_hmac() local
742 tfm = asoc->ep->auth_hmacs[hmac_id]; in sctp_auth_calculate_hmac()
745 if (crypto_shash_setkey(tfm, &asoc_key->data[0], asoc_key->len)) in sctp_auth_calculate_hmac()
749 SHASH_DESC_ON_STACK(desc, tfm); in sctp_auth_calculate_hmac()
751 desc->tfm = tfm; in sctp_auth_calculate_hmac()
/net/mac802154/
Dllsec.c133 BUILD_BUG_ON(ARRAY_SIZE(authsizes) != ARRAY_SIZE(key->tfm)); in llsec_key_alloc()
135 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) { in llsec_key_alloc()
136 key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0, in llsec_key_alloc()
138 if (IS_ERR(key->tfm[i])) in llsec_key_alloc()
140 if (crypto_aead_setkey(key->tfm[i], template->key, in llsec_key_alloc()
143 if (crypto_aead_setauthsize(key->tfm[i], authsizes[i])) in llsec_key_alloc()
160 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) in llsec_key_alloc()
161 if (key->tfm[i]) in llsec_key_alloc()
162 crypto_free_aead(key->tfm[i]); in llsec_key_alloc()
175 for (i = 0; i < ARRAY_SIZE(key->tfm); i++) in llsec_key_release()
[all …]
Dllsec.h31 struct crypto_aead *tfm[3]; member

12