Draft
Security hardening: erase LDevID root keys before ROM→FMC handoff#3664
Conversation
|
Agent-Logs-Url: https://github.com/chipsalliance/caliptra-sw/sessions/0598609d-bf31-4bd8-b2be-516e97dddfd5 Co-authored-by: mhatrevi <38512878+mhatrevi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement key clearing for ROM to FMC and FMC to RT transitions
Security hardening: erase LDevID root keys before ROM→FMC handoff
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LDevID private keys (ECC and MLDSA) were left in the Key Vault when ROM handed control to FMC, exposing them to ROM glitch attacks where an attacker causes ROM to skip verification and jump to FMC with root keys still accessible.
Changes
rom/dev/src/main.rs— Inlaunch_fmc(), eraseKEY_ID_LDEVID_ECDSA_PRIV_KEY(KeyId5) andKEY_ID_LDEVID_MLDSA_KEYPAIR_SEED(KeyId4) from the Key Vault immediately before transferring control to FMC. Any erasure failure triggers a fatal error.Notes
set_key_use_lock()approach is preserved. Erasing these keys before RT runs would break firmware update reset—FMC must re-sign the RT alias certificate on each update reset using the same cold-boot-derived keys, which are restored when the hardware clears USE_LOCK on reset. A proper erasure-based solution here requires ROM to re-derive FMC keys on update reset and is a separate effort.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/benjamindoron/byteorder/commits/struct_aware-1.4.3/home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo metadata --format-version 1 --all-features --manifest-path /home/REDACTED/work/caliptra-sw/caliptra-sw/image/verify/fuzz/Cargo.toml --filter-platform x86_64-REDACTED-linux-gnu --lockfile-path /tmp/rust-analyzerdd3e-6/Cargo.lock -Zunstable-options n/ru�� tests-085d826a63debuginfo=2 tests-085d826a63--cfg /debug/build/calfeature="arbitrary" /debug/build/calgit /debug/build/calrev-parse /debug/build/calHEAD /debug/build/calfeature="default"(http block)/home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo check --quiet --workspace --message-format=json --manifest-path /home/REDACTED/work/caliptra-sw/caliptra-sw/image/verify/fuzz/Cargo.toml --target-dir /tmp/codeql-scratch-dcfb536374eacc37/dbs/rust/working/target --lockfile-path /tmp/rust-analyzerdd3e-8/Cargo.lock --all-features --keep-going -Zunstable-options /debug/deps/caliptra_fmc-6889d70/home/REDACTED/work/caliptra-sw/caliptra-sw/target/debug/deps/rom_- own-linux-gnu/bin/rustc /debug/deps/caligit /debug/deps/calirev-parse /debug/deps/caliHEAD own-linux-gnu/bin/rustc(http block)/home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo /home/REDACTED/.rustup/toolchains/1.85-x86_64-REDACTED-linux-gnu/bin/cargo metadata --format-version 1 --all-features --manifest-path /home/REDACTED/work/caliptra-sw/caliptra-sw/drivers/fuzz/Cargo.toml --filter-platform x86_64-REDACTED-linux-gnu --lockfile-path /tmp/rust-analyzerdd3e-2f/Cargo.lock -Zunstable-options rev-�� HEAD git ndor/bin/git HEAD inux-gnu /usr/bin/git git(http block)https://api.github.com/repos/benjamindoron/zerocopy/commits/struct_aware-v0.6.3REDACTED, pid is -1(http block)If you need me to access, download, or install something from one of these locations, you can either: