/kernel/linux/linux-5.10/Documentation/crypto/ |
D | architecture.rst | 8 cipher types: 33 A single block cipher may even be called with multiple templates. 34 However, templates cannot be used without a single cipher. 63 When using the synchronous API operation, the caller invokes a cipher 65 That means, the caller waits until the cipher operation completes. 71 implies that the invocation of a cipher operation will complete almost 72 instantly. That invocation triggers the cipher operation but it does not 73 signal its completion. Before invoking a cipher operation, the caller 75 signal the completion of the cipher operation. Furthermore, the caller 84 A cipher is referenced by the caller with a string. That string has the [all …]
|
D | intro.rst | 19 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
|
D | userspace-if.rst | 13 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 …]
|
/kernel/linux/linux-5.10/drivers/crypto/amcc/ |
D | crypto4xx_alg.c | 73 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_crypt() local 74 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt() 121 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument 127 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes() 177 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument 180 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc() 184 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument 187 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb() 191 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument 194 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb() [all …]
|
D | crypto4xx_core.h | 125 struct crypto_sync_skcipher *cipher; member 137 struct skcipher_alg cipher; member 163 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, 165 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, 167 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, 169 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, 171 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, 173 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, 236 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, 240 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher,
|
/kernel/linux/linux-5.10/crypto/ |
D | cbc.c | 24 struct crypto_cipher *cipher; in crypto_cbc_encrypt_segment() local 28 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_segment() 29 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_segment() 30 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_segment() 51 struct crypto_cipher *cipher; in crypto_cbc_encrypt_inplace() local 55 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_inplace() 56 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_inplace() 57 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_inplace() 99 struct crypto_cipher *cipher; in crypto_cbc_decrypt_segment() local 103 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_decrypt_segment() [all …]
|
D | ecb.c | 16 struct crypto_cipher *cipher, in crypto_ecb_crypt() argument 19 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt() 31 fn(crypto_cipher_tfm(cipher), dst, src); in crypto_ecb_crypt() 46 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_encrypt() local 48 return crypto_ecb_crypt(req, cipher, in crypto_ecb_encrypt() 49 crypto_cipher_alg(cipher)->cia_encrypt); in crypto_ecb_encrypt() 55 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_decrypt() local 57 return crypto_ecb_crypt(req, cipher, in crypto_ecb_decrypt() 58 crypto_cipher_alg(cipher)->cia_decrypt); in crypto_ecb_decrypt()
|
D | Kconfig | 333 Support for the AEAD wrapper using the ChaCha20 stream cipher combined 387 This block cipher algorithm is required for IPSec. 395 This block cipher algorithm is required for TPM2 Cryptography. 403 This block cipher algorithm is required for IPSec. 426 This is the simplest block cipher algorithm. It simply encrypts 436 narrow block cipher mode for dm-crypt. Use it with cipher 439 rest is used to tie each cipher block to its logical position. 446 OFB: the Output Feedback mode makes a block cipher into a synchronous 447 stream cipher. It generates keystream blocks, which are then XORed 459 This block cipher algorithm is required for RxRPC. [all …]
|
D | ctr.c | 101 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ctr_crypt() local 102 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ctr_crypt() 111 nbytes = crypto_ctr_crypt_inplace(&walk, cipher); in crypto_ctr_crypt() 113 nbytes = crypto_ctr_crypt_segment(&walk, cipher); in crypto_ctr_crypt() 119 crypto_ctr_crypt_final(&walk, cipher); in crypto_ctr_crypt() 222 struct crypto_skcipher *cipher; in crypto_rfc3686_init_tfm() local 226 cipher = crypto_spawn_skcipher(spawn); in crypto_rfc3686_init_tfm() 227 if (IS_ERR(cipher)) in crypto_rfc3686_init_tfm() 228 return PTR_ERR(cipher); in crypto_rfc3686_init_tfm() 230 ctx->child = cipher; in crypto_rfc3686_init_tfm() [all …]
|
D | ofb.c | 20 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ofb_crypt() local 21 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ofb_crypt() 34 crypto_cipher_encrypt_one(cipher, iv, iv); in crypto_ofb_crypt() 44 crypto_cipher_encrypt_one(cipher, walk.iv, walk.iv); in crypto_ofb_crypt()
|
D | pcbc.c | 66 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_encrypt() local 76 cipher); in crypto_pcbc_encrypt() 79 cipher); in crypto_pcbc_encrypt() 133 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_decrypt() local 143 cipher); in crypto_pcbc_decrypt() 146 cipher); in crypto_pcbc_decrypt()
|
D | skcipher.c | 582 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in skcipher_setkey_unaligned() local 594 ret = cipher->setkey(tfm, alignbuffer, keylen); in skcipher_setkey_unaligned() 602 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in crypto_skcipher_setkey() local 606 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) in crypto_skcipher_setkey() 612 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey() 882 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in skcipher_setkey_simple() local 884 crypto_cipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in skcipher_setkey_simple() 885 crypto_cipher_set_flags(cipher, crypto_skcipher_get_flags(tfm) & in skcipher_setkey_simple() 887 return crypto_cipher_setkey(cipher, key, keylen); in skcipher_setkey_simple() 895 struct crypto_cipher *cipher; in skcipher_init_tfm_simple() local [all …]
|
D | testmgr.c | 148 struct cipher_test_suite cipher; member 3132 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_skcipher() 3523 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_cipher() 4168 .cipher = __VECS(adiantum_xchacha12_aes_tv_template) 4175 .cipher = __VECS(adiantum_xchacha20_aes_tv_template) 4376 .cipher = __VECS(aes_cbc_tv_template) 4382 .cipher = __VECS(anubis_cbc_tv_template) 4388 .cipher = __VECS(bf_cbc_tv_template) 4394 .cipher = __VECS(camellia_cbc_tv_template) 4400 .cipher = __VECS(cast5_cbc_tv_template) [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/cavium/nitrox/ |
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() 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 …]
|
/kernel/linux/linux-5.10/drivers/crypto/cavium/cpt/ |
D | cptvf_algs.c | 232 static int cvm_xts_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_xts_setkey() argument 235 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in cvm_xts_setkey() 289 static int cvm_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_setkey() argument 292 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in cvm_setkey() 304 static int cvm_cbc_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cbc_aes_setkey() argument 307 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey() 310 static int cvm_ecb_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_ecb_aes_setkey() argument 313 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey() 316 static int cvm_cfb_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in cvm_cfb_aes_setkey() argument 319 return cvm_setkey(cipher, key, keylen, AES_CFB); in cvm_cfb_aes_setkey() [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/bcm/ |
D | cipher.c | 154 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_rx_sg_create() 219 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_tx_sg_create() 324 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req() 325 cipher_parms.mode = ctx->cipher.mode; in handle_skcipher_req() 350 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req() 366 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req() 375 } else if (ctx->cipher.mode == CIPHER_MODE_CTR) { in handle_skcipher_req() 435 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req() 449 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req() 487 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_resp() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | ftm-responder.c | 73 u8 cipher; member 267 if (hltk_data->cipher > IWL_LOCATION_CIPHER_GCMP_256) { in iwl_mvm_ftm_responder_dyn_cfg_v3() 269 hltk_data->cipher); in iwl_mvm_ftm_responder_dyn_cfg_v3() 273 cmd.cipher = hltk_data->cipher; in iwl_mvm_ftm_responder_dyn_cfg_v3() 321 u8 *addr, u32 cipher, u8 *tk, u32 tk_len, in iwl_mvm_ftm_respoder_add_pasn_sta() argument 340 hltk_data.cipher = iwl_mvm_cipher_to_location_cipher(cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 341 if (hltk_data.cipher == IWL_LOCATION_CIPHER_INVALID) { in iwl_mvm_ftm_respoder_add_pasn_sta() 342 IWL_ERR(mvm, "invalid cipher: %u\n", cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 352 cipher, tk, tk_len); in iwl_mvm_ftm_respoder_add_pasn_sta()
|
/kernel/linux/linux-5.10/net/wireless/ |
D | wext-compat.c | 425 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in __cfg80211_set_encryption() 469 wdev->wext.keys->params[idx].cipher = 0; in __cfg80211_set_encryption() 492 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in __cfg80211_set_encryption() 493 params->cipher != WLAN_CIPHER_SUITE_WEP104) in __cfg80211_set_encryption() 503 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 504 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in __cfg80211_set_encryption() 512 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 513 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in __cfg80211_set_encryption() 536 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in __cfg80211_set_encryption() 612 params.cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencode() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/mediatek/mt76/mt7615/ |
D | usb_sdio.c | 141 enum mt7615_cipher_type cipher; in mt7663_usb_sdio_set_key() local 152 cipher = mt7615_mac_get_cipher(key->cipher); in mt7663_usb_sdio_set_key() 153 if (cipher == MT_CIPHER_NONE) { in mt7663_usb_sdio_set_key() 160 mt7615_mac_wtbl_update_cipher(dev, wcid, cipher, key->cmd); in mt7663_usb_sdio_set_key() 162 cipher, key->cmd); in mt7663_usb_sdio_set_key() 166 err = mt7615_mac_wtbl_update_pk(dev, wcid, cipher, key->keyidx, in mt7663_usb_sdio_set_key() 172 wcid->cipher |= BIT(cipher); in mt7663_usb_sdio_set_key() 174 wcid->cipher &= ~BIT(cipher); in mt7663_usb_sdio_set_key()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/engine/cipher/ |
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() 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()
|
/kernel/linux/linux-5.10/net/sunrpc/auth_gss/ |
D | gss_krb5_keys.c | 150 struct crypto_sync_skcipher *cipher; in krb5_derive_key() local 160 cipher = crypto_alloc_sync_skcipher(gk5e->encrypt_name, 0, 0); in krb5_derive_key() 161 if (IS_ERR(cipher)) in krb5_derive_key() 163 if (crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_derive_key() 200 (*(gk5e->encrypt))(cipher, NULL, inblock.data, in krb5_derive_key() 237 crypto_free_sync_skcipher(cipher); in krb5_derive_key()
|
/kernel/linux/linux-5.10/drivers/net/wireless/ralink/rt2x00/ |
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()
|
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()
|
/kernel/linux/linux-5.10/drivers/net/wireless/mediatek/mt7601u/ |
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 …]
|
/kernel/linux/linux-5.10/drivers/staging/wfx/ |
D | key.c | 173 if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || in wfx_add_key() 174 key->cipher == WLAN_CIPHER_SUITE_WEP104) { in wfx_add_key() 180 } else if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { in wfx_add_key() 187 } else if (key->cipher == WLAN_CIPHER_SUITE_CCMP) { in wfx_add_key() 194 } else if (key->cipher == WLAN_CIPHER_SUITE_SMS4) { in wfx_add_key() 200 } else if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in wfx_add_key() 204 dev_warn(wdev->dev, "unsupported key type %d\n", key->cipher); in wfx_add_key()
|