/linux/Documentation/crypto/ |
A D | architecture.rst | 8 cipher types: 131 cipher allocation API calls 154 - aead for AEAD cipher type 178 When allocating a cipher handle, the caller only specifies the cipher 229 cipher implementation for the given cipher name. That means, even when a 240 implement the complete cipher. 266 the AES cipher are all merged into one cipher implementation registered 278 implemented in the cipher. 310 | cipher | 330 invokes AEAD cipher operations with the GCM cipher handle. [all …]
|
A D | userspace-if.rst | 13 consumer and never as a provider of a transformation or cipher 73 parameter specified below for the different cipher types. 111 .salg_name = "sha1" /* this is the cipher name */ 150 .salg_name = "cbc(aes)" /* this is the cipher name */ 184 /proc/crypto for the selected cipher. 247 /proc/crypto for the selected cipher. 377 - the skcipher cipher type (symmetric ciphers) 379 - the hash cipher type (keyed message digests) 381 - the AEAD cipher type 383 - the RNG cipher type to provide the seed [all …]
|
A 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
|
/linux/drivers/crypto/amcc/ |
A D | crypto4xx_alg.c | 74 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt() 127 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes() 257 size_t iv_len = crypto_skcipher_ivsize(cipher); in crypto4xx_ctr_crypt() 288 struct crypto_skcipher *cipher, in crypto4xx_sk_setup_fallback() argument 294 crypto_sync_skcipher_set_flags(ctx->sw_cipher.cipher, in crypto4xx_sk_setup_fallback() 309 return crypto4xx_setkey_aes(cipher, key, keylen, in crypto4xx_setkey_aes_ctr() 367 struct crypto_aead *cipher, in crypto4xx_aead_setup_fallback() argument 373 crypto_aead_get_flags(cipher) & CRYPTO_TFM_REQ_MASK); in crypto4xx_aead_setup_fallback() 384 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setkey_aes_ccm() 486 struct crypto_tfm *tfm = crypto_aead_tfm(cipher); in crypto4xx_setauthsize_aead() [all …]
|
A 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/crypto/ |
A 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() 100 struct crypto_cipher *cipher; in crypto_cbc_decrypt_segment() local 105 tfm = crypto_cipher_tfm(cipher); in crypto_cbc_decrypt_segment() 130 struct crypto_cipher *cipher; in crypto_cbc_decrypt_inplace() local [all …]
|
A 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()
|
A D | Kconfig | 430 narrow block cipher mode for dm-crypt. Use it with cipher 1045 tristate "AES cipher algorithms" 1162 Anubis cipher algorithm. 1178 ARC4 cipher algorithm. 1399 Khazad cipher algorithm. 1548 tristate "SM4 cipher algorithm" 1621 TEA cipher algorithm. 1639 Twofish cipher algorithm. 1662 Twofish cipher algorithm. 1867 key cipher algorithms. [all …]
|
A 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 …]
|
A 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()
|
A 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()
|
A 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() 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() 882 return crypto_cipher_setkey(cipher, key, keylen); in skcipher_setkey_simple() 890 struct crypto_cipher *cipher; in skcipher_init_tfm_simple() local 892 cipher = crypto_spawn_cipher(spawn); in skcipher_init_tfm_simple() 893 if (IS_ERR(cipher)) in skcipher_init_tfm_simple() 894 return PTR_ERR(cipher); in skcipher_init_tfm_simple() 896 ctx->cipher = cipher; in skcipher_init_tfm_simple() [all …]
|
A D | testmgr.c | 151 struct cipher_test_suite cipher; member 4797 .cipher = __VECS(aes_tv_template) 4810 .cipher = __VECS(arc4_tv_template) 4816 .cipher = __VECS(bf_tv_template) 4844 .cipher = __VECS(des_tv_template) 4857 .cipher = { 4879 .cipher = __VECS(seed_tv_template) 4891 .cipher = __VECS(sm4_tv_template) 4897 .cipher = __VECS(tea_tv_template) 4903 .cipher = __VECS(tf_tv_template) [all …]
|
/linux/drivers/crypto/cavium/nitrox/ |
A 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() 84 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_cipher_callback() 169 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in nitrox_skcipher_setkey() 252 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_skcipher_crypt() 294 int ivsize = crypto_skcipher_ivsize(cipher); in nitrox_cbc_decrypt() 323 return verify_skcipher_des3_key(cipher, key) ?: in nitrox_3des_setkey() [all …]
|
/linux/drivers/crypto/cavium/cpt/ |
A 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() 307 return cvm_setkey(cipher, key, keylen, AES_CBC); in cvm_cbc_aes_setkey() 313 return cvm_setkey(cipher, key, keylen, AES_ECB); in cvm_ecb_aes_setkey() 319 return cvm_setkey(cipher, key, keylen, AES_CFB); in cvm_cfb_aes_setkey() 325 return verify_skcipher_des3_key(cipher, key) ?: in cvm_cbc_des3_setkey() 326 cvm_setkey(cipher, key, keylen, DES3_CBC); in cvm_cbc_des3_setkey() 332 return verify_skcipher_des3_key(cipher, key) ?: in cvm_ecb_des3_setkey() [all …]
|
/linux/drivers/crypto/bcm/ |
A D | cipher.c | 325 cipher_parms.alg = ctx->cipher.alg; in handle_skcipher_req() 326 cipher_parms.mode = ctx->cipher.mode; in handle_skcipher_req() 502 &iproc_priv.cipher_cnt[ctx->cipher.alg][ctx->cipher.mode]); in handle_skcipher_resp() 1301 cipher_parms.alg = ctx->cipher.alg; in handle_aead_req() 1302 cipher_parms.mode = ctx->cipher.mode; in handle_aead_req() 1380 ctx->cipher.mode, in handle_aead_req() 1406 ctx->cipher.mode, in handle_aead_req() 1411 ctx->cipher.mode, in handle_aead_req() 1831 switch (ctx->cipher.alg) { in skcipher_setkey() 1869 cipher_parms.alg = ctx->cipher.alg; in skcipher_setkey() [all …]
|
/linux/net/wireless/ |
A D | wext-compat.c | 657 u32 cipher; in cfg80211_wext_siwencodeext() local 673 cipher = 0; in cfg80211_wext_siwencodeext() 677 cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencodeext() 679 cipher = WLAN_CIPHER_SUITE_WEP104; in cfg80211_wext_siwencodeext() 684 cipher = WLAN_CIPHER_SUITE_TKIP; in cfg80211_wext_siwencodeext() 687 cipher = WLAN_CIPHER_SUITE_CCMP; in cfg80211_wext_siwencodeext() 723 params.cipher = cipher; in cfg80211_wext_siwencodeext() 1036 if (cipher & IW_AUTH_CIPHER_WEP40) in cfg80211_set_cipher_group() 1064 if (cipher & IW_AUTH_CIPHER_WEP40) { in cfg80211_set_cipher_pairwise() 1074 if (cipher & IW_AUTH_CIPHER_TKIP) { in cfg80211_set_cipher_pairwise() [all …]
|
/linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
A D | ftm-responder.c | 19 u8 cipher; member 260 if (hltk_data->cipher > IWL_LOCATION_CIPHER_GCMP_256) { in iwl_mvm_ftm_responder_dyn_cfg_v3() 262 hltk_data->cipher); in iwl_mvm_ftm_responder_dyn_cfg_v3() 266 cmd.cipher = hltk_data->cipher; in iwl_mvm_ftm_responder_dyn_cfg_v3() 314 u8 *addr, u32 cipher, u8 *tk, u32 tk_len, in iwl_mvm_ftm_respoder_add_pasn_sta() argument 333 hltk_data.cipher = iwl_mvm_cipher_to_location_cipher(cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 334 if (hltk_data.cipher == IWL_LOCATION_CIPHER_INVALID) { in iwl_mvm_ftm_respoder_add_pasn_sta() 335 IWL_ERR(mvm, "invalid cipher: %u\n", cipher); in iwl_mvm_ftm_respoder_add_pasn_sta() 345 cipher, tk, tk_len); in iwl_mvm_ftm_respoder_add_pasn_sta()
|
/linux/drivers/crypto/keembay/ |
A D | ocs-aes.c | 478 enum ocs_cipher cipher) in ocs_aes_set_key() argument 492 if (cipher == OCS_SM4 && key_size != 16) { in ocs_aes_set_key() 525 enum ocs_cipher cipher, in set_ocs_aes_command() argument 561 enum ocs_cipher cipher, in ocs_aes_init() argument 609 if (!(cipher == OCS_AES || cipher == OCS_SM4)) in ocs_aes_validate_inputs() 798 enum ocs_cipher cipher, in ocs_aes_op() argument 810 NULL, 0, cipher, mode, instruction, in ocs_aes_op() 926 enum ocs_cipher cipher, in ocs_aes_gcm_op() argument 943 aad_size, out_tag, tag_size, cipher, in ocs_aes_gcm_op() 1308 enum ocs_cipher cipher, in ocs_aes_ccm_op() argument [all …]
|
A 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,
|
A D | keembay-ocs-aes-core.c | 54 enum ocs_cipher cipher; member 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() 191 tctx->use_fallback = (cipher == OCS_AES && in kmb_ocs_sk_set_key() 312 enum ocs_cipher cipher, in kmb_ocs_sk_common() argument 357 if (cipher != tctx->cipher) in kmb_ocs_sk_common() 639 enum ocs_cipher cipher, in kmb_ocs_aead_common() argument 675 if (cipher != tctx->cipher) in kmb_ocs_aead_common() 963 tctx->cipher); in kmb_ocs_aes_sk_do_one_request() [all …]
|
/linux/drivers/crypto/rockchip/ |
A 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() 201 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_ablk_hw_init() 202 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(cipher); in rk_ablk_hw_init() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/engine/cipher/ |
A 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/net/sunrpc/auth_gss/ |
A 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/drivers/net/wireless/ralink/rt2x00/ |
A 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()
|