Sign and encrypt other images

Once a device is deployed in the field, new binaries required for booting can be signed and encrypted to boot on the deployed device. This script allows the following artifacts to be signed and encrypted:

To use the script, follow these steps:

  1. Configure the signature process using the following environment variables:
    • CONFIG_SIGN_KEYS_PATH: (Mandatory) The path to the PKI tree. If an empty path is specified, a new PKI tree is generated
    • CONFIG_KEY_INDEX: (Optional) Default value is 0. Index of the key to use for signatures.

    • CONFIG_DEK_PATH: (Optional) Path to the data encryption key. If undefined, the images will not be encrypted. If the file does not exist, a random 256-bit file is generated.

The following example sets up the environment to generate signed and encrypted artifacts:

export CONFIG_SIGN_KEYS_PATH="/path/to/keys"
export CONFIG_DEK_PATH="/path/to/dek"

In a similar way, you can also define these variables in a .config file located in the current path:

.config
CONFIG_SIGN_KEYS_PATH="/path/to/keys"
CONFIG_DEK_PATH="/path/to/dek"
  1. Execute the trustfence-sign-kernel.sh script. Usage of the script is as follows:
Usage: trustfence-sign-kernel.sh [OPTIONS] input-unsigned-image output-signed-image
    -p <platform>    select platform for the project
    -d               sign/encrypt DTB
    -i               sign/encrypt initramfs
    -l               sign/encrypt Linux image
Supported platforms: ccimx6, ccimx6ul

The following example signs and encrypt the zImage for the ConnectCore 6UL:

trustfence-sign-kernel.sh -p ccimx6ul -l zImage zImage-signed

 

© 2018 Digi International Inc. All rights reserved.
Sign and encrypt other images updated on 22 January 2018 02:43:38 PM