Home
last modified time | relevance | path

Searched full:cipher (Results 1 – 25 of 381) sorted by relevance

12345678910>>...16

/linux/include/crypto/internal/
H A Dcipher.h21 * 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
43 * crypto_alloc_cipher() - allocate single block cipher handle
[all …]
/linux/arch/arm64/crypto/
H A DKconfig135 Block ciphers: AES cipher algorithms (FIPS-197)
138 AEAD cipher: AES with CBC, ESSIV, and SHA-256
149 Block ciphers: AES cipher algorithms (FIPS-197)
160 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
161 with block cipher modes:
163 - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
177 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
178 with block cipher modes:
180 - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
196 stream cipher algorithms
[all …]
H A DMakefile26 obj-$(CONFIG_CRYPTO_SM4_ARM64_CE) += sm4-ce-cipher.o
27 sm4-ce-cipher-y := sm4-ce-cipher-glue.o sm4-ce-cipher-core.o
47 obj-$(CONFIG_CRYPTO_AES_ARM64_CE) += aes-ce-cipher.o
48 aes-ce-cipher-y := aes-ce-core.o aes-ce-glue.o
76 aes-arm64-y := aes-cipher-core.o aes-cipher-glue.o
/linux/include/crypto/
H A Daead.h18 * 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.
168 * crypto_alloc_aead() - allocate AEAD cipher handle
[all …]
H A Drng.h75 * message digest cipher
76 * @type: specifies the type of the cipher
77 * @mask: specifies the mask for the cipher
79 * Allocate a cipher handle for a random number generator. The returned struct
80 * crypto_rng is the cipher handle that is required for any subsequent
89 * Return: allocated cipher handle in case of success; IS_ERR() is true in case
106 * @tfm: cipher handle
119 * @tfm: cipher handle to be freed
130 * @tfm: cipher handle
138 * cipher handle.
[all …]
/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
94 Length-preserving ciphers: CAST5 (CAST-128) cipher algorithm
112 Length-preserving ciphers: CAST6 (CAST-256) cipher algorithm
127 Block cipher: Triple DES EDE (FIPS 46-3) cipher algorithm
142 Length-preserving ciphers: Serpent cipher algorithm
158 Length-preserving ciphers: Serpent cipher algorithm
175 Length-preserving ciphers: Serpent cipher algorithm
[all …]
/linux/Documentation/crypto/
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
83 In-place Cipher operation
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
[all …]
H A Dapi-skcipher.rst1 Block Cipher Algorithm Definitions
5 :doc: Block Cipher Algorithm Definitions
10 Symmetric Key Cipher API
14 :doc: Symmetric Key Cipher API
19 Symmetric Key Cipher Request Handle
23 :doc: Symmetric Key Cipher Request Handle
28 Single Block Cipher API
31 .. kernel-doc:: include/crypto/internal/cipher.h
32 :doc: Single Block Cipher API
34 .. kernel-doc:: include/crypto/internal/cipher.h
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 Ddevel-algos.rst1 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/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)->cia_decrypt); in crypto_ecb_decrypt2()
[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()
428 struct crypto_lskcipher *cipher = lskcipher_cipher_simple(tfm); in lskcipher_setkey_simple() local
430 crypto_lskcipher_clear_flags(cipher, CRYPTO_TFM_REQ_MASK); in lskcipher_setkey_simple()
431 crypto_lskcipher_set_flags(cipher, crypto_lskcipher_get_flags(tfm) & in lskcipher_setkey_simple()
433 return crypto_lskcipher_setkey(cipher, key, keylen); in lskcipher_setkey_simple()
[all …]
H A Dpcbc.c3 * PCBC: Propagating Cipher Block Chaining mode
13 #include <crypto/internal/cipher.h>
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()
193 MODULE_DESCRIPTION("PCBC block cipher mode of operation");
H A Dcmac.c3 * CMAC: Cipher Block Mode for Authentication
14 #include <crypto/internal/cipher.h>
199 struct crypto_cipher *cipher; in cmac_init_tfm() local
202 cipher = crypto_spawn_cipher(spawn); in cmac_init_tfm()
203 if (IS_ERR(cipher)) in cmac_init_tfm()
204 return PTR_ERR(cipher); in cmac_init_tfm()
206 ctx->child = cipher; in cmac_init_tfm()
215 struct crypto_cipher *cipher; in cmac_clone_tfm() local
217 cipher = crypto_clone_cipher(octx->child); in cmac_clone_tfm()
218 if (IS_ERR(cipher)) in cmac_clone_tfm()
[all …]
H A Dcbc.c3 * CBC: Cipher Block Chaining mode
58 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.c73 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()
177 int crypto4xx_setkey_aes_cbc(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_cbc() argument
180 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_CBC, in crypto4xx_setkey_aes_cbc()
184 int crypto4xx_setkey_aes_ecb(struct crypto_skcipher *cipher, in crypto4xx_setkey_aes_ecb() argument
187 return crypto4xx_setkey_aes(cipher, key, keylen, CRYPTO_MODE_ECB, in crypto4xx_setkey_aes_ecb()
191 int crypto4xx_setkey_rfc3686(struct crypto_skcipher *cipher, in crypto4xx_setkey_rfc3686() argument
194 struct crypto4xx_ctx *ctx = crypto_skcipher_ctx(cipher); in crypto4xx_setkey_rfc3686()
[all …]
/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()
[all …]
/linux/drivers/crypto/bcm/
H A Dspu2.c88 * Convert from a software cipher mode value to the corresponding value
126 * spu2_cipher_xlate() - Convert a cipher {alg/mode/type} triple to a SPU2
127 * cipher type and mode.
128 * @cipher_alg: [in] cipher algorithm value from software enumeration
129 * @cipher_mode: [in] cipher mode value from software enumeration
130 * @cipher_type: [in] cipher type value from software enumeration
131 * @spu2_type: [out] cipher type value used by spu2 hardware
132 * @spu2_mode: [out] cipher mode value used by spu2 hardware
146 flow_log("Invalid cipher mode %d\n", cipher_mode); in spu2_cipher_xlate()
187 flow_log("Invalid cipher alg %d or type %d\n", in spu2_cipher_xlate()
[all …]
/linux/drivers/nvme/common/
H A Dkeyring.c137 enum nvme_tcp_tls_cipher cipher; member
141 .cipher = NVME_TCP_TLS_CIPHER_SHA384, },
144 .cipher = NVME_TCP_TLS_CIPHER_SHA256, },
147 .cipher = NVME_TCP_TLS_CIPHER_SHA384, },
150 .cipher = NVME_TCP_TLS_CIPHER_SHA256, },
153 .cipher = NVME_TCP_TLS_CIPHER_SHA384, },
156 .cipher = NVME_TCP_TLS_CIPHER_SHA256, },
159 .cipher = NVME_TCP_TLS_CIPHER_SHA384, },
162 .cipher = NVME_TCP_TLS_CIPHER_SHA256, },
178 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.c66 * pad minimum plaintext length to at least a single cipher block.
88 * @tfm: initialized cipher transform
96 * cipher's ivsize.
143 * @tfm: initialized cipher transform
151 * cipher's ivsize.
537 gss_krb5_cts_crypt(struct crypto_sync_skcipher *cipher, struct xdr_buf *buf, in gss_decrypt_xdr_buf()
542 SYNC_SKCIPHER_REQUEST_ON_STACK(req, cipher); in gss_decrypt_xdr_buf()
571 skcipher_request_set_sync_tfm(req, cipher);
594 memcpy(iv, data, crypto_sync_skcipher_ivsize(cipher)); in gss_krb5_cts_crypt()
604 * @cts_tfm: CBC cipher wit in gss_krb5_cts_crypt()
592 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
787 struct crypto_sync_skcipher *cipher, *aux_cipher; gss_krb5_aes_encrypt() local
860 struct crypto_sync_skcipher *cipher, *aux_cipher; gss_krb5_aes_decrypt() local
929 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
1015 struct crypto_sync_skcipher *cipher, *aux_cipher; krb5_etm_encrypt() local
1103 struct crypto_sync_skcipher *cipher, *aux_cipher; krb5_etm_decrypt() local
[all...]
/linux/arch/s390/crypto/
H A DKconfig77 Block cipher: AES cipher algorithms (FIPS 197)
78 AEAD cipher: AES with GCM
100 Block ciphers: DES (FIPS 46-2) cipher algorithm
101 Block ciphers: Triple DES EDE (FIPS 46-3) cipher algorithm
117 Length-preserving cipher: ChaCha20 stream cipher (RFC 7539)
/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
64 Block ciphers: AES cipher algorithms (FIPS-197)
75 Block ciphers: Camellia cipher algorithms
/linux/arch/arm/crypto/
H A DKconfig153 Block ciphers: AES cipher algorithms (FIPS-197)
174 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
175 with block cipher modes:
177 - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
202 Length-preserving ciphers: AES cipher algorithms (FIPS-197)
203 with block cipher modes:
205 - CBC (Cipher Block Chaining) mode (NIST SP800-38A)
207 - CTS (Cipher Text Stealing) mode (NIST SP800-38A)
220 stream cipher algorithms
/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 …]

12345678910>>...16