Skip to content

[Bug]: DMing can be permanently impaired if a device resets its keys #8211

@SudoRand

Description

@SudoRand

Category

Other

Hardware

Rak4631

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

2.6.11.60ec05e

Description

It seems there is a gap in the current Meshtastic implementation of Trust On First Use for direct message encryption keys. If a node is operating in an area with a public mesh and its keys are ever reset, that device may be permanently unable to direct message with nodes that have seen it on the network before.

From this point forward, the device will be unable to send or receive DMs with nodes that previously wrote down the old key. Since the key is associated with the device's fixed Node ID based on the hardware MAC address, the problem is permanent.

The only solution is to get the owner of every node that you might want to DM (or that might want to DM you) to manually delete your device from their NodeDB. This is complicated by the fact that you can't DM them to ask them to do this, and the apps don't make it clear when this may be needed.

Restoring the old key isn't a solution because the problem will exist for any nodes that first saw this node when it was using the new key (and the old key may have been reset for a good reason).

A common solution in other Trust On First Use systems is to have a UI that informs the sender or recipient that the peer they are communicating with has changed keys and confirms whether they want to trust the new key.

Another option is to let nodes reset the Node ID along with its keys. That way, if you find yourself in this situation you could at least "start fresh" by resetting both your ID and your keys. This seems helpful for other reasons, like when selling or giving away used hardware the new owner wouldn't have to use your identity on the mesh and then the old and new owners wouldn't be able to (theoretically) decrypt each other's communications.

There are various common reasons why keys may need to be reset, including when addressing the "low entropy key" issue, when factory resetting, when buying or being given used hardware, or when a private key has been leaked/compromised.

It would be great if there was a means for devices in this situation to become fully viable on the network again.

This topic was previously discussed here.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedReviewed by the team, has enough information and ready to work on now.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions