IP Library › Granted Patent US 12,511,397
Granted Patent B2
US 12,511,397 · App. 17/946,298 · Granted Dec 30, 2025

Secure firmware upload

Inventors: Antonino Mondello (Messina, IT); Michele Alessandro Carrano (Catania, IT); Riccardo Condorelli (Catania, IT)
Assignee: STMicroelectronics S.r.l.
G06F21/572G06F21/602G06F2221/033
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,511,397
App. No.
17/946,298
Granted
Dec 30, 2025
Kind
B2
Abstract

The present disclosure relates to a method including executing, by an electronic device, a first firmware module stored in a volatile memory of the electronic device, the execution of the first firmware module causing an updated firmware key to be stored in a non-volatile memory of the electronic device, and uploading a second firmware module to the electronic device. The method also includes decrypting the second firmware module by a cryptographic processor of the electronic device based on the updated firmware key, and installing the decrypted second firmware module in the volatile memory of the electronic device at least partially overwriting the first firmware module.

Claims (42)

1 . A method, comprising:

executing, by an electronic device, a first firmware module stored in a volatile memory of the electronic device, the volatile memory being accessible only via a cryptographic processor and not directly accessible via an interface of the electronic device, the first firmware module being a key injection firmware;

wherein executing the first firmware module causes an updated firmware key to be stored in a non-volatile memory of the electronic device, the non-volatile memory comprising a one-time programmable (OTP) memory;

uploading a second firmware module to the electronic device via the interface, the second firmware module being a new firmware;

decrypting the second firmware module by the cryptographic processor based on the updated firmware key, and verifying that the second firmware module has an expected format and/or content; and

installing the decrypted second firmware module in the volatile memory, at least partially overwriting the first firmware module;

performing, by the electronic device, a verification process to confirm the authenticity of the decrypted second firmware module prior to execution, and preventing replay of obsolete firmware updates using an anti-replay mechanism implemented by a pseudo-monotonic counter stored in the OTP memory by incrementing the pseudo-monotonic counter, wherein each incrementation of the pseudo-monotonic counter comprises writing a first logic value to a bit in the OTP memory having a second logic value.

2 . The method according to claim 1 , further comprising, before executing the first firmware module:

uploading the first firmware module to the electronic device; and

decrypting the first firmware module by the cryptographic processor of the electronic device based on an initial firmware key.

3 . The method according to claim 2 , wherein the initial firmware key is stored in the non-volatile memory.

4 . The method according to claim 2 , wherein the initial firmware key is stored by a hardware configuration of the electronic device.

5 . The method according to claim 1 , wherein the first and/or second firmware module includes a cyclic redundancy check (CRC) field storing a CRC value, the method further comprising verifying the CRC value by a CRC module of the electronic device.

6 . The method according to claim 1 , wherein verifying comprises at least a part of code of the first and/or second firmware module with a reference value.

7 . The method according to claim 1 , wherein the electronic device comprises a processing unit, the method comprising powering down the processing unit during the uploading, decrypting and/or verification of the second firmware module.

8 . The method according to claim 2 , further comprising, after the execution of the first firmware module, deactivating the initial firmware key.

9 . The method according to claim 1 , further comprising, after the execution of the first firmware module and before installing the second firmware module, encrypting said first firmware module by the cryptographic processor based on the updated firmware key.

10 . The method according to claim 1 , wherein uploading the new firmware module triggers an incrementation of a count value stored in the non-volatile memory.

11 . The method according to claim 10 , further comprising performing authorization to install the new firmware module based on a comparison between a value contained in the new firmware module and the count value.

12 . The method according to claim 1 , further comprising performing elliptic curve cryptography to decrypt the first and/or the second firmware module, using the cryptographic processor.

13 . An electronic device, comprising:

a volatile memory storing a first firmware module, the first firmware module being a key injection firmware;

a non-volatile memory configured to store an updated firmware key upon execution of the first firmware module, the non-volatile memory comprising a one-time programmable (OTP) memory;

an interface configured to upload a second firmware module, the second firmware module being a new firmware;

a cryptographic processor configured to decrypt the second firmware module, based on the updated firmware key, and verify that the second firmware module has an expected format and/or content;

wherein the volatile memory is accessible via the cryptographic processor and is not directly accessible via the interface; and

