Lines Matching refs:tfm
19 static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *scratch, u8 *a) in aes_ccm_prepare() argument
29 crypto_cipher_encrypt_one(tfm, b, b_0); in aes_ccm_prepare()
34 crypto_cipher_encrypt_one(tfm, b, aad); in aes_ccm_prepare()
40 crypto_cipher_encrypt_one(tfm, a, aad); in aes_ccm_prepare()
48 crypto_cipher_encrypt_one(tfm, s_0, b_0); in aes_ccm_prepare()
52 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
107 aes_ccm_prepare(tfm, scratch, a); in ieee80211_aes_ccm_decrypt()
119 crypto_cipher_encrypt_one(tfm, b, b_0); in ieee80211_aes_ccm_decrypt()
124 crypto_cipher_encrypt_one(tfm, a, a); in ieee80211_aes_ccm_decrypt()
138 struct crypto_cipher *tfm; in ieee80211_aes_key_setup_encrypt() local
140 tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_key_setup_encrypt()
141 if (IS_ERR(tfm)) in ieee80211_aes_key_setup_encrypt()
144 crypto_cipher_setkey(tfm, key, ALG_CCMP_KEY_LEN); in ieee80211_aes_key_setup_encrypt()
146 return tfm; in ieee80211_aes_key_setup_encrypt()
150 void ieee80211_aes_key_free(struct crypto_cipher *tfm) in ieee80211_aes_key_free() argument
152 if (tfm) in ieee80211_aes_key_free()
153 crypto_free_cipher(tfm); in ieee80211_aes_key_free()