Home
last modified time | relevance | path

Searched refs:aead (Results 1 – 25 of 105) sorted by relevance

12345

/OK3568_Linux_fs/kernel/net/tipc/
H A Dcrypto.c202 struct tipc_aead __rcu *aead[KEY_MAX + 1]; member
236 struct tipc_aead *aead; member
243 struct tipc_aead *aead; member
247 static struct tipc_aead *tipc_aead_get(struct tipc_aead __rcu *aead);
248 static inline void tipc_aead_put(struct tipc_aead *aead);
250 static int tipc_aead_users(struct tipc_aead __rcu *aead);
251 static void tipc_aead_users_inc(struct tipc_aead __rcu *aead, int lim);
252 static void tipc_aead_users_dec(struct tipc_aead __rcu *aead, int lim);
253 static void tipc_aead_users_set(struct tipc_aead __rcu *aead, int val);
254 static struct crypto_aead *tipc_aead_tfm_next(struct tipc_aead *aead);
[all …]
/OK3568_Linux_fs/kernel/crypto/
H A Daead.c85 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_encrypt() local
86 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_encrypt()
91 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_encrypt()
94 ret = crypto_aead_alg(aead)->encrypt(req); in crypto_aead_encrypt()
102 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_decrypt() local
103 struct crypto_alg *alg = aead->base.__crt_alg; in crypto_aead_decrypt()
108 if (crypto_aead_get_flags(aead) & CRYPTO_TFM_NEED_KEY) in crypto_aead_decrypt()
110 else if (req->cryptlen < crypto_aead_authsize(aead)) in crypto_aead_decrypt()
113 ret = crypto_aead_alg(aead)->decrypt(req); in crypto_aead_decrypt()
121 struct crypto_aead *aead = __crypto_aead_cast(tfm); in crypto_aead_exit_tfm() local
[all …]
H A Dalgif_aead.c40 struct crypto_aead *aead; member
51 struct crypto_aead *tfm = aeadc->aead; in aead_sufficient_data()
68 struct crypto_aead *tfm = aeadc->aead; in aead_sendmsg()
97 struct crypto_aead *tfm = aeadc->aead; in _aead_recvmsg()
395 if (crypto_aead_get_flags(tfm->aead) & CRYPTO_TFM_NEED_KEY) in aead_check_key()
470 struct crypto_aead *aead; in aead_bind() local
477 aead = crypto_alloc_aead(name, type, mask); in aead_bind()
478 if (IS_ERR(aead)) { in aead_bind()
480 return ERR_CAST(aead); in aead_bind()
485 crypto_free_aead(aead); in aead_bind()
[all …]
H A Dgcm.c44 struct crypto_aead_spawn aead; member
92 static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_gcm_setkey() argument
95 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_setkey()
110 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_gcm_setkey()
138 crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) & in crypto_gcm_setkey()
180 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_init_crypt() local
181 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_init_crypt()
414 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_enc_copy_hash() local
420 crypto_aead_authsize(aead), 1); in gcm_enc_copy_hash()
468 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_verify() local
[all …]
H A Dccm.c87 static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_ccm_setkey() argument
90 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_setkey()
96 crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_ccm_setkey()
103 crypto_ahash_set_flags(mac, crypto_aead_get_flags(aead) & in crypto_ccm_setkey()
130 struct crypto_aead *aead = crypto_aead_reqtfm(req); in format_input() local
135 m = crypto_aead_authsize(aead); in format_input()
172 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_auth() local
173 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_auth()
230 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_encrypt_done() local
237 crypto_aead_authsize(aead), 1); in crypto_ccm_encrypt_done()
[all …]
H A Dessiv.c53 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()
241 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt()
322 struct crypto_aead *aead; in essiv_aead_init_tfm() local
329 aead = crypto_spawn_aead(&ictx->u.aead_spawn); in essiv_aead_init_tfm()
330 if (IS_ERR(aead)) in essiv_aead_init_tfm()
331 return PTR_ERR(aead); in essiv_aead_init_tfm()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/cavium/nitrox/
H A Dnitrox_aead.c34 static int nitrox_aes_gcm_setkey(struct crypto_aead *aead, const u8 *key, in nitrox_aes_gcm_setkey() argument
38 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_setkey()
59 static int nitrox_aead_setauthsize(struct crypto_aead *aead, in nitrox_aead_setauthsize() argument
62 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aead_setauthsize()
70 aead->authsize = authsize; in nitrox_aead_setauthsize()
75 static int nitrox_aes_gcm_setauthsize(struct crypto_aead *aead, in nitrox_aes_gcm_setauthsize() argument
91 return nitrox_aead_setauthsize(aead, authsize); in nitrox_aes_gcm_setauthsize()
216 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in nitrox_aes_gcm_enc() local
217 struct nitrox_crypto_ctx *nctx = crypto_aead_ctx(aead); in nitrox_aes_gcm_enc()
231 rctx->dstlen = rctx->srclen + aead->authsize; in nitrox_aes_gcm_enc()
[all …]
/OK3568_Linux_fs/kernel/net/ipv6/
H A Desp6.c63 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen) in esp_alloc_tmp() argument
69 len += crypto_aead_ivsize(aead); in esp_alloc_tmp()
72 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp()
77 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp()
90 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument
92 return crypto_aead_ivsize(aead) ? in esp_tmp_iv()
94 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv()
97 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument
101 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req()
103 aead_request_set_tfm(req, aead); in esp_tmp_req()
[all …]
/OK3568_Linux_fs/kernel/net/ipv4/
H A Desp4.c46 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int extralen) in esp_alloc_tmp() argument
52 len += crypto_aead_ivsize(aead); in esp_alloc_tmp()
55 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp()
60 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp()
73 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int extralen) in esp_tmp_iv() argument
75 return crypto_aead_ivsize(aead) ? in esp_tmp_iv()
77 crypto_aead_alignmask(aead) + 1) : tmp + extralen; in esp_tmp_iv()
80 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument
84 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req()
86 aead_request_set_tfm(req, aead); in esp_tmp_req()
[all …]
H A Desp4_offload.c195 struct crypto_aead *aead; in esp4_gso_segment() local
208 aead = x->data; in esp4_gso_segment()
214 if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) in esp4_gso_segment()
217 __skb_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead)); in esp4_gso_segment()
237 struct crypto_aead *aead = x->data; in esp_input_tail() local
240 if (!pskb_may_pull(skb, sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead))) in esp_input_tail()
256 struct crypto_aead *aead; in esp_xmit() local
279 aead = x->data; in esp_xmit()
280 alen = crypto_aead_authsize(aead); in esp_xmit()
285 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp_xmit()
/OK3568_Linux_fs/kernel/drivers/crypto/xilinx/
H A Dzynqmp-aes-gcm.c46 struct aead_alg aead; member
79 struct crypto_aead *aead = crypto_aead_reqtfm(req); in zynqmp_aes_aead_cipher() local
80 struct zynqmp_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in zynqmp_aes_aead_cipher()
209 struct crypto_aead *aead = crypto_aead_reqtfm(req); in zynqmp_handle_aes_req() local
210 struct zynqmp_aead_tfm_ctx *tfm_ctx = crypto_aead_ctx(aead); in zynqmp_handle_aes_req()
238 static int zynqmp_aes_aead_setkey(struct crypto_aead *aead, const u8 *key, in zynqmp_aes_aead_setkey() argument
241 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setkey()
264 tfm_ctx->fbk_cipher->base.crt_flags |= (aead->base.crt_flags & in zynqmp_aes_aead_setkey()
270 static int zynqmp_aes_aead_setauthsize(struct crypto_aead *aead, in zynqmp_aes_aead_setauthsize() argument
273 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in zynqmp_aes_aead_setauthsize()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/caam/
H A Dcaamalg.c92 struct aead_alg aead; member
132 static int aead_null_set_sh_desc(struct crypto_aead *aead) in aead_null_set_sh_desc() argument
134 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_null_set_sh_desc()
182 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
184 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
185 struct caam_aead_alg, aead); in aead_set_sh_desc()
186 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
187 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc()
203 return aead_null_set_sh_desc(aead); in aead_set_sh_desc()
323 static int gcm_set_sh_desc(struct crypto_aead *aead) in gcm_set_sh_desc() argument
[all …]
H A Dcaamalg_qi.c45 struct aead_alg aead; member
80 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
82 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
83 typeof(*alg), aead); in aead_set_sh_desc()
84 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc()
85 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
195 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument
198 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_setkey()
253 ret = aead_set_sh_desc(aead); in aead_setkey()
283 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument
[all …]
H A Dcaamalg_qi2.c52 struct aead_alg aead; member
167 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
169 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
170 typeof(*alg), aead); in aead_set_sh_desc()
171 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc()
172 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
284 static int aead_setkey(struct crypto_aead *aead, const u8 *key, in aead_setkey() argument
287 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_setkey()
318 return aead_set_sh_desc(aead); in aead_setkey()
324 static int des3_aead_setkey(struct crypto_aead *aead, const u8 *key, in des3_aead_setkey() argument
[all …]
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/host_include/openssl/
H A Daead.h192 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
196 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
200 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
205 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
218 const EVP_AEAD *aead; member
250 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
267 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
438 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/external/security/rk_tee_user/v1/export-user_ta/include/openssl/
H A Daead.h129 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
133 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
137 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
142 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
150 const EVP_AEAD *aead; member
184 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
201 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
381 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/external/security/rk_tee_user/v1/export-user_ta/host_include/openssl/
H A Daead.h129 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
133 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
137 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
142 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
150 const EVP_AEAD *aead; member
184 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
201 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
381 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/host_include/openssl/
H A Daead.h192 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
196 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
200 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
205 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
218 const EVP_AEAD *aead; member
250 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
267 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
438 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/include/openssl/
H A Daead.h192 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
196 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
200 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
205 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
218 const EVP_AEAD *aead; member
250 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
267 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
438 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/include/openssl/
H A Daead.h192 OPENSSL_EXPORT size_t EVP_AEAD_key_length(const EVP_AEAD *aead);
196 OPENSSL_EXPORT size_t EVP_AEAD_nonce_length(const EVP_AEAD *aead);
200 OPENSSL_EXPORT size_t EVP_AEAD_max_overhead(const EVP_AEAD *aead);
205 OPENSSL_EXPORT size_t EVP_AEAD_max_tag_len(const EVP_AEAD *aead);
218 const EVP_AEAD *aead; member
250 OPENSSL_EXPORT EVP_AEAD_CTX *EVP_AEAD_CTX_new(const EVP_AEAD *aead,
267 OPENSSL_EXPORT int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
438 EVP_AEAD_CTX *ctx, const EVP_AEAD *aead, const uint8_t *key, size_t key_len,
/OK3568_Linux_fs/kernel/Documentation/crypto/
H A Dapi-aead.rst4 .. kernel-doc:: include/crypto/aead.h
7 .. kernel-doc:: include/crypto/aead.h
13 .. kernel-doc:: include/crypto/aead.h
19 .. kernel-doc:: include/crypto/aead.h
22 .. kernel-doc:: include/crypto/aead.h
/OK3568_Linux_fs/kernel/net/xfrm/
H A Dxfrm_algo.c31 .aead = {
50 .aead = {
69 .aead = {
88 .aead = {
107 .aead = {
126 .aead = {
145 .aead = {
164 .aead = {
734 const struct xfrm_aead_name *aead = data; in xfrm_aead_name_match() local
735 const char *name = aead->name; in xfrm_aead_name_match()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/rockchip/cryptodev_linux/
H A Dcryptlib.h18 int aead; member
37 uint8_t *key, size_t keylen, int stream, int aead);
39 int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead);
41 int aead);
63 if (likely(cdata->aead != 0)) in cryptodev_cipher_set_tag_size()
69 if (likely(cdata->init && cdata->aead != 0)) in cryptodev_cipher_get_tag_size()
H A Dcryptlib.c56 int aead) in cryptodev_get_cipher_keylen() argument
70 if (aead && sop->mackeylen) { in cryptodev_get_cipher_keylen()
81 int cryptodev_get_cipher_key(uint8_t *key, struct session_op *sop, int aead) in cryptodev_get_cipher_key() argument
94 if (aead && sop->mackeylen) { in cryptodev_get_cipher_key()
141 uint8_t *keyp, size_t keylen, int stream, int aead) in cryptodev_cipher_init() argument
145 if (aead == 0) { in cryptodev_cipher_init()
217 out->aead = aead; in cryptodev_cipher_init()
221 if (aead == 0) { in cryptodev_cipher_init()
248 if (aead == 0) { in cryptodev_cipher_init()
264 if (cdata->aead == 0) { in cryptodev_cipher_deinit()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec.c151 struct crypto_aead *aead; in mlx5e_ipsec_build_accel_xfrm_attrs() local
158 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs()
161 memcpy(aes_gcm->aes_key, x->aead->alg_key, key_len); in mlx5e_ipsec_build_accel_xfrm_attrs()
165 aead = x->data; in mlx5e_ipsec_build_accel_xfrm_attrs()
166 geniv_ctx = crypto_aead_ctx(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
167 ivsize = crypto_aead_ivsize(aead); in mlx5e_ipsec_build_accel_xfrm_attrs()
169 memcpy(&aes_gcm->salt, x->aead->alg_key + key_len, in mlx5e_ipsec_build_accel_xfrm_attrs()
173 aes_gcm->icv_len = x->aead->alg_icv_len; in mlx5e_ipsec_build_accel_xfrm_attrs()
250 if (!x->aead) { in mlx5e_xfrm_validate_state()
254 if (x->aead->alg_icv_len != 128) { in mlx5e_xfrm_validate_state()
[all …]

12345