Bug 44

Summary: examples/l2fwd-crypto : Wrong data length in case of AEAD ciphers
Product: DPDK Reporter: ankur (ankur.dwivedi)
Component: examplesAssignee: Pablo de Lara (pablo.de.lara.guarch)
Status: RESOLVED FIXED    
Severity: normal CC: ajit.khaparde, declan.doherty
Priority: Normal    
Version: 18.05   
Target Milestone: ---   
Hardware: All   
OS: All   

Description ankur 2018-05-09 14:43:52 CEST
In l2fwd-crypto application, file main.c , the digest length is not getting decremented for AEAD ciphers.

Line 410:
 if (cparams->do_hash && cparams->hash_verify)
		data_len -= cparams->digest_length;

I think this results in wrong values assignment in line 517
 op->sym->aead.data.length = data_len;

and wrong digest data pointer assignment in line 524

  op->sym->aead.digest.data = rte_pktmbuf_mtod(m,
				uint8_t *) + ipdata_offset + data_len;
Comment 1 ankur 2018-05-09 14:49:20 CEST
The above issue was seen on the decryption side with aes-gcm cipher.
Comment 2 Ajit Khaparde 2018-07-13 19:09:44 CEST
Ankur,
Is this still an issue?

Pablo,
Can you please take this to closure?

Thanks
Ajit
Comment 3 ankur 2018-07-16 13:15:23 CEST
(In reply to Ajit Khaparde from comment #2)
> Ankur,
> Is this still an issue?
> 
> Pablo,
> Can you please take this to closure?
> 
> Thanks
> Ajit

Hi Ajit,

Yes this is still an issue with aes-gcm cipher in the case of decryption/verify.
Comment 4 Pablo de Lara 2018-07-16 15:26:13 CEST
Will take a look at this shortly.
Comment 5 Pablo de Lara 2018-07-17 10:12:23 CEST
Patch sent and verified by Ankur.
Comment 6 Pablo de Lara 2018-07-17 10:14:49 CEST
Patch applied in dpdk-next-crypto.