Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 132) sorted by relevance

123456

/drivers/crypto/cavium/nitrox/
Dnitrox_algs.c42 const struct nitrox_cipher *cipher = flexi_cipher_table; in flexi_cipher_type() local
44 while (cipher->name) { in flexi_cipher_type()
45 if (!strcmp(cipher->name, name)) in flexi_cipher_type()
47 cipher++; in flexi_cipher_type()
49 return cipher->value; in flexi_cipher_type()
115 static inline int nitrox_skcipher_setkey(struct crypto_skcipher *cipher, in nitrox_skcipher_setkey() argument
119 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey()
145 static int nitrox_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in nitrox_aes_setkey() argument
152 crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in nitrox_aes_setkey()
155 return nitrox_skcipher_setkey(cipher, aes_keylen, key, keylen); in nitrox_aes_setkey()
[all …]
/drivers/crypto/bcm/
Dcipher.c166 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_ablkcipher_rx_sg_create()
180 if (ctx->cipher.alg == CIPHER_ALG_RC4) in spu_ablkcipher_rx_sg_create()
235 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_ablkcipher_tx_sg_create()
341 cipher_parms.alg = ctx->cipher.alg; in handle_ablkcipher_req()
342 cipher_parms.mode = ctx->cipher.mode; in handle_ablkcipher_req()
367 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_ablkcipher_req()
383 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_ablkcipher_req()
392 } else if (ctx->cipher.mode == CIPHER_MODE_CTR) { in handle_ablkcipher_req()
406 if (ctx->cipher.alg == CIPHER_ALG_RC4) { in handle_ablkcipher_req()
479 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_ablkcipher_req()
[all …]
/drivers/staging/skein/
Dthreefish_api.c29 u64 cipher[SKEIN_MAX_STATE_WORDS]; in threefish_encrypt_block_bytes() local
32 threefish_encrypt_block_words(key_ctx, plain, cipher); in threefish_encrypt_block_bytes()
33 skein_put64_lsb_first(out, cipher, key_ctx->state_size / 8); in threefish_encrypt_block_bytes()
56 u64 cipher[SKEIN_MAX_STATE_WORDS]; in threefish_decrypt_block_bytes() local
58 skein_get64_lsb_first(cipher, in, key_ctx->state_size / 64); in threefish_decrypt_block_bytes()
59 threefish_decrypt_block_words(key_ctx, cipher, plain); in threefish_decrypt_block_bytes()
/drivers/crypto/cavium/cpt/
Dcptvf_algs.c235 static int cvm_xts_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_xts_setkey() argument
238 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in cvm_xts_setkey()
292 static int cvm_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_setkey() argument
295 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in cvm_setkey()
303 crypto_ablkcipher_set_flags(cipher, in cvm_setkey()
309 static int cvm_cbc_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_cbc_aes_setkey() argument
312 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey()
315 static int cvm_ecb_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_ecb_aes_setkey() argument
318 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey()
321 static int cvm_cfb_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_cfb_aes_setkey() argument
[all …]
/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
Dg84.c80 g84_cipher_intr(struct nvkm_engine *cipher) in g84_cipher_intr() argument
82 struct nvkm_subdev *subdev = &cipher->subdev; in g84_cipher_intr()
109 g84_cipher_init(struct nvkm_engine *cipher) in g84_cipher_init() argument
111 struct nvkm_device *device = cipher->subdev.device; in g84_cipher_init()
/drivers/net/wireless/ralink/rt2x00/
Drt2x00crypto.c30 enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key) in rt2x00crypto_key_to_cipher()
32 switch (key->cipher) { in rt2x00crypto_key_to_cipher()
58 txdesc->cipher = rt2x00crypto_key_to_cipher(hw_key); in rt2x00crypto_create_tx_descriptor()
95 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) in rt2x00crypto_tx_overhead()
170 switch (rxdesc->cipher) { in rt2x00crypto_rx_insert_iv()
Drt2x00debug.c142 enum cipher cipher = rxdesc->cipher; in rt2x00debug_update_crypto() local
145 if (cipher == CIPHER_TKIP_NO_MIC) in rt2x00debug_update_crypto()
146 cipher = CIPHER_TKIP; in rt2x00debug_update_crypto()
147 if (cipher == CIPHER_NONE || cipher >= CIPHER_MAX) in rt2x00debug_update_crypto()
151 cipher--; in rt2x00debug_update_crypto()
153 intf->crypto_stats[cipher].success += (status == RX_CRYPTO_SUCCESS); in rt2x00debug_update_crypto()
154 intf->crypto_stats[cipher].icv_error += (status == RX_CRYPTO_FAIL_ICV); in rt2x00debug_update_crypto()
155 intf->crypto_stats[cipher].mic_error += (status == RX_CRYPTO_FAIL_MIC); in rt2x00debug_update_crypto()
156 intf->crypto_stats[cipher].key_error += (status == RX_CRYPTO_FAIL_KEY); in rt2x00debug_update_crypto()
Drt2x00queue.h190 u8 cipher; member
333 enum cipher cipher; member
/drivers/net/wireless/mediatek/mt7601u/
Dmac.c500 switch (key->cipher) { in mt76_mac_get_key_info()
517 enum mt76_cipher_type cipher; in mt76_mac_wcid_set_key() local
522 cipher = mt76_mac_get_key_info(key, key_data); in mt76_mac_wcid_set_key()
523 if (cipher == MT_CIPHER_NONE && key) in mt76_mac_wcid_set_key()
533 if (cipher >= MT_CIPHER_TKIP) { in mt76_mac_wcid_set_key()
545 val |= FIELD_PREP(MT_WCID_ATTR_PKEY_MODE, cipher & 7) | in mt76_mac_wcid_set_key()
546 FIELD_PREP(MT_WCID_ATTR_PKEY_MODE_EXT, cipher >> 3); in mt76_mac_wcid_set_key()
558 enum mt76_cipher_type cipher; in mt76_mac_shared_key_setup() local
562 cipher = mt76_mac_get_key_info(key, key_data); in mt76_mac_shared_key_setup()
563 if (cipher == MT_CIPHER_NONE && key) in mt76_mac_shared_key_setup()
[all …]
/drivers/net/wireless/ath/
Dkey.c406 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()
592 if (key->cipher != WLAN_CIPHER_SUITE_TKIP) in ath_key_delete()
/drivers/crypto/rockchip/
Drk3288_crypto_ablkcipher.c33 static int rk_aes_setkey(struct crypto_ablkcipher *cipher, in rk_aes_setkey() argument
36 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in rk_aes_setkey()
41 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in rk_aes_setkey()
49 static int rk_tdes_setkey(struct crypto_ablkcipher *cipher, in rk_tdes_setkey() argument
52 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in rk_tdes_setkey()
57 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in rk_tdes_setkey()
199 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in rk_ablk_hw_init() local
200 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in rk_ablk_hw_init()
201 struct rk_cipher_ctx *ctx = crypto_ablkcipher_ctx(cipher); in rk_ablk_hw_init()
205 ivsize = crypto_ablkcipher_ivsize(cipher); in rk_ablk_hw_init()
/drivers/crypto/amcc/
Dcrypto4xx_alg.c104 static int crypto4xx_setkey_aes(struct crypto_ablkcipher *cipher, in crypto4xx_setkey_aes() argument
110 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in crypto4xx_setkey_aes()
117 crypto_ablkcipher_set_flags(cipher, in crypto4xx_setkey_aes()
171 int crypto4xx_setkey_aes_cbc(struct crypto_ablkcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
174 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
Dcrypto4xx_core.h150 struct crypto_alg cipher; member
170 return container_of(x, struct crypto4xx_alg, alg.u.cipher); in crypto_alg_to_crypto4xx_alg()
191 extern int crypto4xx_setkey_aes_cbc(struct crypto_ablkcipher *cipher,
/drivers/crypto/
Dmxc-scc.c452 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in mxc_scc_ecb_des_encrypt() local
453 struct mxc_scc_ctx *ctx = crypto_ablkcipher_ctx(cipher); in mxc_scc_ecb_des_encrypt()
462 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in mxc_scc_ecb_des_decrypt() local
463 struct mxc_scc_ctx *ctx = crypto_ablkcipher_ctx(cipher); in mxc_scc_ecb_des_decrypt()
473 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in mxc_scc_cbc_des_encrypt() local
474 struct mxc_scc_ctx *ctx = crypto_ablkcipher_ctx(cipher); in mxc_scc_cbc_des_encrypt()
484 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in mxc_scc_cbc_des_decrypt() local
485 struct mxc_scc_ctx *ctx = crypto_ablkcipher_ctx(cipher); in mxc_scc_cbc_des_decrypt()
Dpicoxcell_crypto.c747 static int spacc_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in spacc_des_setkey() argument
750 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in spacc_des_setkey()
755 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in spacc_des_setkey()
760 (crypto_ablkcipher_get_flags(cipher) & CRYPTO_TFM_REQ_WEAK_KEY)) { in spacc_des_setkey()
775 static int spacc_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in spacc_aes_setkey() argument
778 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in spacc_aes_setkey()
783 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in spacc_aes_setkey()
803 cipher->base.crt_flags & in spacc_aes_setkey()
824 static int spacc_kasumi_f8_setkey(struct crypto_ablkcipher *cipher, in spacc_kasumi_f8_setkey() argument
827 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in spacc_kasumi_f8_setkey()
[all …]
Dn2_core.c719 static int n2_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in n2_aes_setkey() argument
722 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_aes_setkey()
739 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in n2_aes_setkey()
748 static int n2_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in n2_des_setkey() argument
751 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_des_setkey()
760 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in n2_des_setkey()
775 static int n2_3des_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in n2_3des_setkey() argument
778 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_3des_setkey()
785 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in n2_3des_setkey()
793 static int n2_arc4_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in n2_arc4_setkey() argument
[all …]
Dtalitos.c1511 static int ablkcipher_setkey(struct crypto_ablkcipher *cipher, in ablkcipher_setkey() argument
1514 struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher); in ablkcipher_setkey()
1518 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in ablkcipher_setkey()
1522 if (unlikely(crypto_ablkcipher_get_flags(cipher) & in ablkcipher_setkey()
1525 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_WEAK_KEY); in ablkcipher_setkey()
1535 static int ablkcipher_aes_setkey(struct crypto_ablkcipher *cipher, in ablkcipher_aes_setkey() argument
1540 return ablkcipher_setkey(cipher, key, keylen); in ablkcipher_aes_setkey()
1542 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in ablkcipher_aes_setkey()
1567 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); in ablkcipher_done() local
1568 struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher); in ablkcipher_done()
[all …]
/drivers/crypto/ux500/cryp/
Dcryp_core.c826 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); in ablk_dma_crypt() local
827 struct cryp_ctx *ctx = crypto_ablkcipher_ctx(cipher); in ablk_dma_crypt()
884 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); in ablk_crypt() local
885 struct cryp_ctx *ctx = crypto_ablkcipher_ctx(cipher); in ablk_crypt()
944 static int aes_ablkcipher_setkey(struct crypto_ablkcipher *cipher, in aes_ablkcipher_setkey() argument
947 struct cryp_ctx *ctx = crypto_ablkcipher_ctx(cipher); in aes_ablkcipher_setkey()
948 u32 *flags = &cipher->base.crt_flags; in aes_ablkcipher_setkey()
979 static int des_ablkcipher_setkey(struct crypto_ablkcipher *cipher, in des_ablkcipher_setkey() argument
982 struct cryp_ctx *ctx = crypto_ablkcipher_ctx(cipher); in des_ablkcipher_setkey()
983 u32 *flags = &cipher->base.crt_flags; in des_ablkcipher_setkey()
[all …]
/drivers/crypto/marvell/
Dcipher.c242 static int mv_cesa_aes_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in mv_cesa_aes_setkey() argument
245 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_aes_setkey()
254 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in mv_cesa_aes_setkey()
267 static int mv_cesa_des_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in mv_cesa_des_setkey() argument
270 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_des_setkey()
276 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in mv_cesa_des_setkey()
291 static int mv_cesa_des3_ede_setkey(struct crypto_ablkcipher *cipher, in mv_cesa_des3_ede_setkey() argument
294 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in mv_cesa_des3_ede_setkey()
298 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in mv_cesa_des3_ede_setkey()
/drivers/crypto/virtio/
Dvirtio_crypto_algs.c154 vcrypto->ctrl.u.sym_create_session.u.cipher.para.algo = in virtio_crypto_alg_ablkcipher_init_session()
156 vcrypto->ctrl.u.sym_create_session.u.cipher.para.keylen = in virtio_crypto_alg_ablkcipher_init_session()
158 vcrypto->ctrl.u.sym_create_session.u.cipher.para.op = in virtio_crypto_alg_ablkcipher_init_session()
398 req_data->u.sym_req.u.cipher.para.iv_len = cpu_to_le32(ivsize); in __virtio_crypto_ablkcipher_do_req()
399 req_data->u.sym_req.u.cipher.para.src_data_len = in __virtio_crypto_ablkcipher_do_req()
419 req_data->u.sym_req.u.cipher.para.dst_data_len = in __virtio_crypto_ablkcipher_do_req()
/drivers/crypto/chelsio/
Dchcr_algo.c557 static int chcr_cipher_fallback(struct crypto_skcipher *cipher, in chcr_cipher_fallback() argument
567 SKCIPHER_REQUEST_ON_STACK(subreq, cipher); in chcr_cipher_fallback()
568 skcipher_request_set_tfm(subreq, cipher); in chcr_cipher_fallback()
740 static int chcr_cipher_fallback_setkey(struct crypto_ablkcipher *cipher, in chcr_cipher_fallback_setkey() argument
744 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in chcr_cipher_fallback_setkey()
745 struct chcr_context *ctx = crypto_ablkcipher_ctx(cipher); in chcr_cipher_fallback_setkey()
750 crypto_skcipher_set_flags(ablkctx->sw_cipher, cipher->base.crt_flags & in chcr_cipher_fallback_setkey()
760 static int chcr_aes_cbc_setkey(struct crypto_ablkcipher *cipher, in chcr_aes_cbc_setkey() argument
764 struct chcr_context *ctx = crypto_ablkcipher_ctx(cipher); in chcr_aes_cbc_setkey()
770 err = chcr_cipher_fallback_setkey(cipher, key, keylen); in chcr_aes_cbc_setkey()
[all …]
/drivers/staging/wilc1000/
Dwilc_wfi_cfgoperations.c875 switch (params->cipher) { in add_key()
884 if (params->cipher == WLAN_CIPHER_SUITE_WEP40) in add_key()
919 if (params->cipher == WLAN_CIPHER_SUITE_TKIP) in add_key()
926 if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { in add_key()
942 priv->wilc_gtk[key_index]->cipher = params->cipher; in add_key()
952 if (params->cipher == WLAN_CIPHER_SUITE_TKIP) in add_key()
957 if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { in add_key()
977 priv->wilc_ptk[key_index]->cipher = params->cipher; in add_key()
991 if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { in add_key()
1014 g_key_gtk_params.cipher = params->cipher; in add_key()
[all …]
/drivers/crypto/axis/
Dartpec6_crypto.c1092 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in artpec6_crypto_encrypt() local
1093 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(cipher); in artpec6_crypto_encrypt()
1138 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in artpec6_crypto_decrypt() local
1139 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(cipher); in artpec6_crypto_decrypt()
1183 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in artpec6_crypto_ctr_crypt() local
1184 struct artpec6_cryptotfm_context *ctx = crypto_skcipher_ctx(cipher); in artpec6_crypto_ctr_crypt()
1185 size_t iv_len = crypto_skcipher_ivsize(cipher); in artpec6_crypto_ctr_crypt()
1614 artpec6_crypto_cipher_set_key(struct crypto_skcipher *cipher, const u8 *key, in artpec6_crypto_cipher_set_key() argument
1618 crypto_skcipher_ctx(cipher); in artpec6_crypto_cipher_set_key()
1626 crypto_skcipher_set_flags(cipher, in artpec6_crypto_cipher_set_key()
[all …]
/drivers/net/wireless/rsi/
Drsi_91x_mac80211.c777 __func__, key->cipher, key_type, key->keylen); in rsi_hal_key_config()
787 if ((key->cipher == WLAN_CIPHER_SUITE_WEP104) || in rsi_hal_key_config()
788 (key->cipher == WLAN_CIPHER_SUITE_WEP40)) { in rsi_hal_key_config()
794 key->cipher, in rsi_hal_key_config()
806 key->cipher, in rsi_hal_key_config()
842 secinfo->ptk_cipher = key->cipher; in rsi_mac80211_set_key()
844 secinfo->gtk_cipher = key->cipher; in rsi_mac80211_set_key()
1269 if ((key->cipher == WLAN_CIPHER_SUITE_WEP104) || in rsi_mac80211_sta_add()
1270 (key->cipher == WLAN_CIPHER_SUITE_WEP40)) in rsi_mac80211_sta_add()
1276 key->cipher, in rsi_mac80211_sta_add()
/drivers/net/wireless/ath/ath5k/
Dmac80211-ops.c488 (key->cipher == WLAN_CIPHER_SUITE_TKIP || in ath5k_set_key()
489 key->cipher == WLAN_CIPHER_SUITE_CCMP) && in ath5k_set_key()
495 switch (key->cipher) { in ath5k_set_key()
517 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) in ath5k_set_key()
519 if (key->cipher == WLAN_CIPHER_SUITE_CCMP) in ath5k_set_key()

123456