AISEC protected-directory container#
The AISEC protected-directory container (dir-v5) packs a directory of AI/ML model
files (weights, configuration, tokenizers, …) into a single binary that is authenticated
and optionally encrypted by a model master key (MMK). The container is consumed on the
device by the AISEC model loader, which verifies it with the help of the EdgeLock Secure
Enclave (ELE), OP-TEE or a software backend.
Supported families are i.MX93 (mimx9352 and its aliases) and i.MX95 (mimx9596
and its aliases). Both use the same AISEC dir-v5 format, not an AHAB image container.
The device must provide a compatible AISEC loader and the selected backend.
nxpimage generates the host-buildable provisioning containers:
discrete (flag
0x12) – the MMK is provisioned to the device separately, the container refers to it only by itsmmk_id.integrated (flag
0x11) – the container carries an MMK provisioning blob (mmk_block) prepared by the provisioning flow.
The sealed on-device container (flag 0x91) is created by the device; nxpimage can
parse and verify it, but it cannot be generated or converted back to a configuration.
Every member is protected with one of the protection levels:
enc_auth– AES-CTR encrypted and AES-CMAC authenticated,auth_only– stored in plaintext and AES-CMAC authenticated,none– stored in plaintext without any protection. It is refused for the load-influencing members (weights, model configuration, tokenizers, manifests).
The encryption and authentication keys are derived from the MMK (SP 800-108 CMAC or HKDF SHA-256), optionally bound to the device by the SRK hash (SRKH). The container header is authenticated by an AES-CMAC computed over the descriptor and the metadata, every member block and every member is authenticated by its own MAC.
Note
The MMK is a secret. It is required to build a container and to decrypt the
encrypted members; it is never stored in the container nor in the configuration created
by the parse command.
Generation of the container
Get a configuration template, fill it in and export the container:
nxpimage aisec get-template -f mimx9596 -o aisec_config.yaml
nxpimage aisec export -c aisec_config.yaml
For i.MX93, use -f mimx9352 instead.
Secure-boot binding on i.MX93 and i.MX95
keys/srkh (and the --srkh option of parse and verify) always accepts
exactly 32 bytes, matching the binding root reported by the device backend.
The secure-boot hash must be calculated for the actual family and silicon revision:
i.MX93, AHAB v1: use the complete 32-byte SHA-256 hash of the AHAB v1 SRK table.
i.MX95 B0, AHAB v2: use the first 32 bytes of the 64-byte SHA-512 SRK table hash. i.MX95 A0/A1 uses AHAB v1 instead.
The AHAB v1 and v2 SRK tables have different representations, so using the same public keys does not produce the same binding root. Do not calculate an i.MX93 binding root using the i.MX95 B0 family/revision, or pad the i.MX93 hash to 64 bytes. AISEC performs the additional SHA-256 step required by its KDF internally; do not pre-hash the binding root yourself.
For example, calculate the i.MX93 hash using the same four SRKs, in the same order and with the same SRK record hash algorithm as the secure-boot image:
nxpcrypto rot calculate-hash -f mimx9352 -r a1 -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem -o srkh.bin
The resulting 32-byte binary can be used directly as keys/srkh: srkh.bin. For i.MX95
B0, calculate with -f mimx9596 -r b0 and supply only the first 32 bytes (the first
64 hex characters of the printed hash), not the full 64-byte output file. Alternatively,
use the first 32 bytes of OEM SRKH reported by nxpele get-info on the target.
A wrong but correctly sized SRKH cannot be detected during export without the device’s
binding root; the resulting container will fail authentication on that device.
Selection of the members
The members section of the configuration defines the container members in two ways that
can be combined:
src_dir– every file of the directory (recursively) becomes a member; no file is skipped, including hidden files such as.DS_Storeor.gitcontent (a warning is printed for them), so use a clean directory. Symbolic links to files are packed with the content of the target, symbolic links to directories are not followed. The member name is the relative path. The protection and block size of each member are selected by the first matching glob pattern inrules; members matching no rule usedefault. Rules only change the settings, they do not add or remove members.files– additional members listed one by one, placed after thesrc_dirmembers. It is meant for files outsidesrc_dir. An entry does not override asrc_dirmember; a name present in both is rejected as a duplicate.
members:
src_dir: model_dir
default:
protection: enc_auth
block_size: b1m
rules:
- match: "tokenizer/*"
protection: auth_only
block_size: b64k
files:
- name: LICENSE
file: ../LICENSE
protection: none
Verification and parsing of the container
The structure of a container is verified without any key. With the MMK (and the SRKH for a device-bound container) the MACs are verified as well and the encrypted members are decrypted. The keys are given as a binary file, a HEX text file or a HEX string.
nxpimage aisec verify -b aisec_container.bin
nxpimage aisec verify -b aisec_container.bin -k mmk.bin --srkh srkh.bin
The parse command stores the members and the configuration (aisec_config.yaml)
into the output directory. Without the MMK the encrypted members cannot be decrypted: they
are listed in the configuration without the file key, no data file is stored for them
and the command prints their names. Such a configuration describes the container structure
but cannot be used to rebuild it; parse the container with the MMK to recover the members.
To rebuild the container, provide the MMK as mmk.bin next to the configuration. The
rebuilt container always uses a fresh container salt, so it is not byte-identical to the
parsed binary.
nxpimage aisec parse -f mimx9596 -b aisec_container.bin -k mmk.bin --srkh srkh.bin -o parsed
AISEC container for mimx9301, Revision: a1#
AISEC container for mimx9301, Revision: a1 JSON schema
AISEC container for mimx9301, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9301, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9301, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9302, Revision: a1#
AISEC container for mimx9302, Revision: a1 JSON schema
AISEC container for mimx9302, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9302, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9302, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9311, Revision: a1#
AISEC container for mimx9311, Revision: a1 JSON schema
AISEC container for mimx9311, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9311, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9311, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9312, Revision: a1#
AISEC container for mimx9312, Revision: a1 JSON schema
AISEC container for mimx9312, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9312, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9312, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9321, Revision: a1#
AISEC container for mimx9321, Revision: a1 JSON schema
AISEC container for mimx9321, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9321, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9321, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9322, Revision: a1#
AISEC container for mimx9322, Revision: a1 JSON schema
AISEC container for mimx9322, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9322, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9322, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9331, Revision: a1#
AISEC container for mimx9331, Revision: a1 JSON schema
AISEC container for mimx9331, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9331, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9331, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9332, Revision: a1#
AISEC container for mimx9332, Revision: a1 JSON schema
AISEC container for mimx9332, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9332, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9332, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9351, Revision: a1#
AISEC container for mimx9351, Revision: a1 JSON schema
AISEC container for mimx9351, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9351, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9351, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9352, Revision: a1#
AISEC container for mimx9352, Revision: a1 JSON schema
AISEC container for mimx9352, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx9352, Revision: a1 ================================
# ======================================================================================================================
# == AISEC container for mimx9352, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx93w32, Revision: a1#
AISEC container for mimx93w32, Revision: a1 JSON schema
AISEC container for mimx93w32, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx93w32, Revision: a1 ===============================
# ======================================================================================================================
# == AISEC container for mimx93w32, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx93w52, Revision: a1#
AISEC container for mimx93w52, Revision: a1 JSON schema
AISEC container for mimx93w52, Revision: a1 YAML configuration template
# =============================== AISEC container template for mimx93w52, Revision: a1 ===============================
# ======================================================================================================================
# == AISEC container for mimx93w52, Revision: a1 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, latest>
revision: a1
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9534, Revision: b0#
AISEC container for mimx9534, Revision: b0 JSON schema
AISEC container for mimx9534, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9534, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9534, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9536, Revision: b0#
AISEC container for mimx9536, Revision: b0 JSON schema
AISEC container for mimx9536, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9536, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9536, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9546, Revision: b0#
AISEC container for mimx9546, Revision: b0 JSON schema
AISEC container for mimx9546, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9546, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9546, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9554, Revision: b0#
AISEC container for mimx9554, Revision: b0 JSON schema
AISEC container for mimx9554, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9554, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9554, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9556, Revision: b0#
AISEC container for mimx9556, Revision: b0 JSON schema
AISEC container for mimx9556, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9556, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9556, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9586, Revision: b0#
AISEC container for mimx9586, Revision: b0 JSON schema
AISEC container for mimx9586, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9586, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9586, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9594, Revision: b0#
AISEC container for mimx9594, Revision: b0 JSON schema
AISEC container for mimx9594, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9594, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9594, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
AISEC container for mimx9596, Revision: b0#
AISEC container for mimx9596, Revision: b0 JSON schema
AISEC container for mimx9596, Revision: b0 YAML configuration template
# =============================== AISEC container template for mimx9596, Revision: b0 ================================
# ======================================================================================================================
# == AISEC container for mimx9596, Revision: b0 ==
# ======================================================================================================================
# -------------------------------------===== The chip family name [Required] =====--------------------------------------
# Description: NXP chip family identifier.
family: CHOOSE_FROM_TABLE
# -----------------------------------------===== MCU revision [Optional] =====------------------------------------------
# Description: Revision of silicon. The 'latest' name, means most current revision.
# Possible options: <a0, a1, b0, latest>
revision: b0
# -------------------------------------===== Output container file [Required] =====-------------------------------------
# Description: Path of the generated AISEC dir-v5 protected-directory container binary.
output: aisec_container.bin
# ------------------------------------===== AISEC dir-v5 container [Required] =====-------------------------------------
# Description: Global container settings. Only the host-buildable provisioning forms are supported - flag 0x12
# (discrete) and flag 0x11 (integrated). The installed flag 0x91 form is produced on-device only.
container:
# --------------------------------------===== Provisioning flow [Required] =====--------------------------------------
# Description: Selects the custody flag. 'discrete' (flag 0x12) - the MMK is a POST_MMK that is imported out of band
# into the keystore slot named by keys/mmk_id; no mmk_block is present. 'integrated' (flag 0x11) - the MMK is
# delivered by an opaque ELE/EL2GO provisioning blob carried in the mmk_block.
# Possible options: <discrete, integrated>
flow: discrete
# --------------------------------------===== Execution backend [Required] =====--------------------------------------
# Description: Primitive backend that executes the container crypto on the device. The mode byte is hashed into the
# KDF base context, so containers built for one backend cannot be opened under another. 'sw_primitive_backend' is for
# testing and development only and is refused by production loaders.
# Possible options: <sw_primitive_backend, optee_primitive_backend, ele_primitive_backend>
mode: ele_primitive_backend
# ----------------------------------------===== Container ID [Optional] =====-----------------------------------------
# Description: OEM-assigned 32-bit identifier of the protected directory/model.
container_id: '0x00000001'
# --------------------------------------===== Container version [Optional] =====--------------------------------------
# Description: OEM-assigned 16-bit version of the protected directory/model.
container_version: 1
# -------------------------------------===== Cryptographic domain [Optional] =====--------------------------------------
# Description: Container-wide cryptographic settings. Encryption is always AES-CTR and authentication is always AES-
# CMAC; only the key sizes and the KDF are selectable.
crypto:
# -------------------------------------===== Encryption key size [Optional] =====-------------------------------------
# Description: Size in bytes of the per-member AES-CTR encryption key (ENC_DKEY).
# Possible options: <16, 24, 32>
enc_key_size: 32
# -----------------------------------===== Authentication key size [Optional] =====-----------------------------------
# Description: Size in bytes of the AES-CMAC authentication key (AUTH_DKEY).
# Possible options: <16, 24, 32>
auth_key_size: 32
# -----------------------------------===== Key derivation function [Optional] =====-----------------------------------
# Description: KDF used to derive AUTH_DKEY and ENC_DKEY from the MMK. 'sp800_108_cmac' is the NIST SP 800-108
# counter-mode KDF with AES-CMAC as PRF (used by the ELE backend), 'hkdf_sha256' is RFC 5869 HKDF with SHA-256 (used
# by the OP-TEE backend).
# Possible options: <sp800_108_cmac, hkdf_sha256>
kdf: sp800_108_cmac
# ---------------------------------------===== Device binding [Optional] =====----------------------------------------
# Description: Enables device binding: the SHA-256 of the backend reported SRKH is mixed into the KDF base context.
# When enabled, keys/srkh must be provided.
binding: true
# -----------------------------------------===== Key material [Required] =====------------------------------------------
# Description: Master model key (MMK) identity and key material used to encapsulate the members. No key material is ever
# stored in the container.
keys:
# ---------------------------------------===== MMK identifier [Optional] =====----------------------------------------
# Description: Keystore reference of the MMK. For the discrete flow it is the persistent keystore slot the POST_MMK
# was imported into (for the ELE backend it must be in range 0x00000001..0x3FFFFFFF). For the integrated flow it is
# informational only.
mmk_id: '0x00000001'
# ------------------------------------------===== MMK size [Optional] =====-------------------------------------------
# Description: MMK size in bytes. It must not be smaller than either derived key size, because a derived key cannot
# carry more entropy than the key it descends from.
# Possible options: <16, 24, 32>
mmk_size: 32
# ------------------------------------------===== MMK value [Required] =====------------------------------------------
# Description: MMK used on the host to derive the container keys - the POST_MMK for the discrete flow, or the MMK
# delivered by the provisioning blob for the integrated flow. Path to a binary or hex-text file, or a hex value.
mmk: post_mmk.bin
# --------------------------------------===== SRKH binding root [Optional] =====--------------------------------------
# Description: 32-byte secure-boot root key hash reported by the device backend. Required when crypto/binding is
# enabled. Path to a binary or hex-text file, or a hex value. It must match the device value exactly; a wrong value is
# not detected on the host, the container just fails to open on the device. For i.MX93 (mimx9352 and aliases), use the
# complete 32-byte AHAB v1 SRK table hash. For i.MX95 B0 (mimx9596 and aliases), the ELE backend reports the first 32
# bytes of the 64-byte AHAB v2 OEM SRK hash; i.MX95 A0/A1 uses AHAB v1. Calculate the hash with 'nxpcrypto rot
# calculate-hash -f <family> -r <revision> -k srk0.pem -k srk1.pem -k srk2.pem -k srk3.pem', using the target
# family/revision and the same SRK order as secure boot. Use the first 64 hex characters of the printed RoT hash, or
# of OEM SRKH read by 'nxpele get-info'. Do not use an i.MX95 B0 hash for i.MX93, even with the same keys. The
# software backend legitimately reports 32 zero bytes.
srkh: srkh.bin
# ---------------------------------------===== Container members [Required] =====---------------------------------------
# Description: Files packed into the container. Members can be collected from a source directory (src_dir), listed
# explicitly (files), or both. When both are used, the container holds all src_dir files followed by all explicit files;
# explicit files are additional members, they do not override src_dir members. Member names must be unique, forward-
# slash separated relative paths.
members:
# --------------------------------------===== Source directory [Optional] =====---------------------------------------
# Description: Directory whose files (recursively) all become container members; no file is skipped, including hidden
# files such as .DS_Store or .git content (a warning is printed for them), so point it to a clean directory. Symbolic
# links to files are packed with the content of the link target, symbolic links to directories are not followed. The
# relative path becomes the member name. Members are ordered by path components. Use 'default' and 'rules' to choose
# the settings of these members.
src_dir: model_dir
# -----------------------------------===== Default member settings [Optional] =====-----------------------------------
# Description: Settings applied to src_dir members that do not match any rule.
default:
# ------------------------------------===== Default protection [Optional] =====-------------------------------------
# Description: 'enc_auth' - AES-CTR encrypted and AES-CMAC authenticated, 'auth_only' - plaintext authenticated by
# AES-CMAC, 'none' - plaintext without any integrity protection (must be selected explicitly per member and must not
# be used for load-influencing files).
# Possible options: <enc_auth, auth_only>
protection: enc_auth
# ------------------------------------===== Default block size [Optional] =====-------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b1m
# ----------------------------------------===== Member rules [Optional] =====-----------------------------------------
# Description: Ordered list of rules for src_dir members. The first rule whose glob pattern matches the member name
# selects its settings; members not matching any rule use 'default'. Rules only change the settings, they do not add
# or remove members.
rules:
-
# --------------------------------------===== Name pattern [Required] =====---------------------------------------
# Description: Glob (fnmatch) pattern matched against the member name.
match: '*.json'
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: auth_only
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k
# --------------------------------------===== Explicit members [Optional] =====---------------------------------------
# Description: Additional members, in container order, placed after the src_dir members. Use it for files outside
# src_dir; a name already provided by src_dir is rejected as a duplicate. To change the settings of a src_dir member,
# use 'rules' instead.
files:
-
# ---------------------------------------===== Member name [Required] =====---------------------------------------
# Description: Relative, forward-slash separated path of the member.
name: LICENSE
# ------------------------------------===== Member data file [Required] =====-------------------------------------
# Description: Path to the file with the member plaintext.
file: ../LICENSE
# ---------------------------------------===== Protection [Optional] =====----------------------------------------
# Description: Member protection level.
# Possible options: <enc_auth, auth_only, none>
protection: none
# ---------------------------------------===== Block size [Optional] =====----------------------------------------
# Description: Plaintext block size of the member payload.
# Possible options: <b64k, b256k, b512k, b1m, b4m>
block_size: b64k