Bug 44 - examples/l2fwd-crypto : Wrong data length in case of AEAD ciphers
Summary: examples/l2fwd-crypto : Wrong data length in case of AEAD ciphers
Status: RESOLVED FIXED
Alias: None
Product: DPDK
Classification: Unclassified
Component: examples (show other bugs)
Version: 18.05
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Pablo de Lara
URL:
Depends on:
Blocks:
 
Reported: 2018-05-09 14:43 CEST by ankur
Modified: 2018-07-17 10:14 CEST (History)
2 users (show)



Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.