| /linux/include/crypto/internal/ |
| H A D | cipher.h | 21 * DOC: Single Block Cipher API 23 * The single block cipher API is used with the ciphers of type 24 * CRYPTO_ALG_TYPE_CIPHER (listed as type "cipher" in /proc/crypto). 26 * Using the single block cipher API calls, operations with the basic cipher 27 * primitive can be implemented. These cipher primitives exclude any block 30 * The purpose of this single block cipher API is to support the implementation 31 * of templates or other concepts that only need to perform the cipher operation 32 * on one block at a time. Templates invoke the underlying cipher primitive 33 * block-wise and process either the input or the output data of these cipher [all...] |
| /linux/include/crypto/ |
| H A D | aead.h | 18 * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API 20 * The AEAD cipher API is used with the ciphers of type CRYPTO_ALG_TYPE_AEAD 25 * with the following cipher string: 27 * authenc(keyed message digest, block cipher) 31 * The example code provided for the symmetric key cipher operation applies 36 * decryption operation. Another deviation from the asynchronous block cipher 40 * code is the key bonus an AEAD cipher has over "standard" block chaining 105 * struct aead_alg - AEAD cipher definition 135 * @base: Definition of a generic crypto cipher algorithm. 183 * crypto_alloc_aead() - allocate AEAD cipher handle [all …]
|
| /linux/crypto/ |
| H A D | Kconfig | 237 tristate "Kerberos 5 combined hash+cipher support" 243 Combined hash and cipher support for Kerberos 5 RFC3961 simplified 364 AES cipher algorithms (Rijndael)(FIPS-197, ISO/IEC 18033-3) 382 Anubis cipher algorithm 384 Anubis is a variable key length cipher which can use keys from 395 ARIA cipher algorithm (RFC5794) 411 Blowfish cipher algorithm, by Bruce Schneier 413 This is a variable key length cipher which can use keys from 32 422 Common parts of the Blowfish cipher algorithm shared by the 429 Camellia cipher algorithm [all...] |
| /linux/drivers/crypto/cavium/nitrox/ |
| H A D | nitrox_skcipher.c | 24 * supported cipher list 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() [all …]
|
| /linux/Documentation/crypto/ |
| H 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
|
| H A D | devel-algos.rst | 1 Developing Cipher Algorithms 47 Single-Block Symmetric Ciphers [CIPHER] 53 implementations, that being the CIPHER type used for symmetric ciphers. 54 The CIPHER type is used for transformations which operate on exactly one 60 The registration of [CIPHER] algorithm is specific in that struct 61 crypto_alg field .cra_type is empty. The .cra_u.cipher has to be 66 Cipher Definition With struct cipher_alg 69 Struct cipher_alg defines a single block cipher. 103 This section describes the multi-block cipher transformation 111 The registration of multi-block cipher algorithms is one of the most [all …]
|
| /linux/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_crypto.c | 393 gss_krb5_cts_crypt(struct crypto_sync_skcipher * cipher,struct xdr_buf * buf,u32 offset,u8 * iv,struct page ** pages,int encrypt) gss_krb5_cts_crypt() argument 588 struct crypto_sync_skcipher *cipher, *aux_cipher; gss_krb5_aes_encrypt() local 661 struct crypto_sync_skcipher *cipher, *aux_cipher; gss_krb5_aes_decrypt() local 730 krb5_etm_checksum(struct crypto_sync_skcipher * cipher,struct crypto_ahash * tfm,const struct xdr_buf * body,int body_offset,struct xdr_netobj * cksumout) krb5_etm_checksum() argument 816 struct crypto_sync_skcipher *cipher, *aux_cipher; krb5_etm_encrypt() local 904 struct crypto_sync_skcipher *cipher, *aux_cipher; krb5_etm_decrypt() local
|
| /linux/drivers/nvme/common/ |
| H A D | keyring.c | 200 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/drivers/crypto/cavium/cpt/ |
| H 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 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/net/wireless/ |
| H A D | wext-compat.c | 430 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in cfg80211_set_encryption() 476 wdev->wext.keys->params[idx].cipher = 0; in cfg80211_set_encryption() 502 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in cfg80211_set_encryption() 503 params->cipher != WLAN_CIPHER_SUITE_WEP104) in cfg80211_set_encryption() 513 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption() 514 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in cfg80211_set_encryption() 522 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption() 523 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in cfg80211_set_encryption() 549 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in cfg80211_set_encryption() 619 params.cipher in cfg80211_wext_siwencode() 640 u32 cipher; cfg80211_wext_siwencodeext() local 989 cfg80211_set_cipher_group(struct wireless_dev * wdev,u32 cipher) cfg80211_set_cipher_group() argument 1014 cfg80211_set_cipher_pairwise(struct wireless_dev * wdev,u32 cipher) cfg80211_set_cipher_pairwise() argument [all...] |
| /linux/drivers/crypto/bcm/ |
| H A D | cipher.c | 38 #include "cipher.h" 72 MODULE_PARM_DESC(cipher_pri, "Priority for cipher algos"); 154 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() 281 * handle_skcipher_req() - Submit as much of a block cipher request as fits in 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 in handle_skcipher_req() 1758 des_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) des_setkey() argument 1772 threedes_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) threedes_setkey() argument 1786 aes_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) aes_setkey() argument 1813 skcipher_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) skcipher_setkey() argument 2717 aead_authenc_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_authenc_setkey() argument 2812 aead_gcm_ccm_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_gcm_ccm_setkey() argument 2894 aead_gcm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_gcm_esp_setkey() argument 2926 rfc4543_gcm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) rfc4543_gcm_esp_setkey() argument 2959 aead_ccm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_ccm_esp_setkey() argument 2979 aead_setauthsize(struct crypto_aead * cipher,unsigned int authsize) aead_setauthsize() argument [all...] |
| H A D | spum.h | 37 * max cipher key len - 264 (RC4) 43 * For SPU2, FMD_SIZE (32) plus lengths of hash and cipher keys, 44 * hash and cipher IVs. If SPU2 does not support RC4, then 149 /* word 1: cipher flags */ 152 /* word 2: Extended cipher flags */
|
| /linux/Documentation/admin-guide/device-mapper/ |
| H A D | dm-crypt.rst | 13 <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] 29 Cipher format also supports direct specification with kernel crypt API 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
|
| /linux/tools/testing/crypto/chacha20-s390/ |
| H A D | test-cipher.c | 49 /* Perform cipher operations with the chacha lib */ 50 static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain) 71 chacha_crypt_arch(&chacha_state, cipher, plain, data_size, 20); in test_lib_chacha() 77 16, 1, cipher, in test_lib_chacha() 86 chacha_crypt_arch(&chacha_state, revert, cipher, data_size, 20); in test_lib_chacha() 99 /* Perform cipher operations with skcipher */ 124 /* Initialize and trigger cipher operations */ 125 static int test_skcipher(char *name, u8 *revert, u8 *cipher, u8 *plain) 173 sg_init_one(&sk.sgout, cipher, data_size); in test_skcipher() 190 16, 1, cipher, in test_skcipher() 51 test_lib_chacha(u8 * revert,u8 * cipher,u8 * plain) test_lib_chacha() argument 126 test_skcipher(char * name,u8 * revert,u8 * cipher,u8 * plain) test_skcipher() argument [all...] |
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/cipher/ |
| H A D | g84.c | 24 #include <engine/cipher.h> 80 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/net/tls/ |
| H A D | tls_main.c | 59 #define CHECK_CIPHER_DESC(cipher,ci) \ 60 static_assert(cipher ## _IV_SIZE <= TLS_MAX_IV_SIZE); \ 61 static_assert(cipher ## _SALT_SIZE <= TLS_MAX_SALT_SIZE); \ argument 62 static_assert(cipher ## _REC_SEQ_SIZE <= TLS_MAX_REC_SEQ_SIZE); \ 63 static_assert(cipher ## _TAG_SIZE == TLS_TAG_SIZE); \ 64 static_assert(sizeof_field(struct ci, iv) == cipher ## _IV_SIZE); \ 65 static_assert(sizeof_field(struct ci, key) == cipher ## _KEY_SIZE); \ 66 static_assert(sizeof_field(struct ci, salt) == cipher ## _SALT_SIZE); \ 67 static_assert(sizeof_field(struct ci, rec_seq) == cipher ## _REC_SEQ_SIZE); 76 #define CIPHER_DESC(cipher,c 78 CIPHER_DESC(cipher,ci,algname,_offloadable) global() argument 90 CIPHER_DESC_NONCE0(cipher,ci,algname,_offloadable) global() argument [all...] |
| /linux/drivers/net/wireless/ralink/rt2x00/ |
| H A D | rt2x00debug.c | 87 * All statistics are stored separately per cipher type. 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() [all …]
|
| /linux/drivers/s390/crypto/ |
| H A D | zcrypt_ccamisc.h | 28 #define TOKVER_CCA_VLSC 0x05 /* var length sym cipher key token */ 30 /* Max size of a cca variable length cipher key token */ 58 /* inside view of a variable length symmetric cipher AES key token */ 86 u8 algtype; /* 0x02 for AES cipher */ 87 u16 keytype; /* 0x0001 for 'cipher' */ 142 * Simple check if the token is a valid CCA secure AES cipher key 180 * Generate (random) CCA AES CIPHER secure key. 186 * Derive proteced key from CCA AES cipher secure key. 193 * Build CCA AES CIPHER secure key with a given clear key value.
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | crypto_bench.c | 15 * cipher[] and key[] are 8-byte aligned and 'params' is kept off the stack to 22 char cipher[128] __attribute__((aligned(8))) = {}; in crypto_setup() 38 if (!cipher[0] || !key_len || key_len > 256) { in crypto_setup() 46 __builtin_memcpy(¶ms.algo, cipher, sizeof(cipher)); in crypto_setup() 14 char cipher[128] = {}; global() variable
|
| /linux/drivers/net/wireless/mediatek/mt7601u/ |
| H A 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 …]
|
| /linux/drivers/net/wireless/silabs/wfx/ |
| H A D | key.c | 167 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/drivers/crypto/intel/keembay/ |
| H 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,
|
| /linux/drivers/crypto/rockchip/ |
| H A D | rk3288_crypto_skcipher.c | 108 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/arch/s390/include/uapi/asm/ |
| H A D | pkey.h | 27 #define MAXAESCIPHERKEYSIZE 136 /* our aes cipher keys have always 136 bytes */ 73 /* keygenflags defines for CCA AES cipher keys */ 242 * Generate CCA AES secure key, CCA AES cipher key or EP11 AES secure key. 253 * generating CCA cipher keys you can use one or more of the PKEY_KEYGEN_* 254 * flags to widen the export possibilities. By default a cipher key is 275 * Construct an CCA AES secure key, CCA AES cipher key or EP11 AES secure 287 * generating CCA cipher keys you can use one or more of the PKEY_KEYGEN_* 288 * flags to widen the export possibilities. By default a cipher key is 316 * For CCA AES secure keys and CCA AES cipher keys this means to check 372 * key, CCA AES cipher key, CCA ECC private key, EP11 AES key, EP11 ECC private [all …]
|
| /linux/drivers/crypto/aspeed/ |
| H A D | aspeed-acry.c | 148 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 …]
|