Skip to content

Standardise protocol for apps and firmware #323

@mchack-work

Description

@mchack-work

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions