simulator: fix simulator by fixing Nova memory fake
What changed, and why it matters
This commit fixes a mismatch inside the firmware simulator's fake memory. The simulator was incorrectly pretending the device used one type of secure chip (ATECC) while the fake secure chip implementation expected another (Optiga). As a result, the wrong password-stretching algorithm was being passed during simulator tests. The fix sets the simulated secure chip type to Optiga so the simulator runs correctly. This only affects test/simulator code, not real hardware or production firmware.
No security action required. Treat as a normal test/simulator bugfix. If reviewing, confirm the change is limited to test hardware fakes and does not alter production securechip handling.
Security signals we found
Incorrect secure chip type in simulator fake memory caused algorithm mismatch
Only affects test/simulator code, not production firmware
No evidence of real-device impact or malicious behavior
Evidence from the diff
In test/hardware-fakes/src/fake_memory.c, fake_memory_nova() now sets shared_ptr->fields.securechip_type = MEMORY_SECURECHIP_TYPE_OPTIGA. Previously the field was left unset, so the simulator inferred ATECC (V0 stretching) while the fake securechip implementation assumed Optiga (V1 stretching). This caused the simulator to pass the V0 stretching algorithm to a fake chip expecting V1. The patch aligns the fake memory with the fake securechip implementation.
Changed components
test/hardware-fakes/src/fake_memory.cSimulator / test harness onlyInspect captured patch +1 / −0
diff --git a/test/hardware-fakes/src/fake_memory.c b/test/hardware-fakes/src/fake_memory.c
index 9cc39ef..572ed3b 100644
--- a/test/hardware-fakes/src/fake_memory.c
+++ b/test/hardware-fakes/src/fake_memory.c
@@ -70,6 +70,7 @@ bool fake_memory_nova(void)
{
chunk_shared_t* shared_ptr = (chunk_shared_t*)&_memory_shared_data[0];
shared_ptr->fields.platform = MEMORY_PLATFORM_BITBOX02_PLUS;
+ shared_ptr->fields.securechip_type = MEMORY_SECURECHIP_TYPE_OPTIGA;
memory_ble_metadata_t ble_metadata = {0};
memcpy(ble_metadata.allowed_firmware_hash, ALLOWED_HASH, sizeof(ALLOWED_HASH) - 1);
Why this scored 16/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.