Added SILC Thread Queue API
[crypto.git] / doc / draft-riikonen-silc-spec-01.nroff
index fa5909171dd745fbaaa800b123ff8b468a5bdf4b..326c79cc0c1347052472068f50288d88d74401c1 100644 (file)
@@ -79,6 +79,7 @@ Table of Contents
   2.3 Communication in the Network ..............................  6
   2.4 Channel Communication .....................................  7
   2.5 Router Connections ........................................  7
+  2.6 Backup Routers ............................................ XX
 3 SILC Specification ............................................  8
   3.1 Client ....................................................  8
       3.1.1 Client ID ...........................................  9
@@ -207,7 +208,7 @@ keep global information up to date at all time.
 This, on the other hand, leads to cellular like network, where routers 
 are in the center of the cell and servers are connected to the router.
 
-Following diagram represents SILC network topology.
+The following diagram represents SILC network topology.
 
 
 
@@ -279,7 +280,7 @@ to other server in the same cell, will have its messages delivered from
 its local server first to the router of the cell, and from the router 
 to the other server in the cell.
 
-Following diagram represents this scenario:
+The following diagram represents this scenario:
 
 
 .in 25
@@ -317,7 +318,7 @@ If the message is destined to server that does not belong to local cell
 the message is routed to the router server to which the destination 
 server belongs, if the local router is connected to destination router.
 If there is no direct connection to the destination router, the local
-router routes the message to its primary route.  Following diagram
+router routes the message to its primary route.  The following diagram
 represents message sending between cells.
 
 
@@ -417,6 +418,76 @@ broadcast packets.  Usually all router wide information in the network is
 distributed by SILC broadcast packets.
 
 
+.ti 0
+2.6 Backup Routers
+
+Backup routers may exist in the cell in addition of the primary router.
+However, they must not be active routers and act as routers in the cell.
+Only one router may be acting as primary router in the cell.  In the case
+of failure of the primary router may one of the backup routers become
+active.  The purpose of backup routers are in case of failure of the
+primary router to maintain working connections inside the cell and outside
+the cell and to avoid netsplits.
+
+Backup routers are normal servers in the cell that are prepared to take
+over the tasks of primary router if needed.  They need to have at least
+one direct and active connection to the primary router of the cell.
+This communication channel is used to send the router information to
+the backup router.  Backup router must know everything that the primary
+router knows to be able to take over the tasks of the primary router.
+It is the primary router's responsibility to feed the data to the backup
+router.  If the backup router does not know all the data in the case of
+failure some connections may be lost.  The primary router of the cell
+must consider the backup router being normal router server and feed the
+data accordingly.
+
+In addition of having direct connection to the primary router of the
+cell the backup router must also have connection to the same router
+the primary router of the cell has connected.  However, it must not be
+active router connection meaning that the backup router must not use
+that channel as its primary route and it must not notify the router
+about having connected servers, channels and clients behind it.  It
+merely connects to the router.  This sort of connection is later
+referred as being passive connection.  Some keepalive actions may be
+needed by the router to keep the connection alive.
+
+The primary router notifies its primary router about having backup
+routers in the cell by sending SILC_PACKET_CELL_ROUTERS packet.  If
+and when the primary router of the cell becomes unresponsive, its
+primary router knows that there exists backup routers in the cell.  
+After that it will start using the first backup router sent in the
+packet as router of that cell.  In this case the backup router must
+notify its new primary router about the servers, channels and clients
+it has connected to it.  The primary router knows that this server
+has become a router of the cell because of failure of the primary
+router in the cell.  It must also cope with the fact that the servers,
+channels and clients that the new backup router announces are not
+really new, since they used to exist in the primary router of the
+cell.
+
+It is required that other normal servers has passive connections to
+the backup router(s) in the cell.  Some keepalive actions may be needed
+by the server to keep the connection alive.  After they notice the
+failure of the primary router they must start using the connection to
+the first backup router as their primary route.
+
+It is recommended that there would be at least one backup router in
+the cell.  It is not recommended to have all servers in the cell acting
+as backup routers as it requires establishing several connections to
+several servers in the cell.  Large cells can easily have several
+backup routers in the cell.  The order of the backup routers are decided
+at the primary router of the cell and servers and backup servers in the
+cell must be configured accordingly.  It is not required that the backup
+server is actually active server in the cell.  Backup router may be spare
+server in the cell that does not accept normal client connections at all.
+It maybe reserved purely for the backup purposes.  These, however, are
+cell management issues.
+
+If the first backup router is down as well and there is another backup
+router in the cell then it will start acting as the primary router as
+described above.
+
+
 .ti 0
 3. SILC Specification
 
