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