Skip to content

Expose active key SPIs/fingerprints from TcSecurityDeframer #488

Description

@nateinaction

Summary

Add a way to query which SPIs are currently active in a TcSecurityDeframer instance's on-flash key store, along with a fingerprint of each key, so an operator who has lost track of what was provisioned can identify the slots without knowing the key material.

Rationale

TcSecurityDeframer already tracks up to two active slots (m_keyStore / activeKeyCount() / activeSpiSlots() in TcSecurityDeframer.hpp), but none of that is exposed to ground. If an operator forgets which SPI(s) and keys are provisioned on a given link (UART/LoRa/S-band), there's currently no way to find out short of trial and error with PROVISION_KEY/ADD_KEY/REMOVE_KEY.

Required changes

  1. Add a command and/or telemetry channel that reports the active SPI(s) for a TcSecurityDeframer instance.
  2. Alongside each SPI, report a fingerprint of the associated key (e.g. a truncated hash) rather than the key itself, so the response never leaks key material.
  3. Cover the new command/telemetry with unit and/or integration tests.

Acceptance criteria

  • Ground can query a TcSecurityDeframer instance and get back its active SPI(s) plus a non-reversible fingerprint per key.
  • No raw key bytes are ever included in the response.
  • Relevant tests pass.

Backlinks

Requested by: @ineskhou, agreed by @nateinaction

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions