Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 25 of 286) sorted by relevance

12345678910>>...12

/linux/Documentation/crypto/
H A Darchitecture.rst8 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 …]
H A Dintro.rst19 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 Duserspace-if.rst13 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/drivers/crypto/amcc/
H A Dcrypto4xx_alg.c70 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); in crypto4xx_crypt() local
71 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_crypt()
118 static int crypto4xx_setkey_aes(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes() argument
124 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_aes()
174 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
177 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
181 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
184 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
188 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
191 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
[all …]
H A Dcrypto4xx_core.h124 struct crypto_sync_skcipher *cipher; member
136 struct skcipher_alg cipher; member
166 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher,
168 int crypto4xx_setkey_aes_ctr(struct crypto_skcipher *cipher,
170 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher,
172 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher,
230 int crypto4xx_setkey_aes_ccm(struct crypto_aead *cipher,
234 int crypto4xx_setkey_aes_gcm(struct crypto_aead *cipher,
/linux/crypto/
H A Decb.c16 static int crypto_ecb_crypt(struct crypto_cipher *cipher, const u8 *src, in crypto_ecb_crypt() argument
20 const unsigned int bsize = crypto_cipher_blocksize(cipher); in crypto_ecb_crypt()
23 fn(crypto_cipher_tfm(cipher), dst, src); in crypto_ecb_crypt()
38 struct crypto_cipher *cipher = *ctx; in crypto_ecb_encrypt2() local
40 return crypto_ecb_crypt(cipher, src, dst, len, in crypto_ecb_encrypt2()
42 crypto_cipher_alg(cipher)->cia_encrypt); in crypto_ecb_encrypt2()
49 struct crypto_cipher *cipher = *ctx; in crypto_ecb_decrypt2() local
51 return crypto_ecb_crypt(cipher, src, dst, len, in crypto_ecb_decrypt2()
53 crypto_cipher_alg(cipher)->cia_decrypt); in crypto_ecb_decrypt2()
60 struct crypto_cipher *cipher = *ctx; in lskcipher_setkey_simple2() local
[all …]
H A Dcmac.c142 struct crypto_cipher *cipher; in cmac_init_tfm() local
145 cipher = crypto_spawn_cipher(spawn); in cmac_init_tfm()
146 if (IS_ERR(cipher)) in cmac_init_tfm()
147 return PTR_ERR(cipher); in cmac_init_tfm()
149 ctx->child = cipher; in cmac_init_tfm()
158 struct crypto_cipher *cipher; in cmac_clone_tfm() local
160 cipher = crypto_clone_cipher(octx->child); in cmac_clone_tfm()
161 if (IS_ERR(cipher)) in cmac_clone_tfm()
162 return PTR_ERR(cipher); in cmac_clone_tfm()
164 ctx->child = cipher; in cmac_clone_tfm()
H A Dctr.c102 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 …]
H A Dlskcipher.c36 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm); in lskcipher_setkey_unaligned() local
48 ret = cipher->setkey(tfm, alignbuffer, keylen); in lskcipher_setkey_unaligned()
57 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm); in crypto_lskcipher_setkey() local
59 if (keylen < cipher->co.min_keysize || keylen > cipher->co.max_keysize) in crypto_lskcipher_setkey()
65 return cipher->setkey(tfm, key, keylen); in crypto_lskcipher_setkey()
425 struct crypto_lskcipher *cipher = lskcipher_cipher_simple(tfm); in lskcipher_setkey_simple() local
427 crypto_lskcipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in lskcipher_setkey_simple()
428 crypto_lskcipher_set_flags(cipher, crypto_lskcipher_get_flags(tfm) & in lskcipher_setkey_simple()
430 return crypto_lskcipher_setkey(cipher, key, keylen); in lskcipher_setkey_simple()
438 struct crypto_lskcipher *cipher; in lskcipher_init_tfm_simple() local
[all …]
H A Dskcipher.c381 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in skcipher_setkey_unaligned() local
393 ret = cipher->setkey(tfm, alignbuffer, keylen); in skcipher_setkey_unaligned()
401 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in crypto_skcipher_setkey() local
405 if (cipher->co.base.cra_type != &crypto_skcipher_type) { in crypto_skcipher_setkey()
416 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) in crypto_skcipher_setkey()
422 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
781 struct crypto_cipher *cipher = skcipher_cipher_simple(tfm); in skcipher_setkey_simple() local
783 crypto_cipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in skcipher_setkey_simple()
784 crypto_cipher_set_flags(cipher, crypto_skcipher_get_flags(tfm) & in skcipher_setkey_simple()
786 return crypto_cipher_setkey(cipher, key, keylen); in skcipher_setkey_simple()
[all …]
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c41 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/arch/x86/crypto/
H A DKconfig12 AEAD cipher: AES with GCM
29 Block cipher: Blowfish cipher algorithm
40 Block cipher: Camellia cipher algorithms
77 Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
94 Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
109 Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
123 Length-preserving ciphers: Serpent cipher algorithm
138 Length-preserving ciphers: Serpent cipher algorithm
154 Length-preserving ciphers: Serpent cipher algorithm
167 Length-preserving ciphers: Serpent cipher algorithm
[all …]
/linux/arch/arm64/crypto/
H A DKconfig47 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
48 with block cipher modes:
65 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
66 with block cipher modes:
83 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
84 with block cipher modes:
102 Block ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
114 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
115 with block cipher modes:
132 Length-preserving ciphers: SM4 cipher algorithms (OSCCA GB/T 32907-2016)
[all …]
/linux/drivers/nvme/common/
H A Dkeyring.c200 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/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c393 gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf, in gss_krb5_cts_crypt() argument
398 SYNC_SKCIPHER_REQUEST_ON_STACK(req, cipher); in gss_krb5_cts_crypt()
427 skcipher_request_set_sync_tfm(req, cipher); in gss_krb5_cts_crypt()
450 memcpy(iv, data, crypto_sync_skcipher_ivsize(cipher)); in gss_krb5_cts_crypt()
588 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_encrypt() local
594 cipher = kctx->initiator_enc; in gss_krb5_aes_encrypt()
598 cipher = kctx->acceptor_enc; in gss_krb5_aes_encrypt()
602 conflen = crypto_sync_skcipher_blocksize(cipher); in gss_krb5_aes_encrypt()
644 err = krb5_cbc_cts_encrypt(cipher, aux_cipher, in gss_krb5_aes_encrypt()
661 struct crypto_sync_skcipher *cipher, *aux_cipher; in gss_krb5_aes_decrypt() local
[all …]
/linux/drivers/crypto/cavium/cpt/
H A Dcptvf_algs.c232 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/drivers/crypto/bcm/
H A Dcipher.c154 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()
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.mode == CIPHER_MODE_CTR) { in handle_skcipher_req()
434 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req()
448 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_req()
484 if ((ctx->cipher.mode == CIPHER_MODE_XTS) && in handle_skcipher_resp()
[all …]
/linux/net/wireless/
H A Dwext-compat.c429 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { in cfg80211_set_encryption()
475 wdev->wext.keys->params[idx].cipher = 0; in cfg80211_set_encryption()
500 else if (params->cipher != WLAN_CIPHER_SUITE_WEP40 && in cfg80211_set_encryption()
501 params->cipher != WLAN_CIPHER_SUITE_WEP104) in cfg80211_set_encryption()
511 if (!addr && (params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption()
512 params->cipher == WLAN_CIPHER_SUITE_WEP104)) { in cfg80211_set_encryption()
520 if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 || in cfg80211_set_encryption()
521 params->cipher == WLAN_CIPHER_SUITE_WEP104) && in cfg80211_set_encryption()
547 if (params->cipher == WLAN_CIPHER_SUITE_AES_CMAC && in cfg80211_set_encryption()
617 params.cipher = WLAN_CIPHER_SUITE_WEP40; in cfg80211_wext_siwencode()
[all …]
/linux/arch/sparc/crypto/
H A DKconfig12 Block cipher: DES (FIPS 46-2) cipher algorithm
13 Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
35 Block ciphers: Camellia cipher algorithms
/linux/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
H A Dg84.c80 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/tools/testing/crypto/chacha20-s390/
H A Dtest-cipher.c51 static int test_lib_chacha(u8 *revert, u8 *cipher, u8 *plain) in test_lib_chacha() argument
72 chacha_crypt_arch(&chacha_state, cipher, plain, data_size, 20); in test_lib_chacha()
78 16, 1, cipher, in test_lib_chacha()
87 chacha_crypt_arch(&chacha_state, revert, cipher, data_size, 20); in test_lib_chacha()
126 static int test_skcipher(char *name, u8 *revert, u8 *cipher, u8 *plain) in test_skcipher() argument
174 sg_init_one(&sk.sgout, cipher, data_size); in test_skcipher()
191 16, 1, cipher, in test_skcipher()
197 sg_init_one(&sk.sginp, cipher, data_size); in test_skcipher()
/linux/crypto/krb5/
H A Drfc3961_simplified.c272 struct crypto_sync_skcipher *cipher; in rfc3961_calc_DK() local
284 cipher = crypto_alloc_sync_skcipher(krb5->derivation_enc, 0, 0); in rfc3961_calc_DK()
285 if (IS_ERR(cipher)) { in rfc3961_calc_DK()
286 ret = (PTR_ERR(cipher) == -ENOENT) ? -ENOPKG : PTR_ERR(cipher); in rfc3961_calc_DK()
289 ret = crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len); in rfc3961_calc_DK()
314 rfc3961_do_encrypt(cipher, NULL, &inblock, &outblock); in rfc3961_calc_DK()
337 crypto_free_sync_skcipher(cipher); in rfc3961_calc_DK()
353 struct crypto_sync_skcipher *cipher; in rfc3961_calc_E() local
356 cipher = crypto_alloc_sync_skcipher(krb5->derivation_enc, 0, 0); in rfc3961_calc_E()
357 if (IS_ERR(cipher)) { in rfc3961_calc_E()
[all …]
/linux/drivers/net/wireless/intel/iwlwifi/mvm/
H A Dmld-key.c74 switch (keyconf->cipher) { in iwl_mvm_get_sec_flags()
198 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key()
199 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) in iwl_mvm_mld_send_key()
208 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key()
209 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) in iwl_mvm_mld_send_key()
215 if (keyconf->cipher == WLAN_CIPHER_SUITE_TKIP) { in iwl_mvm_mld_send_key()
232 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in iwl_mvm_mld_send_key()
233 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) { in iwl_mvm_mld_send_key()
335 if (keyconf->cipher == WLAN_CIPHER_SUITE_WEP40 || in _iwl_mvm_sec_key_del()
336 keyconf->cipher == WLAN_CIPHER_SUITE_WEP104) { in _iwl_mvm_sec_key_del()
/linux/drivers/crypto/intel/keembay/
H A Docs-aes.c479 enum ocs_cipher cipher) in ocs_aes_set_key() argument
486 if (cipher == OCS_AES && !(key_size == 32 || key_size == 16)) { in ocs_aes_set_key()
493 if (cipher == OCS_SM4 && key_size != 16) { in ocs_aes_set_key()
526 enum ocs_cipher cipher, in set_ocs_aes_command() argument
555 val = (cipher << 14) | (mode << 8) | (instruction << 6) | in set_ocs_aes_command()
562 enum ocs_cipher cipher, in ocs_aes_init() argument
572 set_ocs_aes_command(aes_dev, cipher, mode, instruction); in ocs_aes_init()
605 enum ocs_cipher cipher, enum ocs_mode mode, in ocs_aes_validate_inputs() argument
610 if (!(cipher == OCS_AES || cipher == OCS_SM4)) in ocs_aes_validate_inputs()
799 enum ocs_cipher cipher, in ocs_aes_op() argument
[all …]
/linux/net/tls/
H A Dtls_main.c61 #define CHECK_CIPHER_DESC(cipher,ci) \ argument
62 static_assert(cipher ## _IV_SIZE <= TLS_MAX_IV_SIZE); \
63 static_assert(cipher ## _SALT_SIZE <= TLS_MAX_SALT_SIZE); \
64 static_assert(cipher ## _REC_SEQ_SIZE <= TLS_MAX_REC_SEQ_SIZE); \
65 static_assert(cipher ## _TAG_SIZE == TLS_TAG_SIZE); \
66 static_assert(sizeof_field(struct ci, iv) == cipher ## _IV_SIZE); \
67 static_assert(sizeof_field(struct ci, key) == cipher ## _KEY_SIZE); \
68 static_assert(sizeof_field(struct ci, salt) == cipher ## _SALT_SIZE); \
69 static_assert(sizeof_field(struct ci, rec_seq) == cipher ## _REC_SEQ_SIZE);
78 #define CIPHER_DESC(cipher,ci,algname,_offloadable) [cipher - TLS_CIPHER_MIN] = { \ argument
[all …]

12345678910>>...12