/Linux-v5.15/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 …]
|
/Linux-v5.15/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,
|
/Linux-v5.15/crypto/ |
D | cbc.c | 25 struct crypto_cipher *cipher; in crypto_cbc_encrypt_segment() local 29 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_segment() 30 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_segment() 31 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_segment() 52 struct crypto_cipher *cipher; in crypto_cbc_encrypt_inplace() local 56 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_inplace() 57 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_encrypt_inplace() 58 fn = crypto_cipher_alg(cipher)->cia_encrypt; in crypto_cbc_encrypt_inplace() 100 struct crypto_cipher *cipher; in crypto_cbc_decrypt_segment() local 104 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_decrypt_segment() [all …]
|
D | ecb.c | 17 struct crypto_cipher *cipher, in crypto_ecb_crypt() argument 20 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt() 32 fn(crypto_cipher_tfm(cipher), dst, src); in crypto_ecb_crypt() 47 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_encrypt() local 49 return crypto_ecb_crypt(req, cipher, in crypto_ecb_encrypt() 50 crypto_cipher_alg(cipher)->cia_encrypt); in crypto_ecb_encrypt() 56 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ecb_decrypt() local 58 return crypto_ecb_crypt(req, cipher, in crypto_ecb_decrypt() 59 crypto_cipher_alg(cipher)->cia_decrypt); in crypto_ecb_decrypt()
|
D | Kconfig | 327 Support for the AEAD wrapper using the ChaCha20 stream cipher combined 381 This block cipher algorithm is required for IPSec. 389 This block cipher algorithm is required for TPM2 Cryptography. 397 This block cipher algorithm is required for IPSec. 420 This is the simplest block cipher algorithm. It simply encrypts 430 narrow block cipher mode for dm-crypt. Use it with cipher 433 rest is used to tie each cipher block to its logical position. 440 OFB: the Output Feedback mode makes a block cipher into a synchronous 441 stream cipher. It generates keystream blocks, which are then XORed 453 This block cipher algorithm is required for RxRPC. [all …]
|
D | ctr.c | 102 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ctr_crypt() local 103 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ctr_crypt() 112 nbytes = crypto_ctr_crypt_inplace(&walk, cipher); in crypto_ctr_crypt() 114 nbytes = crypto_ctr_crypt_segment(&walk, cipher); in crypto_ctr_crypt() 120 crypto_ctr_crypt_final(&walk, cipher); in crypto_ctr_crypt() 223 struct crypto_skcipher *cipher; in crypto_rfc3686_init_tfm() local 227 cipher = crypto_spawn_skcipher(spawn); in crypto_rfc3686_init_tfm() 228 if (IS_ERR(cipher)) in crypto_rfc3686_init_tfm() 229 return PTR_ERR(cipher); in crypto_rfc3686_init_tfm() 231 ctx->child = cipher; in crypto_rfc3686_init_tfm() [all …]
|
D | ofb.c | 21 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_ofb_crypt() local 22 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ofb_crypt() 35 crypto_cipher_encrypt_one(cipher, iv, iv); in crypto_ofb_crypt() 45 crypto_cipher_encrypt_one(cipher, walk.iv, walk.iv); in crypto_ofb_crypt()
|
D | pcbc.c | 67 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_encrypt() local 77 cipher); in crypto_pcbc_encrypt() 80 cipher); in crypto_pcbc_encrypt() 134 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in crypto_pcbc_decrypt() local 144 cipher); in crypto_pcbc_decrypt() 147 cipher); in crypto_pcbc_decrypt()
|
D | skcipher.c | 577 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in skcipher_setkey_unaligned() local 589 ret = cipher->setkey(tfm, alignbuffer, keylen); in skcipher_setkey_unaligned() 597 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in crypto_skcipher_setkey() local 601 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) in crypto_skcipher_setkey() 607 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey() 877 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in skcipher_setkey_simple() local 879 crypto_cipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in skcipher_setkey_simple() 880 crypto_cipher_set_flags(cipher, crypto_skcipher_get_flags(tfm) & in skcipher_setkey_simple() 882 return crypto_cipher_setkey(cipher, key, keylen); in skcipher_setkey_simple() 890 struct crypto_cipher *cipher; in skcipher_init_tfm_simple() local [all …]
|
/Linux-v5.15/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 …]
|
/Linux-v5.15/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 …]
|
/Linux-v5.15/drivers/crypto/bcm/ |
D | cipher.c | 155 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_rx_sg_create() 220 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_skcipher_tx_sg_create() 325 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req() 326 cipher_parms.mode = ctx->cipher.mode; in handle_skcipher_req() 351 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req() 367 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_skcipher_req() 376 } else if (ctx->cipher.mode == CIPHER_MODE_CTR) { in handle_skcipher_req() 436 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req() 450 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req() 486 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_resp() [all …]
|
/Linux-v5.15/drivers/net/wireless/intel/iwlwifi/mvm/ |
D | ftm-responder.c | 19 u8 cipher; member 251 if (hltk_data->cipher > IWL_LOCATION_CIPHER_GCMP_256) { in iwl_mvm_ftm_responder_dyn_cfg_v3() 253 hltk_data->cipher); in iwl_mvm_ftm_responder_dyn_cfg_v3() 257 cmd.cipher = hltk_data->cipher; in iwl_mvm_ftm_responder_dyn_cfg_v3() 305 u8 *addr, u32 cipher, u8 *tk, u32 tk_len, in iwl_mvm_ftm_respoder_add_pasn_sta() argument 324 hltk_data.cipher = iwl_mvm_cipher_to_location_cipher(cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 325 if (hltk_data.cipher == IWL_LOCATION_CIPHER_INVALID) { in iwl_mvm_ftm_respoder_add_pasn_sta() 326 IWL_ERR(mvm, "invalid cipher: %u\n", cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 336 cipher, tk, tk_len); in iwl_mvm_ftm_respoder_add_pasn_sta()
|
/Linux-v5.15/net/wireless/ |
D | wext-compat.c | 439 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in __cfg80211_set_encryption() 483 wdev->wext.keys->params[idx].cipher = 0; in __cfg80211_set_encryption() 506 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in __cfg80211_set_encryption() 507 params->cipher != WLAN_CIPHER_SUITE_WEP104) in __cfg80211_set_encryption() 517 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 518 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in __cfg80211_set_encryption() 526 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 527 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in __cfg80211_set_encryption() 550 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in __cfg80211_set_encryption() 629 params.cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencode() [all …]
|
/Linux-v5.15/drivers/crypto/keembay/ |
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,
|
D | ocs-aes.c | 478 enum ocs_cipher cipher) in ocs_aes_set_key() argument 485 if (cipher == OCS_AES && !(key_size == 32 || key_size == 16)) { in ocs_aes_set_key() 492 if (cipher == OCS_SM4 && key_size != 16) { in ocs_aes_set_key() 525 enum ocs_cipher cipher, in set_ocs_aes_command() argument 554 val = (cipher << 14) | (mode << 8) | (instruction << 6) | in set_ocs_aes_command() 561 enum ocs_cipher cipher, in ocs_aes_init() argument 571 set_ocs_aes_command(aes_dev, cipher, mode, instruction); in ocs_aes_init() 604 enum ocs_cipher cipher, enum ocs_mode mode, in ocs_aes_validate_inputs() argument 609 if (!(cipher == OCS_AES || cipher == OCS_SM4)) in ocs_aes_validate_inputs() 798 enum ocs_cipher cipher, in ocs_aes_op() argument [all …]
|
D | keembay-ocs-aes-core.c | 54 enum ocs_cipher cipher; member 149 static int check_key(const u8 *in_key, size_t key_len, enum ocs_cipher cipher) in check_key() argument 155 if (cipher == OCS_AES && (key_len == OCS_AES_KEYSIZE_128 || in check_key() 160 if (cipher == OCS_SM4 && key_len == OCS_AES_KEYSIZE_128) in check_key() 169 enum ocs_cipher cipher) in save_key() argument 173 ret = check_key(in_key, key_len, cipher); in save_key() 179 tctx->cipher = cipher; in save_key() 186 size_t key_len, enum ocs_cipher cipher) in kmb_ocs_sk_set_key() argument 191 tctx->use_fallback = (cipher == OCS_AES && in kmb_ocs_sk_set_key() 195 return save_key(tctx, in_key, key_len, cipher); in kmb_ocs_sk_set_key() [all …]
|
/Linux-v5.15/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()
|
/Linux-v5.15/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()
|
/Linux-v5.15/drivers/crypto/rockchip/ |
D | rk3288_crypto_skcipher.c | 31 static int rk_aes_setkey(struct crypto_skcipher *cipher, in rk_aes_setkey() argument 34 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_aes_setkey() 45 static int rk_des_setkey(struct crypto_skcipher *cipher, in rk_des_setkey() argument 48 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in rk_des_setkey() 51 err = verify_skcipher_des_key(cipher, key); in rk_des_setkey() 60 static int rk_tdes_setkey(struct crypto_skcipher *cipher, in rk_tdes_setkey() argument 63 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in rk_tdes_setkey() 66 err = verify_skcipher_des3_key(cipher, key); in rk_tdes_setkey() 200 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in rk_ablk_hw_init() local 201 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_ablk_hw_init() [all …]
|
/Linux-v5.15/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()
|
/Linux-v5.15/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 …]
|