Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hardware-based security support for the i.MX series chips. #38050

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

github-sunxc
Copy link

@github-sunxc github-sunxc commented Mar 18, 2025

Compared to software-based security systems, the hardware-based security modules supported by the i.MX series chips offer faster performance and superior security capabilities.
The NXP i.MX8M chip support Trusty TEE, and the NXP i.MX93 chips support ELE (EdgeLock Enclave). This pull request provides the driver code for Trusty TEE and ELE.
And it implements a portion of hardware-based security APIs.
For more information about Trusty TEE and ELE, please refer the website listed below:
https://source.android.com/docs/security/features/trusty
https://www.nxp.com/design/design-center/training/TIP-EEE-ADVANCEMENTS-IN-INTEGRATED-SOC-SECURITY

Testing

Testing passed on i.MX8M and i.MX93 platforms.
Successfully pairing between chip-tool and chip-lighting-app.

luoji-nxp and others added 7 commits March 18, 2025 09:30
the libtrustymatter third-party lib contains the Trusty IPC
infrastructure and client application in the Non-secure side.

Change-Id: Id2cb5ccc0006d9f51cab06ed971174a94aa0111f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/21249
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23003
read all device attestation credentials from secure storage which
is managed by TEE (Trusty OS), all credentials should be provisioned
in bootloader stage.

Change-Id: I59f144b92c3dfde2ab167d9f0f7f62508ed47354
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/21250
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23004
move the p256keypair operations to Trusty OS to enhance
the crypto security.

Change-Id: I47ec6b440f91adf3e717ed8915f35b7844731c90
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/21251
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23005
support trusty backed persistent storage operation keystore.

Change-Id: I156c51bc415b1e9fb16e054deccb34415a7acc86
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/21252
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23007
Now the build script are refined to use parameter for different option:
Usage:./scripts/examples/imxlinux_example.sh -s|--src <src folder>
-o|--out <out folder> [-d|--debug] [-n|--no-init] [-t|--trusty]
        -s, --src       Source folder
        -o, --out       Output folder
        -d, --debug     Debug build (optional)
        -n, --no-init   No init mode (optional)
        -t, --trusty    Build with Trusty OS backed security enhancement (optional)

example: ./scripts/examples/imxlinux_example.sh -s examples/chip-tool
-o out -dnt  #will build examples/chip-tool to out/ folder with debug
build and skip init and use Trusty OS.

Change-Id: I3ac3b60395255b3bfe45fdf21184ba0b6c7ba265
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/21564
Reviewed-by: Faqiang Zhu <faqiang.zhu@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23009
Support the ELE (EdgeLock Enclave) backed persistent storage
operation keystore.

It's availble for i.MX 93 only.

Change-Id: Id9e624040c57f80d9cc84511cf9a28c01084a60d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/22450
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23010
Support device attestation based on EdgeLock Enclave(ELE).
Attestation certifications and keys should be provisioned
into device in advance.

The official tool to provide signed content is not ready, so
we disable the device attestation feature based on ELE first.

It's currently only supported by i.MX 93 platform.

Change-Id: I39c79efa17a99266113e2bf28204d0c23b81af1d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-on: http://androidsource.nxp.com/project/23345
Reviewed-by: Elven Wang <elven.wang@nxp.com>
Copy link

github-actions bot commented Mar 18, 2025

