IRC over Freenet 0.7 publish/subscribe
======================================

DEFINITIONS:

PSK:
A PSK is the key for a publish/subscribe stream. Any node which knows
the PSK can join the stream, and listen. There is no backchannel. A PSK
looks like this:
freenet:PSK at 
KiXFmrgM11C1o5TiMGCiqfSsu94,NsdAe5mHmlPYJVNIIowy9xZFpCDZoj2V5npSIeWM~Os,AAE/test

It has, at present (in future it will have a signing key as well), a
name, a routing key and a crypto key. It is routed by its routing key,
and decrypted using the crypto key. The name is essentially a comment,
just as with CHKs.

ARCHITECTURE:

Objects:
Master server
- This corresponds to a real IRC server. It receives messages from
  users, and sends messages out to its broadcast streams. It manages
  channels etc.

Client proxy
- This appears to a real IRC client to be an IRC server. It connects to
  the master server via its broadcast stream, and the master server
  connects to it via its injection stream. PRIVMSGs to the client proxy
  and users behind it are encrypted using the client's session key,
  which is sent to the server during introduction.

Broadcast stream
- Stream transmitted by the master server. Clients subscribe to this.
  Anyone who knows the PSK can read the channel, *even if they are not
  currently connected*. The master server has a primary broadcast
  stream, which is used for privmsgs to client nicks, for handshakes
  with clients, and other global and semiglobal stuff, plus one per
  channel.

Injection stream
- Stream transmitted by client to the master server. Server subscribes
  to this in the event of a client being introduced.

Client nick
- Actual IRC client connected to a client proxy. Has a nick.



Bootstrapping: From the master server's perspective:
Node A creates a master server. He can then introduce clients
manually. He will need to introduce at least one. This is done by
entering the client proxy's injection stream PSK. The server will then
connect to this stream if possible. The client has been sending its
session key continually down its transmit stream, as a handshake. When
the server receives this, it sends a response, encrypted using the
session key, down its main broadcast stream. When the client receives
this, it is connected. The client's hostname will appear as the routing
key of its PSK in base64, so we can kickban etc.

Reply via email to