| /drivers/crypto/amcc/ |
| A D | crypto4xx_alg.c | 71 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt() 124 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes() 240 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt() 271 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument 277 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback() 292 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr() 350 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument 356 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback() 367 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm() 469 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead() [all …]
|
| A D | crypto4xx_core.h | 124 struct crypto_sync_skcipher *cipher; member 136 struct skcipher_alg cipher; member 166 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, 168 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, 170 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, 172 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, 230 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, 234 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher,
|
| /drivers/crypto/cavium/nitrox/ |
| A D | nitrox_skcipher.c | 41 const struct nitrox_cipher *cipher = flexi_cipher_table; in flexi_cipher_type() local 43 while (cipher->name) { in flexi_cipher_type() 44 if (!strcmp(cipher->name, name)) in flexi_cipher_type() 46 cipher++; in flexi_cipher_type() 48 return cipher->value; in flexi_cipher_type() 84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback() 169 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey() 252 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_skcipher_crypt() 294 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_decrypt() 323 return verify_skcipher_des3_key(cipher, key) ?: in nitrox_3des_setkey() [all …]
|
| /drivers/nvme/common/ |
| A D | keyring.c | 200 enum nvme_tcp_tls_cipher cipher; member 204 .cipher = NVME_TCP_TLS_CIPHER_SHA384, }, 207 .cipher = NVME_TCP_TLS_CIPHER_SHA256, }, 210 .cipher = NVME_TCP_TLS_CIPHER_SHA384, }, 213 .cipher = NVME_TCP_TLS_CIPHER_SHA256, }, 216 .cipher = NVME_TCP_TLS_CIPHER_SHA384, }, 219 .cipher = NVME_TCP_TLS_CIPHER_SHA256, }, 222 .cipher = NVME_TCP_TLS_CIPHER_SHA384, }, 225 .cipher = NVME_TCP_TLS_CIPHER_SHA256, }, 241 enum nvme_tcp_tls_cipher cipher = nvme_tls_psk_prio[prio].cipher; in nvme_tls_psk_default() local [all …]
|
| /drivers/crypto/cavium/cpt/ |
| A D | cptvf_algs.c | 232 static int cvm_xts_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_xts_setkey() argument 235 struct cvm_enc_ctx *ctx = crypto_skcipher_ctx(cipher); in cvm_xts_setkey() 240 err = xts_verify_key(cipher, key, keylen); in cvm_xts_setkey() 288 static int cvm_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_setkey() argument 291 struct cvm_enc_ctx *ctx = crypto_skcipher_ctx(cipher); in cvm_setkey() 305 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey() 311 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey() 317 return verify_skcipher_des3_key(cipher, key) ?: in cvm_cbc_des3_setkey() 318 cvm_setkey(cipher, key, keylen, DES3_CBC); in cvm_cbc_des3_setkey() 324 return verify_skcipher_des3_key(cipher, key) ?: in cvm_ecb_des3_setkey() [all …]
|
| /drivers/crypto/bcm/ |
| A D | cipher.c | 325 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req() 326 cipher_parms.mode = ctx->cipher.mode; in handle_skcipher_req() 502 &iproc_priv.cipher_cnt[ctx->cipher.alg][ctx->cipher.mode]); in handle_skcipher_resp() 1301 cipher_parms.alg = ctx->cipher.alg; in handle_aead_req() 1302 cipher_parms.mode = ctx->cipher.mode; in handle_aead_req() 1380 ctx->cipher.mode, in handle_aead_req() 1406 ctx->cipher.mode, in handle_aead_req() 1411 ctx->cipher.mode, in handle_aead_req() 1831 switch (ctx->cipher.alg) { in skcipher_setkey() 1869 cipher_parms.alg = ctx->cipher.alg; in skcipher_setkey() [all …]
|
| /drivers/gpu/drm/nouveau/nvkm/engine/cipher/ |
| A D | g84.c | 80 g84_cipher_intr(struct nvkm_engine *cipher) in g84_cipher_intr() argument 82 struct nvkm_subdev *subdev = &cipher->subdev; in g84_cipher_intr() 92 chan = nvkm_chan_get_inst(cipher, (u64)inst << 12, &flags); in g84_cipher_intr() 108 g84_cipher_init(struct nvkm_engine *cipher) in g84_cipher_init() argument 110 struct nvkm_device *device = cipher->subdev.device; in g84_cipher_init()
|
| /drivers/net/wireless/intel/iwlwifi/mvm/ |
| A D | mld-key.c | 74 switch (keyconf->cipher) { in iwl_mvm_get_sec_flags() 198 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key() 199 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) in iwl_mvm_mld_send_key() 208 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key() 209 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) in iwl_mvm_mld_send_key() 215 if (keyconf->cipher == WLAN_CIPHER_SUITE_TKIP) { in iwl_mvm_mld_send_key() 232 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key() 233 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) { in iwl_mvm_mld_send_key() 335 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in _iwl_mvm_sec_key_del() 336 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) { in _iwl_mvm_sec_key_del()
|
| A D | ftm-responder.c | 22 u8 cipher; member 265 if (hltk_data->cipher > IWL_LOCATION_CIPHER_GCMP_256) { in iwl_mvm_ftm_responder_dyn_cfg_v3() 267 hltk_data->cipher); in iwl_mvm_ftm_responder_dyn_cfg_v3() 271 cmd.cipher = hltk_data->cipher; in iwl_mvm_ftm_responder_dyn_cfg_v3()
|
| /drivers/crypto/intel/keembay/ |
| A D | ocs-aes.c | 479 enum ocs_cipher cipher) in ocs_aes_set_key() argument 493 if (cipher == OCS_SM4 && key_size != 16) { in ocs_aes_set_key() 526 enum ocs_cipher cipher, in set_ocs_aes_command() argument 562 enum ocs_cipher cipher, in ocs_aes_init() argument 610 if (!(cipher == OCS_AES || cipher == OCS_SM4)) in ocs_aes_validate_inputs() 799 enum ocs_cipher cipher, in ocs_aes_op() argument 811 NULL, 0, cipher, mode, instruction, in ocs_aes_op() 927 enum ocs_cipher cipher, in ocs_aes_gcm_op() argument 944 aad_size, out_tag, tag_size, cipher, in ocs_aes_gcm_op() 1309 enum ocs_cipher cipher, in ocs_aes_ccm_op() argument [all …]
|
| A D | ocs-aes.h | 68 const u8 *key, const enum ocs_cipher cipher); 72 enum ocs_cipher cipher, 97 enum ocs_cipher cipher, 109 enum ocs_cipher cipher,
|
| A D | keembay-ocs-aes-core.c | 51 enum ocs_cipher cipher; member 166 enum ocs_cipher cipher) in save_key() argument 170 ret = check_key(in_key, key_len, cipher); in save_key() 176 tctx->cipher = cipher; in save_key() 188 tctx->use_fallback = (cipher == OCS_AES && in kmb_ocs_sk_set_key() 309 enum ocs_cipher cipher, in kmb_ocs_sk_common() argument 354 if (cipher != tctx->cipher) in kmb_ocs_sk_common() 636 enum ocs_cipher cipher, in kmb_ocs_aead_common() argument 672 if (cipher != tctx->cipher) in kmb_ocs_aead_common() 960 tctx->cipher); in kmb_ocs_aes_sk_do_one_request() [all …]
|
| /drivers/crypto/aspeed/ |
| A D | aspeed-acry.c | 148 struct crypto_akcipher *cipher = crypto_akcipher_reqtfm(req); in aspeed_acry_do_fallback() local 149 struct aspeed_acry_ctx *ctx = akcipher_tfm_ctx(cipher); in aspeed_acry_do_fallback() 159 akcipher_request_set_tfm(req, cipher); in aspeed_acry_do_fallback() 166 struct crypto_akcipher *cipher = crypto_akcipher_reqtfm(req); in aspeed_acry_need_fallback() local 167 struct aspeed_acry_ctx *ctx = akcipher_tfm_ctx(cipher); in aspeed_acry_need_fallback() 186 struct crypto_akcipher *cipher = crypto_akcipher_reqtfm(req); in aspeed_acry_do_request() local 187 struct aspeed_acry_ctx *ctx = akcipher_tfm_ctx(cipher); in aspeed_acry_do_request() 350 struct crypto_akcipher *cipher = crypto_akcipher_reqtfm(req); in aspeed_acry_rsa_trigger() local 351 struct aspeed_acry_ctx *ctx = akcipher_tfm_ctx(cipher); in aspeed_acry_rsa_trigger() 416 struct aspeed_acry_ctx *ctx = akcipher_tfm_ctx(cipher); in aspeed_acry_rsa_enc() [all …]
|
| A D | aspeed-hace-crypto.c | 82 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in aspeed_crypto_do_request() local 83 struct aspeed_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in aspeed_crypto_do_request() 366 struct crypto_skcipher *cipher; in aspeed_hace_skcipher_trigger() local 374 cipher = crypto_skcipher_reqtfm(req); in aspeed_hace_skcipher_trigger() 375 ctx = crypto_skcipher_ctx(cipher); in aspeed_hace_skcipher_trigger() 409 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in aspeed_des_crypt() local 410 struct aspeed_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in aspeed_des_crypt() 431 struct aspeed_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in aspeed_des_setkey() 432 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in aspeed_des_setkey() 540 struct aspeed_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in aspeed_aes_crypt() [all …]
|
| /drivers/net/wireless/intel/iwlwifi/mld/ |
| A D | d3.c | 625 switch (key->cipher) { in iwl_mld_set_key_rx_seq() 694 switch (key->cipher) { in iwl_mld_resume_keys_iter() 706 key->cipher == in iwl_mld_resume_keys_iter() 754 u32 cipher) in iwl_mld_add_mcast_rekey() argument 761 .conf.cipher = cipher, in iwl_mld_add_mcast_rekey() 779 switch (cipher) { in iwl_mld_add_mcast_rekey() 1389 __le32 cipher = 0; in iwl_mld_suspend_key_data_iter() local 1391 switch (key->cipher) { in iwl_mld_suspend_key_data_iter() 1397 if (!cipher) in iwl_mld_suspend_key_data_iter() 1401 if (!cipher) in iwl_mld_suspend_key_data_iter() [all …]
|
| /drivers/net/wireless/mediatek/mt7601u/ |
| A D | mac.c | 516 switch (key->cipher) { in mt76_mac_get_key_info() 533 enum mt76_cipher_type cipher; in mt76_mac_wcid_set_key() local 538 cipher = mt76_mac_get_key_info(key, key_data); in mt76_mac_wcid_set_key() 539 if (cipher == MT_CIPHER_NONE && key) in mt76_mac_wcid_set_key() 549 if (cipher >= MT_CIPHER_TKIP) { in mt76_mac_wcid_set_key() 561 val |= FIELD_PREP(MT_WCID_ATTR_PKEY_MODE, cipher & 7) | in mt76_mac_wcid_set_key() 562 FIELD_PREP(MT_WCID_ATTR_PKEY_MODE_EXT, cipher >> 3); in mt76_mac_wcid_set_key() 574 enum mt76_cipher_type cipher; in mt76_mac_shared_key_setup() local 578 cipher = mt76_mac_get_key_info(key, key_data); in mt76_mac_shared_key_setup() 579 if (cipher == MT_CIPHER_NONE && key) in mt76_mac_shared_key_setup() [all …]
|
| /drivers/net/wireless/ralink/rt2x00/ |
| A D | rt2x00debug.c | 113 enum cipher cipher = rxdesc->cipher; in rt2x00debug_update_crypto() local 116 if (cipher == CIPHER_TKIP_NO_MIC) in rt2x00debug_update_crypto() 117 cipher = CIPHER_TKIP; in rt2x00debug_update_crypto() 118 if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX) in rt2x00debug_update_crypto() 122 cipher--; in rt2x00debug_update_crypto() 124 intf->crypto_stats[cipher].success += (status == RX_CRYPTO_SUCCESS); in rt2x00debug_update_crypto() 125 intf->crypto_stats[cipher].icv_error += (status == RX_CRYPTO_FAIL_ICV); in rt2x00debug_update_crypto() 126 intf->crypto_stats[cipher].mic_error += (status == RX_CRYPTO_FAIL_MIC); in rt2x00debug_update_crypto() 127 intf->crypto_stats[cipher].key_error += (status == RX_CRYPTO_FAIL_KEY); in rt2x00debug_update_crypto()
|
| A D | rt2x00crypto.c | 19 enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key) in rt2x00crypto_key_to_cipher() 21 switch (key->cipher) { in rt2x00crypto_key_to_cipher() 47 txdesc->cipher = rt2x00crypto_key_to_cipher(hw_key); in rt2x00crypto_create_tx_descriptor() 84 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) in rt2x00crypto_tx_overhead() 159 switch (rxdesc->cipher) { in rt2x00crypto_rx_insert_iv()
|
| /drivers/net/wireless/silabs/wfx/ |
| A D | key.c | 167 if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || in wfx_add_key() 168 key->cipher == WLAN_CIPHER_SUITE_WEP104) { in wfx_add_key() 173 } else if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { in wfx_add_key() 179 } else if (key->cipher == WLAN_CIPHER_SUITE_CCMP) { in wfx_add_key() 184 } else if (key->cipher == WLAN_CIPHER_SUITE_SMS4) { in wfx_add_key() 189 } else if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in wfx_add_key() 193 dev_warn(wdev->dev, "unsupported key type %d\n", key->cipher); in wfx_add_key()
|
| /drivers/crypto/rockchip/ |
| A D | rk3288_crypto_skcipher.c | 108 static int rk_aes_setkey(struct crypto_skcipher *cipher, in rk_aes_setkey() argument 111 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_aes_setkey() 123 static int rk_des_setkey(struct crypto_skcipher *cipher, in rk_des_setkey() argument 126 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in rk_des_setkey() 129 err = verify_skcipher_des_key(cipher, key); in rk_des_setkey() 139 static int rk_tdes_setkey(struct crypto_skcipher *cipher, in rk_tdes_setkey() argument 142 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in rk_tdes_setkey() 145 err = verify_skcipher_des3_key(cipher, key); in rk_tdes_setkey() 254 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in rk_cipher_hw_init() local 255 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_cipher_hw_init() [all …]
|
| /drivers/net/wireless/ath/ |
| A D | key.c | 406 u32 cipher) in ath_reserve_key_cache_slot() argument 410 if (cipher == WLAN_CIPHER_SUITE_TKIP) in ath_reserve_key_cache_slot() 486 switch (key->cipher) { in ath_key_config() 514 idx = ath_reserve_key_cache_slot(common, key->cipher); in ath_key_config() 524 idx = ath_reserve_key_cache_slot(common, key->cipher); in ath_key_config() 546 idx = ath_reserve_key_cache_slot(common, key->cipher); in ath_key_config() 552 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) in ath_key_config() 562 if (key->cipher == WLAN_CIPHER_SUITE_CCMP) in ath_key_config() 565 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { in ath_key_config()
|
| /drivers/net/wireless/realtek/rtw89/ |
| A D | wow.c | 30 #define RTW89_CIPHER_INFO_DEF(cipher) \ argument 31 {WLAN_CIPHER_SUITE_ ## cipher, .fw_alg = RTW89_WOW_FW_ALG_ ## cipher, \ 32 .len = WLAN_KEY_LEN_ ## cipher} 55 if (cipher_info_defs->cipher == cipher) in rtw89_cipher_alg_recognize() 65 switch (key->cipher) { in _pn_to_iv() 141 switch (key->cipher) { in _iv_to_pn() 286 switch (key->cipher) { in rtw89_wow_get_key_info_iter() 331 key->cipher); in rtw89_wow_get_key_info_iter() 353 switch (key->cipher) { in rtw89_wow_set_key_info_iter() 399 key->cipher); in rtw89_wow_set_key_info_iter() [all …]
|
| /drivers/net/wireless/mediatek/mt76/ |
| A D | mt76x02_mac.c | 44 switch (key->cipher) { in mt76x02_mac_get_key_info() 61 enum mt76x02_cipher_type cipher; in mt76x02_mac_shared_key_setup() local 65 cipher = mt76x02_mac_get_key_info(key, key_data); in mt76x02_mac_shared_key_setup() 66 if (cipher == MT76X02_CIPHER_NONE && key) in mt76x02_mac_shared_key_setup() 84 enum mt76x02_cipher_type cipher; in mt76x02_mac_wcid_sync_pn() local 94 if (cipher == MT76X02_CIPHER_TKIP) { in mt76x02_mac_wcid_sync_pn() 97 } else if (cipher >= MT76X02_CIPHER_AES_CCMP) { in mt76x02_mac_wcid_sync_pn() 109 enum mt76x02_cipher_type cipher; in mt76x02_mac_wcid_set_key() local 115 if (cipher == MT76X02_CIPHER_NONE && key) in mt76x02_mac_wcid_set_key() 129 if (cipher >= MT76X02_CIPHER_TKIP) { in mt76x02_mac_wcid_set_key() [all …]
|
| /drivers/net/ethernet/netronome/nfp/crypto/ |
| A D | ipsec.c | 100 uint32_t cipher :4; /* From nfp_ipsec_sa_cipher */ member 181 cfg->ctrl_word.cipher = aes_gmac ? NFP_IPSEC_CIPHER_AES128_NULL : in set_aes_keylen() 185 cfg->ctrl_word.cipher = aes_gmac ? NFP_IPSEC_CIPHER_AES192_NULL : in set_aes_keylen() 189 cfg->ctrl_word.cipher = aes_gmac ? NFP_IPSEC_CIPHER_AES256_NULL : in set_aes_keylen() 405 cfg->ctrl_word.cipher = NFP_IPSEC_CIPHER_CHACHA20; in nfp_net_xfrm_add_state() 411 cfg->ctrl_word.cipher = NFP_IPSEC_CIPHER_NULL; in nfp_net_xfrm_add_state() 419 cfg->ctrl_word.cipher = NFP_IPSEC_CIPHER_3DES; in nfp_net_xfrm_add_state()
|
| /drivers/net/wireless/mediatek/mt76/mt7615/ |
| A D | mac.c | 61 mt7615_mac_get_cipher(int cipher) in mt7615_mac_get_cipher() argument 63 switch (cipher) { in mt7615_mac_get_cipher() 1197 if (cipher == MT_CIPHER_TKIP) { in mt7615_mac_wtbl_update_key() 1203 if (cipher_mask == BIT(cipher)) in mt7615_mac_wtbl_update_key() 1238 if (cipher != MT_CIPHER_BIP_CMAC_128 || cipher_mask == BIT(cipher)) { in mt7615_mac_wtbl_update_pk() 1271 enum mt76_cipher_type cipher; in __mt7615_mac_wtbl_set_key() local 1272 u16 cipher_mask = wcid->cipher; in __mt7615_mac_wtbl_set_key() 1275 cipher = mt7615_mac_get_cipher(key->cipher); in __mt7615_mac_wtbl_set_key() 1276 if (cipher == MT_CIPHER_NONE) in __mt7615_mac_wtbl_set_key() 1279 cipher_mask |= BIT(cipher); in __mt7615_mac_wtbl_set_key() [all …]
|