Skip to content

Commit c697df8

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. Signed-off-by: Ha Duong Quang <ha.duongquang@nxp.com>
1 parent a4542ed commit c697df8

File tree

7 files changed

+767
-1
lines changed

7 files changed

+767
-1
lines changed

drivers/crypto/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ zephyr_library_sources_ifdef(CONFIG_CRYPTO_IT8XXX2_SHA crypto_it8xxx2_sha.c)
1414
zephyr_library_sources_ifdef(CONFIG_CRYPTO_IT8XXX2_SHA_V2 crypto_it8xxx2_sha_v2.c)
1515
zephyr_library_sources_ifdef(CONFIG_CRYPTO_MCUX_DCP crypto_mcux_dcp.c)
1616
zephyr_library_sources_ifdef(CONFIG_CRYPTO_SI32 crypto_si32.c)
17+
zephyr_library_sources_ifdef(CONFIG_CRYPTO_NXP_S32_HSE crypto_nxp_s32_hse.c)
1718
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
@@ -84,5 +84,6 @@ source "drivers/crypto/Kconfig.it8xxx2"
8484
source "drivers/crypto/Kconfig.mcux_dcp"
8585
source "drivers/crypto/Kconfig.si32"
8686
source "drivers/crypto/Kconfig.smartbond"
87+
source "drivers/crypto/Kconfig.nxp_s32_hse"
8788

8889
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 2024 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"
15+
default 128
16+
help
17+
The output buffer size for storing the output data of HSE crypto service.
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)