harden: gate key-export/PIN over unauthenticated USB companion

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 4.8 committed 2026-07-11 19:21:11 +02:00
1 parent b4212ab6fc
commit 16f5c2889d
2 files changed
+37 -15

No files matched your search

+8
View File
@@ -18,4 +18,12 @@ public:
virtual bool isWriteBusy() const = 0;
virtual size_t writeFrame(const uint8_t src[], size_t len) = 0;
virtual size_t checkRecvFrame(uint8_t dest[]) = 0;
// Whether the transport carrying the current / most-recent frame is
// authenticated. A single-transport interface is trusted by definition
// (physically-connected USB, or a MITM-paired BLE link), so the default is
// true. Multi-transport wrappers (e.g. SerialDualInterface) override this to
// distinguish an unauthenticated local channel (USB) from a paired one, so
// callers can gate sensitive commands (key export, PIN read/set).
virtual bool isConnectionSecure() const { return true; }
};