Skip to content

fix: add default Public channel key to rainbow table#897

Open
Kpa-clawbot wants to merge 2 commits intomasterfrom
fix/public-rainbow-key
Open

fix: add default Public channel key to rainbow table#897
Kpa-clawbot wants to merge 2 commits intomasterfrom
fix/public-rainbow-key

Conversation

@Kpa-clawbot
Copy link
Copy Markdown
Owner

Problem

The MeshCore default Public channel uses the well-known PSK 8b3387e9c5cdea6ac9e5edbaa115cd72 (channel-hash byte 0x11) per the companion protocol spec.

This key is missing from channel-rainbow.json in the repo. As a result, the ingestor sees GRP_TXT messages on the default Public channel (the most common channel on the mesh), can't find a key for hash 0x11 (the only entry that hashes to 0x11 in the current rainbow is #bogota, which obviously isn't the right key), and reports decryption_failed. Fresh deploys see almost no decrypted public traffic.

Fix

Add the well-known Public channel key to the rainbow as "Public": "8b3387e9c5cdea6ac9e5edbaa115cd72".

Verification

python3 -c "import hashlib; print(hex(hashlib.sha256(bytes.fromhex('8b3387e9c5cdea6ac9e5edbaa115cd72')).digest()[0]))"
# 0x11

Matches the channel-hash byte we observe on incoming Public channel GRP_TXT packets.

Discovered via

Fresh MikroTik container deploy with no local channel additions — every Public message showed up as decryption_failed while #LongFast etc decrypted fine.

you added 2 commits April 23, 2026 03:37
The MeshCore default Public channel uses the well-known PSK
8b3387e9c5cdea6ac9e5edbaa115cd72 (channel hash byte 0x11), per the
companion protocol spec. Without this entry, GRP_TXT messages on the
default Public channel land in the rainbow lookup with no key and
report decryption_failed even though the key is publicly known.

Add it as 'Public' so the ingestor decrypts these messages out of
the box on fresh deploys.
The MeshCore default Public channel uses well-known PSK
8b3387e9c5cdea6ac9e5edbaa115cd72 — it is part of the firmware spec,
not a community-named channel. Don't rely on the rainbow JSON to
ship it; bake it into a builtinChannelKeys() floor that loads
before the rainbow file. Rainbow / hashChannels / explicit config
can still override it (priority order preserved).

This means fresh deploys decrypt default Public traffic out of the
box even if channel-rainbow.json is missing or stale.

Tests:
- TestLoadChannelKeysBuiltinPublic: confirms Public is present with
  no rainbow / config.
- TestLoadChannelKeysBuiltinOverridable: confirms explicit config
  still wins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant