Lines Matching refs:cipher
70 * Table of registered cipher modules.
180 * This is useful especially for the cipher test modules.
199 * Register a crypto cipher module.
205 printf("%s: cipher %s has an invalid cipher index %u\n",
210 printf("%s: cipher %s registered with a different template\n",
218 * Unregister a crypto cipher module.
224 printf("%s: cipher %s has an invalid cipher index %u\n",
229 printf("%s: cipher %s registered with a different template\n",
239 ieee80211_crypto_available(u_int cipher)
241 return cipher < IEEE80211_CIPHER_MAX && ciphers[cipher] != NULL;
254 * Establish a relationship between the specified key and cipher
267 ieee80211_crypto_newkey(struct ieee80211com *ic, int cipher, int flags,
277 * Validate cipher and set reference to cipher routines.
279 if (cipher >= IEEE80211_CIPHER_MAX) {
281 "%s: invalid cipher %u\n", __func__, cipher);
285 cip = ciphers[cipher];
289 * Auto-load cipher module if we have a well-known name
291 * than numbers and craft a module name based on the cipher
292 * name; e.g. wlan_cipher_<cipher-name>.
294 if (cipher < N(cipher_modnames)) {
296 "%s: unregistered cipher %u, load module %s\n",
297 __func__, cipher, cipher_modnames[cipher]);
298 ieee80211_load_module(cipher_modnames[cipher]);
300 * If cipher module loaded it should immediately
304 cip = ciphers[cipher];
308 "%s: unable to load cipher %u, module %s\n",
309 __func__, cipher,
310 cipher < N(cipher_modnames) ?
311 cipher_modnames[cipher] : "<unknown>");
321 * If the hardware does not support the cipher then
324 if ((ic->ic_caps & (1<<cipher)) == 0) {
326 "%s: no h/w support for cipher %s, falling back to s/w\n",
334 * the cipher modules honor it.
336 if (cipher == IEEE80211_CIPHER_TKIP &&
345 * Bind cipher to key instance. Note we do this
347 * cipher module can optimize space usage based on
348 * whether or not it needs to do the cipher work.
353 * Fillin the flags so cipher modules can see s/w
365 "%s: unable to attach cipher %s\n",
385 * cipher template. Note also that when using software
401 "%s: no h/w resources for cipher %s, "
406 if (cipher == IEEE80211_CIPHER_TKIP)
412 "%s: unable to setup cipher %s\n",
431 IASSERT(key->wk_cipher != NULL, ("No cipher!"));
500 IASSERT(cip != NULL, ("No cipher!"));
509 * Give cipher a chance to validate key contents.
514 "%s: cipher %s rejected key index %u len %u flags 0x%x\n",