Skip to content

Commit e4c5459

Browse files
committed
driver: crypto: add NXP S32 CRYPTO HSE driver
Add device tree node for MU instances that will be used by HSE and RTU for s32z270. Add support hash crypto for NXP S32 with Algo 2: SHA224, SHA256, SHA384 and SHA512. Add support cipher crypto with ECB, CBC and CTR mode by using ram key catalog. Add support 128/256 bits ram key length. Signed-off-by: Ha Duong Quang <[email protected]>
1 parent c3f67ab commit e4c5459

File tree

7 files changed

+769
-1
lines changed

7 files changed

+769
-1
lines changed

drivers/crypto/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ zephyr_library_sources_ifdef(CONFIG_CRYPTO_IT8XXX2_SHA_V2 crypto_it8xxx2_sha_v2.
1515
zephyr_library_sources_ifdef(CONFIG_CRYPTO_MCUX_DCP crypto_mcux_dcp.c)
1616
zephyr_library_sources_ifdef(CONFIG_CRYPTO_SI32 crypto_si32.c)
1717
zephyr_library_sources_ifdef(CONFIG_CRYPTO_CC23X0 crypto_cc23x0.c)
18+
zephyr_library_sources_ifdef(CONFIG_CRYPTO_NXP_S32_HSE crypto_nxp_s32_hse.c)
1819
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)

drivers/crypto/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,6 @@ source "drivers/crypto/Kconfig.mcux_dcp"
8585
source "drivers/crypto/Kconfig.si32"
8686
source "drivers/crypto/Kconfig.smartbond"
8787
source "drivers/crypto/Kconfig.cc23x0"
88+
source "drivers/crypto/Kconfig.nxp_s32_hse"
8889

8990
endif # CRYPTO

drivers/crypto/Kconfig.nxp_s32_hse

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
menuconfig CRYPTO_NXP_S32_HSE
5+
bool "NXP S32 HSE crypto driver"
6+
default y
7+
depends on DT_HAS_NXP_S32_CRYPTO_HSE_MU_ENABLED
8+
help
9+
Enable NXP HSE crypto driver.
10+
11+
if CRYPTO_NXP_S32_HSE
12+
13+
config CRYPTO_NXP_S32_HSE_OUTPUT_BUFFER_SIZE
14+
int "The output buffer size for storing the output data of HSE crypto service, measured in bytes."
15+
default 128
16+
help
17+
The output buffer size for storing the output data of HSE crypto service, measured in bytes.
18+
19+
config CRYPTO_NXP_S32_HSE_AES_KEY_SIZE
20+
int "The size of the key used in cryptographic algorithms, measured in bits."
21+
default 128
22+
help
23+
The size of the key used in cryptographic algorithms, measured in bits.
24+
Only support for 128 bits or 256 bits.
25+
26+
config CRYPTO_NXP_S32_HSE_AES_KEY_GROUP_ID
27+
int "The AES Key Group ID within RAM Key Catalog."
28+
range 0 255
29+
default 0
30+
help
31+
The AES Key Group ID within RAM Key Catalog.
32+
33+
endif #CRYPTO_NXP_S32_HSE

0 commit comments

Comments
 (0)