[][src]Crate shs_core

Most of the comments are taken from Duncan's fantastic Scuttlebutt Protocol Guide (repo), which he graciously released into the public domain.

Modules

client
server

Structs

ClientAuth

Message 3

ClientEphPublicKey
ClientEphSecretKey
ClientHello

Message 1

ClientPublicKey
ClientSecretKey
ClientSignature
ClientToServerKey

At this point the handshake has succeeded. The client and server have proven their identities to each other.

ClientToServerNonce
ClientToServerNonceGen
NetworkId
ServerAccept

Message 4

ServerEphPublicKey
ServerEphSecretKey
ServerHello

Message 2

ServerPublicKey
ServerSecretKey
ServerSignature
ServerToClientKey
ServerToClientNonce
ServerToClientNonceGen
SharedA

Now that ephemeral keys have been exchanged, both ends use them to derive a shared secret using scalar multiplication.

SharedB

Because the client already knows the server’s long term public key, both ends derive a second secret that will allow the client to send a message that only the real server can read and not a man-in-the-middle.

SharedC

Now that the server knows the  client’s long term public key, another shared secret is derived by both ends. The server uses this shared secret to send a message that only the real client can read and not a man-in-the-middle.