Module libwhisper::session
[−]
[src]
This module handles Session (singular) management. The session is responsible for Frame generation and encryption.
Client session vs Server session
Only different between ClientSession and ServerSession is that Client doesn't know about server's session key at the beginning, while Server key doesn't know about client's identity key.
This handshake is heavily based on CurveCP and CurveZMQ.
Handshake
This is a very rough explanation. detailed one is coming later.
- Client sends Hello frame to server
- Server replies with Welcome frame
- Client replies with Initiate frame
- Server verifies that client is allowed to talk to this server and replies with Ready or Terminate frame
Messages
The protocol allows bi-directorial message exchange. However, implementation of that is not part of the protocol.
Structs
ClientSession |
Client-side session. |
EstablishedSession |
This structure represent session that completed handshake. |
KeyPair |
A keypair. This is just a helper type. |
ServerSession |
Server-side session. |
Enums
SessionState |
Enum representing session state. |
Statics
HANDSHAKE_DURATION |
How much time client and server have to agree on shared secret. |
NULL_BYTES |
Array of null bytes used in Hello package. Needs to be bigger than Welcome frame to prevent amplification attacks. Maybe, 256 is too much...who knows? |
READY_PAYLOAD |
Payload "server" side supposed to send to client when. |
SESSION_DURATION |
How much time one shared secret can last. |