From 289905ac1fc51ed3718a43d08165568eb339a6bf Mon Sep 17 00:00:00 2001 From: Shiva Tripathi Date: Wed, 15 Jul 2026 16:51:14 +0530 Subject: [PATCH] feat(linux): Add crypto implementation options guide Add documentation on crypto implementation options including hardware crypto accelerators and ARM-based crypto extensions, and the trade-offs of using them. Signed-off-by: Shiva Tripathi --- .../AM62LX/linux/Linux_Performance_Guide.rst | 1 + .../AM62PX/linux/Linux_Performance_Guide.rst | 1 + .../AM62X/linux/Linux_Performance_Guide.rst | 1 + .../AM64X/linux/Linux_Performance_Guide.rst | 2 ++ .../Kernel/Kernel_Drivers/Crypto/DTHEv2.rst | 35 +++++++++++++++++++ .../Kernel_Drivers/Crypto/SA2UL_OMAP.rst | 33 +++++++++++++++++ 6 files changed, 73 insertions(+) diff --git a/source/devices/AM62LX/linux/Linux_Performance_Guide.rst b/source/devices/AM62LX/linux/Linux_Performance_Guide.rst index 647c1df85..0ff037a1a 100644 --- a/source/devices/AM62LX/linux/Linux_Performance_Guide.rst +++ b/source/devices/AM62LX/linux/Linux_Performance_Guide.rst @@ -779,6 +779,7 @@ benchmark test. time -v openssl speed -elapsed -evp aes-128-cbc +.. _crypto-performance: Crypto Performance Comparison ----------------------------- diff --git a/source/devices/AM62PX/linux/Linux_Performance_Guide.rst b/source/devices/AM62PX/linux/Linux_Performance_Guide.rst index 8965f23a3..7d103d649 100644 --- a/source/devices/AM62PX/linux/Linux_Performance_Guide.rst +++ b/source/devices/AM62PX/linux/Linux_Performance_Guide.rst @@ -797,6 +797,7 @@ Listed for each algorithm are the code snippets used to run each time -v openssl speed -elapsed -evp aes-128-cbc +.. _crypto-performance: Crypto Performance Comparison ----------------------------- diff --git a/source/devices/AM62X/linux/Linux_Performance_Guide.rst b/source/devices/AM62X/linux/Linux_Performance_Guide.rst index 1ae273ebb..46f7443f2 100644 --- a/source/devices/AM62X/linux/Linux_Performance_Guide.rst +++ b/source/devices/AM62X/linux/Linux_Performance_Guide.rst @@ -923,6 +923,7 @@ Listed for each algorithm are the code snippets used to run each time -v openssl speed -elapsed -evp aes-128-cbc +.. _crypto-performance: Crypto Performance Comparison ----------------------------- diff --git a/source/devices/AM64X/linux/Linux_Performance_Guide.rst b/source/devices/AM64X/linux/Linux_Performance_Guide.rst index 07906db1d..a3e368da5 100644 --- a/source/devices/AM64X/linux/Linux_Performance_Guide.rst +++ b/source/devices/AM64X/linux/Linux_Performance_Guide.rst @@ -43,6 +43,8 @@ System Benchmarks CRYPTO ====== +.. _crypto-performance: + Crypto Performance Comparison ----------------------------- diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/DTHEv2.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/DTHEv2.rst index 44c8ae259..3c6cb0e71 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/DTHEv2.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/DTHEv2.rst @@ -23,6 +23,41 @@ devices: Hashing - MD5, SHA224, SHA256, SHA384, SHA512 Message Authentication - HMAC(MD5), HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512) + +***************************** +Crypto Implementation Options +***************************** + +Users can implement cryptographic operations using two different approaches: + +**1. Hardware Accelerator (DTHEv2)** + - Offloads crypto operations to dedicated hardware engine + - Frees up CPU cycles for other tasks + - In general lower throughput but optimized for multi-tasking systems + +**2. ARM CPU with Cryptographic Extension (ARM CE)** + - Uses ARM processor's built-in cryptographic hardware support + - Delivers higher throughput (faster than hardware accelerator) + - Might require high CPU utilization + +Choosing the Right Implementation +================================== + +**Use Hardware Accelerator (DTHEv2) when:** + +- **Multi-tasking systems** - system runs computation heavy services that need CPU resources alongside crypto operations +- **Functional safety/security requirements** - ASIL or safety-critical applications require offloading crypto operations away from Linux kernel to reduce attack surface and ensure isolation +- **Compliance/regulatory requirements** - FIPS certification, Common Criteria, or TEE integration mandates hardware acceleration + +**Use ARM CPU (CE) when:** + +- **Maximum throughput required** - Need high throughput for bulk data encryption, video transcoding, or media processing +- **Dedicated crypto workload** - Crypto is the primary task and high CPU utilization is acceptable +- **Small/infrequent operations** - One-time encryption with small data blocks where accelerator overhead is minimal + +**Performance Comparison** : For a detailed comparison of DTHEv2 accelerator performance against ARM Cryptographic Extension (CE) and baseline ARM CPU, see :ref:`crypto-performance` in the Linux Performance Guide. + + ******************** Building the Drivers ******************** diff --git a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst index f8d5f717a..6e75568ae 100644 --- a/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst +++ b/source/linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP.rst @@ -72,6 +72,39 @@ The following is a list of supported hardware accelerated algorithms: - SHA256, SHA512 - CMAC(AES) +***************************** +Crypto Implementation Options +***************************** + +Users can implement cryptographic operations using two different approaches: + +**1. Hardware Accelerator** + - Offloads crypto operations to dedicated hardware engine + - Frees up CPU cycles for other tasks + - In general lower throughput but optimized for multi-tasking systems + +**2. ARM CPU with Cryptographic Extension (ARM CE)** + - Uses ARM processor's built-in cryptographic hardware support + - Delivers higher throughput (faster than hardware accelerator) + - Might require high CPU utilization + +Choosing the Right Implementation +================================== + +**Use Hardware Accelerator when:** + +- **Multi-tasking systems** - system runs computation heavy services that need CPU resources alongside crypto operations +- **Functional safety/security requirements** - ASIL or safety-critical applications require offloading crypto operations away from Linux kernel to reduce attack surface and ensure isolation +- **Compliance/regulatory requirements** - FIPS certification, Common Criteria, or TEE integration mandates hardware acceleration + +**Use ARM CPU (CE) when:** + +- **Maximum throughput required** - Need high throughput for bulk data encryption, video transcoding, or media processing +- **Dedicated crypto workload** - Crypto is the primary task and high CPU utilization is acceptable +- **Small/infrequent operations** - One-time encryption with small data blocks where accelerator overhead is minimal + +**Performance Comparison** : For a detailed comparison of hardware accelerator performance against ARM Cryptographic Extension (CE) and baseline ARM CPU, see :ref:`crypto-performance` in the Linux Performance Guide. + ******************** Building the Drivers ********************