CyberShield Toolkit (CST)

Overview

The CyberShield Toolkit (CST) is a security utility which performs several secure operations like key provisioning, lifecycle detection, mass erase, factory reset, debug access control, and secure binary signing for AM13E230X device lifecycle management.

The toolkit can be used from the command line (ti_cst) or from a step-by-step graphical wizard (cstgui). See CyberShield Toolkit GUI for the graphical interface.

Note

am13e230x is used as the device name in many commands below. Replace with other supported device names based on the device you are using.

Feature List

The CyberShield Toolkit provides the following features and services

Device Management Services

  • Key Provisioning - Provision AES-CMAC cryptographic keys into device OTP and transition device lifecycle state

  • Lifecycle Detection - Query current device lifecycle state (HSFS/HSSE)

  • Debug Access Control - Enable JTAG port access with L0 (simple) and L1 (secure) modes

  • Mass Erase - Erase main flash banks and return device to blank state

  • Factory Reset - Reset device to factory defaults while preserving lifecycle state

  • Device ID Retrieval - Query and retrieve device ID with optional L1 authentication

  • SoC ID Reading - Read System-on-Chip (SoC) ID from device

  • Serial Port Listing - List available serial ports for device communication

  • BSL Invoke - Invoke bootstrap loader (BSL) for firmware download

  • Binary Signing - Sign application binaries for secure boot authentication using AES-CMAC MCUBoot format

Key and Revision Management (HSSE only)

  • Key Revision Update - Advance device major key revision

  • App Revision Update - Advance application major revision

  • RMA Customer Operation - Execute RMA (Return Merchandise Authorization) operations

Payload Generation Utilities

  • Key Encoding - Generate BCH-encoded provisioning payload from cryptographic keys

  • Payload Signing - Sign L1 (password) HSSE DSSM payloads for secure command authentication

  • HSSE Command Payload Generation - Generate signed payloads for specialized HSSE operations

  • Key Revision Payload Generation - Generate signed payloads for key revision updates

Installation

Prerequisites

  • Python 3.10 (64b) or higher

  • Texas Instruments CCS (Code Composer Studio)

  • CCXML configuration file for your device

Note

The CCXML file should be a functional version that corresponds to your customer hardware variant (LP/CC - LaunchPad or ControlCard). Ensure the CCXML is properly configured for your specific hardware to ensure correct device communication and operation.

Installation via pip

To install the CyberShield Toolkit:

pip install tools/am13e230x/cybershield_toolkit-x.x.x.whl

This command installs the wheel file via pip, making the ti_cst and other CyberShield Toolkit utilities available in your system.

Verify Installation

After installation, verify that the toolkit is properly installed:

ti_cst  # Verify installation

Quick Start

ti_cst --help                                   # Show all commands and utilities
ti_cst --device <device> --help                 # Show device commands with examples
ti_cst --device <device> <cmd> --help           # Show detailed command help

Note

During the programming flow, you will be prompted to reset the device using the nRST (reset) button. Follow the on-screen prompts to perform the device reset at the appropriate time during each operation.

Sessions

A session is a password-protected encrypted vault that securely stores cryptographic keys (AES-128) used for device provisioning and security operations. Sessions enable you to:

  • Store keys securely — Keys are encrypted with PBKDF2+Fernet using a user-provided password

  • Reuse keys across commands — Reference the same session by name and password in multiple operations

  • Manage key lifecycle — Import, generate, or use pre-provisioned keys for development and production

Sessions are stored in a platform-specific location:

  • Linux/macOS: $(HOME)/.local/share/tisecprov/sessions/

  • Windows: C:\Users\<username>\AppData\Local\tisecprov\tisecprov\sessions

To use a custom session in any command, provide --session <name> --session-password <password> flags. Session creation commands (genkeys, import-keys) and encode-keys take --password instead of --session-password.

Development Session

Introduction

The CyberShield Toolkit includes a pre-provisioned development session for rapid prototyping and testing. This session is a special case that contains sample cryptographic keys and is automatically located without requiring manual session creation or key generation.

In any command documentation below, if you see --session session_name --session-password session_pass, you can replace these with simply --dev-session to use the development keys instead. This applies to the commands that accept a session (for example encode-keys, sign-l1-payload, sign-binary, sign-hsse-command-payload, sign-key-revision-payload, imgtool-sign). genkeys and import-keys create a session and do not accept --dev-session.

