diff options
| author | tv <tv@krebsco.de> | 2026-10-27 00:36:40 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 00:36:40 +0100 |
| commit | fde8a76ec5d8e697d9b13470cd15ed324bae3d00 (patch) | |
| tree | 6045b4c9fcd5ca2da221668f23e115c88c8e3d97 /src/swarm/auth.rs | |
| parent | 7af8f58d46737bb5835aa1625485f22ecf374ebe (diff) | |
talk about "transport" unless mycelium is meant
Diffstat (limited to 'src/swarm/auth.rs')
| -rw-r--r-- | src/swarm/auth.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/swarm/auth.rs b/src/swarm/auth.rs index 46efd77..3bfbd4d 100644 --- a/src/swarm/auth.rs +++ b/src/swarm/auth.rs @@ -1,9 +1,10 @@ //! Swarm membership by pre-shared key. //! -//! Mycelium authenticates the sender of every message (`src_pk` can't be forged), so we -//! always know *who* talks to us. With a swarm key configured, only nodes that also know -//! the key may take part: HELLO and HELLO_REPLY carry a tag proving it, and until a peer -//! has sent a valid one, everything else it sends is ignored. +//! The transport authenticates the sender of every message (for Mycelium, `src_pk` +//! can't be forged), so we always know *who* talks to us. With a swarm key configured, +//! only nodes that also know the key may take part: HELLO and HELLO_REPLY carry a tag +//! proving it, and until a peer has sent a valid one, everything else it sends is +//! ignored. //! //! The tag is `HMAC-SHA256(key, label ‖ swarm_id ‖ from_pk ‖ to_pk)`. It needs no //! challenge: it is bound to both keys, and only `from_pk` can send as `from_pk`, so a |
