Home
last modified time | relevance | path

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

1234567891011

/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 i
[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 handl
[all...]
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 nam
[all...]
/linux/crypto/
H A Decb.c8 #include <crypto/internal/cipher.h>
16 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) in crypto_ecb_decrypt2()
60 struct crypto_cipher *cipher = *ctx; lskcipher_setkey_simple2() local
73 struct crypto_cipher *cipher; lskcipher_init_tfm_simple2() local
[all...]
H A Dskcipher.c3 * Symmetric key cipher operations.
13 #include <crypto/internal/cipher.h>
132 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in skcipher_setkey_unaligned() local
144 ret = cipher->setkey(tfm, alignbuffer, keylen); in skcipher_setkey_unaligned()
152 struct skcipher_alg *cipher = crypto_skcipher_alg(tfm); in crypto_skcipher_setkey() local
156 if (cipher->co.base.cra_type != &crypto_skcipher_type) { in crypto_skcipher_setkey()
167 if (keylen < cipher->min_keysize || keylen > cipher->max_keysize) in crypto_skcipher_setkey()
173 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
535 struct crypto_cipher *cipher in skcipher_setkey_simple() local
548 struct crypto_cipher *cipher; skcipher_init_tfm_simple() local
[all...]
H A Dctr.c10 #include <crypto/internal/cipher.h>
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()
148 /* CTR mode is a stream cipher. */ in crypto_ctr_create()
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()
[all...]
H A Dlskcipher.c3 * Linear symmetric key cipher operations.
36 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()
429 struct crypto_lskcipher *cipher = lskcipher_cipher_simple(tfm); in lskcipher_setkey_simple() local
431 crypto_lskcipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in lskcipher_setkey_simple()
432 crypto_lskcipher_set_flags(cipher, crypto_lskcipher_get_flag in lskcipher_setkey_simple()
442 struct crypto_lskcipher *cipher; lskcipher_init_tfm_simple() local
[all...]
H A Dcbc.c58 struct crypto_lskcipher *cipher = *ctx; in crypto_cbc_encrypt() local
62 rem = crypto_cbc_encrypt_inplace(cipher, dst, len, iv); in crypto_cbc_encrypt()
64 rem = crypto_cbc_encrypt_segment(cipher, src, dst, len, iv); in crypto_cbc_encrypt()
127 struct crypto_lskcipher *cipher = *ctx; in crypto_cbc_decrypt() local
131 rem = crypto_cbc_decrypt_inplace(cipher, dst, len, iv); in crypto_cbc_decrypt()
133 rem = crypto_cbc_decrypt_segment(cipher, src, dst, len, iv); in crypto_cbc_decrypt()
186 MODULE_DESCRIPTION("CBC block cipher mode of operation");
/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()
207 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); crypto4xx_rfc3686_encrypt() local
222 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); crypto4xx_rfc3686_decrypt() local
238 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(req); crypto4xx_ctr_crypt() local
271 crypto4xx_sk_setup_fallback(struct crypto4xx_ctx * ctx,struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) crypto4xx_sk_setup_fallback() argument
282 crypto4xx_setkey_aes_ctr(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) crypto4xx_setkey_aes_ctr() argument
350 crypto4xx_aead_setup_fallback(struct crypto4xx_ctx * ctx,struct crypto_aead * cipher,const u8 * key,unsigned int keylen) crypto4xx_aead_setup_fallback() argument
364 crypto4xx_setkey_aes_ccm(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) crypto4xx_setkey_aes_ccm() argument
466 crypto4xx_setauthsize_aead(struct crypto_aead * cipher,unsigned int authsize) crypto4xx_setauthsize_aead() argument
510 crypto4xx_setkey_aes_gcm(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) crypto4xx_setkey_aes_gcm() argument
[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/drivers/crypto/cavium/nitrox/
H A Dnitrox_skcipher.c24 * 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()
197 nitrox_aes_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) nitrox_aes_setkey() argument
249 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq); nitrox_skcipher_crypt() local
293 struct crypto_skcipher *cipher = crypto_skcipher_reqtfm(skreq); nitrox_cbc_decrypt() local
320 nitrox_3des_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) nitrox_3des_setkey() argument
337 nitrox_aes_xts_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) nitrox_aes_xts_setkey() argument
361 nitrox_aes_ctr_rfc3686_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) nitrox_aes_ctr_rfc3686_setkey() argument
[all...]
/linux/arch/arm64/crypto/
H A DKconfig75 Block ciphers: AES cipher algorithms (FIPS-197)
78 AEAD cipher: AES with CBC, ESSIV, and SHA-256
89 Block ciphers: AES cipher algorithms (FIPS-197)
100 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
101 with block cipher modes:
117 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
118 with block cipher modes:
135 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
136 with block cipher modes:
154 Block ciphers: SM4 cipher algorithm
[all...]
H A DMakefile17 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce-cipher.o
18 sm4-ce-cipher-y := sm4-ce-cipher-glue.o sm4-ce-cipher-core.o
38 obj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o
39 aes-ce-cipher-y := aes-ce-core.o aes-ce-glue.o
54 aes-arm64-y := aes-cipher-core.o aes-cipher-glue.o
/linux/arch/x86/crypto/
H A DKconfig26 Block cipher: AES cipher algorithms
27 AEAD cipher: AES with GCM
44 Block cipher: Blowfish cipher algorithm
55 Block cipher: Camellia cipher algorithms
92 Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
109 Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
124 Block cipher
[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 in nvme_tls_psk_default() local
[all...]
/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c66 * pad minimum plaintext length to at least a single cipher block.
88 * @tfm: initialized cipher transform
96 * cipher's ivsize.
393 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()
460 * @cts_tfm: CBC cipher with CTS
461 * @cbc_tfm: base CBC cipher
468 * To provide confidentiality, encrypt using cipher bloc
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
[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
34 Block ciphers: AES cipher algorithms (FIPS-197)
45 Block ciphers: Camellia cipher algorithms
/linux/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
H A Dg84.c24 #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/drivers/crypto/bcm/
H A Dcipher.c38 #include "cipher.h"
72 MODULE_PARM_DESC(cipher_pri, "Priority for cipher algos");
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()
283 * handle_skcipher_req() - Submit as much of a block cipher request as fits in
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 in handle_skcipher_req()
1764 des_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) des_setkey() argument
1778 threedes_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) threedes_setkey() argument
1792 aes_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) aes_setkey() argument
1819 skcipher_setkey(struct crypto_skcipher * cipher,const u8 * key,unsigned int keylen) skcipher_setkey() argument
2723 aead_authenc_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_authenc_setkey() argument
2818 aead_gcm_ccm_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_gcm_ccm_setkey() argument
2900 aead_gcm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_gcm_esp_setkey() argument
2932 rfc4543_gcm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) rfc4543_gcm_esp_setkey() argument
2965 aead_ccm_esp_setkey(struct crypto_aead * cipher,const u8 * key,unsigned int keylen) aead_ccm_esp_setkey() argument
2985 aead_setauthsize(struct crypto_aead * cipher,unsigned int authsize) aead_setauthsize() argument
[all...]
/linux/tools/testing/crypto/chacha20-s390/
H A Dtest-cipher.c50 /* Perform cipher operations with the chacha lib */
51 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()
100 /* Perform cipher operations with skcipher */
125 /* Initialize and trigger cipher operations */
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()
[all...]
/linux/crypto/krb5/
H A Drfc3961_simplified.c256 * DR(Key, Constant) = k-truncate(E(Key, Constant, initial-cipher-state))
257 * K1 = E(Key, n-fold(Constant), initial-cipher-state)
258 * K2 = E(Key, K1, initial-cipher-state)
259 * K3 = E(Key, K2, initial-cipher-state)
272 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, inke in rfc3961_calc_DK()
353 struct crypto_sync_skcipher *cipher; rfc3961_calc_E() local
[all...]
/linux/tools/testing/selftests/bpf/progs/
H A Dcrypto_bench.c14 char cipher[128] = {}; variable
34 if (!cipher[0] || !key_len || key_len > 256) { in crypto_setup()
39 __builtin_memcpy(&params.algo, cipher, sizeof(cipher)); in crypto_setup()
/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 in _iwl_mvm_sec_key_del()
[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,c argument
90 CIPHER_DESC_NONCE0(cipher,ci,algname,_offloadable) global() argument
[all...]
/linux/drivers/crypto/intel/keembay/
H A Docs-aes.h68 const u8 *key, const enum ocs_cipher cipher);
72 enum ocs_cipher cipher,
97 enum ocs_cipher cipher,
109 enum ocs_cipher cipher,

1234567891011