Dear NXP engineers:
G'Day.
I am working on caam hash performance test on i.MX8 board.
and there is weird result that sha1 performance is lower than sha256's.
As far as i know, the computation of sha256 algorithm is more complicated that sha1's,
so i want to know why sha1 hash time is longer than sha256's.
I know the hash time is depend on the algorithm implementation.
Following is the test result, please help to confirm if it is normal data of test result?
Hash SHA1: 16 Mega byte data takes 94 milliseconds.
----------------------------------------------------
Job ring parameters:
g_job->dsc[0]:b0800007
g_job->dsc[1]:8441000d
g_job->dsc[2]:24540000
g_job->dsc[3]:84ef0a40
g_job->dsc[4]:1000000
g_job->dsc[5]:54200014
g_job->dsc[6]:81edef00
-----------------------------------------------------
Hash SHA256: 16 Mega byte data takes 81 milliseconds.
------------------------------------------------------
Job ring parameters:
g_job->dsc[0]:b0800007
g_job->dsc[1]:8443000d
g_job->dsc[2]:24540000
g_job->dsc[3]:84ef0a40
g_job->dsc[4]:1000000
g_job->dsc[5]:54200020
g_job->dsc[6]:81edef00
-----------------------------------------------------
Looking forward to you reply.
Thanks a bunch.
Hello,
What i.MX8 device / board is used in the case?
Regards,
Yuri.
Hello, Yuri,
I test these cases on i.mx8qxp b0 board with android os.
I use jobring3 in Trustzone to invoke CAAM hash function.
Could you help check my test result?
Thanks a million.
Hello,
which TEE they used to test SHA performance? OP-TEE or Trusty OS?
Regards,
Yuri.
Hello Yuri,
I test the case with Trusty OS.
Thank you.
Hello,
preliminary considerations - it is possible to get SHA256 is faster than SHA1 when using CAAM,
depending on the optimization method of the SHA algorithms.
Regards,
Yuri.
Thanks for checking it,
so when can i get a exact point that SHA256 is faster than SHA1 when using CAAM?
Have a nice day.
Hello,
app team tried the SHA1 and SHA256 in Trusty OS with input data of 4k bytes.
It is shown that SHA256 is faster, than SHA1.
Note: It is recommended to use SHA256 - as it is more secure than SHA1.
Regards,
Yuri.
Got it.
Thank you very much for helping check this issue.
I do appreciate it.
Best wishes.