From 0fcc1c76d1acaa68a0675f0baa0e5d9a25908bae Mon Sep 17 00:00:00 2001 From: Loic Poulain Date: Wed, 1 Jun 2022 20:26:31 +0200 Subject: armv8 SHA-256 using ARMv8 Crypto Extensions This patch adds support for the SHA-256 Secure Hash Algorithm for CPUs that have support for the SHA-256 part of the ARM v8 Crypto Extensions. It greatly improves sha-256 based operations, about 17x faster on iMX8M evk board. ~12ms vs ~208ms for a 20MiB kernel sha-256 verification. asm implementation is a simplified version of the Linux version (from Ard Biesheuvel). Signed-off-by: Loic Poulain --- arch/arm/cpu/armv8/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/cpu/armv8/Kconfig') diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index 1768e67..72d12b4 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -194,6 +194,10 @@ config ARMV8_CE_SHA1 bool "SHA-1 digest algorithm (ARMv8 Crypto Extensions)" default y if SHA1 +config ARMV8_CE_SHA256 + bool "SHA-256 digest algorithm (ARMv8 Crypto Extensions)" + default y if SHA256 + endif endif -- cgit v1.1