updates.
[silc.git] / TODO
1 TODO for 1.2 And Beyond
2 =======================
3
4 NOTE: Any item that doesn't have (***DONE) in it, isn't done yet.  The
5 (***TESTING NEEDED) means that the item has been done but not yet properly
6 tested.
7
8 NOTE: A TODO entry does not mean that it is ever going to be done.  Some
9 of the entries may be just ideas, good, bad or ugly.  If you want to work
10 on some of the TODO entries simply let us know about it by dropping a note
11 to silc-devel mailing list or appear on 'silc' channel on SILCNet.
12
13
14 General
15 =======
16
17  o Create apps/tutorial containing various Toolkit API tutorials.
18
19  o The Toolkit split.  The Toolkit is to be splitted in parts.  How many
20    parts and what the parts are isn't decided yet.  Each part is a separate
21    software package.  Current thinking is of the following:
22
23    SILC Toolkit                 SILC protocol, client and server library
24    SILC Runtime Toolkit         runtime library
25    SILC Crypto Toolkit          crypto, asn1, math, skr, pgp, etc.
26
27    The rationale for this is of course that other than SILC projects
28    might like to use the various libraries SILC Toolkit provides, but
29    naturally they don't want the bloat of SILC protocol related stuff.
30
31    The Runtime library in SILC Toolkit is a general purpose runtime library,
32    like Glib and APR are.  The runtime library is to be developed further
33    to provide alternative to Glib and APR.
34
35    The Crypto library in SILC Toolkit is a general purpose crypto library
36    providing pretty nice APIs compared to many other crypto libraries,
37    especially OpenSSL.  The Crypto library is to be developed further
38    to include support for OpenPGP, X.509 and SSH2.
39
40
41 lib/silccore
42 ============
43
44  o SILC_PACKET_FLAG_ACK support.  Implement ACK packet and packet payload
45    to silcpacket.c.
46
47  o All payload encoding routines should take SilcStack as argument.
48
49  o Remove SilcCommandCb from silccommand.h.
50
51  o All payload test routines into lib/silccore/tests/.
52
53
54 lib/silcclient, The Client Library
55 ==================================
56
57  o Giving WHOIS for nick that doesn't exist should remove any same
58    named entries from the client cache.
59
60  o peer-to-peer private messages
61
62  o Private message key request notification to application.  See XXX in
63    client_prvmsg.c.
64
65  o in JOIN notify handle resolving that timedout.  Currently the user is
66    never joined the channel if this happens.  What to do if message is
67    received from user that hasn't been resolved/joined?
68
69  o Message ACKing support.
70
71  o in /cmode and /cumode with +r, maybe the public key and private key
72    could be just some "string", which would then match to "string.pub" and
73    "string.prv".
74
75  o If the SILC Events (see below) are implemented, perhaps client library
76    should provide events so that application developer has a choice of
77    developing the SILC app with callbacks or with events.
78
79
80 Runtime library, lib/silcutil/
81 ==============================
82
83  o Fix universal time decoding (doesn't accept all formats) in silctime.c.
84
85  o Add functions to manipulate environment variables.
86
87    SilcBool silc_setenv(const char *variable, const char *value);
88    const char *silc_getenv(const char *variable);
89    SilcBool silc_clearenv(const char *variable);
90
91  o Add functions to loading shared/dynamic object symbols (replaces the
92    SIM library (lib/silcsim) and introduces generic library).  Add this
93    to lib/silcutil/silcdll.[ch].
94
95    SilcDll silc_dll_load(const char *object_path, SilcDllFlags flags);
96    void silc_dll_close(SilcDll dll);
97    void *silc_dll_getsym(SilcDll dll, const char *symbol);
98    const char *silc_dll_error(SilcDll dll);
99
100  o Add directory opening/traversing functions
101
102  o silc_getopt routines
103
104  o silc_hash_table_replace -> silc_hash_table_set.  Retain support for
105    silc_hash_table_replace as macro.
106
107  o The SILC Event signals.  Asynchronous events that can be created,
108    connected to and signalled.  Either own event routines or glued into
109    SilcSchedule:
110
111    SilcTask silc_schedule_task_add_event(SilcSchedule schedule,
112                                          const char *event, ...);
113    SilcBool silc_schedule_event_connect(SilcSchedule schedule,
114                                         const char *event,
115                                         SilcTaskCallback event_callback,
116                                         void *context);
117    SilcBool silc_schedule_event_signal(SilcSchedule schedule,
118                                        const char *event, ...);
119
120    Example:
121      silc_schedule_task_add_event(schedule, "connected",
122                                   SILC_PARAM_UI32_INT,
123                                   SILC_PARAM_BUFFER,
124                                   SILC_PARAM_END);
125      silc_schedule_event_connect(schedule, "connected", connected_cb, ctx);
126      silc_schedule_event_signal(schedule, "connected", integer, buf,
127                                  SILC_PARAM_END);
128      SILC_TASK_CALLBACK(connected_cb)
129      {
130        FooCtx ctx = context;
131        va_list args;
132        SilcUInt32 integer;
133        SilcBuffer buf;
134
135        va_start(args, context);
136        integer = va_arg(args, SilcUInt32);
137        buf = va_arg(args, SilcBuffer);
138        va_end(args);
139        ...
140      }
141
142    Problems: Events would be SilcSchedule specific, and would not work on
143    multi-thread/multi-scheduler system.  The events should be copyable
144    between schedulers.  Another problem is the signal delivery.  Do we
145    deliver them synchronously possibly from any thread to any other thread
146    or do we deliver them through the target schedulers.  If we use the
147    schedulers then signalling would be asynchronous (data must be
148    duplicated and later freed) which is not very nice.
149
150  o If the event signals are added, the SILC_PARAM_* stuff needs to be
151    moved from silcbuffmt.h to silctypes.h or something similar.
152
153  o In case the SILC Events are done we shall create a new concept of
154    parent and child SilcSchedule's.  When new SilcSchedule is created a
155    parent can be associated to it.  This association could be done either
156    directly by the parent or by any other children.  This way the signals
157    would in effect be global and would reach all children schedulers.
158
159    This relationship would be associative only.  The schedulers are still
160    independent and run independently from each other.   All schedulers
161    would be linked and could be accessed from any of the schedulers.
162    It should be possible to retrieve the parent and enumate all children
163    from any of the schedulers.
164
165    SilcSchedule silc_schedule_init(int max_tasks, void *app_context,
166                                    SilcSchedule parent);
167    SilcSchedule silc_schedule_get_parent(SilcSchedule schedule);
168
169  o Additional scheduler changes: optimize silc_schedule_wakeup.  Wakeup
170    only if the scheduler is actually waiting something.  If it is
171    delivering tasks wakeup is not needed.
172
173  o Structured log messages to Log API.  Allows machine readable log
174    messages.  Would allow sending of any kind of data in a log message.
175
176  o Base64 to an own API
177
178  o Timer API
179
180  o Add builtin SOCKS and HTTP Proxy support, well the SOCKS at least.
181    SILC currently supports SOCKS4 and SOCKS5 but it needs to be compiled
182    in separately.
183
184  o silc_stringprep to non-allocating version.
185
186  o SilcStack aware SilcHashTable.
187
188  o SilcStack aware SilcDList.
189
190  o Thread pool API.  Add this to lib/silcutil/silcthread.[ch].
191
192    typedef void (*SilcThreadPoolFunc)(SilcSchedule schedule,
193                                       void *context);
194
195    /* Allocate thread pool with at least `min_threads' and at most
196       `max_threads' many threads.  If `stack' is non-NULL all memory
197       is allocated from the `stack'.  If `start_min_threads' is TRUE
198       this will start `min_threads' many threads immediately. */
199    SilcThreadPool silc_thread_pool_alloc(SilcStack stack,
200                                          SilcUInt32 min_threads,
201                                          SilcUInt32 max_threads,
202                                          SilcBool start_min_threads);
203
204    /* Free thread pool.  If `wait_unfinished' is TRUE this will block
205       and waits that all remaining active threads finish before freeing
206       the pool. */
207    void silc_thread_pool_free(SilcThreadPool tp, SilcBool wait_unfinished);
208
209    /* Run `run' function with `run_context' in one of the threads in the
210       thread pool.  Returns FALSE if the thread pool is being freed.  If
211       there are no free threads left in the pool this will queue the
212       the `run' and will call it once a thread becomes free.
213
214       If `completion' is non-NULL it will be called to indicate completion
215       of the `run' function.  If `schedule' is non-NULL the `completion'
216       will be called through the scheduler in the main thread.  If it is
217       NULL the `completion' is called directly from the thread after the
218       `run' has returned. */
219    SilcBool silc_thread_pool_run(SilcThreadPool tp,
220                                  SilcSchedule schedule,
221                                  SilcThreadPoolFunc run,
222                                  void *run_context,
223                                  SilcThreadPoolFunc completion,
224                                  void *completion_context);
225
226    /* Modify the amount of maximum threads of the pool. */
227    void silc_thread_pool_set_max_threads(SilcThreadPool tp,
228                                          SilcUInt32 max_threads);
229
230    /* Returns the amount of maximum size the pool can grow. */
231    SilcUInt32 silc_thread_pool_num_max_threads(SilcThreadPool tp);
232
233    /* Returns the amount of free threads in the pool currently. */
234    SilcUInt32 silc_thread_pool_num_free_threads(SilcThreadPool tp);
235
236    /* Stops all free and started threads.  The minumum amount of threads
237       specified to silc_thread_pool_alloc always remains. */
238    void silc_thread_pool_purge(SilcThreadPool tp);
239
240  o Fast mutex implementation.  Fast rwlock implementation.  Mutex and
241    rwlock implementation using atomic operations.
242
243  o Compression routines are missing.  The protocol supports packet
244    compression thus it must be implemented.  SILC Zip API must be
245    defined.
246
247  o Add new functions to SilcStack API in lib/silcutil/silcstack.[ch].  Add
248    silc_stack_[set|get]_byte_alignment and
249    silc_stack_[set|get]_address_alignment.  The _byte_alignment defines the
250    default alignment when allocating aligned memory for structures etc.
251    The address_alignment defines the default (default is 0) alignment for
252    memory addresses SilcStack routines return.  Usefull when needing 
253    aligned addresses for example for hardware devices (such as crypto
254    accelerators).  Move also the low level silc_stack_malloc and 
255    silc_stack_realloc from silcstack_i.h to silcstack.h.
256
257  (o Generic SilcStatus or SilcResult that includes all possible status and
258     error conditions, including those of SILC protocol.  Though, the SILC
259     protocol related status (currently in silcstatus.h) cannot be in
260     runtime library) maybe
261
262  (o SILC specific socket creation/closing routines to silcnet.h, wrappers
263   to all send(), recv(), sendto() etc.  Bad thing is that we'd have to
264   define all socket options, sockaddrs, etc.) maybe
265
266  (o mmap) maybe
267
268
269 lib/silcutil/symbian/
270 =====================
271
272  o Something needs to be thought to the logging globals as well,
273    like silc_debug etc.  They won't work on EPOC.  Perhaps logging
274    and debugging is to be disabled on EPOC.  The logging currently works
275    by it cannot be controlled, same with debugging.
276
277
278 SFTP Library, lib/silcsftp/
279 ===========================
280
281  o Read prefetch (read-ahead, reading ahead of time).  Maybe if this can
282    be done easily.
283
284
285 SKR Library, lib/silcskr/
286 =========================
287
288  o Add fingerprint as search constraint.
289
290  o Add OpenPGP support.  Adding, removing, fetching PGP keys.  (Keyring
291    support?)
292
293  o Add support for importing public keys from a directory and/or from a
294    file.  Add support for exporting the repository (different formats for
295    different key types?).
296
297  o Change the entire silc_skr_find API.  Remove SilcSKRFind and just simply
298    add the find constraints as variable argument list to silc_skr_find, eg:
299
300   silc_skr_find(skr, schedule, callback, context,
301                 SILC_SKR_FIND_PUBLIC_KEY, public_key,
302                 SILC_SKR_FIND_COUNTRY, "FI",
303                 SILC_SKR_FIND_USAGE, SILC_SKR_USAGE_AUTH,
304                 SILC_SKR_FIND_END);
305
306    NULL argument would be ignored and skipped.
307
308  o Add OR logical rule in addition of the current default AND, eg:
309
310   // Found key(s) MUST have this public key AND this country.
311   silc_skr_find(skr, schedule, callback, context,
312                 SILC_SKR_FIND_RULE_AND,
313                 SILC_SKR_FIND_PUBLIC_KEY, public_key,
314                 SILC_SKR_FIND_COUNTRY, "FI",
315                 SILC_SKR_FIND_END);
316
317   // Found key(s) MUST have this public key OR this key context
318   silc_skr_find(skr, schedule, callback, context,
319                 SILC_SKR_FIND_RULE_OR,
320                 SILC_SKR_FIND_PUBLIC_KEY, public_key,
321                 SILC_SKR_FIND_CONTEXT, key_context,
322                 SILC_SKR_FIND_END);
323
324  o SilcStack to SKR API.
325
326
327 Crypto Library, lib/silccrypt/
328 ==============================
329
330  o SilcStack to APIs.
331
332  o Add fingerprint to SilcSILCPublicKey and retrieval to silcpk.h, and
333    possibly to silcpkcs.h.
334
335    /* Return fingerprint of the `public_key'.  Returns also the algorithm
336       that has been used to make the fingerprint. */
337    const unsigned char *
338    silc_pkcs_get_fingerprint(SilcPublicKey public_key,
339                              const char **hash_algorithm,
340                              SilcUInt32 *fingerprint_len);
341
342  o Change SILC PKCS API to asynchronous, so that accelerators can be used.
343    All PKCS routines should now take callbacks as argument and they should
344    be delivered to SilcPKCSObject and SilcPKCSAlgorithm too.
345
346    /* Signature computation callback */
347    typedef void (*SilcPKCSSignCb)(SilcBool success,
348                                   const unsigned char *signature,
349                                   SilcUInt32 signature_len,
350                                   void *context);
351
352    /* Signature verification callback */
353    typedef void (*SilcPKCSVerifyCb)(SilcBool success, void *context);
354
355    /* Encryption callback */
356    typedef void (*SilcPKCSEncryptCb)(SilcBool success,
357                                      const unsigned char *encrypted,
358                                      SilcUInt32 encrypted_len,
359                                      void *context);
360
361    /* Decryption callback */
362    typedef void (*SilcPKCSDecryptCb)(SilcBool success,
363                                      const unsigned char *decrypted,
364                                      SilcUInt32 decrypted_len,
365                                      void *context);
366
367    Either add new _async functions or add the callbacks to existing API
368    and if the callback is NULL then the API is not async and if provided
369    it may be async.  For example;
370
371    SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
372                            unsigned char *src, SilcUInt32 src_len,
373                            unsigned char *dst, SilcUInt32 dst_size,
374                            SilcUInt32 *dst_len,
375                            SilcBool compute_hash, SilcHash hash,
376                            SilcPKCSSignCb async_sign,
377                            void *async_sign_context);
378
379    (if this is done then there's no reason why the buffers in the
380     callbacks cannot be the ones user gives here) or allow only async:
381
382    SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
383                            unsigned char *src, SilcUInt32 src_len,
384                            SilcBool compute_hash, SilcHash hash,
385                            SilcPKCSSignCb async_sign,
386                            void *async_sign_context);
387
388    or add new:
389
390    SilcBool silc_pkcs_sign_async(SilcPrivateKey private_key,
391                                  unsigned char *src, SilcUInt32 src_len,
392                                  SilcBool compute_hash, SilcHash hash,
393                                  SilcPKCSSignCb async_sign,
394                                  void *async_sign_context);
395
396  o Change PKCS Algorithm API to take SilcPKCSAlgorithm as argument to
397    encrypt, decrypt, sign and verify functions.  We may need to for exmaple
398    check the alg->hash, supported hash functions.  Maybe deliver it also
399    to all other functions in SilcPKCSAlgorithm to be consistent.
400
401  o Add DSS support.  Take implementation from Tom or make it yourself.
402
403  o Implement the defined SilcDH API.  The definition is in
404    lib/silccrypt/silcdh.h.  Make sure it is asynchronous so that it can
405    be accelerated.  Also take into account that it could use elliptic
406    curves.
407
408  o ECDSA and ECDH
409
410  o All cipher, hash, hmac etc. allocation routines should take their name
411    in as const char * not const unsigned char *.
412
413
414 SILC Accelerator Library
415 ========================
416
417  o SILC Accelerator API.  Provides generic way to use different kind of
418    accelerators.  Basically implements SILC PKCS API so that SilcPublicKey
419    and SilcPrivateKey can be used but they call the accelerators.
420
421    Something in the lines of (preliminary):
422
423    /* Register accelerator to system.  Initializes the accelerator. */
424       Varargs are optional accelerator specific init parameteres. */
425    SilcBool silc_acc_register(SilcAccelerator acc, ...);
426
427      silc_acc_register(softacc, "min_threads", 2, "max_threads", 16, NULL);
428
429    /* Unregister accelerator.  Uninitializes the accelerator. */
430    SilcBool silc_acc_unregister(const SilcAccelerator acc);
431
432    /* Return list of the registered accelerators */
433    SilcDList silc_acc_get_supported(void);
434
435    /* Find existing accelerator.  `name' is accelerator's name. */
436    SilcAccelerator silc_acc_find(const char *name);
437
438    /* Return accelerator's name */
439    const char *silc_acc_get_name(SilcAccelerator acc);
440
441    /* Accelerate `public_key'.  Return accelerated public key. */
442    SilcPublicKey silc_acc_public_key(SilcAccelerator acc,
443                                      SilcPublicKey public_key);
444
445    /* Accelerate `private_key'.  Returns accelerated private key. */
446    SilcPrivateKey silc_acc_private_key(SilcAccelerator acc,
447                                        SilcPrivateKey private_key);
448
449    /* Return the underlaying public key */
450    SilcPublicKey silc_acc_get_public_key(SilcAccelerator acc,
451                                          SilcPublicKey public_key);
452
453    /* Return the underlaying private key */
454    SilcPrivateKey silc_acc_get_private_key(SilcAccelerator acc,
455                                            SilcPrivateKey private_key);
456
457    typedef struct SilcAcceleratorObject {
458      const char *name;                  /* Accelerator's name */
459      SilcBool (*init)(va_list va);      /* Initialize accelerator */
460      SilcBool (*uninit)(void);          /* Uninitialize accelerator */
461      const SilcPKCSAlgorithm *pkcs;     /* Accelerated PKCS algorithms */
462      const SilcDHObject *dh;            /* Accelerated Diffie-Hellmans */
463      const SilcCipherObject *cipher;    /* Accelerated ciphers */
464      const SilcHashObject *hash;        /* Accelerated hashes */
465      const SilcHmacObject *hmac;        /* Accelerated HMACs */
466      const SilcRngObject *rng;          /* Accelerated RNG's */
467    } *SilcAccelerator, SilcAcceleratorStruct;
468
469    Allows accelerator to have multiple accelerators (cipher, hash etc)
470    and multiple different algorithms and implementations (SHA-1, SHA-256 etc).
471
472    SilcPublicKey->SilcSILCPublicKey->RsaPublicKey accelerated as:
473    SilcPublicKey->SilcAcceleratorPublicKey->SilcSoftAccPublicKey->
474      SilcPublicKey->SilcSILCPublicKey->RsaPublicKey
475
476    silc_acc_public_key creates SilcPublicKey and SilcAcceleratorPublicKey
477    and acc->pkcs->import_public_key creates SilcSoftAccPublicKey.
478
479  o Implement software accelerator.  It is a thread pool system where the
480    public key and private key operations are executed in threads.
481
482    const struct SilcAcceleratorObject softacc =
483    {
484      "softacc", softacc_init, softacc_uninit,
485      softacc_pkcs, NULL, NULL, NULL, NULL
486    }
487
488    /* Called from silc_acc_private_key */
489    int silc_softacc_import_private_key(void *key, SilcUInt32 key_len,
490                                        void **ret_private_key)
491    {
492      SilcSoftAccPrivateKey prv = silc_calloc(1, sizeof(*prv));
493      prv->pkcs = acc->pkcs;
494      prv->private_key = key;
495      *ret_private_key = prv;
496    }
497
498  (o Symmetric key cryptosystem acceleration?  They are always sycnhronouos
499    even with hardware acceleration so the crypto API shouldn't require
500    changes.) maybe
501
502
503 lib/silcmath
504 ============
505
506  o Import TFM.  Talk to Tom to add the missing functions.  Use TFM in
507    client and client library, but TMA in server, due to the significantly
508    increased memory consumption with TFM, and the rare need for public
509    key operations in server.
510
511    We want TFM's speed but not TFM's memory requirements.  Talk to Tom
512    about making the TFM mp dynamic just as it is in LTM.
513
514  o The SILC MP API function must start returning indication of success
515    and failure of the operation.
516
517  o Do SilcStack support for silc_mp_init, silc_mp_init_size and other
518    any other MP function (including utility ones) that may allocate
519    memory.
520
521  o All utility functions should be made non-allocating ones.
522
523
524 SILC XML Library, lib/silcxml/
525 ==============================
526
527  o SILC XML API (wrapper to expat).  Look at the expat API and simplify
528    it.  The SILC XML API should have at most 8-10 API functions.  It should
529    be possible to create full XML parser with only one function.  And, it
530    should be possible to have a function that is able to parse an entire
531    XML document.  It should also have a parser function to be able to
532    parse a stream of XML data (SilcStream).  It MUST NOT have operations
533    that require multiple function calls to be able to execute that one
534    operation (like creating parser).
535
536
537 lib/silcske/silcske.[ch]
538 ========================
539
540  o Ratelimit to UDP/IP transport for incoming packets.
541
542
543 lib/silcasn1
544 ============
545
546  o Negative integer encoding is missing, add it.
547
548  o SILC_ASN1_CHOICE should perhaps return an index what choice in the
549    choice list was found.  Currently it is left for caller to figure out
550    which choice was found.
551
552  o SILC_ASN1_NULL in decoding should return SilcBool whether or not
553    the NULL was present.  It's important when it's SILC_ASN1_OPTIONAL
554    and we need to know whether it was present or not.
555
556
557 lib/silcpgp
558 ===========
559
560  o OpenPGP certificate support, allowing the use of PGP public keys
561    in SILC.
562
563
564 lib/silcssh
565 ===========
566
567  o SSH2 public key/private key support, allowing the use of SSH2 keys
568    in SILC.  RFC 4716.
569
570
571 lib/silcpkix
572 ============
573
574  o PKIX implementation
575
576
577 apps/silcd
578 ==========
579
580  o Deprecate the old server.  Write interface for the new lib/silcserver
581    server library.  The interface should work on Unix/Linux systems.
582
583  o Consider deprecating also the old config file format and use XML
584    istead.  This should require SILC XML API implementation first.
585
586  o The configuration must support dynamic router and server connections.
587    The silcd must work without specifying any servers or routers to
588    connect to.
589
590  o The configuration must support specifying whether the server is
591    SILC Server or SILC Router.  This should not be deduced from the
592    configuration as it was in < 1.2.
593
594  o The configuration must support specifying the ciphers and hmacs and
595    their order so that user can specify which algorithms take preference.
596
597
598 lib/silcserver
599 ==============
600
601  o Rewrite the entire server.  Deprecate apps/silcd as the main server
602    implementation and create lib/silcserver/.  It is a platform
603    independent server library.  The apps/silcd will merely provide a
604    a simple interface for the library.
605
606  o Write the SILC Server library extensively using SILC FSM.
607
608  o Server library must support multiple networks.  This means that one
609    server must be able to create multiple connections that each reach
610    different SILC network.  This means also that all cache's etc. must
611    be either connection-specific or network-specific.
612
613  o Library must support dynamic router and server connections.  This means
614    that connections are create only when they are needed, like when someone
615    says JOIN foo@foo.bar.com or WHOIS foobar@silcnet.org.
616
617  o Library must support server-to-server connections even though protocol
618    prohibits that.  The responder of the connection should automatically
619    act as a router.  The two servers create an own, isolated, SILC network.
620    To be used specifically with dynamic connections.
621
622  o Library must support multiple threads and must be entirely thread safe.
623
624  o Library must have support for SERVICE command.
625
626  o The server must be able to run behind NAT device.  This means that 
627    Server ID must be based on public IP instead of private IP.
628
629  o The following data must be in per-connection context: client id cache, 
630    server id cache, channel id cache, all statistics must be 
631    per-connection.
632
633  o The following data must be in per-thread context: command context
634    freelist/pool, pending commands, random number generator.
635
636  o Do inccoming packet processing in an own FSM thread in the 
637    server-threads FSM.  Same as in client library.
638
639  o Reference count all Silc*Entry structures.
640
641  Some issues that must be kept in mind from 1.0 and 1.1 silcd's:
642
643  o The SERVER_SIGNOFF notify handing is not optimal, because it'll
644    cause sending of multiple SIGNOFF notify's instead of the one
645    SERVER_SIGNOFF notify that the server received.  This should be
646    optimized so that the only SERVER_SIGNOFF is sent and not
647    SIGNOFF of notify at all (using SIGNOFF takes the idea about
648    SERVER_SIGNOFF away entirely).
649
650  o Another SERVER_SIGNOFF opt/bugfix:  Currently the signoff is
651    sent to a client if it is on same channel as the client that
652    signoffed.  However, the entire SERVER_SIGNOFF list is sent to
653    the client, ie. it may receive clients that was not on the
654    same channel.  This is actually against the specs.  It must be
655    done per channel.  It shouldn't receive the whole list just
656    because one client happened to be on same channel.
657
658  o If client's public key is saved in the server (and doing public key
659    authentication) then the hostname and the username information could
660    be taken from the public key.  Should be a configuration option!
661
662  o Add a timeout to handling incoming JOIN commands.  It should be
663    enforced that JOIN command is executed only once in a second or two
664    seconds.  Now it is possible to accept n incoming JOIN commands
665    and process them without any timeouts.  THis must be employed because
666    each JOIN command will create and distribute the new channel key
667    to everybody on the channel.
668
669  o Related to above.  If multiple JOINs are received in sequence perhaps
670    new key should be created only once, if the JOINs are handeled at the same
671    time.  Now we create multiple keys and never end up using them because
672    many JOINs are processed at the same time in sequence.  Only the last
673    key ends up being used.