Example:

# Standard approach with custom session
ti_cst --device am13e230x encode-keys --session session_name --password session_pass --output payload.bin

# Quick development approach
ti_cst --device am13e230x encode-keys --dev-session --output payload.bin

Development Session Details

  • Location: <SDK install path>/tools/<device>/development_session.session

  • Session Name: development_session

  • Password: develop123

  • Usage: Automatically located and used when --dev-session flag is provided

Security Levels Overview

L0 (Level 0) — Unauthenticated

  • DSSM commands that do not require authentication or password

  • Used for open access operations on the device

L1 (Level 1) — Authenticated

  • Requires a password file (HSFS authentication) and a signed payload (HSSE authentication)

  • Used for secure lifecycle operations like key revision, app revision, RMA

  • Commands are signed with session keys to ensure authenticity

Device Services

The services offered by CyberShield Toolkit are in the form of commands and utilities. Run ti_cst --help for detailed usage.

Session Setup

Before provisioning keys or signing payloads, you need a session containing the cryptographic keys. Choose one of the following three approaches:

Option 1: Use Development Session (Fastest)

The development session is pre-provisioned and available immediately:

ti_cst --device am13e230x encode-keys --dev-session --output payload.bin
  • Pros: Quick prototyping, no setup required

  • Cons: Sample keys only, not for production

Option 2: Generate New Keys

Generate four random 128-bit AES keys and save them:

ti_cst --device am13e230x genkeys --session session_name --password session_pass

This creates a session with random keys. Encrypted session files are stored in your user data directory:

  • Linux/macOS: $(HOME)/.local/share/tisecprov/sessions/

  • Windows: C:\Users\<username>\AppData\Local\tisecprov\tisecprov\sessions

Each session is encrypted and stored as <session_name>.session. You can safely backup or move these files between machines.

  • Pros: Fresh random keys for development/production

  • Cons: Requires key generation and session creation

Option 3: Import Existing Keys

If you already have four 16-byte key files, import them into a new session:

ti_cst --device am13e230x import-keys \
  --session session_name --password session_pass \
  --key1 path/to/key1.bin \
  --key2 path/to/key2.bin \
  --key3 path/to/key3.bin \
  --key4 path/to/key4.bin
  • Pros: Use existing keys, full control

  • Cons: Keys must already be available

Key Provisioning

This DSSM command is used to provision four 128-bit AES-CMAC cryptographic keys into device OTP and transition from HSFS to HSSE state.

STEP 1: Generate BCH-encoded payload (if not already available):

Generate a 72-byte BCH-encoded provisioning payload from four 16-byte AES-128 keys.

Using development session (quick prototyping):

ti_cst --device am13e230x encode-keys --dev-session --output payload.bin

Using custom session:

ti_cst --device am13e230x encode-keys \
  --session session_name --password session_pass \
  --output payload.bin

Output:

  • payload.bin — BCH-encoded 72-byte provisioning payload file that will be programmed into device OTP memory. This file is generated from the four key files using BCH(288,261,7) error correction encoding and contains all four keys in encoded format for secure storage on the device.

STEP 2: Program device with payload:

ti_cst --device am13e230x provision-keys \
  --ccxml <path to CCXML> \
  --ccs-path <path to CCS> \
  --payload payload.bin

Lifecycle Detection

This DSSM command queries the current device lifecycle state (HSFS = unsecured, HSSE = secured with keys provisioned).

Command Syntax:

ti_cst --device am13e230x detect-lifecycle \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version}

Output:

  • HSFS = High Security Field Securable

  • HSSE = High Security Security Enforced (Keys Provisioned)

Wait for Debug

This DSSM command locks the debug port. Once debug is unlocked, the core is held in reset. Supports L0 (simple) and L1 (secure with authentication) modes.

L0 (Simple wait for debug)

ti_cst --device am13e230x wait-for-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L0 \
  --device-type [HSSE or HSFS]

L1 HSSE (Secure wait for debug with signed payload)

First, generate the signed L1 payload:

ti_cst --device am13e230x sign-l1-payload \
  --session session_name --session-password session_pass \
  --password password.bin \
  --key-index 2 \
  --output signed_payload.bin
  • password.bin is 16-byte password file

Then wait for debug:

