legacy-medical-device-security-frameworks

Hardware Port — Pattern C MFA Shim

Notes for porting the Python reference design to production hardware. This document is intended for hardware engineers and device manufacturers building a deployable Pattern C device.

Why a hardware port matters

The Python reference design demonstrates the security mechanisms but is not a deployable product. A production-grade Pattern C shim must satisfy several requirements that the prototype does not:

Candidate platforms

Raspberry Pi (development and small pilots)

Notes on Raspberry Pi port:

ESP32 (potential dedicated-hardware port)

A faithful port to ESP32 would:

Custom hardware

Hardware-software boundary

The Python reference design has clean abstractions that map well to a hardware port:

Python protocol Hardware mapping
SerialEndpoint UART driver
TamperSensor GPIO interrupts on case-open switch, magnetic sensor, accelerometer
SessionRecorder Filesystem on power-protected storage
TotpGate RFC 6238 implementation in C/C++ or MicroPython
SiemTransport TLS over WiFi/Ethernet (consider mTLS for mutual auth)

Tamper-evident enclosure considerations

A production enclosure should:

Cabling

The shim sits in-line between the technician’s tooling and the medical device’s service port. Cabling considerations:

Power

Provisioning and decommissioning

Hardware shims must support:

Manufacturing and supply chain

Cost and form factor

Estimated bill-of-materials cost ranges:

Platform Approx BOM
Raspberry Pi-based $80–150 per unit
ESP32-based $20–40 per unit
Custom STM32 with secure element $40–80 per unit

Form factor:

Roadmap

The repository’s roadmap places production hardware procurement on the 2027 plan. In the interim, the Python prototype is suitable for institutional pilot deployments under research-artifact governance (see ../FDA-CONSIDERATIONS.md).

Contributing hardware variants

If you build a hardware port, please contribute notes back to this directory:

  1. A <platform>/ subdirectory with build instructions, schematics (if free to publish), and bill-of-materials.
  2. Any platform-specific software (firmware images are not required, but configuration notes are appreciated).
  3. An entry in this README.

Licence

Apache-2.0. The patent-grant clause applies, ensuring that contributors cannot subsequently assert patent claims against users of the design. See top-level LICENSE.