a processing unit configured to install the decrypted second firmware module in the volatile memory, partially overwriting the first firmware module;

wherein the processing unit performs a verification process to confirm authenticity of the decrypted second firmware module prior to execution, and further prevents replay of obsolete firmware updates using an anti-replay mechanism implemented by incrementing a pseudo-monotonic counter stored in the OTP memory, wherein each incrementation of the pseudo-monotonic counter comprises writing a first logic value to a bit in the OTP memory having a second logic value.

14 . The electronic device according to claim 13 , wherein the cryptographic processor is configured to perform elliptic curve cryptography to decrypt the first and/or the second firmware module.

15 . A computer readable medium comprising a non-volatile memory of an electronic device, the computer readable medium containing instructions that, when executed, cause:

Before execution of a first firmware module, the first firmware module being a key injection firmware:

uploading of the first firmware module to a volatile memory of the electronic device; and

decryption of the first firmware module by a cryptographic processor of the electronic device based on an initial firmware key;

execution, by the electronic device, of the first firmware module stored in the volatile memory of the electronic device;

wherein execution of the first firmware module causes an updated firmware key to be stored in the non-volatile memory of the electronic device;

uploading of a second firmware module to the electronic device via an interface of the electronic device, the second firmware module being a new firmware;

decryption of the second firmware module by the cryptographic processor of the electronic device based on the updated firmware key, and verification that the second firmware module has an expected format and/or content; and

installation of the decrypted second firmware module in the volatile memory of the electronic device at least partially overwriting the first firmware module, the volatile memory being accessible via the cryptographic processor and not directly accessible via the interface;

performance of a verification process to confirm the authenticity of the decrypted second firmware module prior to execution, and preventing replay of obsolete firmware updates using an anti-replay mechanism implemented by a pseudo-monotonic counter stored in the OTP memory by incrementing the pseudo-monotonic counter, wherein each incrementation of the pseudo-monotonic counter comprises writing a first logic value to a bit in the OTP memory having a second logic value.

16 . The method according to claim 15 , wherein the initial firmware key is stored in the non-volatile memory.

17 . The method according to claim 15 , wherein the initial firmware key is stored by a hardware configuration of the electronic device.

18 . The method according to claim 15 , further comprising, after the execution of the first firmware module, deactivating the initial firmware key.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 16, 2022
From: MONDELLO, ANTONINO; CARRANO, MICHELE ALESSANDRO; CONDORELLI, RICCARDO
To: STMICROELECTRONICS S.R.L.
Reel/Frame 061120/0398 →
Priority Claims (1)
FR 2109983 · Sep 22, 2021 · national
Continuity (1)
Related Publication 20230090664A1 · Mar 23, 2023
References Cited (12)
US 20110119460A1 · Wankhade · 2011 [cited by examiner]
US 20130332605A1 · Kozlowski · 2013 [cited by examiner]
US 20150121086A1 · Smith · 2015 [cited by examiner]
US 20160026783A1 · Buer · 2016 [cited by examiner]
US 20210312053A1 · Kloth · 2021 [cited by examiner]
EP 3789898A1 · 2021 [cited by applicant]
WO WO2005076139A1 · 2005 [cited by examiner]
Ujjwal Guin ⋅ Swarup Bhunia ⋅ Domenic Forte ⋅ Mark M. Tehranipoor; SMA: A System-Level Mutual Authentication for Protecting Electronic Hardware and Firmware; IEEE Transactions on Dependable and Secure Computing (vol. 14… [cited by examiner]
M. A. Prada-Delgado ⋅ A. Vazquez-Reyes ⋅ I. Baturone; Trustworthy firmware update for Internet-of-Thing Devices using physical unclonable functions; 2017 Global Internet of Things Summit (GIoTS) (2017, pp. 1-5); (Year: … [cited by examiner]
Shay Gueron; Memory Encryption for General-Purpose Processors; IEEE Security & Privacy (vol. 14, Issue: 6, 2016, pp. 54-62); (Year: 2016). [cited by examiner]
Arm: “Arm Platform Security Architecture Trusted Boot and Firmware Update 1.1 Contents”, Mar. 9, 2020 (Mar. 9, 2020), XP055891415, 49 pgs. [cited by applicant]
INPI Search Report and Written Opinion for priority application, FR 2109983, report dated Apr. 29, 2022, 11 pgs. [cited by applicant]