ti_cst --device am13e230x wait-for-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSSE \
  --password signed_payload.bin

L1 HSFS (Secure wait for debug with password)

ti_cst --device am13e230x wait-for-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSFS \
  --password password.bin
  • password.bin is 16-byte password file

Debug Open

This DSSM command enables JTAG port access for development. Supports L0 (simple) and L1 (secure with authentication) modes.

L0 (Simple debug open)

ti_cst --device am13e230x open-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L0 \
  --device-type [HSSE or HSFS]

L1 HSSE (Secure debug open with signed payload)

First, generate the signed L1 payload:

ti_cst --device am13e230x sign-l1-payload \
  --session session_name --session-password session_pass \
  --password password.bin \
  --key-index 2 \
  --output signed_payload.bin
  • password.bin is 16-byte password file

Then open debug:

ti_cst --device am13e230x open-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSSE \
  --password signed_payload.bin

L1 HSFS (Secure debug with password)

ti_cst --device am13e230x open-debug \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSFS \
  --password password.bin
  • password.bin is 16-byte password file

Mass Erase

This DSSM command erases main flash banks (Flash Bank 0 and 1) and returns device to blank state. Supports L0 (simple) and L1 (secure with authentication) modes.

L0 (Simple erase)

ti_cst --device am13e230x mass-erase \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L0 \
  --device-type [HSSE or HSFS]

L1 HSSE (Secure erase with signed payload)

First, generate the signed L1 payload:

ti_cst --device am13e230x sign-l1-payload \
  --session session_name --session-password session_pass \
  --password password.bin \
  --key-index 2 \
  --output signed_payload.bin
  • password.bin is 16-byte password file

Then execute mass erase:

ti_cst --device am13e230x mass-erase \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSSE \
  --password signed_payload.bin

Warning

Mass Erase L1 configuration will only be valid if Debug Open is also password-based (L1). This is applicable only for HSSE devices and not HSFS devices.

L1 HSFS (Secure erase with password)

ti_cst --device am13e230x mass-erase \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSFS \
  --password password.bin
  • password.bin is 16-byte password file

Factory Reset

This DSSM command resets device to factory defaults while preserving lifecycle state. Supports L0 (simple) and L1 (secure with authentication) modes.

L0 (Simple reset)

ti_cst --device am13e230x factory-reset \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L0 \
  --device-type [HSSE or HSFS]

L1 HSSE (Secure reset with signed payload)

First, generate the signed L1 payload:

ti_cst --device am13e230x sign-l1-payload \
  --session session_name --session-password session_pass \
  --password password.bin \
  --key-index 2 \
  --output signed_payload.bin
  • password.bin is 16-byte password file

Then execute factory reset:

ti_cst --device am13e230x factory-reset \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSSE \
  --password signed_payload.bin

Warning

Factory Reset L1 configuration will only be valid if Debug Open is also password-based (L1). This is applicable only for HSSE devices and not HSFS devices.

L1 HSFS (Secure reset with password)

ti_cst --device am13e230x factory-reset \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSFS \
  --password password.bin
  • password.bin is 16-byte password file

Binary Signing for Secure Boot

This command signs application binaries for secure ROM boot authentication using AES-CMAC MCUBoot format.

Command Syntax:

ti_cst --device am13e230x sign-binary \
  --binary app.bin \
  --session session_name --session-password session_pass \
  --key-index 1 \
  --img-version 1
  • --img-version is optional (1-4, default: 1) and is written to the image header

Output Files:

  • <name>_signed_rom<ext> - Fully signed MCUBoot image (for example, app_signed_rom.bin)

  • rom_header.bin - MCUBoot header + padding (128 bytes)

  • rom_trailer.bin - TLV trailer with AES-CMAC tag (44 bytes)

Device ID Retrieval

Query and retrieve the device ID. Supports both HSFS and HSSE device types with optional L1 authentication.

L0 (No authentication)

ti_cst --device am13e230x get-deviceid \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L0 \
  --device-type [HSSE, HSFS]

L1 HSSE (DeviceID with signed payload)

First, generate the signed L1 payload:

ti_cst --device am13e230x sign-l1-payload \
  --session session_name --session-password session_pass \
  --password password.bin \
  --key-index 2 \
  --output signed_payload.bin
  • password.bin is 16-byte password file

Then retrieve the device ID:

