Home
last modified time | relevance | path

Searched full:aead (Results 1 – 25 of 72) sorted by relevance

123

/linux/net/tipc/
H A Dcrypto.c37 #include <crypto/aead.h>
135 * struct tipc_aead - TIPC AEAD key structure
145 * @key: the aead key
181 * @aead: array of pointers to AEAD keys for encryption/decryption
206 struct tipc_aead __rcu *aead[KEY_MAX + 1]; member
240 struct tipc_aead *aead; member
247 struct tipc_aead *aead; member
251 static struct tipc_aead *tipc_aead_get(struct tipc_aead __rcu *aead);
252 static inline void tipc_aead_put(struct tipc_aead *aead);
383 tipc_aead_get(struct tipc_aead __rcu * aead) tipc_aead_get() argument
396 tipc_aead_put(struct tipc_aead * aead) tipc_aead_put() argument
408 struct tipc_aead *aead = container_of(rp, struct tipc_aead, rcu); tipc_aead_free() local
431 tipc_aead_users(struct tipc_aead __rcu * aead) tipc_aead_users() argument
445 tipc_aead_users_inc(struct tipc_aead __rcu * aead,int lim) tipc_aead_users_inc() argument
456 tipc_aead_users_dec(struct tipc_aead __rcu * aead,int lim) tipc_aead_users_dec() argument
467 tipc_aead_users_set(struct tipc_aead __rcu * aead,int val) tipc_aead_users_set() argument
488 tipc_aead_tfm_next(struct tipc_aead * aead) tipc_aead_tfm_next() argument
514 tipc_aead_init(struct tipc_aead ** aead,struct tipc_aead_key * ukey,u8 mode) tipc_aead_init() argument
628 struct tipc_aead *aead; tipc_aead_clone() local
732 tipc_aead_encrypt(struct tipc_aead * aead,struct sk_buff * skb,struct tipc_bearer * b,struct tipc_media_addr * dst,struct tipc_node * __dnode) tipc_aead_encrypt() argument
846 struct tipc_aead *aead = tx_ctx->aead; tipc_aead_encrypt_done() local
886 tipc_aead_decrypt(struct net * net,struct tipc_aead * aead,struct sk_buff * skb,struct tipc_bearer * b) tipc_aead_decrypt() argument
971 struct tipc_aead *aead = rx_ctx->aead; tipc_aead_decrypt_done() local
1039 tipc_ehdr_build(struct net * net,struct tipc_aead * aead,u8 tx_key,struct sk_buff * skb,struct tipc_crypto * __rx) tipc_ehdr_build() argument
1131 struct tipc_aead *aead = NULL; tipc_crypto_key_init() local
1157 tipc_crypto_key_attach(struct tipc_crypto * c,struct tipc_aead * aead,u8 pos,bool master_key) tipc_crypto_key_attach() argument
1325 struct tipc_aead *aead = NULL; tipc_crypto_key_pick_tx() local
1698 struct tipc_aead *aead = NULL; tipc_crypto_xmit() local
1819 struct tipc_aead *aead = NULL; tipc_crypto_rcv() local
1897 tipc_crypto_rcv_complete(struct net * net,struct tipc_aead * aead,struct tipc_bearer * b,struct sk_buff ** skb,int err) tipc_crypto_rcv_complete() argument
2083 struct tipc_aead *aead; tipc_crypto_key_dump() local
2203 struct tipc_aead *aead; tipc_crypto_key_distr() local
2450 struct tipc_aead *aead; tipc_crypto_work_tx() local
[all...]
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c7 #include <crypto/aead.h>
10 #include <crypto/internal/aead.h>
33 static int nitrox_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key, in nitrox_aes_gcm_setkey() argument
37 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_setkey()
58 static int nitrox_aead_setauthsize(struct crypto_aead *aead, in nitrox_aead_setauthsize() argument
61 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aead_setauthsize()
69 aead->authsize = authsize; in nitrox_aead_setauthsize()
74 static int nitrox_aes_gcm_setauthsize(struct crypto_aead *aead, in nitrox_aes_gcm_setauthsize() argument
90 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize()
215 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc() local
[all …]
/linux/net/rxrpc/
H A Drxgk_kdf.c102 struct crypto_aead *aead; in rxgk_set_up_ciphers() local
119 aead = crypto_krb5_prepare_encryption(krb5, &TK, RXGK_CLIENT_ENC_RESPONSE, gfp); in rxgk_set_up_ciphers()
120 if (IS_ERR(aead)) in rxgk_set_up_ciphers()
122 gk->resp_enc = aead; in rxgk_set_up_ciphers()
148 aead = crypto_krb5_prepare_encryption( in rxgk_set_up_ciphers()
150 if (IS_ERR(aead)) in rxgk_set_up_ciphers()
152 gk->tx_enc = aead; in rxgk_set_up_ciphers()
153 aead = crypto_krb5_prepare_encryption( in rxgk_set_up_ciphers()
155 if (IS_ERR(aead)) in rxgk_set_up_ciphers()
157 gk->rx_enc = aead; in rxgk_set_up_ciphers()
[all …]
H A Drxgk_common.h70 struct crypto_aead *aead, in rxgk_decrypt() argument
80 ret = crypto_krb5_decrypt(krb5, aead, sg, 1, &offset, &len); in rxgk_decrypt()
/linux/include/crypto/
H A Daead.h3 * AEAD: Authenticated Encryption with Associated Data
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
21 * (listed as type "aead" in /proc/crypto)
24 * However, the kernel supports other types of AEAD ciphers which are defined
32 * here as well. Naturally all *skcipher* symbols must be exchanged the *aead*
33 * pendants discussed in the following. In addition, for the AEAD operation,
40 * code is the key bonus an AEAD cipher has over "standard" block chaining
81 * struct aead_request - AEAD request
105 * struct aead_alg - AEAD cipher definition
[all …]
H A Dkrb5.h12 #include <crypto/aead.h>
137 struct crypto_aead *aead,
143 struct crypto_aead *aead,
/linux/crypto/
H A Dessiv.c3 * ESSIV skcipher and aead template for block encryption
17 * we need to instantiate an aead that accepts the same special key format
19 * embedded into the AAD area of the aead request. This means the AEAD
32 #include <crypto/internal/aead.h>
53 struct crypto_aead *aead; member
102 crypto_aead_clear_flags(tctx->u.aead, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey()
103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey()
105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey()
131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize()
244 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt()
[all …]
/linux/include/crypto/internal/
H A Daead.h3 * AEAD: Authenticated Encryption with Associated Data
11 #include <crypto/aead.h>
58 static inline struct aead_instance *aead_alg_instance(struct crypto_aead *aead) in aead_alg_instance() argument
60 return aead_instance(crypto_tfm_alg_instance(&aead->base)); in aead_alg_instance()
120 static inline void crypto_aead_set_reqsize(struct crypto_aead *aead, in crypto_aead_set_reqsize() argument
123 aead->reqsize = reqsize; in crypto_aead_set_reqsize()
126 static inline void crypto_aead_set_reqsize_dma(struct crypto_aead *aead, in crypto_aead_set_reqsize_dma() argument
130 aead->reqsize = reqsize; in crypto_aead_set_reqsize_dma()
/linux/arch/arm64/crypto/
H A Dsm4-ce-ccm-glue.c3 * SM4-CCM AEAD Algorithm using ARMv8 Crypto Extensions
16 #include <crypto/internal/aead.h>
55 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_format_input() local
70 m = crypto_aead_authsize(aead); in ccm_format_input()
92 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_calculate_auth_mac() local
93 struct sm4_ctx *ctx = crypto_aead_ctx(aead); in ccm_calculate_auth_mac()
193 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_encrypt() local
194 struct sm4_ctx *ctx = crypto_aead_ctx(aead); in ccm_encrypt()
213 crypto_aead_authsize(aead), 1); in ccm_encrypt()
220 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_decrypt() local
[all …]
H A Dsm4-ce-gcm-glue.c3 * SM4-GCM AEAD Algorithm using ARMv8 Crypto Extensions
17 #include <crypto/internal/aead.h>
73 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_calculate_auth_mac() local
74 struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); in gcm_calculate_auth_mac()
137 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_crypt() local
138 struct sm4_gcm_ctx *ctx = crypto_aead_ctx(aead); in gcm_crypt()
177 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_encrypt() local
189 crypto_aead_authsize(aead), 1); in gcm_encrypt()
196 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_decrypt() local
197 unsigned int authsize = crypto_aead_authsize(aead); in gcm_decrypt()
/linux/security/keys/trusted-keys/
H A Dtrusted_dcp.c6 #include <crypto/aead.h>
134 struct crypto_aead *aead; in do_aead_crypto() local
138 aead = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in do_aead_crypto()
139 if (IS_ERR(aead)) { in do_aead_crypto()
140 ret = PTR_ERR(aead); in do_aead_crypto()
144 ret = crypto_aead_setauthsize(aead, DCP_BLOB_AUTHLEN); in do_aead_crypto()
150 aead_req = aead_request_alloc(aead, GFP_KERNEL); in do_aead_crypto()
171 if (crypto_aead_setkey(aead, key, AES_KEYSIZE_128)) { in do_aead_crypto()
172 pr_err("Can't set crypto AEAD key\n"); in do_aead_crypto()
185 crypto_free_aead(aead); in do_aead_crypto()
/linux/net/ipv4/
H A Desp4_offload.c15 #include <crypto/aead.h>
211 struct crypto_aead *aead; in esp4_gso_segment() local
224 aead = x->data; in esp4_gso_segment()
230 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp4_gso_segment()
233 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp4_gso_segment()
253 struct crypto_aead *aead = x->data; in esp_input_tail() local
256 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp_input_tail()
272 struct crypto_aead *aead; in esp_xmit() local
296 aead = x->data; in esp_xmit()
297 alen = crypto_aead_authsize(aead); in esp_xmit()
[all …]
/linux/net/ipv6/
H A Desp6_offload.c15 #include <crypto/aead.h>
251 struct crypto_aead *aead; in esp6_gso_segment() local
264 aead = x->data; in esp6_gso_segment()
270 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp6_gso_segment()
273 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp6_gso_segment()
291 struct crypto_aead *aead = x->data; in esp6_input_tail() local
294 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp6_input_tail()
310 struct crypto_aead *aead; in esp6_xmit() local
331 aead = x->data; in esp6_xmit()
332 alen = crypto_aead_authsize(aead); in esp6_xmit()
[all …]
/linux/net/xfrm/
H A Dxfrm_algo.c9 #include <crypto/aead.h>
32 .aead = {
51 .aead = {
70 .aead = {
89 .aead = {
108 .aead = {
127 .aead = {
146 .aead = {
165 .aead = {
750 const struct xfrm_aead_name *aead in xfrm_ealg_get_byname()
770 const struct xfrm_aead_name *aead = data; xfrm_aead_name_match() local
[all...]
/linux/net/tls/
H A Dtls_device_fallback.c33 #include <crypto/aead.h>
41 struct crypto_aead *aead, char *aad, in tls_enc_record() argument
112 struct crypto_aead *aead) in tls_init_aead_request() argument
114 aead_request_set_tfm(aead_req, aead); in tls_init_aead_request()
118 static struct aead_request *tls_alloc_aead_request(struct crypto_aead *aead, in tls_alloc_aead_request() argument
122 crypto_aead_reqsize(aead); in tls_alloc_aead_request()
127 tls_init_aead_request(aead_req, aead); in tls_alloc_aead_request()
132 struct crypto_aead *aead, struct scatterlist *sg_in, in tls_enc_records() argument
143 rc = tls_enc_record(aead_req, aead, aad, iv, in tls_enc_records()
/linux/Documentation/crypto/
H A Dkrb5.rst19 - The krb5enc AEAD algorithm
195 crypto object, an AEAD template for encryption and a synchronous hash for
205 struct crypto_aead *aead,
211 struct crypto_aead *aead,
257 The krb5enc AEAD algorithm
260 A template AEAD crypto algorithm, called "krb5enc", is provided that hashes the
/linux/drivers/crypto/bcm/
H A Dcipher.h16 #include <crypto/aead.h>
110 struct aead_alg aead; member
164 /* Buffers only used for aead */
273 * For AEAD requests, start of associated data. This will typically
282 * API src scatterlist for AEAD starts with AAD, if present. For first
291 * Same for destination. For AEAD, if there is AAD, output data must
308 * buffer for AEAD requests. So allocate as DMAable memory. If IV
458 /* Number of ICV check failures for AEAD messages */
/linux/tools/testing/selftests/net/
H A Dl2tp.sh246 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
251 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
256 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
261 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
285 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
290 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
295 spi 0x1000 proto esp aead 'rfc4106(gcm(aes))' \
300 spi 0x1001 proto esp aead 'rfc4106(gcm(aes))' \
/linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
H A Dchcr_ipsec.c55 #include <crypto/internal/aead.h>
58 #include <crypto/aead.h>
146 int authsize = x->aead->alg_icv_len / 8; in ch_ipsec_setauthsize()
169 int keylen = (x->aead->alg_key_len + 7) / 8; in ch_ipsec_setkey()
170 unsigned char *key = x->aead->alg_key; in ch_ipsec_setkey()
262 if (!x->aead) { in ch_ipsec_xfrm_add_state()
263 NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states without aead"); in ch_ipsec_xfrm_add_state()
266 if (x->aead->alg_icv_len != 128 && in ch_ipsec_xfrm_add_state()
267 x->aead->alg_icv_len != 96) { in ch_ipsec_xfrm_add_state()
268 …NL_SET_ERR_MSG_MOD(extack, "Cannot offload xfrm states with AEAD ICV length other than 96b & 128b"… in ch_ipsec_xfrm_add_state()
[all …]
/linux/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_ipsec.c6 #include <crypto/aead.h>
436 if (!xs->aead) { in ixgbe_ipsec_parse_proto_keys()
441 if (xs->aead->alg_icv_len != IXGBE_IPSEC_AUTH_BITS) { in ixgbe_ipsec_parse_proto_keys()
447 key_data = &xs->aead->alg_key[0]; in ixgbe_ipsec_parse_proto_keys()
448 key_len = xs->aead->alg_key_len; in ixgbe_ipsec_parse_proto_keys()
449 alg_name = xs->aead->alg_name; in ixgbe_ipsec_parse_proto_keys()
618 rsa.decrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa()
728 tsa.encrypt = xs->ealg || xs->aead; in ixgbe_ipsec_add_sa()
923 aead_len = sizeof(*xs->aead) + IXGBE_IPSEC_KEY_BITS / 8; in ixgbe_ipsec_vf_add_sa()
924 xs->aead = kzalloc(aead_len, GFP_ATOMIC); in ixgbe_ipsec_vf_add_sa()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec.c35 #include <crypto/aead.h>
397 struct crypto_aead *aead; in mlx5e_ipsec_build_accel_xfrm_attrs() local
404 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs()
407 memcpy(aes_gcm->aes_key, x->aead->alg_key, key_len); in mlx5e_ipsec_build_accel_xfrm_attrs()
411 aead = x->data; in mlx5e_ipsec_build_accel_xfrm_attrs()
412 geniv_ctx = crypto_aead_ctx(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
413 ivsize = crypto_aead_ivsize(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
415 memcpy(&aes_gcm->salt, x->aead->alg_key + key_len, in mlx5e_ipsec_build_accel_xfrm_attrs()
418 attrs->authsize = crypto_aead_authsize(aead) / 4; /* in dwords */ in mlx5e_ipsec_build_accel_xfrm_attrs()
421 aes_gcm->icv_len = x->aead->alg_icv_len; in mlx5e_ipsec_build_accel_xfrm_attrs()
[all …]
H A Dipsec_rxtx.c34 #include <crypto/aead.h>
202 struct crypto_aead *aead; in mlx5e_ipsec_set_state() local
207 aead = x->data; in mlx5e_ipsec_set_state()
208 alen = crypto_aead_authsize(aead); in mlx5e_ipsec_set_state()
209 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in mlx5e_ipsec_set_state()
/linux/drivers/net/ethernet/intel/ixgbevf/
H A Dipsec.c6 #include <crypto/aead.h>
37 memcpy(sam->key, xs->aead->alg_key, sizeof(sam->key)); in ixgbevf_ipsec_set_pf_sa()
220 if (!xs->aead) { in ixgbevf_ipsec_parse_proto_keys()
225 if (xs->aead->alg_icv_len != IXGBE_IPSEC_AUTH_BITS) { in ixgbevf_ipsec_parse_proto_keys()
231 key_data = &xs->aead->alg_key[0]; in ixgbevf_ipsec_parse_proto_keys()
232 key_len = xs->aead->alg_key_len; in ixgbevf_ipsec_parse_proto_keys()
233 alg_name = xs->aead->alg_name; in ixgbevf_ipsec_parse_proto_keys()
315 rsa.decrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa()
370 tsa.encrypt = xs->ealg || xs->aead; in ixgbevf_ipsec_add_sa()
/linux/drivers/crypto/qce/
H A Dcommon.h14 #include <crypto/internal/aead.h>
92 struct aead_alg aead; member
/linux/Documentation/admin-guide/device-mapper/
H A Ddm-crypt.rst144 For Authenticated Encryption with Additional Data (AEAD)
145 the <type> is "aead". An AEAD mode additionally calculates and verifies

123