Home
last modified time | relevance | path

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

/linux-4.4.14/net/ipv6/
Desp6.c65 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen) in esp_alloc_tmp() argument
71 len += crypto_aead_ivsize(aead); in esp_alloc_tmp()
74 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp()
79 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp()
92 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument
94 return crypto_aead_ivsize(aead) ? in esp_tmp_iv()
96 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv()
99 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument
103 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req()
105 aead_request_set_tfm(req, aead); in esp_tmp_req()
[all …]
/linux-4.4.14/net/ipv4/
Desp4.c38 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqhilen) in esp_alloc_tmp() argument
44 len += crypto_aead_ivsize(aead); in esp_alloc_tmp()
47 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp()
52 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp()
64 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument
66 return crypto_aead_ivsize(aead) ? in esp_tmp_iv()
68 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv()
71 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument
75 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req()
77 aead_request_set_tfm(req, aead); in esp_tmp_req()
[all …]
/linux-4.4.14/Documentation/DocBook/
D.crypto-API.xml.cmd2aead.h include/linux/crypto.h include/linux/crypto.h include/linux/crypto.h include/crypto/aead.h …
Dcrypto-API.xml.db1 API-struct-aead-request
4 API-struct-aead-alg
23 API-crypto-alloc-aead
24 API-crypto-free-aead
25 API-crypto-aead-ivsize
26 API-crypto-aead-authsize
27 API-crypto-aead-blocksize
28 API-crypto-aead-setkey
29 API-crypto-aead-setauthsize
30 API-crypto-aead-encrypt
[all …]
/linux-4.4.14/crypto/
Daead.c84 struct crypto_aead *aead = __crypto_aead_cast(tfm); in crypto_aead_exit_tfm() local
85 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_exit_tfm()
87 alg->exit(aead); in crypto_aead_exit_tfm()
92 struct crypto_aead *aead = __crypto_aead_cast(tfm); in crypto_aead_init_tfm() local
93 struct aead_alg *alg = crypto_aead_alg(aead); in crypto_aead_init_tfm()
95 aead->authsize = alg->maxauthsize; in crypto_aead_init_tfm()
98 aead->base.exit = crypto_aead_exit_tfm; in crypto_aead_init_tfm()
101 return alg->init(aead); in crypto_aead_init_tfm()
110 struct aead_alg *aead = container_of(alg, struct aead_alg, base); in crypto_aead_report() local
116 raead.maxauthsize = aead->maxauthsize; in crypto_aead_report()
[all …]
Dccm.c82 static int crypto_ccm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_ccm_setkey() argument
85 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_setkey()
91 crypto_ablkcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_ccm_setkey()
94 crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctr) & in crypto_ccm_setkey()
100 crypto_cipher_set_flags(tfm, crypto_aead_get_flags(aead) & in crypto_ccm_setkey()
103 crypto_aead_set_flags(aead, crypto_cipher_get_flags(tfm) & in crypto_ccm_setkey()
132 struct crypto_aead *aead = crypto_aead_reqtfm(req); in format_input() local
137 m = crypto_aead_authsize(aead); in format_input()
254 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_ccm_auth() local
255 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead); in crypto_ccm_auth()
[all …]
Dgcm.c48 struct crypto_aead_spawn aead; member
112 static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key, in crypto_gcm_setkey() argument
115 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_setkey()
130 crypto_ablkcipher_set_flags(ctr, crypto_aead_get_flags(aead) & in crypto_gcm_setkey()
133 crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctr) & in crypto_gcm_setkey()
165 crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) & in crypto_gcm_setkey()
168 crypto_aead_set_flags(aead, crypto_ahash_get_flags(ghash) & in crypto_gcm_setkey()
223 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_gcm_init_crypt() local
224 struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); in crypto_gcm_init_crypt()
457 struct crypto_aead *aead = crypto_aead_reqtfm(req); in gcm_enc_copy_hash() local
[all …]
Dtestmgr.c133 struct aead_test_suite aead; member
1547 if (desc->suite.aead.enc.vecs) { in alg_test_aead()
1548 err = test_aead(tfm, ENCRYPT, desc->suite.aead.enc.vecs, in alg_test_aead()
1549 desc->suite.aead.enc.count); in alg_test_aead()
1554 if (!err && desc->suite.aead.dec.vecs) in alg_test_aead()
1555 err = test_aead(tfm, DECRYPT, desc->suite.aead.dec.vecs, in alg_test_aead()
1556 desc->suite.aead.dec.count); in alg_test_aead()
2112 .aead = {
2127 .aead = {
2140 .aead = {
[all …]
Dpcrypt.c157 struct crypto_aead *aead = crypto_aead_reqtfm(req); in pcrypt_aead_encrypt() local
158 struct pcrypt_aead_ctx *ctx = crypto_aead_ctx(aead); in pcrypt_aead_encrypt()
199 struct crypto_aead *aead = crypto_aead_reqtfm(req); in pcrypt_aead_decrypt() local
200 struct pcrypt_aead_ctx *ctx = crypto_aead_ctx(aead); in pcrypt_aead_decrypt()
Dchacha20poly1305.c483 static int chachapoly_setkey(struct crypto_aead *aead, const u8 *key, in chachapoly_setkey() argument
486 struct chachapoly_ctx *ctx = crypto_aead_ctx(aead); in chachapoly_setkey()
496 crypto_ablkcipher_set_flags(ctx->chacha, crypto_aead_get_flags(aead) & in chachapoly_setkey()
500 crypto_aead_set_flags(aead, crypto_ablkcipher_get_flags(ctx->chacha) & in chachapoly_setkey()
DMakefile16 obj-$(CONFIG_CRYPTO_AEAD2) += aead.o
/linux-4.4.14/drivers/crypto/caam/
Dcaamalg.c125 struct aead_alg aead; member
257 static int aead_null_set_sh_desc(struct crypto_aead *aead) in aead_null_set_sh_desc() argument
259 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_null_set_sh_desc()
429 static int aead_set_sh_desc(struct crypto_aead *aead) in aead_set_sh_desc() argument
431 struct caam_aead_alg *alg = container_of(crypto_aead_alg(aead), in aead_set_sh_desc()
432 struct caam_aead_alg, aead); in aead_set_sh_desc()
433 unsigned int ivsize = crypto_aead_ivsize(aead); in aead_set_sh_desc()
434 struct caam_ctx *ctx = crypto_aead_ctx(aead); in aead_set_sh_desc()
446 return aead_null_set_sh_desc(aead); in aead_set_sh_desc()
725 static int gcm_set_sh_desc(struct crypto_aead *aead) in gcm_set_sh_desc() argument
[all …]
/linux-4.4.14/arch/arm64/crypto/
Daes-ce-ccm-glue.c70 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_init_mac() local
98 maciv[0] |= (crypto_aead_authsize(aead) - 2) << 2; in ccm_init_mac()
108 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_calculate_auth_mac() local
109 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_calculate_auth_mac()
150 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_encrypt() local
151 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_encrypt()
181 err = blkcipher_aead_walk_virt_block(&desc, &walk, aead, in ccm_encrypt()
207 crypto_aead_authsize(aead), 1); in ccm_encrypt()
214 struct crypto_aead *aead = crypto_aead_reqtfm(req); in ccm_decrypt() local
215 struct crypto_aes_ctx *ctx = crypto_aead_ctx(aead); in ccm_decrypt()
[all …]
/linux-4.4.14/include/crypto/internal/
Daead.h58 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()
109 static inline void crypto_aead_set_reqsize(struct crypto_aead *aead, in crypto_aead_set_reqsize() argument
112 aead->reqsize = reqsize; in crypto_aead_set_reqsize()
120 static inline unsigned int crypto_aead_maxauthsize(struct crypto_aead *aead) in crypto_aead_maxauthsize() argument
122 return crypto_aead_alg_maxauthsize(crypto_aead_alg(aead)); in crypto_aead_maxauthsize()
/linux-4.4.14/net/xfrm/
Dxfrm_algo.c33 .aead = {
52 .aead = {
71 .aead = {
90 .aead = {
109 .aead = {
128 .aead = {
147 .aead = {
166 .aead = {
736 const struct xfrm_aead_name *aead = data; in xfrm_aead_name_match() local
737 const char *name = aead->name; in xfrm_aead_name_match()
[all …]
Dxfrm_user.c398 x->aead = p; in attach_aead()
399 x->geniv = algo->uinfo.aead.geniv; in attach_aead()
816 if (x->aead) { in copy_to_user_state_extra()
817 ret = nla_put(skb, XFRMA_ALG_AEAD, aead_len(x->aead), x->aead); in copy_to_user_state_extra()
2592 if (x->aead) in xfrm_sa_len()
2593 l += nla_total_size(aead_len(x->aead)); in xfrm_sa_len()
Dxfrm_state.c1160 if (orig->aead) { in xfrm_state_clone()
1161 x->aead = xfrm_algo_aead_clone(orig->aead); in xfrm_state_clone()
1162 if (!x->aead) in xfrm_state_clone()
/linux-4.4.14/drivers/crypto/
Dpicoxcell_crypto.c326 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in spacc_aead_make_ddts() local
337 total += crypto_aead_authsize(aead); in spacc_aead_make_ddts()
420 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in spacc_aead_free_ddts() local
422 (req->is_encrypt ? crypto_aead_authsize(aead) : 0); in spacc_aead_free_ddts()
423 struct spacc_aead_ctx *aead_ctx = crypto_aead_ctx(aead); in spacc_aead_free_ddts()
503 struct crypto_aead *aead = crypto_aead_reqtfm(aead_req); in spacc_aead_need_fallback() local
504 struct aead_alg *alg = crypto_aead_alg(aead); in spacc_aead_need_fallback()
506 struct spacc_aead_ctx *ctx = crypto_aead_ctx(aead); in spacc_aead_need_fallback()
549 struct crypto_aead *aead = crypto_aead_reqtfm(aead_req); in spacc_aead_submit() local
550 unsigned int authsize = crypto_aead_authsize(aead); in spacc_aead_submit()
[all …]
Dtalitos.c1086 struct crypto_aead *aead = crypto_aead_reqtfm(areq); in ipsec_esp() local
1087 unsigned int authsize = crypto_aead_authsize(aead); in ipsec_esp()
1088 struct talitos_ctx *ctx = crypto_aead_ctx(aead); in ipsec_esp()
1092 unsigned int ivsize = crypto_aead_ivsize(aead); in ipsec_esp()
2103 struct aead_alg aead; member
2111 .alg.aead = {
2131 .alg.aead = {
2153 .alg.aead = {
2173 .alg.aead = {
2195 .alg.aead = {
[all …]
/linux-4.4.14/include/crypto/
Daead.h354 struct crypto_aead *aead = crypto_aead_reqtfm(req); in crypto_aead_decrypt() local
356 if (req->cryptlen < crypto_aead_authsize(aead)) in crypto_aead_decrypt()
359 return crypto_aead_alg(aead)->decrypt(req); in crypto_aead_decrypt()
/linux-4.4.14/arch/x86/crypto/
Daesni-intel_glue.c794 static int rfc4106_init(struct crypto_aead *aead) in rfc4106_init() argument
797 struct cryptd_aead **ctx = crypto_aead_ctx(aead); in rfc4106_init()
806 crypto_aead_set_reqsize(aead, crypto_aead_reqsize(&cryptd_tfm->base)); in rfc4106_init()
810 static void rfc4106_exit(struct crypto_aead *aead) in rfc4106_exit() argument
812 struct cryptd_aead **ctx = crypto_aead_ctx(aead); in rfc4106_exit()
885 static int common_rfc4106_set_key(struct crypto_aead *aead, const u8 *key, in common_rfc4106_set_key() argument
888 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(aead); in common_rfc4106_set_key()
891 crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN); in common_rfc4106_set_key()
899 return aes_set_key_common(crypto_aead_tfm(aead), in common_rfc4106_set_key()
913 static int common_rfc4106_set_authsize(struct crypto_aead *aead, in common_rfc4106_set_authsize() argument
/linux-4.4.14/include/net/
Dxfrm.h170 struct xfrm_algo_aead *aead; member
1351 struct xfrm_algo_aead_info aead; member