ti_cst --device am13e230x get-deviceid \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSSE \
  --password signed_payload.bin

L1 HSFS (Device ID with password)

ti_cst --device am13e230x get-deviceid \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --level L1 \
  --device-type HSFS \
  --password password.bin
  • password.bin is 16-byte password file

MCUBoot Image Signing (imgtool-sign)

Wrapper around the MCUBoot imgtool that signs an image with a session key or the development session.

ti_cst --device am13e230x imgtool-sign \
  --session session_name --session-password session_pass \
  --key-index 1 \
  --cmac 128 \
  -H 0x80 \
  -S 0x10000 \
  --img-version 1.0.0 \
  app.bin app_signed.bin
  • Use --dev-session instead of --session and --session-password to use the development session.

List Serial Ports

List the serial ports available for device communication. Use --regexp-filter to narrow the results.

ti_cst --device am13e230x list-ports --regexp-filter "XDS110"

Read SoC ID

Read the System-on-Chip (SoC) ID from the device. No authentication required for either HSFS or HSSE.

Command Syntax:

ti_cst --device am13e230x read-socid \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version}

Invoke Bootloader (BSL)

Invoke the Bootstrap Loader (BSL) on the device. Supports both HSFS (no authentication) and HSSE (with optional signed payload authentication).

HSFS (No authentication required)

ti_cst --device am13e230x invoke-bsl \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --device-type HSFS

HSSE (With signed payload)

First, generate the signed HSSE command payload:

ti_cst --device am13e230x sign-hsse-command-payload \
  --session session_name --session-password session_pass \
  --command-id 0x04 \
  --key-index 2 \
  --output bsl_payload.bin

Then invoke BSL:

ti_cst --device am13e230x invoke-bsl \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --device-type HSSE \
  --payload bsl_payload.bin

Key Revision Update

Advance device major key revision from revision 1 to revision 2. HSSE only.

Step 1: Generate signed key revision update payload

ti_cst --device am13e230x sign-key-revision-payload \
  --session session_name --session-password session_pass \
  --key1-index 1 \
  --key2-index 2 \
  --output krv_payload.bin

Step 2: Execute key revision update

ti_cst --device am13e230x key-revision-update \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --payload krv_payload.bin

App Revision Update

Advance application major revision. HSSE only.

Step 1: Generate signed app revision update payload

ti_cst --device am13e230x sign-hsse-command-payload \
  --session session_name --session-password session_pass \
  --command-id 0x18 \
  --key-index 2 \
  --output app_payload.bin

Step 2: Execute app revision update

ti_cst --device am13e230x app-revision-update \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --payload app_payload.bin

RMA Customer Operation

Execute RMA customer operation. HSSE only.

Step 1: Generate signed RMA customer payload

ti_cst --device am13e230x sign-hsse-command-payload \
  --session session_name --session-password session_pass \
  --command-id 0x0D \
  --key-index 2 \
  --output rma_payload.bin

Step 2: Execute RMA customer operation

ti_cst --device am13e230x rma-customer \
  --ccxml config.ccxml \
  --ccs-path /opt/ti/ccs{version} \
  --payload rma_payload.bin

CyberShield Toolkit GUI

What is the CST GUI

The CyberShield Toolkit GUI is a graphical front end for the same operations that the ti_cst command line provides. It is a three-step wizard that walks through the complete device security flow:

  1. Device & Key Selection - choose the device and the cryptographic keys (session) to use

  2. Configuration - detect the device lifecycle state and optionally provide an L1 password file

  3. Provisioning - run the key provisioning and DSSM commands that are valid for the detected lifecycle state

The GUI hides the command line arguments: it fills in the device, CCS path, CCXML file, session and payload files for every command, shows only the commands that are valid for the current device state, and can generate the signed payloads that the L1 and HSSE commands need.

Start the GUI from a terminal after installing the toolkit (see Installation):

cstgui

Note

The GUI runs the same operations as the command line, so the prerequisites are the same: a CCS installation and a CCXML file for your hardware (LP/CC), with a JTAG connection to the device.

Step 1: Device and Key Selection

The first page is the landing page of the wizard. The progress bar at the top shows the three steps, and the current step is highlighted in red.

CST GUI landing page

