Identity

Nodes are assigned an identity that is used for addressing and security, and currently defined as a struct in identity.h:

struct Identity {
        uint32_t     id;
        uint8_t      signer_priv[32];
        // Pending discussion of RNG.
        // uint8_t   seed[8];
        DateTime     born;
};

The fields are:

  • ID is used for addressing
  • the signing key is used for cryptographically tying identity
  • seed is used to initialise the RNG at startup
  • born identifies when this identity was generated

There are a few options for establishing the node’s identity.

  • Generating at startup if the identity hasn’t been provisioned yet. This is problematic because the RNG hasn’t been established, and the signing key and node ID need to be randomly generated.
  • Programming the EEPROM before putting it in the system. There is a tool for generating an EEPROM SREC file in this repo (nodegen/), but it requires an external EEPROM generator.
  • Reading an SREC file from the SD card at boot if the node isn’t provisioned (and removing that file after programming).
  • The host can provision the node over the serial port.

During this early development stage, I’m leaning towards the second option.