Lines Matching refs:tfm
55 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()
111 static void ccmp_init_blocks(struct crypto_cipher *tfm, in ccmp_init_blocks() argument
171 lib80211_ccmp_aes_encrypt(tfm, b0, auth); in ccmp_init_blocks()
173 lib80211_ccmp_aes_encrypt(tfm, auth, auth); in ccmp_init_blocks()
175 lib80211_ccmp_aes_encrypt(tfm, auth, auth); in ccmp_init_blocks()
178 lib80211_ccmp_aes_encrypt(tfm, b0, s0); in ccmp_init_blocks()
239 ccmp_init_blocks(key->tfm, hdr, key->tx_pn, data_len, b0, b, s0); in lib80211_ccmp_encrypt()
248 lib80211_ccmp_aes_encrypt(key->tfm, b, b); in lib80211_ccmp_encrypt()
252 lib80211_ccmp_aes_encrypt(key->tfm, b0, e); in lib80211_ccmp_encrypt()
344 ccmp_init_blocks(key->tfm, hdr, pn, data_len, b0, a, b); in lib80211_ccmp_decrypt()
355 lib80211_ccmp_aes_encrypt(key->tfm, b0, b); in lib80211_ccmp_decrypt()
359 lib80211_ccmp_aes_encrypt(key->tfm, a, a); in lib80211_ccmp_decrypt()
384 struct crypto_cipher *tfm = data->tfm; in lib80211_ccmp_set_key() local
389 data->tfm = tfm; in lib80211_ccmp_set_key()
401 crypto_cipher_setkey(data->tfm, data->key, CCMP_TK_LEN); in lib80211_ccmp_set_key()