-
Notifications
You must be signed in to change notification settings - Fork 29
Description
With the coming Castor release we introduce the possibility of resetting the TKey from a device app. The rationale is that a user, through a client app, should be able to ask a device app to reset the TKey for several reasons, one of them being to load a new device app.
To make this possible at all we need to standardise the application protocol request for at least doing resets, maybe even for the firmware protocol.
Currently we have one standardisation on the app level: we ask well-behaved apps to reply NOK to a request following the framing protocol with an endpoint number set to 2 (firmware). This is to be able to identify if the firmware is running or not.
We might want to take this moment to further standardise the protocol, perhaps even introduce a formal grammar that can be used for code generation.
Some initial thoughts:
- Define a base set of requests that everything (including firmware) should support.
- Define a base set of requests all device apps should support.
- All else, app specific.
Some things to investigate for implementation:
- nanopb, a Protobuf implementation for embedded systems.
- CBOR. Also used in CTAP2 as in FIDO2.
- Capn'n Proto.