secure secret provisioning (SSP) not working
Hi,
I've finally reached the stage where I can test the SSP flow
I burned a debug AES128GCM key on my ST-HSM-v2 card
I created a 148 bytes secrets file and passed it through TrustedPackageCreator tool to get the 244 bytes file
I created a signed ssp-tf-a bin
And I have a stm32mp157f-ev1 board to sacrifice
I am following commands in
and
Here is where I am currently stuck at:
The command: "STM32_Programmer_CLI.exe -c port=USB1 -ssp .\secrets.ssp .\tf-a-ssp-stm32mp157f-ev1-ssp-signed.stm32 hsm=1 slot=2" always fails
scenario #1:
board is started into DFU mode -> I execute the command (as suggested by the first doc as a valid method)
I get:
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 001C00203139510B38313636
DFU protocol: 1.1
Board : --
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
UPLOADING OTP STRUCTURE ...
Partition : 0xF2
Size : 1024 Bytes
Uploading OTP data:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Error: unable to get the associate alternate setting of partition ID: 0xf2
Error: please make sure that your alternate settings have string descriptors with the right format
Error: the specified partition: 0xf2 is unreachable
Error: Read OTP Partition failed
Error: Uploading the OTP structure failed
Error: Initializing the OTP structure failedFrom this "0xf2" error I see in a different thread on this forum that It means I need to be in U-boot
so:
Scenario #2:
board is started into DFU mode ->
I use STM32_Programmer_CLI with "-w Flashlayout"
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 serialboot/tf-a-stm32mp157f-ev1-serialboot.stm32.signed
- 0x03 ssbl-boot Binary none 0x0 serialboot/u-boot-stm32mp157f-ev1-serialboot.stm32.signed--> I execute the SSP command and get:
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAA Rev.Z,
SN : 001C00203139510B38313636
DFU protocol: 1.1
Board : --
Device ID : 0x0500
Device name : STM32MP157FAA Rev.Z
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
UPLOADING OTP STRUCTURE ...
Partition : 0xF2
Size : 1024 Bytes
Uploading OTP data:
██████████████████████████████████████████████████ 100%
Memory Programming ...
Opening and parsing file: tf-a-ssp-stm32mp157f-ev1-ssp-signed.stm32
File : tf-a-ssp-stm32mp157f-ev1-ssp-signed.stm32
Size : 87.61 KB
Partition ID : 0x01
Download in Progress:
██████████████████████████████████████████████████ 100%
File download complete
Time elapsed during download operation: 00:00:00.049
SSP file path : .\secrets.ssp
SSP HSM slot ID : 2
Reading the chip Certificate...
Requesting Chip Certificate...
Error: unable to get the associate alternate setting of partition ID: 0x 0
Error: please make sure that your alternate settings have string descriptors with the right format
Error: unable to upload data from virtual partitionon the board's console I just see:
partitions : done
Phase=END
DFU alt info setting: done
crq->brequest:0x0
#
UPLOAD ... done
Ctrl+C to exit ...
#
UPLOAD ... done
Ctrl+C to exit ...
#
UPLOAD ... done
Ctrl+C to exit ...
failed: -22Please help me complete this final SSP step
side note:
The SSP process write all OTP words from 59-95
But all evaluation board already have word 59 written with "board id"
I hope this won't interfere with the SSP process (I left first 4 bytes in my 148 byte secrets file as all 0s)
EDIT: I am using 2.10.0 version of tools, and version 2.0 of the ST yocto BSP
EDIT2: see update below
Thanks,
Michael