The landing page has the following sections:

  • Device Selection - the device the toolkit should work with. The key options are shown only after a device is selected.

  • CCS Installation Path - the Code Composer Studio installation folder. It is used to connect to the device over JTAG in the next steps.

  • Target Configuration File - the .ccxml file for your hardware. Use the same functional CCXML that you would pass to --ccxml on the command line.

  • Key Selection - how the keys for this session are created or loaded.

Select the device from the Device drop-down. Select AM13E230X for this device family.

CST GUI landing page after selecting AM13E230X

Once the AM13 device is selected, the Key Selection section lists four key methods. Select one of the four options. The Next button is enabled when the selected method has been completed.

Key selection methods

A session is the password-protected vault that holds the four keys used for key provisioning and for signing payloads (see Sessions). The four methods below correspond to the session setup options of the command line (see Session Setup).

Generate new keys

Creates a new session with four random keys. Use this method when you do not have keys yet.

Generate new keys
  1. Enter a Name for the session.

  2. Enter a Password and repeat it in Confirm Password. The password protects the session and is needed whenever the session is used later.

  3. Select Generate & Save. The button is enabled when all three fields are filled in and both passwords match.

The keys are generated locally and stored in a password-protected session in the user data folder: ~/.local/share/tisecprov/sessions/ on Linux, or %LOCALAPPDATA% on Windows. This is the same as the genkeys command on the command line.

Use existing session

Loads a session that was created earlier, either with the GUI or with genkeys / import-keys.

Use existing session
  1. Select the session from the Select Key drop-down. It lists the sessions found in the user data folder.

  2. Enter the session Password.

  3. Select Load.

New session with existing keys

Creates a new session from four key files that you already have, for example keys that were generated by your own key management system.

New session with existing keys
  1. Enter a Session Name.

  2. Enter a Password and repeat it in Confirm Password.

  3. Select the files for Key 1 File to Key 4 File with Browse. Each file must contain exactly one 16-byte AES-128 key.

  4. Select Import & Save.

This is the same as the import-keys command on the command line.

AM13 Development Session

Uses the pre-provisioned development session that ships with the toolkit.

AM13 development session

Select Use Development Session. No name or password is needed. The session uses the default SDK keys and is meant for evaluation and testing only (see Development Session).

Warning

Do not use the development session for production devices. Its keys are public sample keys. Use Generate new keys or New session with existing keys for production.

Step 2: Configuration

The configuration page identifies the device state and takes the optional L1 password file.

CST GUI configuration page
  • Device Information - shows the device selected in the previous step.

  • Device State - the lifecycle state of the device, HSFS or HSSE (see Lifecycle Detection). Either enter the state if you already know it, or select Detect to read it from the device.

  • Password File - optional. The 16-byte password file that is used by the L1 commands (see Security Levels Overview). If you do not have it yet, leave it empty. You can provide the password file later, when you run an L1 command.

When Detect is selected, a popup asks you to confirm the connection before the toolkit talks to the device.

JTAG connection required popup

Make sure the JTAG probe is connected to the device and select OK. Select Cancel to abort the detection. Follow any further on-screen prompts, for example to reset the device with the nRST button.

When detection finishes, the Device State field shows HSFS or HSSE. Select Next to continue to the provisioning page.

Step 3: Provisioning

The provisioning page shows the session information, the provisioning progress and a DSSM Commands tab. The Command drop-down in this tab lists only the commands that are valid for the detected device state. Selecting a command shows its parameters, and the button at the bottom of the tab is renamed to match, for example Run Factory Reset.

Selecting Finish on the provisioning page saves the commands that were run during the session as a shell script, and then closes the application.

The commands that can be run depend on the device state. The page shows the commands in the Command drop-down of the DSSM Commands tab. Each command is the same operation as the command of the same name in Device Services on the command line, so refer to that section for the details of every command.

  • HSFS devices (no keys provisioned): Provision Keys, Mass Erase, Open Debug, Wait For Debug, Factory Reset, Read SoC ID, Get Device ID and Invoke BSL.

  • HSSE devices (keys provisioned): Mass Erase, Open Debug, Wait For Debug, Factory Reset, Read SoC ID, Key Revision Update, App Revision Update, Invoke BSL, RMA Customer and Get Device ID.

Commands that need authentication offer L0 (no payload required) or L1 (payload / password file required). For L1, an HSFS device uses the 16-byte password file. An HSSE device needs a signed payload, which can be selected with Use Existing File or created in the GUI with Generate Payload.