• Home
  • Raw
  • Download

Lines Matching refs:aead

53 static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags, int seqihlen)  in esp_alloc_tmp()  argument
59 len += crypto_aead_ivsize(aead); in esp_alloc_tmp()
62 len += crypto_aead_alignmask(aead) & in esp_alloc_tmp()
67 len += sizeof(struct aead_request) + crypto_aead_reqsize(aead); in esp_alloc_tmp()
80 static inline u8 *esp_tmp_iv(struct crypto_aead *aead, void *tmp, int seqhilen) in esp_tmp_iv() argument
82 return crypto_aead_ivsize(aead) ? in esp_tmp_iv()
84 crypto_aead_alignmask(aead) + 1) : tmp + seqhilen; in esp_tmp_iv()
87 static inline struct aead_request *esp_tmp_req(struct crypto_aead *aead, u8 *iv) in esp_tmp_req() argument
91 req = (void *)PTR_ALIGN(iv + crypto_aead_ivsize(aead), in esp_tmp_req()
93 aead_request_set_tfm(req, aead); in esp_tmp_req()
97 static inline struct scatterlist *esp_req_sg(struct crypto_aead *aead, in esp_req_sg() argument
101 crypto_aead_reqsize(aead), in esp_req_sg()
107 struct crypto_aead *aead = x->data; in esp_ssg_unref() local
116 iv = esp_tmp_iv(aead, tmp, seqhilen); in esp_ssg_unref()
117 req = esp_tmp_req(aead, iv); in esp_ssg_unref()
318 struct crypto_aead *aead; in esp6_output_tail() local
330 aead = x->data; in esp6_output_tail()
331 alen = crypto_aead_authsize(aead); in esp6_output_tail()
332 ivlen = crypto_aead_ivsize(aead); in esp6_output_tail()
334 tmp = esp_alloc_tmp(aead, esp->nfrags + 2, seqhilen); in esp6_output_tail()
339 iv = esp_tmp_iv(aead, tmp, seqhilen); in esp6_output_tail()
340 req = esp_tmp_req(aead, iv); in esp6_output_tail()
341 sg = esp_req_sg(aead, req); in esp6_output_tail()
429 struct crypto_aead *aead; in esp6_output() local
439 aead = x->data; in esp6_output()
440 alen = crypto_aead_authsize(aead); in esp6_output()
451 blksize = ALIGN(crypto_aead_blocksize(aead), 4); in esp6_output()
476 struct crypto_aead *aead = x->data; in esp_remove_trailer() local
483 alen = crypto_aead_authsize(aead); in esp_remove_trailer()
484 hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); in esp_remove_trailer()
523 struct crypto_aead *aead = x->data; in esp6_input_done2() local
524 int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); in esp6_input_done2()
594 struct crypto_aead *aead = x->data; in esp6_input() local
597 int ivlen = crypto_aead_ivsize(aead); in esp6_input()
647 tmp = esp_alloc_tmp(aead, nfrags, seqhilen); in esp6_input()
653 iv = esp_tmp_iv(aead, tmp, seqhilen); in esp6_input()
654 req = esp_tmp_req(aead, iv); in esp6_input()
655 sg = esp_req_sg(aead, req); in esp6_input()
718 struct crypto_aead *aead = x->data; in esp6_destroy() local
720 if (!aead) in esp6_destroy()
723 crypto_free_aead(aead); in esp6_destroy()
729 struct crypto_aead *aead; in esp_init_aead() local
734 x->geniv, x->aead->alg_name) >= CRYPTO_MAX_ALG_NAME) in esp_init_aead()
737 aead = crypto_alloc_aead(aead_name, 0, 0); in esp_init_aead()
738 err = PTR_ERR(aead); in esp_init_aead()
739 if (IS_ERR(aead)) in esp_init_aead()
742 x->data = aead; in esp_init_aead()
744 err = crypto_aead_setkey(aead, x->aead->alg_key, in esp_init_aead()
745 (x->aead->alg_key_len + 7) / 8); in esp_init_aead()
749 err = crypto_aead_setauthsize(aead, x->aead->alg_icv_len / 8); in esp_init_aead()
759 struct crypto_aead *aead; in esp_init_authenc() local
792 aead = crypto_alloc_aead(authenc_name, 0, 0); in esp_init_authenc()
793 err = PTR_ERR(aead); in esp_init_authenc()
794 if (IS_ERR(aead)) in esp_init_authenc()
797 x->data = aead; in esp_init_authenc()
824 crypto_aead_authsize(aead)) { in esp_init_authenc()
827 crypto_aead_authsize(aead), in esp_init_authenc()
833 aead, x->aalg->alg_trunc_len / 8); in esp_init_authenc()
841 err = crypto_aead_setkey(aead, key, keylen); in esp_init_authenc()
852 struct crypto_aead *aead; in esp6_init_state() local
861 if (x->aead) in esp6_init_state()
869 aead = x->data; in esp6_init_state()
872 crypto_aead_ivsize(aead); in esp6_init_state()
887 align = ALIGN(crypto_aead_blocksize(aead), 4); in esp6_init_state()
888 x->props.trailer_len = align + 1 + crypto_aead_authsize(aead); in esp6_init_state()