feat(TcSecurityDeframer): expose active key SPIs and fingerprints - #490
Draft
nateinaction wants to merge 1 commit into
Draft
feat(TcSecurityDeframer): expose active key SPIs and fingerprints#490nateinaction wants to merge 1 commit into
nateinaction wants to merge 1 commit into
Conversation
Adds GET_ACTIVE_KEYS, which logs an ActiveKeyInfo(spi, fingerprint) event per active key-store slot so an operator who has lost track of what was provisioned can identify the slots without knowing the key material. The fingerprint is the first 4 bytes of SHA-256(key), hex-encoded, and the raw key never leaves the board. Bypass-allowlisted in ProvesRouter, like PROVISION_KEY/GET_SEQ_NUM, since an operator without the key cannot send an authenticated command to ask. Closes #488.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nateinaction
marked this pull request as draft
August 3, 2026 14:07
5 tasks
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.
Summary
Stacked on #472. Closes #488.
Adds
GET_ACTIVE_KEYStoTcSecurityDeframer: it logs oneActiveKeyInfo(spi, fingerprint)event per active key-store slot, so an operator who has lost track of what was provisioned can identify the slots without knowing the key material.fingerprintis the first 4 bytes of SHA-256(key), hex-encoded (computeKeyFingerprintinAuthenticator.cpp) — the raw key never leaves the board. If the store is empty, aNoActiveKeysevent is logged instead.GET_ACTIVE_KEYSis bypass-allowlisted inProvesRouter, the same asPROVISION_KEY/GET_SEQ_NUM: an operator who doesn't know the key can't send an authenticated command to ask what's provisioned, which is exactly the scenario this command exists for.Test plan
make test-unit— all 9 suites pass, including newcomputeKeyFingerprintcoverage (deterministic for the same key, differs for different keys, never echoes the key's own hex encoding) and new Bypasser opcode tests forGET_ACTIVE_KEYSon all three linksmake generate build— clean full build, dictionary confirms opcodes0x2100B005/0x2200B005/0x2300B005for UART/LoRa/SbandGET_ACTIVE_KEYSmake check-console-disabled— OKsecurity_active_keys_test.py(runs afterprovision_key_test.py): sendsGET_ACTIVE_KEYS, asserts the reported SPI matches what was provisioned and the fingerprint is an 8-hex-char string that never contains the raw key