Home
last modified time | relevance | path

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

1234567

/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c41 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()
83 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq); in nitrox_cbc_cipher_callback() local
84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback()
165 static inline int nitrox_skcipher_setkey(struct crypto_skcipher *cipher, in nitrox_skcipher_setkey() argument
169 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey()
197 static int nitrox_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in nitrox_aes_setkey() argument
[all …]
/linux/drivers/nvme/common/
H A Dkeyring.c200 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 …]
/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c393 gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf, in gss_krb5_cts_crypt() argument
398 SYNC_SKCIPHER_REQUEST_ON_STACK(req, cipher); in gss_krb5_cts_crypt()
427 skcipher_request_set_sync_tfm(req, cipher); in gss_krb5_cts_crypt()
450 memcpy(iv, data, crypto_sync_skcipher_ivsize(cipher)); in gss_krb5_cts_crypt()
588 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_encrypt() local
594 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt()
598 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt()
602 conflen = crypto_sync_skcipher_blocksize(cipher); in gss_krb5_aes_encrypt()
644 err = krb5_cbc_cts_encrypt(cipher, aux_cipher, in gss_krb5_aes_encrypt()
661 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_decrypt() local
[all …]
H A Dgss_krb5_keys.c157 struct crypto_sync_skcipher *cipher; in krb5_DK() local
166 cipher = crypto_alloc_sync_skcipher(gk5e->encrypt_name, 0, 0); in krb5_DK()
167 if (IS_ERR(cipher)) in krb5_DK()
169 blocksize = crypto_sync_skcipher_blocksize(cipher); in krb5_DK()
170 if (crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_DK()
201 krb5_encrypt(cipher, NULL, inblock.data, outblock.data, in krb5_DK()
220 crypto_free_sync_skcipher(cipher); in krb5_DK()
/linux/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.c232 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()
302 static int cvm_cbc_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cbc_aes_setkey() argument
305 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey()
308 static int cvm_ecb_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_ecb_aes_setkey() argument
311 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey()
314 static int cvm_cbc_des3_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cbc_des3_setkey() argument
[all …]
/linux/Documentation/crypto/
H A Dintro.rst19 Therefore, a cipher handle variable usually has the name "tfm". Besides
37 Note: The terms "transformation" and cipher algorithm are used
56 to as a "cipher handle". Such a cipher handle is always subject to the
58 a cipher handle:
60 1. Initialization of a cipher handle.
62 2. Execution of all intended cipher operations applicable for the handle
63 where the cipher handle must be furnished to every API call.
65 3. Destruction of a cipher handle.
67 When using the initialization API calls, a cipher handle is created and
H A Duserspace-if.rst13 consumer and never as a provider of a transformation or cipher
56 A cipher is accessed with the same name as done for the in-kernel API
61 user space application. User space invokes the cipher operation with the
62 send()/write() system call family. The result of the cipher operation is
73 parameter specified below for the different cipher types.
79 particular cipher instance. When invoking send/write or recv/read
87 space interface allows the cipher operation in-place. That means that
90 is of particular interest for symmetric cipher operations where a
101 The message digest type to be used for the cipher operation is selected
111 .salg_name = "sha1" /* this is the cipher name */
[all …]
/linux/drivers/crypto/bcm/
H A Dcipher.c154 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_rx_sg_create()
218 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_tx_sg_create()
323 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req()
324 cipher_parms.mode = ctx->cipher.mode; in handle_skcipher_req()
349 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req()
365 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req()
374 } else if (ctx->cipher.mode == CIPHER_MODE_CTR) { in handle_skcipher_req()
434 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req()
448 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req()
484 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_resp()
[all …]
/linux/net/wireless/
H A Dwext-compat.c429 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in cfg80211_set_encryption()
475 wdev->wext.keys->params[idx].cipher = 0; in cfg80211_set_encryption()
500 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in cfg80211_set_encryption()
501 params->cipher != WLAN_CIPHER_SUITE_WEP104) in cfg80211_set_encryption()
511 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption()
512 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in cfg80211_set_encryption()
520 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption()
521 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in cfg80211_set_encryption()
547 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in cfg80211_set_encryption()
617 params.cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencode()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
H A 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()
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()
/linux/tools/testing/crypto/chacha20-s390/
H A Dtest-cipher.c50 /* Perform cipher operations with the chacha lib */
51 static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain) in test_lib_chacha() argument
72 chacha_crypt_arch(&chacha_state, cipher, plain, data_size, 20); in test_lib_chacha()
78 16, 1, cipher, in test_lib_chacha()
87 chacha_crypt_arch(&chacha_state, revert, cipher, data_size, 20); in test_lib_chacha()
100 /* Perform cipher operations with skcipher */
125 /* Initialize and trigger cipher operations */
126 static int test_skcipher(char *name, u8 *revert, u8 *cipher, u8 *plain) in test_skcipher() argument
174 sg_init_one(&sk.sgout, cipher, data_size); in test_skcipher()
191 16, 1, cipher, in test_skcipher()
[all...]
/linux/net/tls/
H A Dtls_main.c61 #define CHECK_CIPHER_DESC(cipher,ci) \ argument
62 static_assert(cipher ## _IV_SIZE <= TLS_MAX_IV_SIZE); \
63 static_assert(cipher ## _SALT_SIZE <= TLS_MAX_SALT_SIZE); \
64 static_assert(cipher ## _REC_SEQ_SIZE <= TLS_MAX_REC_SEQ_SIZE); \
65 static_assert(cipher ## _TAG_SIZE == TLS_TAG_SIZE); \
66 static_assert(sizeof_field(struct ci, iv) == cipher ## _IV_SIZE); \
67 static_assert(sizeof_field(struct ci, key) == cipher ## _KEY_SIZE); \
68 static_assert(sizeof_field(struct ci, salt) == cipher ## _SALT_SIZE); \
69 static_assert(sizeof_field(struct ci, rec_seq) == cipher ## _REC_SEQ_SIZE);
78 #define CIPHER_DESC(cipher,ci,algname,_offloadable) [cipher - TLS_CIPHER_MIN] = { \ argument
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dcrypto_bench.c14 char cipher[128] = {}; variable
34 if (!cipher[0] || !key_len || key_len > 256) { in crypto_setup()
39 __builtin_memcpy(&params.algo, cipher, sizeof(cipher)); in crypto_setup()
/linux/drivers/crypto/intel/keembay/
H A Docs-aes.h68 const u8 *key, const enum ocs_cipher cipher);
72 enum ocs_cipher cipher,
97 enum ocs_cipher cipher,
109 enum ocs_cipher cipher,
/linux/drivers/crypto/aspeed/
H A Daspeed-acry.c148 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()
415 struct crypto_akcipher *cipher = crypto_akcipher_reqtfm(req); in aspeed_acry_rsa_enc() local
[all …]
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00crypto.c19 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()
H A Drt2x00debug.c113 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()
/linux/crypto/
H A Dtestmgr.c149 struct cipher_test_suite cipher; member
3217 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_skcipher()
3442 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_cipher()
4067 .cipher = __VECS(adiantum_xchacha12_aes_tv_template)
4074 .cipher = __VECS(adiantum_xchacha20_aes_tv_template)
4299 .cipher = __VECS(aes_cbc_tv_template)
4305 .cipher = __VECS(anubis_cbc_tv_template)
4311 .cipher = __VECS(aria_cbc_tv_template)
4317 .cipher = __VECS(bf_cbc_tv_template)
4323 .cipher = __VECS(camellia_cbc_tv_template)
[all …]
/linux/drivers/net/wireless/mediatek/mt7601u/
H A Dmac.c516 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 …]
/linux/drivers/net/wireless/silabs/wfx/
H A Dkey.c167 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()
/linux/net/mac80211/
H A Dkey.c205 switch (key->conf.cipher) { in ieee80211_key_enable_hw_accel()
459 is_wep = new->conf.cipher == WLAN_CIPHER_SUITE_WEP40 || in ieee80211_key_replace()
460 new->conf.cipher == WLAN_CIPHER_SUITE_WEP104; in ieee80211_key_replace()
464 is_wep = old->conf.cipher == WLAN_CIPHER_SUITE_WEP40 || in ieee80211_key_replace()
465 old->conf.cipher == WLAN_CIPHER_SUITE_WEP104; in ieee80211_key_replace()
593 ieee80211_key_alloc(u32 cipher, int idx, size_t key_len, in ieee80211_key_alloc() argument
617 key->conf.cipher = cipher; in ieee80211_key_alloc()
620 switch (cipher) { in ieee80211_key_alloc()
681 if (cipher == WLAN_CIPHER_SUITE_AES_CMAC) in ieee80211_key_alloc()
748 switch (key->conf.cipher) { in ieee80211_key_free_common()
[all …]
/linux/drivers/crypto/rockchip/
H A Drk3288_crypto_skcipher.c108 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 …]
/linux/drivers/net/wireless/ath/
H A 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()
/linux/drivers/net/wireless/realtek/rtw89/
H A Dwow.c30 #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}
48 struct rtw89_cipher_info *rtw89_cipher_alg_recognize(u32 cipher) in rtw89_cipher_alg_recognize() argument
55 if (cipher_info_defs->cipher == cipher) in rtw89_cipher_alg_recognize()
65 switch (key->cipher) { in _pn_to_iv()
102 switch (key->cipher) { in rtw89_rx_pn_to_iv()
154 switch (key->cipher) { in _iv_to_pn()
193 switch (key->cipher) { in rtw89_rx_iv_to_pn()
310 cipher_info = rtw89_cipher_alg_recognize(key->cipher); in rtw89_wow_get_key_info_iter()
[all …]
/linux/Documentation/admin-guide/device-mapper/
H A Ddm-crypt.rst13 <cipher> <key> <iv_offset> <device path> \
16 <cipher>
17 Encryption cipher, encryption mode and Initial Vector (IV) generator.
19 The cipher specifications format is::
21 cipher[:keycount]-chainmode-ivmode[:ivopts]
34 The crypto API cipher specifications format is::
55 You can only use key sizes that are valid for the selected cipher
210 # Create a crypt device using cryptsetup and LUKS header with default cipher

1234567