Fetching contributors…
Cannot retrieve contributors at this time
59 lines (45 sloc) 874 Bytes

Vock protocol

Framing

All frames are JSON packed with msgpack module.

{
  "type": "hello" // frame type
  "version": [0, 1], // protocol version
  "seq": 1,       // sequence number
  ...             // other packet data
}
||
{ "enc": Encrypted buffer }

Client <-> Client

Frame types:

  • helo
  • wait
  • acpt
  • voic
  • text
  • ping
  • pong
  • clse
    Client1      Client2
hello        ->
  * pub = p1
            <-    hello
                     * pub = p2
            <-    accept
                     * enc(p1, DH_public = d1)
accept       ->
  * enc(p2, d2)

     BLOCK CIPHERED PART

voice        ->
            <-    voice
text         ->
            <-    text
ping         ->
            <-    pong
clse         ->
            <-    close

Client <-> Server

TODO (May be just STUN?)