/Linux-v5.4/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.4/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() 133 crypto_skcipher_set_flags(cipher, in crypto4xx_setkey_aes() 180 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument 183 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc() 187 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cfb() argument 190 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CFB, in crypto4xx_setkey_aes_cfb() 194 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument [all …]
|
D | crypto4xx_core.h | 124 struct crypto_sync_skcipher *cipher; member 136 struct skcipher_alg cipher; member 162 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, 164 int crypto4xx_setkey_aes_cfb(struct crypto_skcipher *cipher, 166 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher, 168 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, 170 int crypto4xx_setkey_aes_ofb(struct crypto_skcipher *cipher, 172 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, 235 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher, 239 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher,
|
/Linux-v5.4/net/sunrpc/auth_gss/ |
D | gss_krb5_seqnum.c | 46 struct crypto_sync_skcipher *cipher; in krb5_make_rc4_seq_num() local 51 cipher = crypto_alloc_sync_skcipher(kctx->gk5e->encrypt_name, 0, 0); in krb5_make_rc4_seq_num() 52 if (IS_ERR(cipher)) in krb5_make_rc4_seq_num() 53 return PTR_ERR(cipher); in krb5_make_rc4_seq_num() 68 code = krb5_rc4_setup_seq_key(kctx, cipher, cksum); in krb5_make_rc4_seq_num() 72 code = krb5_encrypt(cipher, cksum, plain, buf, 8); in krb5_make_rc4_seq_num() 75 crypto_free_sync_skcipher(cipher); in krb5_make_rc4_seq_num() 115 struct crypto_sync_skcipher *cipher; in krb5_get_rc4_seq_num() local 120 cipher = crypto_alloc_sync_skcipher(kctx->gk5e->encrypt_name, 0, 0); in krb5_get_rc4_seq_num() 121 if (IS_ERR(cipher)) in krb5_get_rc4_seq_num() [all …]
|
D | gss_krb5_wrap.c | 240 struct crypto_sync_skcipher *cipher; in gss_wrap_kerberos_v1() local 242 cipher = crypto_alloc_sync_skcipher(kctx->gk5e->encrypt_name, in gss_wrap_kerberos_v1() 244 if (IS_ERR(cipher)) in gss_wrap_kerberos_v1() 247 krb5_rc4_setup_enc_key(kctx, cipher, seq_send); in gss_wrap_kerberos_v1() 249 err = gss_encrypt_xdr_buf(cipher, buf, in gss_wrap_kerberos_v1() 251 crypto_free_sync_skcipher(cipher); in gss_wrap_kerberos_v1() 328 struct crypto_sync_skcipher *cipher; in gss_unwrap_kerberos_v1() local 331 cipher = crypto_alloc_sync_skcipher(kctx->gk5e->encrypt_name, in gss_unwrap_kerberos_v1() 333 if (IS_ERR(cipher)) in gss_unwrap_kerberos_v1() 336 krb5_rc4_setup_enc_key(kctx, cipher, seqnum); in gss_unwrap_kerberos_v1() [all …]
|
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()
|
D | gss_krb5_crypto.c | 677 gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf, in gss_krb5_cts_crypt() argument 682 SYNC_SKCIPHER_REQUEST_ON_STACK(req, cipher); in gss_krb5_cts_crypt() 711 skcipher_request_set_sync_tfm(req, cipher); in gss_krb5_cts_crypt() 740 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_encrypt() local 749 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt() 754 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt() 759 blocksize = crypto_sync_skcipher_blocksize(cipher); in gss_krb5_aes_encrypt() 835 err = gss_krb5_cts_crypt(cipher, buf, in gss_krb5_aes_encrypt() 860 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_decrypt() local 869 cipher = kctx->acceptor_enc; in gss_krb5_aes_decrypt() [all …]
|
/Linux-v5.4/drivers/crypto/cavium/nitrox/ |
D | nitrox_skcipher.c | 40 const struct nitrox_cipher *cipher = flexi_cipher_table; in flexi_cipher_type() local 42 while (cipher->name) { in flexi_cipher_type() 43 if (!strcmp(cipher->name, name)) in flexi_cipher_type() 45 cipher++; in flexi_cipher_type() 47 return cipher->value; in flexi_cipher_type() 92 static inline int nitrox_skcipher_setkey(struct crypto_skcipher *cipher, in nitrox_skcipher_setkey() argument 96 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey() 124 static int nitrox_aes_setkey(struct crypto_skcipher *cipher, const u8 *key, in nitrox_aes_setkey() argument 131 crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in nitrox_aes_setkey() 134 return nitrox_skcipher_setkey(cipher, aes_keylen, key, keylen); in nitrox_aes_setkey() [all …]
|
/Linux-v5.4/crypto/ |
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 | cipher.c | 78 struct cipher_alg *cipher = &tfm->__crt_alg->cra_cipher; in cipher_encrypt_unaligned() local 81 cipher_crypt_unaligned(cipher->cia_encrypt, tfm, dst, src); in cipher_encrypt_unaligned() 85 cipher->cia_encrypt(tfm, dst, src); in cipher_encrypt_unaligned() 92 struct cipher_alg *cipher = &tfm->__crt_alg->cra_cipher; in cipher_decrypt_unaligned() local 95 cipher_crypt_unaligned(cipher->cia_decrypt, tfm, dst, src); in cipher_decrypt_unaligned() 99 cipher->cia_decrypt(tfm, dst, src); in cipher_decrypt_unaligned() 105 struct cipher_alg *cipher = &tfm->__crt_alg->cra_cipher; in crypto_init_cipher_ops() local 109 cipher_encrypt_unaligned : cipher->cia_encrypt; in crypto_init_cipher_ops() 111 cipher_decrypt_unaligned : cipher->cia_decrypt; in crypto_init_cipher_ops()
|
D | Kconfig | 298 Support for the AEAD wrapper using the ChaCha20 stream cipher combined 352 This block cipher algorithm is required for IPSec. 360 This block cipher algorithm is required for TPM2 Cryptography. 369 This block cipher algorithm is required for IPSec. 392 This is the simplest block cipher algorithm. It simply encrypts 402 narrow block cipher mode for dm-crypt. Use it with cipher 405 rest is used to tie each cipher block to its logical position. 412 OFB: the Output Feedback mode makes a block cipher into a synchronous 413 stream cipher. It generates keystream blocks, which are then XORed 425 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() 228 struct crypto_skcipher *cipher; in crypto_rfc3686_init_tfm() local 232 cipher = crypto_spawn_skcipher(spawn); in crypto_rfc3686_init_tfm() 233 if (IS_ERR(cipher)) in crypto_rfc3686_init_tfm() 234 return PTR_ERR(cipher); in crypto_rfc3686_init_tfm() 236 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()
|
/Linux-v5.4/drivers/crypto/cavium/cpt/ |
D | cptvf_algs.c | 230 static int cvm_xts_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_xts_setkey() argument 233 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in cvm_xts_setkey() 287 static int cvm_setkey(struct crypto_ablkcipher *cipher, const u8 *key, in cvm_setkey() argument 290 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in cvm_setkey() 298 crypto_ablkcipher_set_flags(cipher, in cvm_setkey() 304 static int cvm_cbc_aes_setkey(struct crypto_ablkcipher *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_ablkcipher *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_ablkcipher *cipher, const u8 *key, in cvm_cfb_aes_setkey() argument [all …]
|
/Linux-v5.4/drivers/crypto/bcm/ |
D | cipher.c | 154 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_ablkcipher_rx_sg_create() 168 if (ctx->cipher.alg == CIPHER_ALG_RC4) in spu_ablkcipher_rx_sg_create() 223 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in spu_ablkcipher_tx_sg_create() 329 cipher_parms.alg = ctx->cipher.alg; in handle_ablkcipher_req() 330 cipher_parms.mode = ctx->cipher.mode; in handle_ablkcipher_req() 355 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_ablkcipher_req() 371 if ((ctx->cipher.mode == CIPHER_MODE_CBC) && in handle_ablkcipher_req() 380 } else if (ctx->cipher.mode == CIPHER_MODE_CTR) { in handle_ablkcipher_req() 394 if (ctx->cipher.alg == CIPHER_ALG_RC4) { in handle_ablkcipher_req() 467 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_ablkcipher_req() [all …]
|
/Linux-v5.4/drivers/net/wireless/mediatek/mt76/mt7615/ |
D | mac.c | 370 key->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in mt7615_mac_write_txwi() 601 mt7615_mac_get_cipher(int cipher) in mt7615_mac_get_cipher() argument 603 switch (cipher) { in mt7615_mac_get_cipher() 630 enum mt7615_cipher_type cipher, in mt7615_mac_wtbl_update_key() argument 641 if (cipher == MT_CIPHER_TKIP) { in mt7615_mac_wtbl_update_key() 646 if (cipher != MT_CIPHER_BIP_CMAC_128 && wcid->cipher) in mt7615_mac_wtbl_update_key() 648 if (cipher != MT_CIPHER_BIP_CMAC_128 || !wcid->cipher) in mt7615_mac_wtbl_update_key() 650 else if (cipher == MT_CIPHER_BIP_CMAC_128) in mt7615_mac_wtbl_update_key() 653 if (wcid->cipher & ~BIT(cipher)) { in mt7615_mac_wtbl_update_key() 654 if (cipher != MT_CIPHER_BIP_CMAC_128) in mt7615_mac_wtbl_update_key() [all …]
|
/Linux-v5.4/net/wireless/ |
D | wext-compat.c | 426 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in __cfg80211_set_encryption() 470 wdev->wext.keys->params[idx].cipher = 0; in __cfg80211_set_encryption() 493 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in __cfg80211_set_encryption() 494 params->cipher != WLAN_CIPHER_SUITE_WEP104) in __cfg80211_set_encryption() 504 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 505 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in __cfg80211_set_encryption() 513 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in __cfg80211_set_encryption() 514 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in __cfg80211_set_encryption() 537 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in __cfg80211_set_encryption() 613 params.cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencode() [all …]
|
/Linux-v5.4/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.4/drivers/crypto/rockchip/ |
D | rk3288_crypto_ablkcipher.c | 30 static int rk_aes_setkey(struct crypto_ablkcipher *cipher, in rk_aes_setkey() argument 33 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in rk_aes_setkey() 38 crypto_ablkcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN); in rk_aes_setkey() 46 static int rk_des_setkey(struct crypto_ablkcipher *cipher, in rk_des_setkey() argument 49 struct rk_cipher_ctx *ctx = crypto_ablkcipher_ctx(cipher); in rk_des_setkey() 52 err = verify_ablkcipher_des_key(cipher, key); in rk_des_setkey() 61 static int rk_tdes_setkey(struct crypto_ablkcipher *cipher, in rk_tdes_setkey() argument 64 struct rk_cipher_ctx *ctx = crypto_ablkcipher_ctx(cipher); in rk_tdes_setkey() 67 err = verify_ablkcipher_des3_key(cipher, key); in rk_tdes_setkey() 201 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(req); in rk_ablk_hw_init() local [all …]
|
/Linux-v5.4/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()
|
/Linux-v5.4/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 …]
|