Home
last modified time | relevance | path

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

12

/net/mac80211/
Daes_ccm.c20 static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *scratch, u8 *a) in aes_ccm_prepare() argument
30 crypto_cipher_encrypt_one(tfm, b, b_0); in aes_ccm_prepare()
35 crypto_cipher_encrypt_one(tfm, b, aad); in aes_ccm_prepare()
41 crypto_cipher_encrypt_one(tfm, a, aad); in aes_ccm_prepare()
49 crypto_cipher_encrypt_one(tfm, s_0, b_0); in aes_ccm_prepare()
53 void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *scratch, in ieee80211_aes_ccm_encrypt() argument
67 aes_ccm_prepare(tfm, scratch, b); in ieee80211_aes_ccm_encrypt()
79 crypto_cipher_encrypt_one(tfm, b, b); in ieee80211_aes_ccm_encrypt()
83 crypto_cipher_encrypt_one(tfm, e, b_0); in ieee80211_aes_ccm_encrypt()
93 int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *scratch, in ieee80211_aes_ccm_decrypt() argument
[all …]
Daes_cmac.c39 static void aes_128_cmac_vector(struct crypto_cipher *tfm, size_t num_elem, in aes_128_cmac_vector() argument
67 crypto_cipher_encrypt_one(tfm, cbc, cbc); in aes_128_cmac_vector()
72 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_128_cmac_vector()
90 crypto_cipher_encrypt_one(tfm, pad, pad); in aes_128_cmac_vector()
95 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad, in ieee80211_aes_cmac() argument
110 aes_128_cmac_vector(tfm, 3, addr, len, mic); in ieee80211_aes_cmac()
116 struct crypto_cipher *tfm; in ieee80211_aes_cmac_key_setup() local
118 tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_cmac_key_setup()
119 if (!IS_ERR(tfm)) in ieee80211_aes_cmac_key_setup()
120 crypto_cipher_setkey(tfm, key, AES_CMAC_KEY_LEN); in ieee80211_aes_cmac_key_setup()
[all …]
Dwep.c136 int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_encrypt_data() argument
142 if (IS_ERR(tfm)) in ieee80211_wep_encrypt_data()
148 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_encrypt_data()
150 crypto_cipher_encrypt_one(tfm, data + i, data + i); in ieee80211_wep_encrypt_data()
194 int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key, in ieee80211_wep_decrypt_data() argument
200 if (IS_ERR(tfm)) in ieee80211_wep_decrypt_data()
203 crypto_cipher_setkey(tfm, rc4key, klen); in ieee80211_wep_decrypt_data()
205 crypto_cipher_decrypt_one(tfm, data + i, data + i); in ieee80211_wep_decrypt_data()
Daes_ccm.h16 void ieee80211_aes_ccm_encrypt(struct crypto_cipher *tfm, u8 *scratch,
19 int ieee80211_aes_ccm_decrypt(struct crypto_cipher *tfm, u8 *scratch,
22 void ieee80211_aes_key_free(struct crypto_cipher *tfm);
Daes_cmac.h15 void ieee80211_aes_cmac(struct crypto_cipher *tfm, const u8 *aad,
17 void ieee80211_aes_cmac_key_free(struct crypto_cipher *tfm);
Dtkip.h18 int ieee80211_tkip_encrypt_data(struct crypto_cipher *tfm,
29 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,
Dkey.c367 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt(key_data); in ieee80211_key_alloc()
368 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc()
369 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc()
385 key->u.aes_cmac.tfm = in ieee80211_key_alloc()
387 if (IS_ERR(key->u.aes_cmac.tfm)) { in ieee80211_key_alloc()
388 err = PTR_ERR(key->u.aes_cmac.tfm); in ieee80211_key_alloc()
403 ieee80211_aes_key_free(key->u.ccmp.tfm); in ieee80211_key_free_common()
405 ieee80211_aes_cmac_key_free(key->u.aes_cmac.tfm); in ieee80211_key_free_common()
Dkey.h97 struct crypto_cipher *tfm; member
103 struct crypto_cipher *tfm; member
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.c462 ieee80211_aes_ccm_encrypt(key->u.ccmp.tfm, scratch, pos, len, in ccmp_encrypt_skb()
530 key->u.ccmp.tfm, scratch, in ieee80211_crypto_ccmp_decrypt()
626 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_encrypt()
667 ieee80211_aes_cmac(key->u.aes_cmac.tfm, aad, in ieee80211_crypto_aes_cmac_decrypt()
/net/ceph/
Dcrypto.c97 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt() local
98 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt()
105 if (IS_ERR(tfm)) in ceph_aes_encrypt()
106 return PTR_ERR(tfm); in ceph_aes_encrypt()
112 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt()
118 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt()
119 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt()
132 crypto_free_blkcipher(tfm); in ceph_aes_encrypt()
148 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt2() local
149 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt2()
[all …]
/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 …]
Dlib80211_crypt_tkip.c356 struct blkcipher_desc desc = { .tfm = tkey->tx_tfm_arc4 }; in lib80211_tkip_encrypt()
406 struct blkcipher_desc desc = { .tfm = tkey->rx_tfm_arc4 }; in lib80211_tkip_decrypt()
525 desc.tfm = tfm_michael; in michael_mic()
648 struct crypto_hash *tfm = tkey->tx_tfm_michael; in lib80211_tkip_set_key() local
656 tkey->tx_tfm_michael = tfm; in lib80211_tkip_set_key()
Dlib80211_crypt_wep.c136 struct blkcipher_desc desc = { .tfm = wep->tx_tfm }; in lib80211_wep_encrypt()
183 struct blkcipher_desc desc = { .tfm = wep->rx_tfm }; in lib80211_wep_decrypt()
/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c54 struct crypto_blkcipher *tfm, in krb5_encrypt() argument
63 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; in krb5_encrypt()
65 if (length % crypto_blkcipher_blocksize(tfm) != 0) in krb5_encrypt()
68 if (crypto_blkcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_encrypt()
70 crypto_blkcipher_ivsize(tfm)); in krb5_encrypt()
75 memcpy(local_iv, iv, crypto_blkcipher_ivsize(tfm)); in krb5_encrypt()
88 struct crypto_blkcipher *tfm, in krb5_decrypt() argument
97 struct blkcipher_desc desc = { .tfm = tfm, .info = local_iv }; in krb5_decrypt()
99 if (length % crypto_blkcipher_blocksize(tfm) != 0) in krb5_decrypt()
102 if (crypto_blkcipher_ivsize(tfm) > GSS_KRB5_MAX_BLOCKSIZE) { in krb5_decrypt()
[all …]
Dgss_krb5_mech.c456 desc.tfm = hmac; in context_derive_keys_rc4()
/net/ipv4/
Dtcp_fastopen.c21 crypto_free_cipher(ctx->tfm); in tcp_fastopen_ctx_free()
33 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in tcp_fastopen_reset_cipher()
35 if (IS_ERR(ctx->tfm)) { in tcp_fastopen_reset_cipher()
36 err = PTR_ERR(ctx->tfm); in tcp_fastopen_reset_cipher()
41 err = crypto_cipher_setkey(ctx->tfm, key, len); in tcp_fastopen_reset_cipher()
44 crypto_free_cipher(ctx->tfm); in tcp_fastopen_reset_cipher()
75 crypto_cipher_encrypt_one(ctx->tfm, in tcp_fastopen_cookie_gen()
Dtcp.c3148 if (p->md5_desc.tfm) in __tcp_free_md5sig_pool()
3149 crypto_free_hash(p->md5_desc.tfm); in __tcp_free_md5sig_pool()
3186 per_cpu_ptr(pool, cpu)->md5_desc.tfm = hash; in __tcp_alloc_md5sig_pool()
/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()
146 struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); in ipcomp_compress() local
150 err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); in ipcomp_compress()
267 struct crypto_comp *tfm = *per_cpu_ptr(tfms, cpu); in ipcomp_free_tfms() local
268 crypto_free_comp(tfm); in ipcomp_free_tfms()
281 struct crypto_comp *tfm; in ipcomp_alloc_tfms() local
284 tfm = __this_cpu_read(*pos->tfms); in ipcomp_alloc_tfms()
286 if (!strcmp(crypto_comp_name(tfm), alg_name)) { in ipcomp_alloc_tfms()
305 struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0, in ipcomp_alloc_tfms() local
[all …]
/net/bluetooth/
Dsmp.c51 static int smp_e(struct crypto_blkcipher *tfm, const u8 *k, u8 *r) in smp_e() argument
58 if (tfm == NULL) { in smp_e()
59 BT_ERR("tfm %p", tfm); in smp_e()
63 desc.tfm = tfm; in smp_e()
66 err = crypto_blkcipher_setkey(tfm, k, 16); in smp_e()
74 iv_len = crypto_blkcipher_ivsize(tfm); in smp_e()
77 crypto_blkcipher_set_iv(tfm, iv, iv_len); in smp_e()
87 static int smp_c1(struct crypto_blkcipher *tfm, u8 k[16], u8 r[16], in smp_c1() argument
112 err = smp_e(tfm, k, res); in smp_c1()
122 err = smp_e(tfm, k, res); in smp_c1()
[all …]
Damp.c136 struct crypto_shash *tfm; in hmac_sha256() local
141 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in hmac_sha256()
142 if (IS_ERR(tfm)) { in hmac_sha256()
143 BT_DBG("crypto_alloc_ahash failed: err %ld", PTR_ERR(tfm)); in hmac_sha256()
144 return PTR_ERR(tfm); in hmac_sha256()
147 ret = crypto_shash_setkey(tfm, key, ksize); in hmac_sha256()
153 char ctx[crypto_shash_descsize(tfm)]; in hmac_sha256()
156 desc.shash.tfm = tfm; in hmac_sha256()
163 crypto_free_shash(tfm); in hmac_sha256()
/net/sctp/
Dauth.c451 struct crypto_hash *tfm = NULL; in sctp_auth_init_hmacs() local
485 tfm = crypto_alloc_hash(sctp_hmac_list[id].hmac_name, 0, in sctp_auth_init_hmacs()
487 if (IS_ERR(tfm)) in sctp_auth_init_hmacs()
490 ep->auth_hmacs[id] = tfm; in sctp_auth_init_hmacs()
755 desc.tfm = asoc->ep->auth_hmacs[hmac_id]; in sctp_auth_calculate_hmac()
759 if (crypto_hash_setkey(desc.tfm, &asoc_key->data[0], asoc_key->len)) in sctp_auth_calculate_hmac()
Dsm_make_chunk.c1651 desc.tfm = sctp_sk(ep->base.sk)->hmac; in sctp_pack_cookie()
1654 if (crypto_hash_setkey(desc.tfm, ep->secret_key, in sctp_pack_cookie()
1718 desc.tfm = sctp_sk(ep->base.sk)->hmac; in sctp_unpack_cookie()
1722 if (crypto_hash_setkey(desc.tfm, ep->secret_key, in sctp_unpack_cookie()
/net/rxrpc/
Drxkad.c131 desc.tfm = conn->cipher; in rxkad_prime_packet_security()
180 desc.tfm = call->conn->cipher; in rxkad_secure_packet_auth()
226 desc.tfm = call->conn->cipher; in rxkad_secure_packet_encrypt()
284 desc.tfm = call->conn->cipher; in rxkad_secure_packet()
355 desc.tfm = call->conn->cipher; in rxkad_verify_packet_auth()
438 desc.tfm = call->conn->cipher; in rxkad_verify_packet_encrypt()
519 desc.tfm = call->conn->cipher; in rxkad_verify_packet()
727 desc.tfm = conn->cipher; in rxkad_encrypt_response()
856 desc.tfm = conn->server_key->payload.data; in rxkad_decrypt_ticket()
984 desc.tfm = rxkad_ci; in rxkad_decrypt_response()

12