diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-23 17:14:26 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-23 17:14:26 +0200 |
| commit | 339cb427f886a0177014126bb684335837eff067 (patch) | |
| tree | 5f79dc0df617be66287a06fc4f0c5dcc61ceb167 /packages/meshbay-common/src/meshbay_common/__init__.py | |
| parent | cd85808c13926c89a97987d320ac26391eae3267 (diff) | |
| download | meshbay-339cb427f886a0177014126bb684335837eff067.tar.gz | |
feat: the node signs its handshake challenge (MNP 3.4)
node_pk in handshake_challenge is now signed over the channel binding
and both nonces, so a client can check the node key before a join
rather than only at the ack. Both transports; the browser and the QUIC
client refuse a wrong signature and treat an absent one as an older node.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/__init__.py')
| -rw-r--r-- | packages/meshbay-common/src/meshbay_common/__init__.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/__init__.py b/packages/meshbay-common/src/meshbay_common/__init__.py index f10302f..1271c4e 100644 --- a/packages/meshbay-common/src/meshbay_common/__init__.py +++ b/packages/meshbay-common/src/meshbay_common/__init__.py @@ -220,5 +220,21 @@ __version__ = "0.15.0" # the node's own `stream_init` and from no version number, so the request is # never sent to a peer that could not answer it. `MNP_MIN_SUPPORTED` does not # move. -MNP_VERSION = "3.3" +# +# **3.4 (2026-09-23): the node signs its challenge.** +# +# `handshake_challenge` carries `sig`, Ed25519 by the node key over +# `meshbay:mnp:challenge:v1` ‖ group_id ‖ nonce_c ‖ nonce_s ‖ binding +# (`handshake.challenge_transcript`). Until now `node_pk` in the challenge was a +# claim: the ack proves it, but a join is sent *before* the ack, so an +# invitation code went to whichever peer answered signaling. With the +# signature, a client that knows which node it means to reach — an invitation +# link names it — can refuse to send the code anywhere else. +# +# **Additive, and MINOR because nothing is required of an older peer.** A client +# that ignores `sig` behaves exactly as before; a client that reads it refuses a +# *wrong* one outright and treats an absent one as "this node cannot prove +# itself early", which it discovers from the node's answer and never from the +# version number. `MNP_MIN_SUPPORTED` does not move. +MNP_VERSION = "3.4" MHP_VERSION = "0.1" |