Encryption in Meshtastic

Cryptography is tricky, so we’ve tried to ‘simply’ apply standard crypto solutions to our implementation. However, the project developers are not cryptography experts. Therefore we ask two things:

Summary of strengths/weaknesses of our current implementation

Based on comments from reviewers (see below), here’s some tips for usage of these radios. So you can know the level of protection offered:

Possible future areas of work (if there is enough interest - post in our forum if you want this):

  1. Optionally requiring users to provide a PIN to regain access to the mesh. This could be based on: intentionally locking the device, time since last use, or any member could force all members to reauthenticate,
  2. Until a device reauthenticates, any other access via BLE or USB would be blocked (this would protect against attackers who are not prepared to write custom software to extract and reverse engineer meshtastic flash memory)
  3. Turning on read-back protection in the device fuse-bits (this would extend protection in #2 to block all but extremely advanced attacks involving chip disassembly)
  4. Time limiting keys used for message transmission and automatically cycling them on a schedule. This would protect past messages from being decoded even if an attacker learns the current key.

Notes for reviewers

If you are reviewing our implementation, this is a brief statement of our method.

Comments from reviewer #1

This reviewer is a cryptography professional, but would like to remain anonymous. We thank them for their comments ;-):

I’m assuming that meshtastic is being used to hike in places where someone capable is trying to break it - like you were going to walk around DefCon using these. I spent about an hour reviewing the encryption, and have the following notes:

I’m guessing that the network behaves somewhat like a store-and-forward network - or, at least, that the goal is to avoid establishing a two-way connection to transmit data. I’m afraid I haven’t worked with mesh networks much, but remember studying them briefly in school about ten years ago.