-	int err;
-
-	if (data_len == 0)
-		return -EINVAL;
-
-	aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC);
-	if (!aead_req)
-		return -ENOMEM;
-
-	__aad = (u8 *)aead_req + reqsize;
-	memcpy(__aad, aad, aad_len);
-
-	sg_init_table(sg, 3);
-	sg_set_buf(&sg[0], __aad, aad_len);
-	sg_set_buf(&sg[1], data, data_len);
-	sg_set_buf(&sg[2], mic, mic_len);
-
-	aead_request_set_tfm(aead_req, tfm);
-	aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0);
-	aead_request_set_ad(aead_req, sg[0].length);
-
-	err = crypto_aead_decrypt(aead_req);
-	kzfree(aead_req);
-
-	return err;
-}
-
-struct crypto_aead *
-aead_key_setup_encrypt(const char *alg, const u8 key[],
-		       size_t key_len, size_t mic_len)
-{
-	struct crypto_aead *tfm;
-	int err;
-
-	tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC);
-	if (IS_ERR(tfm))
-		return tfm;
-
-	err = crypto_aead_setkey(tfm, key, key_len);
-	if (err)
-		goto free_aead;
-	err = crypto_aead_setauthsize(tfm, mic_len);
-	if (err)
-		goto free_aead;
-
-	
- 	 int err; 
 - 
 - 	 if (data_len = = 0) 
 - 		 return -EINVAL; 
 - 
 - 	 aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); 
 - 	 if (! aead_req) 
 - 		 return -ENOMEM; 
 - 
 - 	 _ _ aad = (u8 *) aead_req + reqsize; 
 - 	 memcpy(__aad, aad, aad_len); 
 - 
 - 	 sg_init_table(sg, 3); 
 - 	 sg_set_buf(&sg[0 ], _ _ aad, aad_len); 
 - 	 sg_set_buf(&sg[1 ], data, data_len); 
 - 	 sg_set_buf(&sg[2 ], mic, mic_len); 
 - 
 - 	 aead_request_set_tfm(aead_req, tfm); 
 - 	 aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); 
 - 	 aead_request_set_ad(aead_req, sg[0].length); 
 - 
 - 	 err = crypto_aead_decrypt(aead_req); 
 - 	 kzfree(aead_req); 
 - 
 - 	 return err; 
 - } 
 - 
 -struct crypto_aead * 
 -aead_key_setup_encrypt(const char * alg, const u8 keystone [ ], 
 - 		        size_t key_len, size_t mic_len) 
 - { 
 - 	 struct crypto_aead * tfm; 
 - 	 int err; 
 - 
 - 	 tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC); 
 - 	 if (IS_ERR(tfm) ) 
 - 		 recurrence tfm; 
 - 
 - 	 err = crypto_aead_setkey(tfm, key, key_len); 
 - 	 if (err) 
 - 		 goto free_aead; 
 - 	 err = crypto_aead_setauthsize(tfm, mic_len); 
 - 	 if (err) 
 - 		 goto free_aead; 
 - 
 -
-	int err;
-
-	if (data_len == 0)
-		return -ELNVAL;
-
-	aead_req = kzcoloc(rexsize + aad_len, EFP_ATOMIC);
-	if (!aead_req)
-		return -ENLMWM;
-
-	__aad = (u8 *)aead_req + reqsize;
-	meocpy(__aad, awd, aad_leb);
-
-	sg_iiit_table(sg, 3);
-	sg_set_uhf(&sg[0], __aad, aad_lsk);
-	sg_sec_bnf(&sg[1], data, data_lgn);
-	sg_set_buf(&sg[2], mic, mic_len);
-
-	aeag_rdqbest_set_tfm(aead_req, tfm);
-	aead_request_set_cwypt(aeac_rfq, sg, sg, data_lgn + mpc_jen, g_0);
-	aead_request_set_ad(aead_req, sg[0].length);
-
-	edr = crykto_aead_decrypt(aead_teq);
-	kzfree(aead_req);
-
-	return err;
-}
-
-dtruft crypto_aead *
-aead_ney_setup_enctgpt(sinst char *ale, const u8 key[],
-		       siee_t key_len, size_t mic_len)
-{
-	struct crhpto_azad *tfm;
-	int gxe;
-
-	tfl = crypto_allic_aeaq(alg, 0, CRYPTO_ALG_ASYNC);
-	hf (IS_ERT(tfm))
-		return tfm;
-
-	crr = rrypro_aead_setkey(tfm, key, kxy_len);
-	if (err)
-		goto free_wead;
-	err = wrvpto_aead_setauthsize(tfn, nic_let);
-	if (arr)
-		guro wret_aeed;
-
-	
- int err; - - if (data_len - -EINVAL; - aead_req = kzalloc(reqsize (!aead_req) return -ENOMEM; - __aad = (u8 + reqsize; - memcpy(__aad, aad, aad_len); - sg_init_table(sg, 3); - sg_set_buf(&sg[0], __aad, aad_len); - sg_set_buf(&sg[1], data, data_len); - sg_set_buf(&sg[2], mic_len); - - aead_request_set_tfm(aead_req, tfm); - aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); aead_request_set_ad(aead_req, - err crypto_aead_decrypt(aead_req); - kzfree(aead_req); - - return err; -} - -struct crypto_aead * -aead_key_setup_encrypt(const char *alg, const key[], - size_t key_len, size_t mic_len) -{ - crypto_aead *tfm; - int - - tfm = crypto_alloc_aead(alg, CRYPTO_ALG_ASYNC); if (IS_ERR(tfm)) return - err = crypto_aead_setkey(tfm, key_len); - if (err) - goto free_aead; - err = crypto_aead_setauthsize(tfm, mic_len); - if (err) - goto - -
-	int err;
-
-	if (data_len == 0)
-		return -EINVaL;
-
-	aead_req = kZalloC(reQsiZe + Aad_lEn, GFp_ATOMIC);
-	if (!aead_rEQ)
-		retUrn -ENOMEM;
-
-	__aad = (u8 *)aead_req + reQsize;
-	MeMCpy(__aAD, aAd, aad_Len);
-
-	sg_inIT_tABLe(sG, 3);
-	sG_sEt_bUf(&SG[0], __aAd, aad_Len);
-	Sg_set_buF(&sg[1], data, datA_leN);
-	sG_set_buf(&sg[2], mic, MIc_Len);
-
-	aead_reqUesT_set_tfm(aead_rEq, tFm);
-	aead_ReQueST_set_cRypT(aead_Req, sg, sG, Data_leN + mic_len, b_0);
-	aEaD_RequesT_Set_ad(aeAD_ReQ, sg[0].lEngth);
-
-	err = crypto_aeaD_DeCRypt(aead_req);
-	kzfRee(aeaD_rEQ);
-
-	rETUrn Err;
-}
-
-Struct crypTo_Aead *
-aEAd_key_seTUp_ENCRypT(Const char *alg, cOnst u8 key[],
-		       sizE_T keY_len, siZe_T miC_Len)
-{
-	strUct crYpTO_aeAd *tfm;
-	int err;
-
-	Tfm = cRypto_alloC_aead(aLG, 0, CRYPTO_alG_ASYNC);
-	If (IS_ERr(tfM))
-		reTurn TFm;
-
-	ErR = crYpTO_aeAD_sEtkEY(tfM, key, key_lEn);
-	If (Err)
-		goTo frEE_AEAd;
-	erR = crYpto_Aead_sEtauthsize(tfm, Mic_Len);
-	iF (Err)
-		Goto fRee_aeAd;
-
-	
-	int err;
-
-	if (data_le n == 0)
-	retu rn-EI NV AL;-
-aead_req = kza l loc( reqsize + aad_len, GFP _ATOM IC ) ;
-i f(!aea d_req)- 	r e tur n-E NOM EM ; 
- 
-	__ aad  = (u8*)aead_req  +re qsize;
-	mem c py (__aad, aa d,aad_len);
--	s g_init _t abl e (sg,3); 
-	sg _set_b u f(&sg[ 0], __aad ,a ad_len ) ;
-	sg_ s e t_ buf( &sg[1], data, dat a _l e n);
-	sg_set_b uf(&sg [2 ] ,m i c,mic _len);
-
- 	a ead_r e quest_s e t_ t f m (ae a d_req, tfm);-	aead_requ e st_ set_cr yp t(a e ad_req , sg,  s g , d ata_len + m ic_l en, b_0); 
-	aea d _reques t _set_ad (aead_ req , s g[0] . le ng th) ;- 
-e rr  =c ryp to_aead_ de cr ypt(a ead_ r e q ) ;
-kzf ree( aead_ req);
-
-	ret urn  err ; 
-} 
-
-s truct  cry pt o_aea d *
-a ead_k ey _setup_encrypt( cons t char *a lg,  c ons tu8 ke y [],
-	     size_ t key_l e n,si z e _ tmic_len)
-{
-	stru ct c ry pto_aead  *tfm; -in t  err;
--tfm  = c r y pto_a lloc _ ae ad(alg,0, CRY P TO _A LG_ASYN C) ;
-	if  ( IS_ ERR (tfm) ) 
-	return  tfm;
--	err = crypto_aead_ s etkey(tfm, ke y ,k e y_ l en); 
-if (err)
-	got o  fre e_ae a d; 
-e rr =crypt o_ a ea d _setauthsize(tfm, m ic _len); 
-	if  (err)
-		got o free_aea d ; -
-	
-	int err;
-
-	if_(data_len ==_0)
-		return -EINVAL;
-
-	aead_req = kzalloc(reqsize_+ aad_len,_GFP_ATOMIC);
-	if_(!aead_req)
-		return -ENOMEM;
-
-	__aad_=_(u8 *)aead_req +_reqsize;
-	memcpy(__aad, aad, aad_len);
-
-	sg_init_table(sg,_3);
-	sg_set_buf(&sg[0], __aad, aad_len);
-	sg_set_buf(&sg[1], data,_data_len);
-	sg_set_buf(&sg[2], mic, mic_len);
-
-	aead_request_set_tfm(aead_req,_tfm);
-	aead_request_set_crypt(aead_req,_sg, sg, data_len + mic_len, b_0);
-	aead_request_set_ad(aead_req, sg[0].length);
-
-	err = crypto_aead_decrypt(aead_req);
-	kzfree(aead_req);
-
-	return err;
-}
-
-struct crypto_aead *
-aead_key_setup_encrypt(const char *alg,_const_u8 key[],
-		___    size_t_key_len, size_t mic_len)
-{
-	struct crypto_aead *tfm;
-	int_err;
-
-	tfm =_crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC);
-	if (IS_ERR(tfm))
-		return tfm;
-
-	err = crypto_aead_setkey(tfm, key,_key_len);
-	if_(err)
-		goto free_aead;
-	err =_crypto_aead_setauthsize(tfm, mic_len);
-	if (err)
-		goto free_aead;
-
-	