The PSoC-64 microcontroller family, developed by Infineon (formerly Cypress), offers robust security features tailored for embedded applications. Central to these security features is the concept of the Root of Trust (RoT), an immutable and secure foundation that underpins all cryptographic operations and secure processes within the device. Establishing the RoT involves a meticulous provisioning process, ensuring that the device's security mechanisms are both reliable and resistant to tampering.
The initial step in provisioning a PSoC-64 device involves setting up the necessary software tools and ensuring compatibility. This setup is crucial for facilitating secure communication between the host machine and the device during the provisioning process.
Tools and Requirements:
Connect the PSoC-64 development kit to a host machine via the USB interface using the KitProg3 USB connector. This connection establishes the communication channel necessary for provisioning commands and data transfer.
Begin with the device in a known state, typically in “debug mode” or a pre-provisioned state. This ensures that the device is ready to receive new security configurations without any residual data compromising the process.
Configure the bootloader settings and security configuration registers to enable secure boot. Secure boot ensures that only authenticated and integrity-verified firmware can be executed on the device.
Security configuration registers play a pivotal role in defining how the device handles secure operations. Key configurations include:
Utilize a trusted provisioning tool, such as Infineon’s Secure Provisioning Tool or Cypress’s custom toolset, to establish a secure session with the target device. This session ensures that all provisioning data, especially cryptographic keys, remain encrypted and authenticated during transmission.
The provisioning tool authenticates itself to the device using pre-established credentials and secure channels, often leveraging TLS or other encryption protocols to safeguard data integrity and confidentiality.
During the secure provisioning session, the root cryptographic key is written into the device. This can be accomplished by:
The data injected typically includes:
Using tools like CySecureTools, generate a provisioning policy that outlines:
Create device or signing certificates that establish a certificate chain. These certificates are signed with a vendor or manufacturing certificate, ensuring that the device’s public key can be verified against the known chain during boot processes.
The PSoC-64 device validates tokens from the Hardware Security Module (HSM), accepting the OEM’s public key as the new Root of Trust. The device then generates its private key and exports its public key, forming an immutable identity that is crucial for secure operations.
cysecuretools --policy ./policy/policy_multi_CM0_CM4_tfm.json --target CY8CKIT-064S0S2-4343W provision-device
This command sends the provisioning packet, including cryptographic keys and policies, to the MCU, completing the Root of Trust transfer.
After transferring the Root of Trust, perform validation steps such as testing a sample secure boot sequence to ensure that the secure boot logic correctly utilizes the Root of Trust to validate firmware images.
Once validation is successful, the device is locked down by setting debug and read protections. This prevents any future unauthorized reading or modification of the security keys and configurations. Additional fusing operations or configuration register settings may be applied to permanently commit the Root of Trust.
Sign the application firmware using the previously generated cryptographic keys. This ensures that only authenticated and unaltered firmware can be executed on the device.
Program the signed firmware onto the device, ensuring that the secure boot process will recognize and verify the firmware integrity during each boot cycle.
For future firmware updates or provisioning changes, use secure methods to ensure that any new firmware or configurations are authenticated against the established Root of Trust. Re-provisioning can be performed using updated parameters and policies as necessary.
Generate audit logs that document provisioning actions, key identifiers, and the device’s security state. Maintaining thorough documentation is essential for security compliance and post-deployment audits.
Step | Description | Tools/Commands |
---|---|---|
1. Environment Setup | Install CySecureTools, OpenOCD, and ensure Python is up to date. | CySecureTools, OpenOCD, Python 3.8.10+ |
2. Device Preparation | Initialize the device and configure secure boot settings. | ModusToolbox, CyProgrammer |
3. Initiate Provisioning | Establish a secure provisioning session. | CySecureTools, Secure Provisioning Tool |
4. Transfer RoT Keys | Inject root cryptographic keys into the device. | cysecuretools commands |
5. Policy & Certificate Prep | Generate security policies and certificates. | CySecureTools, JSON policy files |
6. RoT Transfer | Validate and establish the Root of Trust. | cysecuretools provision-device command |
7. Validation & Lockdown | Verify secure boot and lock down the device. | Provisioning tool validation steps |
8. Firmware Signing | Sign and deploy authenticated firmware. | CySecureTools signing tools |
9. Post-Provisioning | Perform auditing and prepare for future updates. | Audit logs, documentation tools |
Protect the Root of Trust keys by using Hardware Security Modules (HSMs) and ensuring that keys are stored in secure, non-volatile memory locations. Utilize one-time programmable memory or eFuses to prevent key extraction or tampering.
Conduct regular security audits to verify the integrity of the provisioning process. Maintain comprehensive documentation of provisioning steps, key management, and policy configurations to comply with industry security standards.
Implement secure firmware update mechanisms that rely on the Root of Trust to authenticate and verify firmware integrity. Ensure that all firmware updates are signed and validated before execution to prevent malicious code from being introduced.
The provisioning process for transferring the Root of Trust on PSoC-64 devices is a multifaceted procedure that establishes a secure foundation for all subsequent operations. By meticulously following each step—from environment setup and device preparation to key injection and device lockdown—developers can ensure that their PSoC-64 devices are fortified against unauthorized access and malicious interventions. Implementing these provisioning practices not only enhances device security but also builds trust in the integrity and reliability of the deployed solutions.