PR #38050: Size comparison from 52d8e11 to ab42e1f

Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 52d8e11 ab42e1f change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1098418 1098418 0 0.0
RAM 94866 94866 0 0.0
bl702 lighting-app bl702+eth FLASH 653332 653332 0 0.0
RAM 33533 33533 0 0.0
bl702+wifi FLASH 830604 830604 0 0.0
RAM 22257 22257 0 0.0
bl706+mfd+rpc+littlefs FLASH 1063062 1063062 0 0.0
RAM 32181 32181 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 893844 893844 0 0.0
RAM 26920 26920 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 976740 976740 0 0.0
RAM 24668 24668 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 818472 818472 0 0.0
RAM 120296 120296 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 827384 827384 0 0.0
RAM 125392 125392 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 774244 774244 0 0.0
RAM 113764 113764 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 758528 758528 0 0.0
RAM 113972 113972 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 541934 541934 0 0.0
RAM 205152 205152 0 0.0
lock CC3235SF_LAUNCHXL FLASH 576034 576034 0 0.0
RAM 205400 205400 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 660069 660069 0 0.0
RAM 75436 75436 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 679929 679929 0 0.0
RAM 78076 78076 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 679929 679929 0 0.0
RAM 78076 78076 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 636853 636853 0 0.0
RAM 70504 70504 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 620309 620309 0 0.0
RAM 71676 71676 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 639953 639953 0 0.0
RAM 74220 74220 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 639953 639953 0 0.0
RAM 74220 74220 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 639805 639805 0 0.0
RAM 74684 74684 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 659521 659521 0 0.0
RAM 77228 77228 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 659521 659521 0 0.0
RAM 77228 77228 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616145 616145 0 0.0
RAM 68772 68772 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636005 636005 0 0.0
RAM 71412 71412 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636005 636005 0 0.0
RAM 71412 71412 0 0.0
efr32 lock-app BRD4187C FLASH 941024 941024 0 0.0
RAM 159944 159944 0 0.0
BRD4338a FLASH 734504 734504 0 0.0
RAM 234844 234844 0 0.0
window-app BRD4187C FLASH 1033400 1033392 -8 -0.0
RAM 128048 128048 0 0.0
esp32 all-clusters-app c3devkit DRAM 103376 103376 0 0.0
FLASH 1785220 1785220 0 0.0
IRAM 83846 83846 0 0.0
m5stack DRAM 121964 121964 0 0.0
FLASH 1751742 1751742 0 0.0
IRAM 117043 117043 0 0.0
linux air-purifier-app debug unknown 4752 4752 0 0.0
FLASH 2659329 2659329 0 0.0
RAM 112304 112304 0 0.0
all-clusters-app debug unknown 5584 5584 0 0.0
FLASH 6124422 6124422 0 0.0
RAM 517552 517552 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5317372 5317372 0 0.0
RAM 222680 222680 0 0.0
bridge-app debug unknown 5472 5472 0 0.0
FLASH 4631156 4631156 0 0.0
RAM 201000 201000 0 0.0
camera-app debug unknown 5456 5456 0 0.0
FLASH 4693690 4693690 0 0.0
RAM 196448 196448 0 0.0
camera-controller debug unknown 5776 5776 0 0.0
FLASH 11345651 11345651 0 0.0
RAM 597312 597312 0 0.0
chip-tool debug unknown 6112 6112 0 0.0
FLASH 13365709 13365709 0 0.0
RAM 605952 605952 0 0.0
chip-tool-ipv6only arm64 unknown 22120 22120 0 0.0
FLASH 11551528 11551528 0 0.0
RAM 658632 658632 0 0.0
fabric-admin debug unknown 5800 5800 0 0.0
FLASH 11636901 11636901 0 0.0
RAM 605736 605736 0 0.0
fabric-bridge-app debug unknown 4720 4720 0 0.0
FLASH 4462112 4462112 0 0.0
RAM 188200 188200 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5579237 5579237 0 0.0
RAM 471968 471968 0 0.0
lighting-app debug+rpc+ui unknown 6192 6192 0 0.0
FLASH 5525761 5525761 0 0.0
RAM 205200 205200 0 0.0
lock-app debug unknown 5424 5424 0 0.0
FLASH 4697900 4697900 0 0.0
RAM 192360 192360 0 0.0
ota-provider-app debug unknown 4760 4760 0 0.0
FLASH 4320110 4320110 0 0.0
RAM 181016 181016 0 0.0
ota-requestor-app debug unknown 4712 4712 0 0.0
FLASH 4450466 4450466 0 0.0
RAM 185504 185504 0 0.0
shell debug unknown 4240 4240 0 0.0
FLASH 2957900 2957900 0 0.0
RAM 145680 145680 0 0.0
thermostat-no-ble arm64 unknown 9456 9456 0 0.0
FLASH 4146936 4146936 0 0.0
RAM 229848 229848 0 0.0
tv-app debug unknown 5752 5752 0 0.0
FLASH 5918085 5918085 0 0.0
RAM 595400 595400 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11538413 11538413 0 0.0
RAM 721744 721744 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916332 916332 0 0.0
RAM 167463 167463 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 909200 909200 0 0.0
RAM 145707 145707 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 852812 852812 0 0.0
RAM 141243 141243 0 0.0
nxp contact k32w0+release FLASH 588480 588480 0 0.0
RAM 71004 71004 0 0.0
mcxw71+release FLASH 603704 603704 0 0.0
RAM 63144 63144 0 0.0
light k32w0+release FLASH 614292 614292 0 0.0
RAM 70292 70292 0 0.0
k32w1+release FLASH 687888 687888 0 0.0
RAM 72056 72056 0 0.0
lock mcxw71+release FLASH 752664 752664 0 0.0
RAM 67556 67556 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1661836 1661836 0 0.0
RAM 212352 212352 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1565796 1565796 0 0.0
RAM 208560 208560 0 0.0
light cy8ckit_062s2_43012 FLASH 1442548 1442548 0 0.0
RAM 197320 197320 0 0.0
lock cy8ckit_062s2_43012 FLASH 1471444 1471444 0 0.0
RAM 224984 224984 0 0.0
qpg lighting-app qpg6105+debug FLASH 665084 665084 0 0.0
RAM 105180 105180 0 0.0
lock-app qpg6105+debug FLASH 623536 623536 0 0.0
RAM 99792 99792 0 0.0
stm32 light STM32WB5MM-DK FLASH 461056 461056 0 0.0
RAM 141496 141496 0 0.0
telink bridge-app tl7218x FLASH 665848 665848 0 0.0
RAM 90712 90712 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 623428 623428 0 0.0
RAM 31488 31488 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 762206 762206 0 0.0
RAM 40420 40420 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 755314 755314 0 0.0
RAM 97540 97540 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 682364 682364 0 0.0
RAM 52192 52192 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710922 710922 0 0.0
RAM 73400 73400 0 0.0
light-switch-app-ota-shell-factory-data tl3218x_retention FLASH 703472 703472 0 0.0
RAM 37664 37664 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603042 603042 0 0.0
RAM 138640 138640 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 790380 790380 0 0.0
RAM 96388 96388 0 0.0
tizen all-clusters-app arm unknown 5152 5152 0 0.0
FLASH 1783584 1783584 0 0.0
RAM 94320 94320 0 0.0
chip-tool-ubsan arm unknown 11560 11560 0 0.0
FLASH 19092918 19092918 0 0.0
RAM 8355044 8355044 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants