Intel® QuickAssist Technology (Intel® QAT)
For questions and discussions related to Intel® QuickAssist Technology (Intel® QAT).
41 Discussions

Why algorithm chaining partial requests destination buffer get empty?

Goroyal
Beginner
2,451 Views

I am using QAT20.L.1.0.10-00005 version to perform chaining requests in partial mode. 

I tried to send partial requests with AES256-CBC-SHA256 chaining encryption, the cipher and hash share same start offset and length.
No matter the chain order is cipher-then-hash or hash-then-cipher, there is no data in destination buffer in partial requests except the last partial(src buffer != dst buffer). And no digest generation too.
But if the algorithm is AES256-CBC only, each partial request can return cipher text in destination buffer.

In 330685-qat-api-reference-cryptographic:

When using partial packet processing with algorithm chaining, only the cipher state is maintained between calls.
The hash state is not be maintained between calls. Instead the hash digest will be generated/verified for each call.
If both the cipher state and hash state need to be maintained between calls, algorithm chaining cannot be used.

The document did not mention the empty result will be returned in partial requests. Can anyone explain the behavior of chaining partial requests? Thanks.

Quick Reproduce:
In quickassist/lookaside/access_layer/src/sample_code/functional/sym/alg_chaining_sample/cpa_algchaining_sample.c,
Set pOpData->packetType = CPA_CY_SYM_PACKET_TYPE_PARTIAL at line 206.
In quickassist/lookaside/access_layer/src/sample_code/functional, run “make sym”, and execute “sudo ./build/alg_chaining_sample”

In this sample, it is in-place operation (destination buffer == source buffer). You will find after perform operation, the buffer data is not changed, which is unexpected.

0 Kudos
1 Solution
BrusC_Intel
Employee
2,324 Views

Hello, Goroyal.


Thank you very much for your time and patience while we were working on this.


This particular issue has been successfully reproduced, and it is currently targeted to be fixed in a future release later this year. There is no no specific ETA or version we can provide right now, but it could be in the September-October timeframe.


Please let us know if we can help with anything else, and I will follow up on June 28th just in case.


Regards,


Bruce C.

Intel Customer Support Technician


View solution in original post

0 Kudos
7 Replies
BrusC_Intel
Employee
2,415 Views

Hello, Goroyal.


Good day,


Thank you for posting on the Intel Community Support forums.


Please allow us to review this and I will contact you back as soon as possible.


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
BrusC_Intel
Employee
2,392 Views

Hello, Goroyal.


Thank you for waiting.


There are some additional details we would like to obtain, please let us know the following:


  1. Besides the edits to the line 206 of the cpa_algchaining_sample.c file, are you doing any other changes to the sample application?
  2. What's the output of the sample application when running with the default 206 line and after changing it?
  3. Are you running the sample code (even with or without changing the line 206) with the default cipher and hash algorithms? The sample code uses CPA_CY_SYM_CIPHER_AES_CBC for the cipher algorithm and CPA_CY_SYM_HASH_SHA256 for the hash algorithm. If you are changing them, which ones are you using?
  4. Can you test it using the latest QAT driver package 1.0.40-00004?
    1. Download site: https://www.intel.com/content/www/us/en/download/765501/intel-quickassist-technology-driver-for-linux-hw-version-2-0.html


I will follow up on June 16th in case you need additional time.


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
Goroyal
Beginner
2,384 Views

Thanks for the reply!

1. I did no other changes except the change CPA_CY_SYM_PACKET_TYPE_FULL to CPA_CY_SYM_PACKET_TYPE_PARTIAL.

2. After the change, the output is: when cpaCySymPerformOp is done and COMPLETION_WAIT successfully. The pSrcBuffer result is the same with sampleAlgChainingSrc, this behavior means no output override original input as it is in-place operation.

3. Yes, I run with CPA_CY_SYM_CIPHER_AES_CBC and CPA_CY_SYM_HASH_SHA256 in the alg_chaining_sample for quick reproduce.

4. I downloaded the QAT20.L.1.0.40-00004.tar.gz and compared the files with QAT20.L.1.0.10-00005.tar.gz. The major change is about adf_ae_fw_integr_test, I don't think the result will be different. This is the hardware problem.

0 Kudos
BrusC_Intel
Employee
2,362 Views

Hello, Goroyal.


Thank you for the details.


I will get back to you as soon as possible.


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
BrusC_Intel
Employee
2,325 Views

Hello, Goroyal.


Thank you very much for your time and patience while we were working on this.


This particular issue has been successfully reproduced, and it is currently targeted to be fixed in a future release later this year. There is no no specific ETA or version we can provide right now, but it could be in the September-October timeframe.


Please let us know if we can help with anything else, and I will follow up on June 28th just in case.


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
BrusC_Intel
Employee
2,286 Views

Hello, Goroyal.


This post is just to follow up on this ticket in case we can help you with anything else.


The thread will be closed on July 3rd after a final follow up if there is no confirmation


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
BrusC_Intel
Employee
2,239 Views

Hello, Goroyal.


This post is to inform you about the thread closure.


I previously wanted to confirm if you had any additional questions since this particular issue has been successfully reproduced, and it is currently targeted to be fixed in a future release later this year, but there was no response after trying to follow up.


We really hope this works for you, but please feel free to contact us back if anything else is needed.


The thread will be closed right now, and it will no longer be monitored by Intel support, but if you require any type of assistance from Intel in the future, just open a new thread, or contact us using any of the available support methods.


Regards,


Bruce C.

Intel Customer Support Technician


0 Kudos
Reply