SecureBootloadersST RevA0
SecureBootloadersST RevA0
MCU’s
Topics:
• Embedded System Security Attacks
• Secure Bootloader Features
• STM32 X-CUBE-SBSFU
• Secure Bootloader Implementation
• SBSFU Demonstration
• Best practices for secure bootloader design
© 2017 Beningo Embedded Group, All Rights Reserved 2
The Lecturer
Social Media / Contact Newsletters Consulting
: [email protected] • Embedded Bytes • Secure Bootloaders
: 810-844-1522 • Code Reviews
: Jacob_Beningo • Architecture Design
• Real-time Software
: Beningo Engineering
• Expert Firmware Analysis
: JacobBeningo • Microcontroller Systems
Jacob Beningo : Embedded Basics
NUCLEO-L476RG
Sensor
Communications
Device
MCU
Co
mm
un
ica
tion Communication Sensor MCU
Device
Protect Keys
Data Confidentiality Protect Intellectual Property
Protect Customer Data
Code Integrity
Firmware Integrity Isolate Secure and Non Secure Processes
Secure Communications
– Authentication reset
Application
– Integrity Boots Up
Server MCU
Communication
Encrypted File
Firmware Firmware
Data File Data File
Data File
STM32 L4
STM32 L0
STM32 F7
STM32 F4
STM32 F2
STM32 L1
STM32 F0
STM32 F3
STM32 F1
STM32
STM32 H7
Debug
Access
Port
RESET
Register
FLASH
WRP
FLASH
Mass
ERASE
Tamper
Pins
CRC
96-Bit
Unique ID
Crypto
Library
Support
Memory
Protection
Unit(MPU)
FLASH
RDP
TRNG
Security Features
AES
STM32 Security Features
Hardware
Accelerator
FLASH
PCROP
HASH
Hardware
Accelerator
Firewall
SRAM
RDP
FLASH
ECC
Sys Clock
80
32
32
48
72
72
400
216
180
120
(MHz)
Arm
M4
M7
M7
M4
M3
M3
M0
M4
M3
M0+
Cortex®
Package Architecture Overview
Secure Bootloader & Secure Firmware Update Basic User Application
SECURITY ACTIVATION
Download
Local FW loader
(option)
SBSFU SBSFU
Secure OEM-FW image Update (SBSFU local download or User Application Download)
WRP
Nonce (IV)
Isolation
Isolation
SFU keys SFU keys
OEM FW V2
(Clear binary)
RDP L2
RDP L2
OEM FW V2
development
IDE
Slot #0
FW Header #A FW Header #A FW Header #B Active
Firmware
Slot #0 Active Active Active
Firmware #A Firmware #A Firmware #B
Secure Engine
SECoreBin SE_Core.bin
Low level APIs
Low level components
SBSFU Core
Bootloader
Demo
© 2017 Beningo Embedded Group, All Rights Reserved
Secure Bootloader Best Practices
• Start your secure bootloader design early!
• Remember that security isn’t free
• Select a microcontroller that supports security
• Lock the flash security bits to protect the bootloader and application
– Secure boot should be immutable
• Securely store private keys
• Clearly identify up-front the level of security that is necessary for the bootloader
• Develop a chain of trust
• Use signatures to authenticate the firmware source