diff options
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 |
