HabImage

Type: object

HAB Options


An options block contains zero or more name/value pairs and the option settings that assign values to global options used by the nxpimage to control the generation of the output file.

Type: object

The following properties are required:

  • family
  • flags
  • startAddress

Type: object

The following properties are required:

  • ivtOffset
  • initialLoadSize
Type: object

The following properties are required:

  • bootDevice

HAB flags

Type: number or string

HAB flags. 0x0 for unsigned, 0x08 signed, 0x0C encrypted.

Image start address

Type: number or string

First address of the bootable image in the target memory.

IVT Offset

Type: number or string

Offset of IVT table(beginning of HAB container) from startAddress. This option can be omitted if family and bootDevice are specified.

Initial Load size

Type: number or string

Size of the segments(such as IVT, BDT, DCD, XMCD) placed before the actual application image. The value is specific per boot device type. This option can be omitted if family and bootDevice are specified.

Entry Point address

Type: number or string

Reset vector of the application. If not specified, the vector will be automatically detected from the input image.

Family

Type: enum (of string)

Processor family

Must be one of:

  • "mimxrt1060"
  • "mimxrt1015"
  • "mimxrt1040"
  • "mimxrt1165"
  • "mimxrt1172"
  • "mimxrt1046"
  • "mimxrt1043"
  • "mimxrt1166"
  • "mimxrt1010"
  • "mimxrt1024"
  • "mimxrt1064"
  • "mimxrt1173"
  • "mimxrt1020"
  • "mimxrt1175"
  • "mimxrt1176"
  • "mimxrt1171"
  • "mimxrt1050"
  • "rt1015"
  • "rt104x"
  • "rt116x"
  • "rt1010"
  • "rt102x"
  • "rt106x"
  • "rt117x"
  • "rt105x"

Boot device

Type: enum (of string)

Boot device memory where the image is booted from. If not specified, the ivtOffset and initialLoadSize must be defined.

Must be one of:

  • "flexspi_nor"
  • "flexspi_nand"
  • "semc_nand"
  • "sd"
  • "mmc"

Timestamp of the signature

Type: string

Date and time when the signature was created. Format: day/month/year hour:minute:second (DD/MM/YYYY HH:MM:SS)

DCD file path

Type: string

Optional path to DCD data.

XMCD file path

Type: string

Optional path to XMCD data.

Plain application image

Type: stringFormat: file_name

The input application image in plain BIN, S-REC or ELF.

CSF Sections

Type: array

CSF Sections.

No Additional Items

Each item of this array must be:


Type: object

Header

Type: object

The Header command contains data used in the CSF header as well as default values used by the CST for other commands throughout the remaining CSF. There must be exactly one Header command and it must appear first in the CSF.

Version

Type: string or number

Version of HAB.

Hash algorithm

Type: enum (of string)

Default hash algorithm.

Must be one of:

  • "sha256"

Engine

Type: enum (of string)

Default engine.

Must be one of:

  • "ANY"
  • "SAHARA"
  • "RTIC"
  • "DCP"
  • "CAAM"
  • "SW"

Engine configuration

Type: string or number

Default engine configuration. See the CST manual for more info.

Certificate format

Type: enum (of string)

Default certificate format.

Must be one of:

  • "x509"
  • "WTLS"

Signature format

Type: enum (of string)

Default signature format.

Must be one of:

  • "PKCS1"
  • "CMS"
Type: object

Install SRK

Type: object

The Install SRK command authenticates and installs the root public key for use in subsequent Install CSFK (HAB only) or Install Key (HAB4 only) commands. HAB or AHAB authenticates the SRK using the SRK hash (SRKHASH) fuses. HAB4 or AHAB allows revocation of individual keys within the SRK table using the SRK revocation (SRKREVOKE) fuses. HAB installs the SRK in slot 0 of its internal public key store. There must be exactly one Install SRK command in a CSF, and it must occur before the Install CSFK (HAB only) command.

