feat(core): use explicit secret locking on T3W1 and allocate space for MCU device cert in the secret sector
What changed, and why it matters
This commit adjusts the on-device secret memory layout for the Trezor T3W1 hardware model. It removes unnecessary parentheses from one offset, reserves space for an MCU device certificate, and adds a dedicated 'lock slot' region. The change is preparatory: it allocates memory regions but does not by itself add or change any code that reads or writes these regions. There is no direct evidence in the commit that this fixes an active security bug, though the title mentions 'explicit secret locking' which is a security-hardening concept.
Treat as low-priority informational. Review follow-up commits that consume the new SECRET_MCU_DEVICE_CERT and SECRET_LOCK_SLOT regions to determine whether the intended 'explicit secret locking' is implemented correctly and whether any previously implicit locking had security gaps. No immediate patching is indicated by this diff alone.
Security signals we found
Memory-layout change in secret sector for hardware wallet
Addition of a dedicated lock-slot region (SECRET_LOCK_SLOT_OFFSET/LEN)
Addition of MCU device certificate region in secret sector
Title frames change as 'explicit secret locking' and certificate allocation
No changelog entry, reducing public traceability
Evidence from the diff
The patch modifies core/embed/models/T3W1/secret_layout.h, a header defining offsets and lengths for secret storage sectors on the T3W1 model. It changes SECRET_MONOTONIC_COUNTER_1_OFFSET from parenthesized (0x430) to 0x430 (no functional change), adds SECRET_MCU_DEVICE_CERT_OFFSET 0x870 with size 0x400, and adds SECRET_LOCK_SLOT_OFFSET 0xC70 with length 0x10. These are purely layout/address-space reservations; no runtime logic is changed in this commit. The title references ‘explicit secret locking on T3W1’ and ‘allocate space for MCU device cert in the secret sector’, suggesting future code will use these regions for certificate storage and a lock slot, but that code is not present here.
Changed components
Trezor Core firmwareT3W1 model secret storage layoutcore/embed/models/T3W1/secret_layout.hInspect captured patch +7 / −1
diff --git a/core/embed/models/T3W1/secret_layout.h b/core/embed/models/T3W1/secret_layout.h
index 353d18310..8e27a97bd 100644
--- a/core/embed/models/T3W1/secret_layout.h
+++ b/core/embed/models/T3W1/secret_layout.h
@@ -33,7 +33,7 @@
#define SECRET_MONOTONIC_COUNTER_0_OFFSET 0x30
#define SECRET_MONOTONIC_COUNTER_0_LEN 0x400
-#define SECRET_MONOTONIC_COUNTER_1_OFFSET (0x430)
+#define SECRET_MONOTONIC_COUNTER_1_OFFSET 0x430
#define SECRET_MONOTONIC_COUNTER_1_LEN 0x400
#define SECRET_KEY_SLOT_1_OFFSET 0x830
@@ -44,6 +44,12 @@
#define SECRET_KEY_SLOT_2_LEN 0x20
#define SECRET_KEY_SLOT_2_PUBLIC 1
+#define SECRET_MCU_DEVICE_CERT_OFFSET 0x870
+#define SECRET_MCU_DEVICE_CERT_SIZE 0x400
+
+#define SECRET_LOCK_SLOT_OFFSET 0xC70
+#define SECRET_LOCK_SLOT_LEN 0x10
+
// second page: refreshed on wallet wipe
#define SECRET_BHK_OFFSET 0x2000
#define SECRET_BHK_LEN 0x20
Why this scored 22/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.