Protocol breaks #
I don’t see this idea implemented often, and I think it’s pretty great. This design pattern lets you keep the network stack out of the TCB.
The scenario is as follows. You have a sensitive system that talks a complex protocol, like TCP or BLE. You’re concerned about that pre-authentication attack surface: the TCP or BLE stack itself. You may implement fancy cryptographic authentication on a layer on top, but that doesn’t rule out an attacker exploiting the stack underneath, since that code parses their packets before any signature is checked. What can we do about it?
One option is to not use TCP or BLE, and use a simpler protocol instead. But that’s a luxury. Another option is to “break” the protocol: insert a frontend node that terminates TCP or BLE and forwards only the APDU over a much simpler transport. The sensitive node speaks only that simple transport. It verifies the signature and passes the APDU to the application. The frontend can be fully compromised and it still can’t forge a valid message.
This suggests keeping the inner transport super simple. Something like a serial line, where you can actually audit the driver, plus an extremely simple framing protocol, say a length field followed by the payload. And that’s it. Then you put signatures on top.