Hello,
I have enabled CAAM driver support for OP-TEE OS and tried to compare the performance of crypto operations within OP-TEE OS with xtest --crypto-perf.
What I find quite surprising is that with CAAM enabled, hash and symmetric crypto performance is lower according to the xtest output. However, speed-up is achieved with ECDSA and RSASSA-PKCS1. Nevertheless, I believe even the ECDSA throughput is too low for a SW implementation.
Can you reproduce or contradict these findings? Am I missing something?
Here are my measurements from the target:
Test | with CAAM | no CAAM |
---|---|---|
xtest --crypto-perf -alg SHA256 | 5 MiB/s | 13,2 MiB/s |
xtest --crypto-perf -alg SHA1 | 5 MiB/s | 13,4 MiB/s |
xtest --crypto-perf -alg AES_CTS | 4,7 MiB/s | 13,3 MiB/s |
xtest --crypto-perf -alg SHA256 -s 100K | 101 MiB/s | 447 MiB/s |
xtest --crypto-perf -alg SHA1 -s 100K | 83 MiB/s | 430 MiB/s |
xtest --crypto-perf -alg AES_CTS -s 100K (encrypt) | 28,5 MiB/s | 485 MiB/s |
xtest --crypto-perf -alg ECDSA_P256 -k 256 -n 10 | 0,0127 MiB/s | 0,000176 MiB/s |
xtest --crypto-perf -alg RSASSA_PKCS1_V1_5_SHA512 -k 2048 -n 10 | 0,23 MiB/s | 0,063 MiB/s |
I don't think these results are very plausible, so I appreciate any insights. Meanwhile I am inspecting configurations and source code to find any clues.
System Information:
Kind Regards,
Matthias
Hello,
"For small payloads, a better performance is achieved when using OPTEE with CFG_IMXCRYPT=n
because CAAM is not enabled in OPTEE.
When CFG_IMXCRYPT=y, CAAM is enabled in OPTEE and the total time increases because the block
is offloaded to CAAM and this time used to offload the data to CAAM adds up to the total time of the operation".
Regards,
Yuri.
Hello,
OP-TEE on i.MX8QXP/QM platform does not support HW cryptography accelerating.
Below are patches to fix the issue.
Enable CAAM accelerating in OP-TEE on i.MX8QXP/QM platform(L4.14.98 GA)
Regards,
Yuri.