@@ -612,7 +683,7 @@ distributing it to the router.
 .ti 0
 3.2.3 SILC Server Ports
 
-Following ports has been assigned by IANA for the SILC protocol:
+The following ports has been assigned by IANA for the SILC protocol:
 
 .in 10
 silc            706/tcp    SILC
@@ -745,7 +816,7 @@ not contain any spaces (`  '), any non-printable ASCII characters,
 commas (`,') and wildcard characters.
 
 Channels can have operators that can administrate the channel and
-operate all of its modes.  Following operators on channel exist on SILC
+operate all of its modes.  The following operators on channel exist on SILC
 network.
 
 .in 6
@@ -1159,7 +1230,7 @@ in the SILC packets.  See [SILC2] of the actual encryption process and
 definition of how it must be done.  SILC has a mandatory algorithm that
 must be supported in order to be compliant with this protocol.
 
-Following ciphers are defined in SILC protocol:
+The following ciphers are defined in SILC protocol:
 
 .in 6
 aes-256-cbc         AES in CBC mode, 256 bit key       (mandatory)
@@ -1198,7 +1269,7 @@ Public keys are used in SILC to authenticate entities in SILC network
 and to perform other tasks related to public key cryptography.  The 
 public keys are also used in the SILC Key Exchange protocol [SILC3].
 
-Following public key algorithms are defined in SILC protocol:
+The following public key algorithms are defined in SILC protocol:
 
 .in 6
 rsa        RSA  (mandatory)
@@ -1207,7 +1278,7 @@ dss        DSS  (optional)
 
 DSS is described in [Menezes].  The RSA must be implemented according
 PKCS #1 [PKCS1].  The mandatory PKCS #1 implementation in SILC must be
-compliant to either PKCS #1 version 1.5 or newer with the following
+compliant to either PKCS #1 version 1.5 or newer with the the following
 notes: The signature encoding is always in same format as the encryption
 encoding regardles of the PKCS #1 version.  The signature with appendix
 (with hash algorithm OID in the data) must not be used in the SILC.  The
@@ -1225,7 +1296,7 @@ Hash functions are used as part of MAC algorithms defined in the next
 section.  They are also used in the SILC Key Exchange protocol defined
 in the [SILC3].
 
-Following Hash algorithm are defined in SILC protocol:
+The following Hash algorithm are defined in SILC protocol:
 
 sha1             SHA-1, length = 20      (mandatory)
 md5              MD5, length = 16        (optional)
@@ -1238,7 +1309,7 @@ Data integrity is protected by computing a message authentication code
 (MAC) of the packet data.  See [SILC2] for details how to compute the
 MAC.
 
-Following MAC algorithms are defined in SILC protocol:
+The following MAC algorithms are defined in SILC protocol:
 
 .in 6
 hmac-sha1-96     HMAC-SHA1, length = 12  (mandatory)
@@ -1269,7 +1340,7 @@ significantly speed up the data transmission.  By default, SILC does not
 use compression which is the mode that must be supported by all SILC
 implementations.
 
-Following compression algorithms are defined:
+The following compression algorithms are defined:
 
 .in 6
 none        No compression               (mandatory)
@@ -1336,7 +1407,7 @@ o Identifier Length (2 bytes) - Indicates the length of
 
 o Identifier (variable length) - Indicates the identifier
   of the public key.  This data can be used to identify
-  the owner of the key.  The identifier is of following
+  the owner of the key.  The identifier is of the following
   format:
 
      UN   User name
@@ -1399,13 +1470,13 @@ order.
 The version detection of both client and server is performed at the
 connection phase while executing the SILC Key Exchange protocol.  The
 version identifier is exchanged between initiator and responder.  The
-version identifier is of following format:
+version identifier is of the following format:
 
 .in 6
 SILC-<protocol version>-<software version>
 .in 3
 
-The version strings are of following format:
+The version strings are of the following format:
 
 .in 6
 protocol version = <major>.<minor>
@@ -1720,10 +1791,15 @@ without executing SKE protocol.  In this case, the new key is created by
 hashing the old key with hash function selected earlier in the SKE
 protocol.  If the digest length of the hash function is too short for the
 key, then the key is distributed as described in section Processing the
-Key Material in [SILC3].  After both parties has regenerated the session
-key, both send SILC_PACKET_REKEY_DONE packet to each other.  These packets
-are still secured with the old key.  After these packets, following
-packets must be protected with the new key.
+Key Material in [SILC3].
+
+After both parties has regenerated the session key, both send
+SILC_PACKET_REKEY_DONE packet to each other.  These packets are still
+secured with the old key.  After these packets, the following packets
+must be protected with the new key.  After sending the REKEY_DONE packet
+all subsequent sent packets must be encrypted with the new key.  After
+receiving the REKEY_DONE packet all subsequent packets must be
+decrypted with the new key.
 
 
 .ti 0
@@ -1904,17 +1980,19 @@ List of all defined commands in SILC follows.
         so that all users are searched.  However, the server still must
         search its locally connected clients.  The router must send
         this command to the server who owns the requested client.  That
-        server must reply to the command.  Server should not send whois
+        server must reply to the command.  Server must not send whois
        replies to the client until it has received the reply from its
        router.
 
         Reply messages to the command:
 
-        Max Arguments:  7
+        Max Arguments:  8
             Arguments:  (1) <Status Payload>       (2) <Client ID> 
                         (3) <nickname>[@<server>]  (4) <username@host> 
-                        (5) <real name>            (6) [<channel list>] 
-                        (7) [<idle time>]
+                        (5) <real name>            (6) [<Channel Payload 
+                                                         list>] 
+                        (7) [<user mode>]          (8) [<idle time>]
+
 
         This command may reply with several command reply messages to
         form a list of results.  In this case the status payload will
@@ -1930,6 +2008,12 @@ List of all defined commands in SILC follows.
         <count> option were defined in the query there will be only
         <count> many replies from the server.
 
+        The server may return the list of channel the client has joined.
+        In this case the list is list of Channel Payloads.  The Mode Mask
+        in the Channel Payload (see [SILC2] and section 2.3.2.3 for the
+        Channel Payload) is the client's mode on the channel.  The list
+        is encoded by adding the Channel Payloads one after the other.
+
         Status messages:
 
             SILC_STATUS_OK
@@ -1942,8 +2026,6 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_TOO_MANY_PARAMS
 
 
-
-
    2    SILC_COMMAND_WHOWAS
 
         Max Arguments:  2
@@ -2105,24 +2187,22 @@ List of all defined commands in SILC follows.
 
    5    SILC_COMMAND_LIST
 
-        Max Arguments:  2
-            Arguments:  (1) [<Channel ID>] [<server>]
+        Max Arguments:  1
+            Arguments:  (1) [<Channel ID>]
 
-        The list command is used to list channels and their topics on
+        The list command is used to list channels and their topics on the
         current server.  If the <Channel ID> parameter is used, only the
         status of that channel is displayed.  Secret channels are not
         listed at all.  Private channels are listed with status indicating
-        that the channel is private.
-
-        If the <server> argument is specified the specified server's
-        channels are listed.  In this case the command must be sent to
-        the server who owns the channel that was requested.
+        that the channel is private.  Router may reply with all channels
+        it knows about.
 
         Reply messages to the command:
 
-        Max Arguments:  4
+        Max Arguments:  5
             Arguments:  (1) <Status Payload>  (2) <Channel ID>
-                        (3) <channel>         (4) <topic>
+                        (3) <channel>         (4) [<topic>]
+                        (5) [<user count>]
 
         This command may reply with several command reply messages to form
         a list of results.  In this case the status payload will include
@@ -2142,8 +2222,8 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_WILDCARDS
             SILC_STATUS_ERR_NOT_REGISTERED
             SILC_STATUS_ERR_TOO_MANY_PARAMS
-            SILC_STATUS_ERR_NO_SUCH_CHANNEL
             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
+            SILC_STATUS_ERR_NO_CHANNEL_ID
             SILC_STATUS_ERR_NO_SUCH_SERVER
 
 
@@ -2158,6 +2238,10 @@ List of all defined commands in SILC follows.
         for that channel will be changed, if the channel modes permit
         this action.
 
+        After setting the topic the server must send the notify type
+        SILC_NOTIFY_TYPE_TOPIC_SET to its primary router and then to
+        the channel which topic was changed.
+
         Reply messages to the command:
 
         Max Arguments:  2
@@ -2184,24 +2268,52 @@ List of all defined commands in SILC follows.
 
    7    SILC_COMMAND_INVITE
 
-        Max Arguments:  2
-            Arguments:  (1) <Client ID>  (2) <Channel ID>
+        Max Arguments:  4
+            Arguments:  (1) <Channel ID>       (2) [<Client ID>]
+                        (3) [<adding client>]  (4) [<removing client>]
 
         This command is used to invite other clients to join to the
         channel.  The <Client ID> argument is the target client's ID that
         is being invited.  The <Channel ID> is the Channel ID of the
         requested channel.  The sender of this command must be on the
-        channel.  This command must fail if the requested channel does
-        not exist, the requested client is already on the channel or if
-        the channel is invite only channel and the caller of this command
-        does not have at least channel operator privileges.
+        channel.  The server must also send the notify type
+        SILC_NOTIFY_TYPE_INVITE to its primary router and then to the
+        client indicated by the <Client ID>.
+
+        The <adding client> and <removing client> can be used to add to
+        and remove from the invite list.  The format of the <adding client>
+        and <removing client> is as follows:
+
+            [<nickname>[@<server>]!][<username>]@[<hostname>]
+
+        When adding to or removing from the invite list the server must
+        send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router
+        and must not send it to the client which was added to the list.
+        The client which executes this command must have at least channel
+        operator privileges to be able to add to or remove from the invite
+        list.  The wildcards may be used with this command.  If adding or
+        removing from than one clients then the lists are an comma (`,')
+        separated list.
+
+        Note that the <Client ID> provided must be resolved into correct
+        nickname and hostname and add to the invite list before sending
+        the notify packet.
+        
+        When this command is given with only <Channel ID> argument then
+        the command merely returns the invite list of the channel.   This
+        command must fail if the requested channel does not exist, the
+        requested <Client ID> is already on the channel or if the channel
+        is invite only channel and the caller of this command does not
+        have at least channel operator privileges.
 
         Reply messages to the command:
 
-        Max Arguments:  2
-            Arguments:  (1) <Status Payload>
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Channel ID>
+                        (3) [<invite list>]
 
-        This command replies only with Status Payload.
+       This command replies with the invite list of the channel if it
+       exists.
 
         Status messages:
 
@@ -2215,6 +2327,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CHANNEL_ID
             SILC_STATUS_ERR_NOT_ON_CHANNEL
             SILC_STATUS_ERR_USER_ON_CHANNEL
+            SILC_STATUS_ERR_NO_CHANNEL_PRIV
 
 
    8    SILC_COMMAND_QUIT
@@ -2244,6 +2357,13 @@ List of all defined commands in SILC follows.
         give to the removed client some information why it was removed
         from the network.
 
+        When killing a client the router must first send notify type
+        SILC_NOTIFY_TYPE_KILLED to all channels the client has joined.
+        The packet must not be sent to the killed client on the channel.
+        Then, the router must send the same notify type to its primary
+        router.  Finally, the router must send the same notify type to
+        the client who was killed.
+
         Reply messages to the command:
 
         Max Arguments:  1
@@ -2265,18 +2385,21 @@ List of all defined commands in SILC follows.
 
    10   SILC_COMMAND_INFO
 
-        Max Arguments:  1
-            Arguments:  (1) [<server>]
+        Max Arguments:  2
+            Arguments:  (1) [<server>]  (2) [<Server ID>]
 
         This command is used to fetch various information about a server.
         If <server> argument is specified the command must be sent to
         the requested server.
 
+        If the <Server ID> is specified the server information if fetched
+        by the provided Server ID.
+
         Reply messages to the command:
 
-        Max Arguments:  3
+        Max Arguments:  4
             Arguments:  (1) <Status Payload>  (2) <Server ID>
-                        (3) <string>
+                        (3) <server name>     (4) <string>
 
         This command replies with the Server ID of the server and a
         string which tells the information about the server.
@@ -2289,6 +2412,8 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
             SILC_STATUS_ERR_TOO_MANY_PARAMS
             SILC_STATUS_ERR_NO_SUCH_SERVER
+            SILC_STATUS_ERR_NO_SUCH_SERVER_ID
+            SILC_STATUS_ERR_NO_SERVER_ID
 
 
    11   SILC_COMMAND_CONNECT
@@ -2354,7 +2479,7 @@ List of all defined commands in SILC follows.
    13   SILC_COMMAND_OPER
 
         Max Arguments:  2
-            Arguments:  (1) <username>  (2) <authentication data>
+            Arguments:  (1) <username>  (2) <authentication payload>
 
         This command is used by normal client to obtain server operator
         privileges on some server or router.  Note that router operator
@@ -2363,11 +2488,13 @@ List of all defined commands in SILC follows.
         must use SILCOPER command to obtain router level privileges.
 
         The <username> is the username set in the server configurations
-        as operator.  The <authentication data> is the data that the
+        as operator.  The <authentication payload> is the data that the
         client is authenticated against.  It may be passphrase prompted
-        for user on client's screen or it may be public key
-        authentication data (data signed with private key), or 
-        certificate.
+        for user on client's screen or it may be public key or certificate
+        authentication data (data signed with private key).
+
+        After changing the mode server must send the notify type
+        SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
 
         Reply messages to the command:
 
@@ -2382,7 +2509,6 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
             SILC_STATUS_ERR_TOO_MANY_PARAMS
             SILC_STATUS_ERR_NOT_REGISTERED
-            SILC_STATUS_ERR_BAD_PASSWORD
             SILC_STATUS_ERR_AUTH_FAILED
 
 
@@ -2434,13 +2560,13 @@ List of all defined commands in SILC follows.
         Reply messages to the command:
 
         Max Arguments:  14
-            Arguments:  (1) <Status Payload>      (2) <channel> 
-                        (3) <Channel ID>          (4) <Client ID>
-                        (5) <channel mode mask>   (6) <created>
-                        (7) <Channel Key Payload> (8) [<ban mask>]
-                        (9) [<invite list>]       (10) [<topic>]
-                       (11) [<hmac>]              (12) <list count>
-                       (13) <Client ID list>      (14) <client mode list>
+            Arguments:  (1) <Status Payload>        (2) <channel> 
+                        (3) <Channel ID>            (4) <Client ID>
+                        (5) <channel mode mask>     (6) <created>
+                        (7) [<Channel Key Payload>] (8) [<ban list>]
+                        (9) [<invite list>]         (10) [<topic>]
+                        (11) [<hmac>]               (12) <list count>
+                        (13) <Client ID list>       (14) <client mode list>
 
         This command replies with the channel name requested by the
         client, channel ID of the channel and topic of the channel
@@ -2451,8 +2577,10 @@ List of all defined commands in SILC follows.
         and/or invite list is set they are sent as well.
 
         The <list count>, <Client ID list> and <client mode list> are
-        the clients curerntly on the channel and their modes on the
-        channel.
+        the clients currently on the channel and their modes on the
+        channel.  The <Client ID list> is formed by adding the ID Payloads
+        one after the other.  The <client mode list> is formed by adding
+        32 bit MSB first order values one after the other.
 
         Client receives the channel key in the reply message as well
         inside <Channel Key Payload>.
@@ -2481,8 +2609,9 @@ List of all defined commands in SILC follows.
 
         Reply messages to the command:
 
-        Max Arguments:  2
-            Arguments:  (1) <Status Payload>  (2) [<motd>]
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Server ID>
+                        (3) [<motd>]
 
         This command replies with the motd message if it exists.
 
@@ -2508,7 +2637,10 @@ List of all defined commands in SILC follows.
         locally so that the mode setting/unsetting would work without
         problems.  Client may change only its own modes.
 
-        Following client modes are defined:
+        After changing the mode server must send the notify type
+        SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
+
+        The following client modes are defined:
 
            0x0000    SILC_UMODE_NONE
 
@@ -2534,6 +2666,7 @@ List of all defined commands in SILC follows.
               privileges by SILC_COMMAND_SILCOPER command.  Client
               may unset the mode itself.
 
+
         Reply messages to the command:
 
         Max Arguments:  2
@@ -2552,18 +2685,17 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
             SILC_STATUS_ERR_BAD_CLIENT_ID
             SILC_STATUS_ERR_NOT_YOU
+            SILC_STATUS_ERR_PERM_DENIED
             SILC_STATUS_ERR_UNKNOWN_MODE
-            SILC_STATUS_ERR_NO_RECIPIENT
             SILC_STATUS_ERR_NO_CLIENT_ID
 
 
    17   SILC_COMMAND_CMODE
 
-        Max Arguments:  8
+        Max Arguments:  6
             Arguments:  (1) <Channel ID>    (2) <channel mode mask>
                         (3) [<user limit>]  (4) [<passphrase>]
-                        (5) [<ban mask>]    (6) [<invite list>]
-                        (7) [<cipher>]      (8) [<hmac>]
+                        (5) [<cipher>]      (6) [<hmac>]
 
         This command is used by client to set or change channel flags on
         a channel.  Channel has several modes that set various properties
@@ -2576,7 +2708,7 @@ List of all defined commands in SILC follows.
         When the mode is changed SILC_NOTIFY_TYPE_CMODE_CHANGE notify
         type is distributed to the channel.
 
-        Following channel modes are defined:
+        The following channel modes are defined:
 
            0x0000    SILC_CMODE_NONE
 
@@ -2691,46 +2823,7 @@ List of all defined commands in SILC follows.
               to set/unset this mode.
 
 
-           0x0080    SILC_CMODE_BAN
-
-              Ban mask has been set to the channel.  The ban mask
-              may be used to ban specific clients to join the channel.
-              The <ban mask> argument is the set ban mask.  When
-              unsetting a ban mask the mask must be provided as
-              argument.  Channel founder and channel operator may
-              set/unset this mode.  Channel founder may not be
-              added to the ban list.  <ban mask> is an comma (`,')
-              separated list of banned clients in the following format:
-
-                [<nickname>[@<server>]!][<username>]@[<hostname>]
-
-              Wildcards maybe used when banning clients.
-
-              Typical implementation would use [+|-]b on user interface
-              to set/unset this mode.
-
-
-           0x0100    SILC_CMODE_INVITE_LIST
-
-              Invite list has been set to the channel.  The invite list
-              can be used to mark the clients that is able to join
-              channel without being invited when the channel is set to
-              be invite-only channel.  The <invite list> argument is the
-              set invite mask.  When unsetting entry from the invite list
-              the entry must be provided as argument.  Channel founder and
-              channel operator may set/unset this mode.  The <invite list>
-              is command (`,') separated list of invited clients in the
-              following format:
-
-                [<nickname>[@<server>]!][<username>]@[<hostname>]
-
-              Wildcards maybe used when setting the invite list.
-
-              Typical implementation would use [+|-]I on user interface
-              to set/unset this mode.
-
-        
-           0x0200    SILC_CMODE_CIPHER
+           0x0080    SILC_CMODE_CIPHER
 
               Sets specific cipher to be used to protect channel
               traffic.  The <cipher> argument is the requested cipher.
@@ -2743,7 +2836,7 @@ List of all defined commands in SILC follows.
               to set/unset this mode.
 
 
-           0x0400    SILC_CMODE_HMAC
+           0x0100    SILC_CMODE_HMAC
 
               Sets specific hmac to be used to compute the MACs of the
               channel message.  The <hmac> argument is the requested hmac.
@@ -2761,7 +2854,6 @@ List of all defined commands in SILC follows.
         all clients on the channel by sending SILC_NOTIFY_TYPE_CMODE_CHANGE
         notify type.
 
-
         Reply messages to the command:
 
         Max Arguments:  2
@@ -2785,7 +2877,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
 
 
-   19   SILC_COMMAND_CUMODE
+   18   SILC_COMMAND_CUMODE
 
         Max Arguments:  3
             Arguments:  (1) <Channel ID>  (2) <mode mask>
@@ -2803,7 +2895,7 @@ List of all defined commands in SILC follows.
         When the mode is changed SILC_NOTIFY_TYPE_CUMODE_CHANGE notify
         type is distributed to the channel.
 
-        Following channel modes are defined:
+        The following channel modes are defined:
 
            0x0000    SILC_CUMODE_NONE
 
@@ -2825,7 +2917,6 @@ List of all defined commands in SILC follows.
               client on the channel.  Channel founder and channel operator
               may set/unset (promote/demote) this mode.
 
-
         Reply messages to the command:
 
         Max Arguments:  3
@@ -2863,6 +2954,10 @@ List of all defined commands in SILC follows.
         channel.  If <comment> is provided it will be sent to the removed
         client.
 
+        After kicking the client the server must send the notify type
+        SILC_NOTIFY_TYPE_KICKED to the channel and to its primary router.
+        The channel key must also be re-generated after kicking.
+
         Reply messages to the command:
 
         Max Arguments:  1
@@ -2904,9 +2999,6 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SERVER_PRIV
 
 
-
-
-
    21   SILC_COMMAND_CLOSE
 
         Max Arguments:  2
@@ -2961,7 +3053,7 @@ List of all defined commands in SILC follows.
    23   SILC_COMMAND_SILCOPER
 
         Max Arguments:  2
-            Arguments:  (1) <username>  (2) <authentication data>
+            Arguments:  (1) <username>  (2) <authentication payload>
 
         This command is used by normal client to obtain router operator
         privileges (also known as SILC operator) on some router.  Note
@@ -2969,7 +3061,7 @@ List of all defined commands in SILC follows.
         server operator privileges.
 
         The <username> is the username set in the server configurations
-        as operator.  The <authentication data> is the data that the
+        as operator.  The <authentication payload> is the data that the
         client is authenticated against.  It may be passphrase prompted
         for user on client's screen or it may be public key
         authentication data (data signed with private key), or 
@@ -2981,6 +3073,9 @@ List of all defined commands in SILC follows.
         local properties, such as, local connections and normal server
         administration.
 
+        After changing the mode server must send the notify type
+        SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
+
         Reply messages to the command:
 
         Max Arguments:  1
@@ -2994,7 +3089,6 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
             SILC_STATUS_ERR_TOO_MANY_PARAMS
             SILC_STATUS_ERR_NOT_REGISTERED
-            SILC_STATUS_ERR_BAD_PASSWORD
             SILC_STATUS_ERR_AUTH_FAILED
 
 
@@ -3004,9 +3098,12 @@ List of all defined commands in SILC follows.
             Arguments:  (1) <Channel ID>
 
         This command is used by client to leave a channel the client is
-        joined to.  After a client has leaved the channel the server
-        must create new key for the channel and distribute to all clients
-        still currently on the channel.
+        joined to. 
+
+        When leaving the channel the server must send the notify type
+        SILC_NOTIFY_TYPE_LEAVE to its primary router and to the channel.
+        The channel key must also be re-generated when leaving the channel
+        and distribute it to all clients still currently on the channel.
 
         Reply messages to the command:
 
@@ -3072,7 +3169,55 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ON_CHANNEL
 
 
-   26 - 199
+   26   SILC_COMMAND_BAN
+
+        Max Arguments:  3
+            Arguments:  (1) <Channel ID>         (2) [<adding client>]
+                        (3) [<removing client>]
+
+        This command is used to manage the ban list of the channel
+        indicated by the <Channel ID>.  A client that is banned from
+        channel is no longer able to join the channel.  The client which
+        is executing this command must have at least channel operator
+        privileges on the channel.
+
+        The <adding client> and <removing client> are used to add to and
+        remove from the ban list.  The format of the <adding client> and
+        the <removing client> is of following format:
+
+            [<nickname>[@<server>]!][<username>]@[<hostname>]
+
+        The server must send the notify type SILC_NOTIFY_TYPE_BAN to its
+        primary router after adding to or removing from the ban list.
+        The wildcards may be used with this command.  If adding or removing
+        from than one clients then the lists are an comma (`,') separated
+        list.
+
+        If this command is executed without the ban arguments the command
+        merely replies with the current ban list.
+
+
+        Reply messages to the command:
+
+        Max Arguments:  3
+            Arguments:  (1) <Status Payload>  (2) <Channel ID>
+                        (3) [<ban list>]
+
+        This command replies with the <Channel ID> of the channel and
+        the current <ban list> of the channel if it exists.
+
+        Status messages:
+
+            SILC_STATUS_OK
+            SILC_STATUS_ERR_NOT_REGISTERED
+            SILC_STATUS_ERR_TOO_MANY_PARAMS
+            SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
+            SILC_STATUS_ERR_NO_CHANNEL_ID
+            SILC_STATUS_ERR_NOT_ON_CHANNEL
+            SILC_STATUS_ERR_NO_CHANNEL_PRIV
+
+
+   27 - 199
 
         Currently undefined commands.
 
@@ -3098,7 +3243,7 @@ List of all defined commands in SILC follows.
 Command Status Payload is sent in command reply messages to indicate
 the status of the command.  The payload is one of argument in the
 command thus this is the data area in Command Argument Payload described
-in [SILC2].  The payload is only 2 bytes of length.  Following diagram
+in [SILC2].  The payload is only 2 bytes of length.  The following diagram
 represents the Command Status Payload (field is always in MSB order).
 
 
@@ -3272,8 +3417,8 @@ List of all defined command status messages following.
 
    31   SILC_STATUS_ERR_PERM_DENIED
 
-        "Your host is not among the privileged".  The client tried to
-        register on server that does not allow this host to connect.
+        "Permission denied".  Generic permission denied error status
+        to indicate disallowed access.
 
    32   SILC_STATUS_ERR_BANNED_FROM_SERVER