SRK table binary file

Type: string

Valid file path

InstallSRK SourceIndex

Type: enum (of integer)

SRK index within SRK table. Installation fails if the SRK revocation fuse with this index is burned.

Must be one of:

  • 0
  • 1
  • 2
  • 3
Type: object

Install CSFK

Type: object

The Install CSFK command authenticates and installs a public key for use in subsequent Install Key (HAB3 only) or Authenticate CSF commands. HAB authenticates the CSFK from the CSFK certificate using the SRK. HAB installs the CSFK in slot 1 of its internal public key store. There must be exactly one Install CSFK command in a CSF, and it must occur before the Authenticate CSF command.

CSFK Certificate

Type: string

Valid path.

Certificate Format

Type: enum (of string)

CSFK certificate format.

Must be one of:

  • "x509"
  • "WTLS"
Type: object

Install NOCAK

Type: object

The Install NOCAK command authenticates and installs a public key for use with the fast authentication mechanism (HAB 4.1.2 and later only). With this mechanism, one key is used for all signatures. HAB installs the no-CA key in slot 1 of its internal public key store. There must be exactly one Install NOCAK command in a CSF, and it must occur before the Authenticate CSF command and there must be no Install Key commands.

NOCAK Certificate

Type: string

Valid path.

Certificate Format

Type: enum (of string)

NOCAK certificate format.

Must be one of:

  • "x509"
  • "WTLS"
Type: object

Authenticate CSF

Type: object

The Authenticate CSF command authenticates the CSF from which it is executed. HAB authenticates the CSF using the CSFK public key, from a digital signature generated automatically by the CST. There must be exactly one Authenticate CSF command in a CSF file, and it must occur after the Install CSFK command. Most other CSF commands are allowed only after the Authenticate CSF command.

Engine configuration

Type: string or number

Default engine configuration. See the CST manual for more info.

Certificate format

Type: enum (of string)

Default certificate format.

Must be one of:

  • "x509"
  • "WTLS"

Signature format

Type: enum (of string)

Default signature format.

Must be one of:

  • "PKCS1"
  • "CMS"

Signer

Type: string

Signature provider configuration string or a path to authenticate CSF private key file.

Type: object

Install Key

Type: object

The Install Key command authenticates and installs a public key for use in subsequent Install Key or Authenticate Data commands. HAB authenticates a public key from a public key certificate using a previously installed verifying key and a hash of the public key certificate. HAB installs the authenticated public key in an internal public key store with a zero-based array of key slots. The CSF author is responsible for managing the key slots in the internal public key store to establish the desired public key hierarchy and determine the keys used in authentication operations. Overwriting occupied key slots is not allowed, although a repeat command to re- install the same public key occupying the target slot will be skipped and not generate an error.

Public key certificate

Type: string

Valid file path.

Verification Index

Type: enum (of integer)

Verification key index in key store. CSFK not supported.

Must be one of:

  • 0
  • 2
  • 4

Target Index

Type: enum (of integer)

Target key index in key store. SRK, CSFK slots reserved.

Must be one of:

  • 2
  • 4
Type: object

Authenticate Data

Type: object

The Authenticate Data command verifies the authenticity of pre-loaded data in memory. The data may include executable SW instructions and may be spread across multiple non-contiguous address ranges drawn from multiple object files. HAB authenticates the pre-loaded data using a previously installed public key from a digital signature generated automatically by the CST.

Verification Index

Type: enum (of integer)

Verification key index in key store. SRK, CSFK not supported. NOTE For HAB4 Fast Authentication, this must be 0

Must be one of:

  • 0
  • 2
  • 4

Engine

Type: enum (of string)

Data signature hash engine.

Must be one of:

  • "ANY"
  • "SAHARA"
  • "RTIC"
  • "DCP"
  • "CAAM"
  • "SW"

Engine Configuration

Type: string or number

Configuration flags for the engine. See the CSF manual.

Signer

Type: string

Signature provider configuration string or a path to authenticate IMG private key file.

Type: object

Set Engine

Type: object

The Set Engine command selects the default engine and engine configuration for a given algorithm. HAB3 does not support the Set Engine command. Some CSF commands allow the CSF author to select the engine used for an algorithm by specifying an argument other than ANY. However, if the engine argument is ANY, then HAB selects the engine to use based on internal criteria. The Set Engine command overrides the HAB internal criteria and selects the engine and configuration to use when ANY is specified.
Some algorithm types do not have an associated engine argument in the CSF commands (e.g. the signature algorithm in Authenticate Data commands). By default, HAB selects the engine to use for such algorithms based on internal criteria. The Set Engine command overrides the HAB internal criteria in such cases as well. Multiple Set Engine commands may appear anywhere in a CSF after the Header command. Subsequent commands use the engine selected by the most recent Set Engine command

Hash Algorithm

Type: enum (of string)

Hash algorithm.

Must be one of:

  • "sha256"

Engine

Type: enum (of string)

Engine, use ANY to restore internal HAB criteria.

Must be one of:

  • "ANY"
  • "SAHARA"
  • "RTIC"
  • "DCP"
  • "CAAM"
  • "SW"

Engine configuration

Type: string or number

Default engine configuration. See the CST manual for more info.

Type: object

Unlock

Type: object

The Unlock command prevents specified engine features from being locked when exiting the internal boot ROM. HAB3 does not support the Unlock command. Multiple Unlock commands may appear after the Authenticate CSF command. A feature will be unlocked if specified in one or more Unlock commands.

Engine

Type: enum (of string)

Engine to unlock.

Must be one of:

  • "SRTC"
  • "CAAM"
  • "SNVS"
  • "OCOTP"

Features

Type: string or array

Comma-separated list of features to unlock.

Unlock UID

Type: string or array

List of UIDs.

Type: object

Install Secret Key

Type: object

This command is applicable from HAB 4.1 onwards and only on processors which include CAAM and SNVS. Each instance of this command generates a CSF command to install a secret key in CAAM's secret key store.

Key

Type: string

CMS encrypted data encryption key.

Key length

Type: enum (of integer)

Key length in bits

Must be one of:

  • 128
  • 192
  • 256

Verification index

Type: enum (of integer)

Master KEK index. 0 or 1 OTPMK from fuses. 2 ZMK from SNVS, 3 CMK from SNVS.

Must be one of:

  • 0
  • 1
  • 2
  • 3

Target index

Type: enum (of integer)

Target secret key store index.

Must be one of:

  • 0
  • 1
  • 2
  • 3

Reuse DEK

Type: boolean or number

If set, the secret key from SecretKey_Name parameter will be used. If not, a random key will be generated and stored.

Type: object

Decrypt Data

Type: object

This command is applicable from HAB4.1 onwards. Each instance generates a CSF command to decrypt and authenticate a list of code/data blocks using secret key stored in the secret key store. CST will generate a corresponding AUT_DAT command. CST will encrypt the data blocks in- place in the given files using a secret key and generate MAC data which is appended to the CSF. The secret key index must have been the target key index in a preceding Install Secret Key command. The same secret key must never be used more than once. The secret key used is removed from the secret key store by the Decrypt Data command. A separate Install Secret Key command (which generates a fresh secret key) is required for another Decrypt Data command.

Verification Index

Type: enum (of integer)

Secret key index in Secret key store.

Must be one of:

  • 0
  • 1
  • 2
  • 4

Engine

Type: enum (of string)

MAC Engine.

Must be one of:

  • "ANY"
  • "CAAM"
  • "DCP"

Engine Configuration

Type: string or number

Configuration flags for the engine. See the CSF manual.

Mac Bytes

Type: string or number

Size of MAC in bytes. Even value between 4 and 16.

Nonce

Type: string

If set, the nonce from the given file will be used. If not, a random nonce will be generated.