1db15932bbea27dac04de74dd1ab399be94e138c
[silc.git] / doc / draft-riikonen-silc-commands-06.nroff
1 .pl 10.0i
2 .po 0
3 .ll 7.2i
4 .lt 7.2i
5 .nr LL 7.2i
6 .nr LT 7.2i
7 .ds LF Riikonen
8 .ds RF FORMFEED[Page %]
9 .ds CF
10 .ds LH Internet Draft
11 .ds RH 4 February 2004
12 .ds CH
13 .na
14 .hy 0
15 .in 0
16 .nf
17 Network Working Group                                        P. Riikonen
18 Internet-Draft
19 draft-riikonen-silc-commands-06.txt                      4 February 2004
20 Expires: 4 August 2004
21
22 .in 3
23
24 .ce 2
25 SILC Commands
26 <draft-riikonen-silc-commands-06.txt>
27
28 .ti 0
29 Status of this Memo
30
31 This document is an Internet-Draft and is in full conformance with
32 all provisions of Section 10 of RFC 2026.  Internet-Drafts are
33 working documents of the Internet Engineering Task Force (IETF), its
34 areas, and its working groups.  Note that other groups may also
35 distribute working documents as Internet-Drafts.
36
37 Internet-Drafts are draft documents valid for a maximum of six months
38 and may be updated, replaced, or obsoleted by other documents at any
39 time.  It is inappropriate to use Internet-Drafts as reference
40 material or to cite them other than as "work in progress."
41
42 The list of current Internet-Drafts can be accessed at
43 http://www.ietf.org/ietf/1id-abstracts.txt
44
45 The list of Internet-Draft Shadow Directories can be accessed at
46 http://www.ietf.org/shadow.html
47
48 The distribution of this memo is unlimited.
49
50
51 .ti 0
52 Abstract
53
54 This memo describes the commands used in the Secure Internet Live
55 Conferencing (SILC) protocol, specified in the Secure Internet Live
56 Conferencing, Protocol Specification [SILC1].  The SILC Commands are
57 very important part of the SILC protocol.  Usually the commands are used
58 by SILC clients to manage the SILC session, but also SILC servers may
59 use the commands.  This memo specifies detailed command messages and
60 command reply messages.
61
62
63
64
65
66
67
68
69 .ti 0
70 Table of Contents
71
72 .nf
73 1 Introduction ..................................................  2
74   1.1 Requirements Terminology ..................................  2
75 2 SILC Commands .................................................  2
76   2.1 SILC Commands Syntax ......................................  4
77   2.2 SILC Command Argument Idioms ..............................  4
78   2.3 SILC Commands List ........................................  5
79   2.4 SILC Command Status Payload ............................... 42
80 3 SILC Status Types ............................................. 43
81 4 Security Considerations ....................................... 50
82 5 References .................................................... 50
83 6 Author's Address .............................................. 51
84 Appendix A ...................................................... 51
85 Full Copyright Statement ........................................ 53
86
87
88 .ti 0
89 1. Introduction
90
91 This document describes the commands used in the Secure Internet Live
92 Conferencing (SILC) protocol, specified in the Secure Internet Live
93 Conferencing, Protocol Specification [SILC1].  This document specifies
94 detailed command messages and command reply messages.
95
96 Commands are very important part on SILC network especially for client
97 which uses commands to operate on the SILC network.  Commands are used
98 to set nickname, join to channel, change modes and many other things.
99
100 See the [SILC1] for the requirements and the restrictions for the usage
101 of the SILC commands.  The [SILC2] defines the command packet type and
102 the Command Payload which is actually used to deliver the commands and
103 command reply messages.
104
105
106 .ti 0
107 1.1 Requirements Terminology
108
109 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED,
110 MAY, and OPTIONAL, when they appear in this document, are to be
111 interpreted as described in [RFC2119].
112
113
114 .ti 0
115 2 SILC Commands
116
117 .ti 0
118 2.1 SILC Commands Syntax
119
120 This section briefly describes the syntax of the command notions
121 in this document.  Every field in command is separated from each
122 other by whitespaces (` ') indicating that each field is independent
123 argument and each argument MUST have own Command Argument Payload.
124 The number of maximum arguments are defined with each command
125 separately.  The Command Argument Payload is described in [SILC2].
126
127 Every command defines specific number for each argument.  Currently,
128 they are defined in ascending order; first argument has number one
129 (1), second has number two (2) and so on.  This number is set into the
130 Argument Type field in the Command Argument Payload.  This makes it
131 possible to send the arguments in free order as the number MUST be
132 used to identify the type of the argument.  This makes is it also
133 possible to have multiple optional arguments in commands and in
134 command replies.  The number of argument is marked in parentheses
135 before the actual argument.
136
137
138
139 .in 6
140 Example:  Arguments:  (1) <nickname> (2) <username@host>
141 .in 3
142
143
144 Every command replies with Status Payload.  This payload tells the
145 sender of the command whether the command was completed successfully or
146 whether there was an error.  If error occurred the payload includes the
147 error type.  In the next section the Status Payload is not described
148 as it is common to all commands and has been described here.  Commands
149 MAY reply with other arguments as well.  These arguments are command
150 specific and are described in the next section.
151
152 Example command:
153 .in 6
154
155 EXAMPLE_COMMAND
156
157 .in 8
158 Max Arguments:  3
159     Arguments:  (1) <nickname>[@<server>]  (2) <message>
160                 (3) [<count>]
161
162 The command has maximum of 3 arguments.  However, only first
163 and second arguments are mandatory.
164
165 First argument <nickname> is mandatory but may have optional
166 <nickname@server> format as well.  Second argument is mandatory
167 <message> argument.  Third argument is optional <count> argument.
168
169 The numbers in parentheses are the argument specific numbers
170 that specify the type of the argument in Command Argument Payload.
171 The receiver always knows that, say, argument number two (2) is
172 <message> argument, regardless of the ordering of the arguments in
173 the Command Payload.
174
175 Reply messages to the command:
176
177 Max Arguments:  4
178     Arguments:  (1) <Status Payload>  (2) [<channel list>]
179                 (3) <idle time>       (4) [<away message>]
180
181 This command may reply with maximum of 4 arguments.  However,
182 only the first and third arguments are mandatory.  The numbers
183 in the parentheses have the same meaning as in the upper
184 command sending specification.
185
186 Every command reply with <Status Payload>, it is mandatory
187 argument for all command replies and for this reason it is not
188 described in the command reply descriptions.
189
190
191
192 Status messages:
193
194     SILC_STATUS_OK
195     SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
196     SILC_STATUS_ERR_NO_SUCH_NICK
197
198 Every command reply also defines set of status message that it
199 may return inside the <Status Payload>.  All status messages
200 are defined in the section 2.3 SILC Command Status Payload
201 The status messages defined with the command are recommendations.
202 It is possible to return other status messages not listed with
203 the command reply definition.
204 .in 3
205
206
207 .ti 0
208 2.2 SILC Command Argument Idioms
209
210 All commands that has an ID as argument (for example <Client ID>) are
211 actually ID Payloads, defined in [SILC2] that includes the type of the
212 ID, length of the ID and the actual ID data.  This way variable length
213 ID's can be sent as arguments.
214
215 All passphrases that may be sent in commands as arguments MUST be
216 UTF-8 [RFC2279] encoded.  All strings, with exeption of nicknames and
217 channel names [SILC1], are UTF-8 encoded.  This includes strings like
218 algorithm names, quit, kick and kill messages, service identifiers and
219 others.
220
221 All public keys and certificates that are sent as arguments are actually
222 Public Key Payloads [SILC2].  This way it is possible to send different
223 kind of public keys and certificate types as arguments.
224
225
226
227
228 .ti 0
229 2.3 SILC Commands List
230
231 This section lists all SILC commands, however, it is expected that a
232 implementation and especially client implementation has many more
233 commands that has only local affect.  These commands are official
234 SILC commands that has both client and server sides and cannot be
235 characterized as local commands.
236
237 List of all defined commands in SILC follows.
238
239 .in 0
240    0    SILC_COMMAND_NONE
241
242         None.  This is reserved command and MUST NOT be sent.
243
244
245    1    SILC_COMMAND_WHOIS
246
247         Max Arguments:  256
248             Arguments:  (1) [<nickname>[@<server>]]   (2) [<count>]
249                         (3) [<Requested Attributes>]  (4) [<Client ID>]
250                         (n) [...]
251
252         Whois command is used to query various information about specific
253         user.  The user may be requested by their nickname and server name.
254         The query may find multiple matching users as there are no unique
255         nicknames in the SILC.  The <count> option may be given to narrow
256         down the number of accepted results.  If this is not defined there
257         are no limit of accepted results.  The query may also be narrowed
258         down by defining the server name of the nickname.  The <count> is
259         32 bit MSB first order integer.
260
261         It is also possible to search the user by Client ID.  If the
262         <Client ID> is provided server MUST use it as the search value
263         instead of the <nickname>.  It is also possible to define multiple 
264         Client ID's to search multiple users sending only one WHOIS 
265         command.  In this case the Client ID's are appended as normal 
266         arguments.
267
268         The <Requested Attributes> is defined in [ATTRS] and can be used
269         to request various information about the client.  See Appendix A
270         for definition of using these attributes in SILC.  If neither the
271         <nickname> or <Client ID> arguments are present but the attributes
272         are, the server MUST use the attributes to do the searching.  If
273         none of the arguments, <nickname>, <Client ID> and <Requested
274         Attributes> are present, error MUST be retuned.  Server MAY
275         use the <Requested Attributes> to narrow down the search if they
276         present at any time.
277
278         To prevent miss-use of this command wildcards in the nickname
279         or in the server name are not permitted.  It is not allowed
280         to request all users on some server.  The WHOIS requests MUST
281         be based on explicit nickname request.
282
283         The WHOIS request MUST be always sent to the router by normal 
284         server so that all users are searched.  However, the server still 
285         MUST search its locally connected clients.  The router MUST send
286         this command to the server which owns the requested client, if
287         the router is unable to provide all mandatory information about
288         the client.  That server MUST reply to the command.  Server MUST
289         NOT send whois replies to the client until it has received the
290         reply from its router.
291
292         Reply messages to the command:
293
294         Max Arguments:  11
295             Arguments:  (1) <Status Payload>       (2) <Client ID>
296                         (3) <nickname>[@<server>]  (4) <username@host>
297                         (5) <real name>            (6) [<Channel Payload
298                                                          list>]
299                         (7) [<user mode>]          (8) [<idle time>]
300                         (9) [<fingerprint>]        (10) <channel user
301                                                          mode list>
302                         (11) [<Attributes>]
303
304
305         This command may reply with several command reply messages to
306         form a list of results.  In this case the status payload will
307         include STATUS_LIST_START status in the first reply and
308         STATUS_LIST_END in the last reply to indicate the end of the
309         list.  If there are only one reply the status is set to normal
310         STATUS_OK.  If multiple Client IDs was requested then each found
311         and unfound client MUST cause successful or error reply,
312         respectively.
313
314         The command replies include the Client ID of the nickname,
315         nickname and server name, user name and host name and user's real
316         name.  Client should process these replies only after the last
317         reply has been received with the STATUS_LIST_END status.  If the
318         <count> option were defined in the query there will be only
319         <count> many replies from the server.
320
321         The server returns the list of channels if the client has
322         joined channels.  In this case the list is list of Channel
323         Payloads.  The Mode Mask in the Channel Payload is the channel's
324         mode.  The list is encoded by adding the Channel Payloads one
325         after the other.  Private and secret channels MUST NOT be sent,
326         except if the sender of this command is on those channels, or
327         the sender is server.  The <channel user mode list> MUST also
328         be sent if client is joined channels.  This list includes 32 bit
329         MSB first order values one after the other and each indicate
330         the user's mode on a channel.  The order of these values MUST
331         be same as the channel order in the <Channel Payload list>.
332
333         The server also returns client's user mode, idle time, and the
334         fingerprint of the client's public key.  The <fingerprint> is the
335         binary hash digest of the public key.  The fingerprint MUST NOT
336         be sent if the server has not verified the proof of possession of
337         the corresponding private key.  Server can do this during the
338         SILC Key Exchange protocol.  The <fingerprint> is SHA1 digest.
339
340         The <Attributes> is the reply to the <Requested Attributes>.
341         See the Appendix A for more information.
342
343         Status messages:
344
345             SILC_STATUS_OK
346             SILC_STATUS_LIST_START
347             SILC_STATUS_LIST_END
348             SILC_STATUS_ERR_NO_SUCH_NICK
349             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
350             SILC_STATUS_ERR_WILDCARDS
351             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
352             SILC_STATUS_ERR_TOO_MANY_PARAMS
353
354
355    2    SILC_COMMAND_WHOWAS
356
357         Max Arguments:  2
358             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
359
360         Whowas.  This command is used to query history information about
361         specific user.  The user may be requested by their nickname and
362         server name.  The query may find multiple matching users as there
363         are no unique nicknames in the SILC.  The <count> option may be
364         given to narrow down the number of accepted results.  If this
365         is not defined there are no limit of accepted results.  The query
366         may also be narrowed down by defining the server name of the
367         nickname.  The <count> is 32 bit MSB first order integer.
368
369         To prevent miss-use of this command wildcards in the nickname
370         or in the server name are not permitted.  The WHOWAS requests MUST
371         be based on specific nickname request.
372
373         The WHOWAS request MUST be always sent to the router by server
374         so that all users are searched.  However, the server still must
375         search its locally connected clients.
376
377         Reply messages to the command:
378
379         Max Arguments:  5
380             Arguments:  (1) <Status Payload>        (2) <Client ID>
381                         (3) <nickname>[@<server>]   (4) <username@host>
382                         (5) [<real name>]
383
384         This command may reply with several command reply messages to form
385         a list of results.  In this case the status payload will include
386         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
387         the last reply to indicate the end of the list.  If there are only
388         one reply the status is set to normal STATUS_OK.
389
390         The command replies with nickname and user name and host name.
391         Every server MUST keep history for some period of time of its
392         locally connected clients.
393
394         Status messages:
395
396             SILC_STATUS_OK
397             SILC_STATUS_LIST_START
398             SILC_STATUS_LIST_END
399             SILC_STATUS_ERR_NO_SUCH_NICK
400             SILC_STATUS_ERR_WILDCARDS
401             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
402             SILC_STATUS_ERR_TOO_MANY_PARAMS
403
404
405    3    SILC_COMMAND_IDENTIFY
406
407         Max Arguments:  256
408             Arguments:  (1) [<nickname>[@<server>]]  (2) [<server name>]
409                         (3) [<channel name>]         (4) [<count>]
410                         (5) [<ID Payload>]           (n) [...]
411
412         Identify command is used to query information about an entity by
413         the entity's name or ID.  This command can be used to query
414         information about clients, servers and channels.
415
416         The query may find multiple matching entities.  The <count> option
417         may be given to narrow down the number of accepted results.  If
418         this is not defined there are no limit of accepted results.  The
419         <count> is 32 bit MSB first order integer.
420
421         It is also possible to search the entity by its ID.  If the
422         <ID Payload> is provided server must use it as the search value
423         instead of the entity's name.  One of the arguments MUST be given.
424         It is also possible to define multiple ID Payloads to search
425         multiple entities sending only one IDENTIFY command.  In this case
426         the ID Payloads are appended as normal arguments.  The type of the
427         entity is defined by the type of the ID Payload.
428
429         To prevent miss-use of this command wildcards in the names are
430         not permitted.  It is not allowed to request for example all users
431         on server.
432
433         Implementations may not want to give interface access to this
434         command as it is hardly a command that would be used by an end
435         user.  However, it must be implemented as it is most likely used
436         with private message sending.
437
438         The IDENTIFY command MUST be always sent to the router by server
439         so that all users are searched.  However, server MUST still search
440         its locally connected clients.
441
442         Reply messages to the command:
443
444         Max Arguments:  4
445             Arguments:  (1) <Status Payload>   (2) <ID Payload>
446                         (3) [<entity's name>]  (4) [<info>]
447
448         This command may reply with several command reply messages to form
449         a list of results.  In this case the status payload will include
450         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
451         the last reply to indicate the end of the list.  If there are only
452         one reply the status is set to normal STATUS_OK.  If multiple Client
453         IDs was requested then each found and unfound client must cause
454         successful or error reply, respectively.
455
456         When querying clients the <entity's name> must include the client's
457         nickname in the following format: nickname[@server].  The
458         <info> must include the client's username and host in the following
459         format: username@host.
460
461         When querying servers the <entity's name> must include the server's
462         full name.  The <info> may be omitted.
463
464         When querying channels the <entity's name> must include the
465         channel's name.  The <info> may be omitted.
466
467         If the <count> option were defined in the query there will be only
468         <count> many replies from the server.
469
470         Status messages:
471
472             SILC_STATUS_OK
473             SILC_STATUS_LIST_START
474             SILC_STATUS_LIST_END
475             SILC_STATUS_ERR_NO_SUCH_NICK
476             SILC_STATUS_ERR_NO_SUCH_SERVER
477             SILC_STATUS_ERR_NO_SUCH_CHANNEL
478             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
479             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
480             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
481             SILC_STATUS_ERR_WILDCARDS
482             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
483             SILC_STATUS_ERR_TOO_MANY_PARAMS
484
485
486    4    SILC_COMMAND_NICK
487
488         Max Arguments:  1
489             Arguments:  (1) <nickname>
490
491         Set/change nickname.  This command is used to set nickname for
492         user.  Nickname MUST NOT include any whitespaces (` '),
493         non-printable characters, commas (`,'), '@', '!' or any wildcard
494         characters.
495
496         When nickname is changed new Client ID is generated.  Server MUST
497         distribute SILC_NOTIFY_TYPE_NICK_CHANGE to local clients on the
498         channels (if any) the client is joined on.  Then it MUST send
499         SILC_NOTIFY_TYPE_NICK_CHANGE notify to its primary route to
500         notify about nickname and Client ID change.
501
502         Reply messages to the command:
503
504         Max Arguments:  3
505             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
506                         (3) <nickname>
507
508         This command replies always with <New ID Payload> that is
509         generated by the server every time user changes their nickname.
510         Client receiving this payload MUST start using the received
511         Client ID as its current valid Client ID.  The New ID Payload
512         is described in [SILC2].  The <nickname> is the user's new
513         nickname.
514
515         Status messages:
516
517             SILC_STATUS_OK
518             SILC_STATUS_ERR_WILDCARDS
519             SILC_STATUS_ERR_NICKNAME_IN_USE
520             SILC_STATUS_ERR_BAD_NICKNAME
521             SILC_STATUS_ERR_NOT_REGISTERED
522             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
523             SILC_STATUS_ERR_TOO_MANY_PARAMS
524
525
526    5    SILC_COMMAND_LIST
527
528         Max Arguments:  1
529             Arguments:  (1) [<Channel ID>]
530
531         The list command is used to list channels and their topics on the
532         current server.  If the <Channel ID> parameter is used, only the
533         status of that channel is displayed.  Secret channels are not
534         listed at all.  Private channels are listed with status indicating
535         that the channel is private.  Router MAY reply with all channels
536         it knows about.
537
538         Reply messages to the command:
539
540         Max Arguments:  5
541             Arguments:  (1) <Status Payload>  (2) <Channel ID>
542                         (3) <channel>         (4) [<topic>]
543                         (5) [<user count>]
544
545         This command may reply with several command reply messages to form
546         a list of results.  In this case the status payload will include
547         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
548         the last reply to indicate the end of the list.  If there are only
549         one reply the status is set to normal STATUS_OK.
550
551         This command replies with Channel ID, name and the topic of the
552         channel.  If the channel is private channel the <topic> SHOULD
553         include the "*private*" string.
554
555         Status messages:
556
557             SILC_STATUS_OK
558             SILC_STATUS_LIST_START
559             SILC_STATUS_LIST_END
560             SILC_STATUS_ERR_WILDCARDS
561             SILC_STATUS_ERR_NOT_REGISTERED
562             SILC_STATUS_ERR_TOO_MANY_PARAMS
563             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
564             SILC_STATUS_ERR_NO_CHANNEL_ID
565             SILC_STATUS_ERR_NO_SUCH_SERVER
566
567
568    6    SILC_COMMAND_TOPIC
569
570         Max Arguments:  2
571             Arguments:  (1) <Channel ID>  (2) [<topic>]
572
573         This command is used to change or view the topic of a channel.
574         The topic for channel <Channel ID> is returned if there is no
575         <topic> given.  If the <topic> parameter is present, the topic
576         for that channel will be changed, if the channel modes permit
577         this action.
578
579         After setting the topic the server MUST send the notify type
580         SILC_NOTIFY_TYPE_TOPIC_SET to its primary router and then to
581         the channel which topic was changed.
582
583         Reply messages to the command:
584
585         Max Arguments:  2
586             Arguments:  (1) <Status Payload>  (2) <Channel ID>
587                         (3) [<topic>]
588
589         The command may reply with the topic of the channel if it is
590         set.
591
592         Status messages:
593
594             SILC_STATUS_OK
595             SILC_STATUS_ERR_NOT_ON_CHANNEL
596             SILC_STATUS_ERR_WILDCARDS
597             SILC_STATUS_ERR_NOT_REGISTERED
598             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
599             SILC_STATUS_ERR_NO_SUCH_CHANNEL
600             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
601             SILC_STATUS_ERR_NO_CHANNEL_ID
602             SILC_STATUS_ERR_BAD_CHANNEL_ID
603             SILC_STATUS_ERR_TOO_MANY_PARAMS
604             SILC_STATUS_ERR_NO_CHANNEL_PRIV
605
606
607    7    SILC_COMMAND_INVITE
608
609         Max Arguments:  4
610             Arguments:  (1) <Channel ID>       (2) [<Client ID>]
611                         (3) [<add | del>]      (4) [<invite list>]
612
613         This command can be used to invite other clients to join to a
614         channel, and to manage the channel's invite list.  The <Client
615         ID> argument is the target client's ID that is being invited.
616         The <Channel ID> is the Channel ID of the requested channel.
617         The sender of this command MUST be on the channel.  The server
618         MUST also send the notify type SILC_NOTIFY_TYPE_INVITE to its
619         primary router and then to the client indicated by the <Client
620         ID>.
621
622         The <add | del> is an argument of size of 1 byte where 0x00 means
623         adding a client to invite list, and 0x01 means deleting a client
624         from invite list.  The <invite list>, if present, indicates
625         the information to be added to or removed from the invite list.
626         It may include a string for matching clients, public key of a
627         client (Public Key Payload) or Client ID of a client.  The
628         <invite list> is an Argument List Payload.
629
630         The following Argument Types has been defined for invite list
631         Argument Payloads:
632
633           0x01 - Argument is an invite string of following format:
634
635             [<nickname>[@<server>]!][<username>]@[<hostname or IP/MASK>]
636
637             The <hostname> may also be in format of IP/MASK to indicate
638             a network, for example 10.2.1.0/255.255.0.0.
639
640           0x02 - Argument is the public key of a client
641           0x03 - Argument is the Client ID of a client
642
643         If unknown type value is received or there is invalid amount of
644         Argument Payloads present in the list, the command MUST be
645         discarded.  When argument that is to be deleted from the invite
646         list does not exist in the list the argument is ignored.
647
648         When adding to or removing from the invite list the server MUST
649         send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router.
650         When the SILC_CHANNEL_MODE_INVITE is set the client which executes
651         this command MUST have at least channel operator privileges to be
652         able to add to or remove from the invite list.  If this channel
653         mode is not set the list manipulation is allowed for all clients.
654         Wildcards MAY be used with this command.  When this command is
655         used to invite explicit client with <Client ID> the ID MUST be
656         added to the invite list by the server.
657
658         When this command is given with only <Channel ID> argument then
659         the command merely returns the invite list of the channel.   This
660         command MUST fail if the requested channel does not exist, the
661         requested <Client ID> is already on the channel or if the channel
662         is invite only channel and the caller of this command does not
663         have at least channel operator privileges on the channel.
664
665         Reply messages to the command:
666
667         Max Arguments:  3
668             Arguments:  (1) <Status Payload>  (2) <Channel ID>
669                         (3) [<invite list>]
670
671         This command replies with the invite list of the channel if it
672         exists.
673
674         Status messages:
675
676             SILC_STATUS_OK
677             SILC_STATUS_ERR_NOT_REGISTERED
678             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
679             SILC_STATUS_ERR_TOO_MANY_PARAMS
680             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
681             SILC_STATUS_ERR_NO_CLIENT_ID
682             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
683             SILC_STATUS_ERR_NO_CHANNEL_ID
684             SILC_STATUS_ERR_NOT_ON_CHANNEL
685             SILC_STATUS_ERR_USER_ON_CHANNEL
686             SILC_STATUS_ERR_NO_CHANNEL_PRIV
687             SILC_STATUS_ERR_RESOURCE_LIMIT
688
689
690    8    SILC_COMMAND_QUIT
691
692         Max Arguments:  1
693             Arguments:  (1) [<quit message>]
694
695         This command is used by client to end SILC session.  The server
696         must close the connection to a client which sends this command.
697         if <quit message> is given it will be sent to other clients on
698         channel if the client is on channel when quitting.
699
700         Reply messages to the command:
701
702         This command does not reply anything.
703
704
705     9   SILC_COMMAND_KILL
706
707         Max Arguments:  3
708             Arguments:  (1) <Client ID>          (2) [<comment>]
709                         (3) [<auth payload>]
710
711         This command can be used by SILC operators to remove a client from
712         SILC network.  It also can be used by a normal client to remove
713         its own client from network by providing correct authentication
714         data.
715
716         Router operator killing a client:
717
718         The removing has temporary effects and client may reconnect to
719         SILC network.  The <Client ID> is the client to be removed from SILC.
720         The <comment> argument may be provided to give to the removed client
721         some information why it was removed from the network.  The killer
722         MUST have SILC operator privileges.
723
724         When killing a client the router MUST first send notify type
725         SILC_NOTIFY_TYPE_KILLED to all channels the client has joined.
726         The packet MUST NOT be sent to the killed client on the channels.
727         Then, the router MUST send the same notify type to its primary
728         router.  Finally, the router MUST send the same notify type
729         destined directly to the client which was killed.  The killed
730         client MUST also be removed from the invite lists of joined
731         channels if it is explicitly added in the invite lists.
732
733         Normal client killing by authentication:
734
735         When normal client executes this command the <Client ID> is the
736         destination client to be removed from the network.  The client
737         MUST provide the <auth payload> which includes a digital signature
738         that MUST be verified with the public key of the client indicated
739         by <Client ID>.  The <Client ID> MUST be local client to the server.
740         If the signature verification is successful the server sends
741         SILC_NOTIFY_TYPE_SIGNOFF to network and to the destination client.
742         The SILC_NOTIFY_TYPE_KILLED MUST NOT be used in this case.  If the
743         verification fails the destination client remains in network.
744         The hash function used in <auth payload> computing is SHA1.
745
746         Reply messages to the command:
747
748         Max Arguments:  2
749             Arguments:  (1) <Status Payload>  (2) <Client ID>
750
751         This command returns with the requested Client ID.
752
753         Status messages:
754
755             SILC_STATUS_OK
756             SILC_STATUS_ERR_WILDCARDS
757             SILC_STATUS_ERR_NOT_REGISTERED
758             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
759             SILC_STATUS_ERR_TOO_MANY_PARAMS
760             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
761             SILC_STATUS_ERR_NO_CLIENT_ID
762             SILC_STATUS_ERR_NO_ROUTER_PRIV
763
764
765    10   SILC_COMMAND_INFO
766
767         Max Arguments:  2
768             Arguments:  (1) [<server>]  (2) [<Server ID>]
769
770         This command is used to fetch various information about a server.
771         If <server> argument is specified the command MUST be sent to
772         the requested server.
773
774         If the <Server ID> is specified the server information if fetched
775         by the provided Server ID.  One of the arguments MUST always be
776         present.
777
778         Reply messages to the command:
779
780         Max Arguments:  4
781             Arguments:  (1) <Status Payload>  (2) <Server ID>
782                         (3) <server name>     (4) <string>
783
784         This command replies with the Server ID of the server and a
785         string which tells the information about the server.
786
787         Status messages:
788
789             SILC_STATUS_OK
790             SILC_STATUS_ERR_WILDCARDS
791             SILC_STATUS_ERR_NOT_REGISTERED
792             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
793             SILC_STATUS_ERR_TOO_MANY_PARAMS
794             SILC_STATUS_ERR_NO_SUCH_SERVER
795             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
796             SILC_STATUS_ERR_NO_SERVER_ID
797
798
799    11   SILC_COMMAND_STATS
800
801         Max Arguments:  1
802             Arguments:  (1) <Server ID>
803
804         This command is used to fetch various statistical information
805         from the server indicated by <Server ID>, which is the ID of
806         server where sender is connected to.  Server receiving this
807         command MAY also send this further to its router for fetching
808         other cell and network wide statistics to accompany the reply.
809
810         Reply messages to the command:
811
812         Max Arguments:  3
813             Arguments:  (1) <Status Payload>          (2) <Server ID>
814                         (3) [<statistics structure>]
815
816         This command replies with the Server ID of the server and
817         optional statistics structure which includes 32 bit MSB first
818         ordered integer values to represent various statistical
819         information.  The structure is as follows:
820
821           starttime      - time when server was started
822           uptime         - uptime of the server
823           my clients     - number of locally connected clients
824           my channels    - number of locally created channels
825           my server ops  - number of local server operators
826           my router ops  - number of local router operators
827           cell clients   - number of clients in local cell
828           cell channels  - number of channels in local cell
829           cell servers   - number of servers in local cell
830           clients        - number of client in SILC network
831           channels       - number of channels in SILC network
832           servers        - number of servers in SILC network
833           routers        - number of routers in SILC network
834           server ops     - number of server operators in SILC network
835           router ops     - number of router operators in SILC network
836
837         If some value is unknown it is set to zero (0) value.  The
838         "starttime" is the start time of the server, and is seconds
839         since Epoch (POSIX.1).  The "uptime" is time difference of
840         current time and "starttime" in the server, and is seconds
841         in value.
842
843         Status messages:
844
845             SILC_STATUS_OK
846             SILC_STATUS_ERR_NOT_REGISTERED
847             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
848             SILC_STATUS_ERR_TOO_MANY_PARAMS
849             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
850             SILC_STATUS_ERR_NO_SUCH_SERVER
851             SILC_STATUS_ERR_NO_SERVER_ID
852
853
854    12   SILC_COMMAND_PING
855
856         Max Arguments:  1
857             Arguments:  (1) <Server ID>
858
859         This command is used by client and server to test the communication
860         channel to its server if one suspects that the communication is not
861         working correctly.  The <Server ID> is the ID of the server the
862         sender is connected to.
863
864         Reply messages to the command:
865
866         Max Arguments:  1
867             Arguments:  (1) <Status Payload>
868
869         This command replies only with Status Payload.  Server returns
870         SILC_STATUS_OK in Status Payload if pinging was successful.
871
872
873
874         Status messages:
875
876             SILC_STATUS_OK
877             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
878             SILC_STATUS_ERR_TOO_MANY_PARAMS
879             SILC_STATUS_ERR_NO_SERVER_ID
880             SILC_STATUS_ERR_NO_SUCH_SERVER
881             SILC_STATUS_ERR_NOT_REGISTERED
882
883
884    13   SILC_COMMAND_OPER
885
886         Max Arguments:  2
887             Arguments:  (1) <username>  (2) <authentication payload>
888
889         This command is used by normal client to obtain server operator
890         privileges on some server or router.  Note that router operator
891         has router privileges that supersedes the server operator
892         privileges and this does not obtain those privileges.  Client
893         MUST use SILCOPER command to obtain router level privileges.
894
895         The <username> is the username set in the server configurations
896         as operator.  The <authentication payload> is the data that the
897         client is authenticated against.  It may be passphrase prompted
898         for user on client's screen or it may be public key authentication
899         based on digital signatures.  The public key used to verify the
900         signature should be locally saved in the server, and server should
901         not use public key received during the SKE to verify this signature.
902
903         After changing the mode the server MUST send the notify type
904         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
905
906         Reply messages to the command:
907
908         Max Arguments:  1
909             Arguments:  (1) <Status Payload>
910
911         This command replies only with Status Payload.
912
913         Status messages:
914
915             SILC_STATUS_OK
916             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
917             SILC_STATUS_ERR_TOO_MANY_PARAMS
918             SILC_STATUS_ERR_NOT_REGISTERED
919             SILC_STATUS_ERR_AUTH_FAILED
920
921
922    14   SILC_COMMAND_JOIN
923
924         Max Arguments:  7
925             Arguments:  (1) <channel>         (2) <Client ID>
926                         (3) [<passphrase>]    (4) [<cipher>]
927                         (5) [<hmac>]          (6) [<founder auth>]
928                         (7) [<channel auth>]
929
930         Join to channel/create new channel.  This command is used to
931         join to a channel.  If the channel does not exist the channel is
932         created.  If server is normal server this command MUST be sent
933         to router which will create the channel.  The channel MAY be
934         protected with passphrase.  If this is the case the passphrase
935         MUST be sent along the join command.
936
937         The name of the <channel> MUST NOT include any spaces (` '),
938         non-printable characters, commas (`,') or any wildcard characters.
939
940         The second argument <Client ID> is the Client ID of the client
941         which is joining to the client.  When client sends this command
942         to the server the <Client ID> MUST be the client's own ID.
943
944         Cipher to be used to secure the traffic on the channel MAY be
945         requested by sending the name of the requested <cipher>.  This
946         is used only if the channel does not exist and is created.  If
947         the channel already exists the cipher set previously for the
948         channel will be used to secure the traffic.  The computed MACs
949         of the channel message are produced by the default HMAC or by
950         the <hmac> provided for the command.
951
952         The <founder auth> is Authentication Payload providing the
953         authentication for gaining founder privileges on the channel
954         when joining the channel.  The client may provide this if it
955         knows that it is the founder of the channel and that the
956         SILC_CMODE_FOUNDER_AUTH mode is set on the channel.  The server
957         MUST verify whether the client is able to gain the founder
958         privileges the same way as the client had given the
959         SILC_COMMAND_CUMODE command to gain founder privileges.  The
960         client is still able to join the channel even if the founder
961         privileges could not be gained.  The hash function used with
962         the <founder payload> MUST be sha1.
963
964         If the <channel auth> is present and the channel mode
965         SILC_CMODE_CHANNEL_AUTH is set the server MUST verify the
966         <channel auth> with channel public key(s).  If public key that
967         can verify <channel auth> does not exist on the channel public
968         key list the client MUST NOT be allowed to join the channel.
969         Because more than one public key may be set on channel the
970         <channel auth> Authentication Payload's Public Data field
971         MUST include an indication of the public key to be used.  The
972         first 20 bytes of the Public Data field MUST be SHA-1 digest of
973         the public key that must be used in verification.  Rest of the
974         Public Data field are set as defined in [SILC1].  This way server
975         can determine from the digest whether that public key exist on the
976         channel and then use that key in verification.  The hash function
977         used with <channel auth> MUST be sha1.
978
979         The server MUST check whether the user is allowed to join to
980         the requested channel.  Various modes set to the channel affect
981         the ability of the user to join the channel.  These conditions
982         are:
983
984             o  The user MUST be invited to the channel if the channel
985                is invite-only channel.
986
987             o  The Client ID/nickname/username/host name/public key
988                MUST NOT match any active bans.
989
990             o  The correct passphrase MUST be provided if passphrase
991                is set to the channel, and/or digital signature verification
992                with channel public key MUST be successful if public keys
993                has been set to the channel.
994
995             o  The user count limit, if set, MUST NOT be reached.
996
997         If the client provided correct <founder auth> payload it can
998         override these conditions, except the condition for the passphrase.
999         The correct passphrase MUST be provided even if <founder auth>
1000         payload is provided.
1001
1002         Reply messages to the command:
1003
1004         Max Arguments:  16
1005             Arguments:  (1) <Status Payload>        (2) <channel>
1006                         (3) <Channel ID>            (4) <Client ID>
1007                         (5) <channel mode mask>     (6) <created>
1008                         (7) [<Channel Key Payload>] (8) [<ban list>]
1009                         (9) [<invite list>]         (10) [<topic>]
1010                         (11) [<hmac>]               (12) <list count>
1011                         (13) <Client ID list>       (14) <client mode list>
1012                         (15) [<founder pubkey>]     (16) [<channel pubkeys>]
1013
1014         This command replies with the channel name requested by the
1015         client, channel ID of the channel and topic of the channel
1016         if it exists.  The <Client ID> is the Client ID which was joined
1017         to the channel.  It also replies with the channel mode mask
1018         which tells all the modes set on the channel.  If the channel
1019         is created the mode mask is zero (0) and <created> is 0x01.
1020         If ban mask and/or invite list is set they are sent as well.
1021
1022         The <list count>, <Client ID list> and <client mode list> are
1023         the clients currently on the channel and their modes on the
1024         channel.  The <Client ID list> is formed by adding the ID Payloads
1025         one after the other.  The <client mode list> is formed by adding
1026         32 bit MSB first order values one after the other.  The <founder
1027         pubkey> is the public key (or certificate) of the channel founder.
1028         The <channel pubkeys> is Argument List Payload containing the
1029         channel public keys that has been set for the channel.
1030
1031         Client receives the channel key in the reply message as well
1032         inside <Channel Key Payload>.
1033
1034         Status messages:
1035
1036             SILC_STATUS_OK
1037             SILC_STATUS_ERR_WILDCARDS
1038             SILC_STATUS_ERR_NOT_REGISTERED
1039             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1040             SILC_STATUS_ERR_TOO_MANY_PARAMS
1041             SILC_STATUS_ERR_BAD_PASSWORD
1042             SILC_STATUS_ERR_CHANNEL_IS_FULL
1043             SILC_STATUS_ERR_NOT_INVITED
1044             SILC_STATUS_ERR_BANNED_FROM_CHANNEL
1045             SILC_STATUS_ERR_BAD_CHANNEL
1046             SILC_STATUS_ERR_USER_ON_CHANNEL
1047
1048
1049    15   SILC_COMMAND_MOTD
1050
1051         Max Arguments:  1
1052             Arguments:  (1) <server>
1053
1054         This command is used to query the Message of the Day of the server.
1055
1056         Reply messages to the command:
1057
1058         Max Arguments:  3
1059             Arguments:  (1) <Status Payload>  (2) <Server ID>
1060                         (3) [<motd>]
1061
1062         This command replies with the motd message if it exists.
1063
1064         Status messages:
1065
1066             SILC_STATUS_OK
1067             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1068             SILC_STATUS_ERR_TOO_MANY_PARAMS
1069             SILC_STATUS_ERR_NOT_REGISTERED
1070             SILC_STATUS_ERR_NO_SUCH_SERVER
1071
1072
1073    16   SILC_COMMAND_UMODE
1074
1075         Max Arguments:  2
1076             Arguments:  (1) <Client ID>  (2) [<client mode mask>]
1077
1078         This command is used by client to set/unset modes for itself.
1079         However, there are some modes that the client MUST NOT set itself,
1080         but they will be set by server.  However, client MAY unset any
1081         mode.  Modes may be masked together ORing them thus having
1082         several modes set.  Client MUST keep its client mode mask
1083         locally so that the mode setting/unsetting would work without
1084         problems.  Client may change only its own modes.
1085
1086         After changing the mode server MUST send the notify type
1087         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
1088
1089         The following client modes are defined:
1090
1091            0x00000000    SILC_UMODE_NONE
1092
1093               No specific mode for client.  This is the initial
1094               setting when new client is created.  The client is
1095               normal client and is present in the network.
1096
1097
1098            0x00000001    SILC_UMODE_SERVER_OPERATOR
1099
1100               Marks the user as server operator.  Client MUST NOT
1101               set this mode itself.  Server sets this mode to the
1102               client when client attains the server operator
1103               privileges by SILC_COMMAND_OPER command.  Client
1104               MAY unset the mode itself.
1105
1106
1107            0x00000002    SILC_UMODE_ROUTER_OPERATOR
1108
1109               Marks the user as router (SILC) operator.  Client
1110               MUST NOT set this mode itself.  Router sets this mode
1111               to the client when client attains the router operator
1112               privileges by SILC_COMMAND_SILCOPER command.  Client
1113               MAY unset the mode itself.
1114
1115
1116            0x00000004    SILC_UMODE_GONE
1117
1118               Marks that the user is not currently present in the
1119               SILC Network.  Client MAY set and unset this mode.
1120
1121
1122            0x00000008    SILC_UMODE_INDISPOSED
1123
1124               Marks that the user is currently indisposed and may
1125               not be able to receive any messages, and that user may
1126               not be present in the network.  Client MAY set and
1127               unset this mode.
1128
1129
1130            0x00000010    SILC_UMODE_BUSY
1131
1132               Marks that the user is currently busy and may not
1133               want to receive any messages, and that user may not
1134               be present in the network.  Client MAY set and unset
1135               this mode.
1136
1137
1138            0x00000020    SILC_UMODE_PAGE
1139
1140               User is not currently present or is unable to receive
1141               messages, and prefers to be paged in some mechanism
1142               if the user needs to be reached.  Client MAY set and
1143               unset this mode.
1144
1145
1146            0x00000040    SILC_UMODE_HYPER
1147
1148               Marks that the user is hyper active and is eager to
1149               receive and send messages.   Client MAY set and unset
1150               this mode.
1151
1152
1153            0x00000080    SILC_UMODE_ROBOT
1154
1155               Marks that the client is actually a robot program.
1156               Client MAY set and unset this mode.
1157
1158
1159            0x00000100    SILC_UMODE_ANONYMOUS
1160
1161               Marks that the client is anonymous client.  Server
1162               that specifically is designed for anonymous services
1163               can set and unset this mode.  Client MUST NOT set or
1164               unset this mode itself.  A client with this mode set
1165               would have the username and the hostname information
1166               scrambled by the server which set this mode.
1167
1168
1169            0x00000200    SILC_UMODE_BLOCK_PRIVMSG
1170
1171               Marks that the client wishes to block private
1172               messages sent to the client, unless the Private
1173               Message Key flag is set in the SILC packet header.
1174               If this mode is set server MUST NOT deliver private
1175               messages to the client without the Private Message
1176               Key flag being set.  The Private Message Key flag set
1177               indicates that the private message is protected with
1178               a key shared between the sender and the recipient.
1179
1180               A separate service could provide additional filtering
1181               features for accepting private messages from certain
1182               sender.  However, this document does not specify such
1183               service.
1184
1185               The client MAY set and unset this mode.
1186
1187
1188            0x00000400    SILC_UMODE_DETACHED
1189
1190               Marks that the client is detached from the SILC network.
1191               This means that the actual network connection to the
1192               client is lost but the client entry is still valid.  The
1193               detached client can be resumed at a later time.  This
1194               mode MUST NOT be set by client.  It can only be set when
1195               client has issued command SILC_COMMAND_DETACH.  The server
1196               sets this mode.  This mode cannot be unset with this
1197               command.  It is unset when the client is resuming back to
1198               the network and SILC_PACKET_RESUME_CLIENT packet is
1199               received.
1200
1201               This flag MUST NOT be used to determine whether a packet
1202               can be sent to the client or not.  Only the server that
1203               had the original client connection can make the decision
1204               by knowing that the network connection is not active.
1205               In this case the default case is to discard the packet.
1206
1207
1208            0x00000800    SILC_UMODE_REJECT_WATCHING
1209
1210               Marks that the client rejects that it could be watched
1211               by someone else.  If this mode is set notifications about
1212               this client is not send, even if someone is watching the
1213               same nickname this client has.  Client MAY set and unset
1214               this mode.  Any changes for this client MUST NOT be
1215               notified to any watcher when this mode is set.
1216
1217               A separate service could provide additional filtering
1218               features for rejecting and accepting the watching from
1219               certain users.  However, this document does not specify
1220               such service.
1221
1222
1223            0x00001000    SILC_UMODE_BLOCK_INVITE
1224
1225               Marks that the client wishes to block incoming invite
1226               notifications.  Client MAY set and unset this mode.
1227               When set server does not deliver invite notifications
1228               to the client.  Note that this mode may make it harder
1229               to join invite-only channels.
1230
1231         If the <client mode mask> was not provided this command merely
1232         returns the mode mask to the client.
1233
1234
1235         Reply messages to the command:
1236
1237         Max Arguments:  2
1238             Arguments:  (1) <Status Payload>  (2) <client mode mask>
1239
1240         This command replies with the changed client mode mask that
1241         the client MUST to keep locally.
1242
1243
1244         Status messages:
1245
1246             SILC_STATUS_OK
1247             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1248             SILC_STATUS_ERR_TOO_MANY_PARAMS
1249             SILC_STATUS_ERR_NOT_REGISTERED
1250             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1251             SILC_STATUS_ERR_BAD_CLIENT_ID
1252             SILC_STATUS_ERR_NOT_YOU
1253             SILC_STATUS_ERR_PERM_DENIED
1254             SILC_STATUS_ERR_UNKNOWN_MODE
1255             SILC_STATUS_ERR_NO_CLIENT_ID
1256
1257
1258    17   SILC_COMMAND_CMODE
1259
1260         Max Arguments:  9
1261             Arguments:  (1) <Channel ID>      (2) [<channel mode mask>]
1262                         (3) [<user limit>]    (4) [<passphrase>]
1263                         (5) [<cipher>]        (6) [<hmac>]
1264                         (7) [<auth payload>]  (8) [<founder pubkey>]
1265                         (9) [<channel pubkey>]
1266
1267         This command is used by client to set or change channel flags on
1268         a channel.  Channel has several modes that set various properties
1269         of a channel.  Modes may be masked together by ORing them thus
1270         having several modes set.  The <Channel ID> is the ID of the
1271         target channel.  The client changing channel mode MUST be on
1272         the same channel and posses sufficient privileges to be able to
1273         change the mode.
1274
1275         When the mode is changed SILC_NOTIFY_TYPE_CMODE_CHANGE notify
1276         type MUST be distributed to the channel.
1277
1278         The following channel modes are defined:
1279
1280            0x00000000    SILC_CMODE_NONE
1281
1282               No specific mode on channel.  This is the default when
1283               channel is created.  This means that channel is just plain
1284               normal channel.
1285
1286
1287            0x00000001    SILC_CMODE_PRIVATE
1288
1289               Channel is private channel.  Private channels are shown
1290               in the channel list listed with SILC_COMMAND_LIST command
1291               with indication that the channel is private.  Also,
1292               client on private channel will no be detected to be on
1293               the channel as the channel is not shown in the client's
1294               currently joined channel list.  Channel founder and
1295               channel operator MAY set/unset this mode.
1296
1297
1298            0x00000002    SILC_CMODE_SECRET
1299
1300               Channel is secret channel.  Secret channels are not shown
1301               in the list listed with SILC_COMMAND_LIST command.  Secret
1302               channels can be considered to be invisible channels.
1303               Channel founder and channel operator MAY set/unset this
1304               mode.
1305
1306
1307            0x00000004    SILC_CMODE_PRIVKEY
1308
1309               Channel uses private channel key to protect the traffic
1310               on the channel.  When this mode is set the client will be
1311               responsible to set the key it wants to use to encrypt and
1312               decrypt the traffic on channel.  Server generated channel
1313               keys are not used at all.  This mode provides additional
1314               security as clients on channel may agree to use private
1315               channel key that even servers do not know.  Naturally,
1316               this requires that every client on the channel knows
1317               the key before hand (it is considered to be pre-shared-
1318               key).  The key material SHOULD be processed as stated
1319               in the [SILC3] in the section Processing the Key Material.
1320
1321               As it is local setting it is possible to have several
1322               private channel keys on one channel.  In this case several
1323               clients can talk on same channel but only those clients
1324               that share the key with the message sender will be able
1325               to hear the talking.  Client SHOULD NOT display those
1326               message for the end user that it is not able to decrypt
1327               when this mode is set.
1328
1329               Only channel founder MAY set/unset this mode.  If this
1330               mode is unset the server will distribute new channel
1331               key to all clients on the channel which will be used
1332               thereafter.
1333
1334
1335            0x00000008    SILC_CMODE_INVITE
1336
1337               Channel is invite only channel.  Client may join to this
1338               channel only if it is invited to the channel.  Channel
1339               founder and channel operator MAY set/unset this mode.
1340
1341
1342            0x00000010    SILC_CMODE_TOPIC
1343
1344               The topic of the channel may only be set by client that
1345               is channel founder or channel operator.  Normal clients
1346               on channel will not be able to set topic when this mode
1347               is set.  Channel founder and channel operator MAY set/
1348               unset this mode.
1349
1350
1351            0x00000020    SILC_CMODE_ULIMIT
1352
1353               User limit has been set to the channel.  New clients
1354               may not join to the channel when the limit set is
1355               reached.  Channel founder and channel operator MAY set/
1356               unset the limit.  The <user limit> argument is the
1357               number of limited users.
1358
1359
1360            0x00000040    SILC_CMODE_PASSPHRASE
1361
1362               Passphrase has been set to the channel.  Client may
1363               join to the channel only if it is able to provide the
1364               correct passphrase.  Setting passphrases to channel
1365               is entirely safe as all commands are protected in the
1366               SILC network.  Only channel founder MAY set/unset
1367               the passphrase.  The <passphrase> argument is the
1368               set passphrase.
1369
1370
1371            0x00000080    SILC_CMODE_CIPHER
1372
1373               Sets specific cipher to be used to protect channel
1374               traffic.  The <cipher> argument is the requested cipher.
1375               When set or unset the server must re-generate new
1376               channel key.  Only channel founder MAY set the cipher of
1377               the channel.  When unset the new key is generated using
1378               default cipher for the channel.
1379
1380
1381            0x00000100    SILC_CMODE_HMAC
1382
1383               Sets specific hmac to be used to compute the MACs of the
1384               channel message.  The <hmac> argument is the requested hmac.
1385               Only channel founder may set the hmac of the channel.
1386
1387
1388            0x00000200    SILC_CMODE_FOUNDER_AUTH
1389
1390               Channel founder may set this mode to be able to regain
1391               channel founder rights even if the client leaves the
1392               channel.  The <auth payload> is the Authentication Payload
1393               consisting of the public key authentication method and the
1394               digital signature for that method.  The passphrase or NONE
1395               authentication methods MUST NOT be accepted.
1396
1397               The server does not save <auth payload> but MUST verify it.
1398               The public key used to verify the payload is the <founder
1399               pubkey> if present, or the public key of the client sending
1400               this command.  If <founder pubkey> is present also that
1401               public key MUST be saved as founder's public key.  This
1402               mode may be set only if the <auth payload> was verified
1403               successfully.  The hash function used with the <auth
1404               payload> MUST be sha1.
1405
1406               The public key of the founder is sent in the
1407               SILC_NOTIFY_TYPE_CMODE_CHANGE notify type so that other
1408               routers and servers in the network may save the public key.
1409               This way the founder can reclaim the founder rights back
1410               to the channel from any server in the network.  The founder
1411               rights can be regained by the SILC_CUMODE_FOUNDER channel
1412               user mode, or during joining procedure with the command
1413               SILC_COMMAND_JOIN.
1414
1415               If this mode is already set but the <founder pubkey> is
1416               different the new key will replace the old founder key and
1417               the new key is distributed in the network with the
1418               SILC_NOTIFY_TYPE_CMODE_CHANGE notify.  Only the original
1419               founder may set this mode multiple times and the client
1420               MUST have SILC_CUMODE_FOUNDER mode on the channel.
1421
1422               When this channel mode is set the channel also becomes
1423               permanent.  If all clients leave the channel while this
1424               mode is set the channel MUST NOT be destroyed.  The founder
1425               can reclaim the founder mode back on these empty channels
1426               at any time.  Implementations MAY limit the number of how
1427               many channels a user can own and how long they remain
1428               persistent.
1429
1430
1431            0x00000400    SILC_CMODE_SILENCE_USERS
1432
1433               Channel founder may set this mode to silence normal users
1434               on the channel.  Users with operator privileges are not
1435               affected by this mode.  Messages sent by normal users
1436               are dropped by servers when this mode is set.  This mode
1437               can be used to moderate the channel.  Only channel founder
1438               may set/unset this mode.
1439
1440
1441            0x00000800    SILC_CMODE_SILENCE_OPERS
1442
1443               Channel founder may set this mode to silence operators
1444               on the channel.  When used with SILC_CMODE_SILENCE_USERS
1445               mode this can be used to set the channel in state where only
1446               the founder of the channel may send messages to the channel.
1447               Messages sent by operators are dropped by servers when this
1448               mode is set.  Only channel founder may set/unset this mode.
1449
1450
1451            0x00001000    SILC_CMODE_CHANNEL_AUTH
1452
1453               When this mode is set the channel has one or more public keys
1454               or certificates set, and ability to join the channel requires
1455               a client to provide digital signature that can be successfully
1456               verified with one of the channel public keys.  This mode is
1457               equivalent to the SILC_MODE_PASSPHRASE except that digital
1458               signatures are used to gain access to the channel.  Both
1459               modes MAY be set at the same time.  Channel founder may set
1460               and unset this mode.
1461
1462               The <channel pubkey> argument is an Argument List Payload
1463               where each argument is Public Key Payload including public
1464               key to be added or removed from the channel public key list.
1465               To add a public key to channel this mode is set and the
1466               argument type is 0x00, and the argument is the public key.
1467               To remove a public key from channel public key list the
1468               argument type is 0x01, and the argument is the public key
1469               to be removed from the list.  To remove all public keys at
1470               once this mode is unset.  An implementation MAY limit the
1471               number of public keys that can be set for the channel.
1472               This mode MUST NOT be set if <channel pubkey> is not present
1473               when the mode is set for the first time.  Implementation MAY
1474               add and remove multiple public keys at the same time by
1475               including multiple arguments to the <channel pubkey>
1476               Argument List Payload.
1477
1478
1479         To make the mode system work, client MUST keep the channel mode
1480         mask locally so that the mode setting and unsetting would work
1481         without problems.  The client receives the initial channel mode
1482         mask when it joins to the channel.  When the mode changes on
1483         channel the server MUST distribute the changed channel mode mask
1484         to all clients on the channel by sending the notify type
1485         SILC_NOTIFY_TYPE_CMODE_CHANGE.  The notify type MUST also be sent
1486         to the server's primary router.  If the <channel mode mask> was
1487         not provided this command returns the mode mask, founder key
1488         and channel public key list to the client.
1489
1490         Reply messages to the command:
1491
1492         Max Arguments:  5
1493             Arguments:  (1) <Status Payload>    (2) <Channel ID>
1494                         (3) <channel mode mask> (4) [<founder pubkey>]
1495                         (5) [<channel pubkeys>]
1496
1497         This command replies with the changed channel mode mask that
1498         client MUST keep locally.  It may also return the channel
1499         founder's public key if it is set.  It may also return list of
1500         channel public keys when the list was altered.  The <channel
1501         pubkeys> is Argument List Payload and each argument includes
1502         one public key.
1503
1504         Status messages:
1505
1506             SILC_STATUS_OK
1507             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1508             SILC_STATUS_ERR_TOO_MANY_PARAMS
1509             SILC_STATUS_ERR_NOT_REGISTERED
1510             SILC_STATUS_ERR_NOT_ON_CHANNEL
1511             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1512             SILC_STATUS_ERR_BAD_CHANNEL_ID
1513             SILC_STATUS_ERR_NO_CHANNEL_ID
1514             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1515             SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
1516             SILC_STATUS_ERR_UNKNOWN_MODE
1517             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1518             SILC_STATUS_ERR_AUTH_FAILED
1519
1520
1521    18   SILC_COMMAND_CUMODE
1522
1523         Max Arguments:  4
1524             Arguments:  (1) <Channel ID>    (2) <mode mask>
1525                         (3) <Client ID>     (4) [<auth payload>]
1526
1527         This command is used by client to change channel user modes on
1528         channel.  Users on channel may have some special modes and this
1529         command is used by channel operators to set or change these modes.
1530         The <Channel ID> is the ID of the target channel.  The <mode mask>
1531         is OR'ed mask of modes.  The <Client ID> is the target client.
1532         The client changing channel user modes MUST be on the same channel
1533         as the target client and posses sufficient privileges to be able to
1534         change the mode.
1535
1536         When the mode is changed SILC_NOTIFY_TYPE_CUMODE_CHANGE notify
1537         type is distributed to the channel.
1538
1539         The following channel modes are defined:
1540
1541            0x00000000    SILC_CUMODE_NONE
1542
1543               No specific mode.  This is the normal situation for client.
1544               Also, this is the mode set when removing all modes from
1545               the target client.
1546
1547
1548            0x00000001    SILC_CUMODE_FOUNDER
1549
1550               The client is channel founder of the channel.  Usually this
1551               mode is set only by the server when the channel was created.
1552               However, if the SILC_CMODE_FOUNDER_AUTH channel mode has
1553               been set, the client can claim channel founder privileges
1554               by providing the <auth payload> that the server will use
1555               to authenticate the client.  The public key that server will
1556               use to verify the <auth payload> MUST be the same public key
1557               that was saved when the SILC_CMODE_FOUNDER_AUTH channel
1558               mode was set.  The client MAY remove this mode at any time.
1559
1560
1561            0x00000002    SILC_CUMODE_OPERATOR
1562
1563               Sets channel operator privileges on the channel for a
1564               client on the channel.  Channel founder and channel operator
1565               MAY set/unset this mode.  The client MAY remove this mode
1566               at any time.
1567
1568
1569            0x00000004    SILC_CUMODE_BLOCK_MESSAGES
1570
1571               Marks that the client wishes not to receive any channel
1572               messages sent for the channel.  Client MAY set and unset
1573               this mode to itself.  Client MUST NOT set it to anyone else.
1574               When this mode is set server MUST NOT deliver channel
1575               messages to this client.  Other packets such as channel
1576               key packets are still sent to the client.
1577
1578               A separate service could provide additional filtering
1579               features for accepting channel messages from certain
1580               sender.  However, this document does not specify such
1581               service.
1582
1583
1584            0x00000008    SILC_CUMODE_BLOCK_MESSAGES_USERS
1585
1586               Marks that the client wishes not to receive any channel
1587               messages sent from normal users.  Only messages sent by
1588               channel founder or channel operator is accepted.  Client
1589               MAY set and unset this mode to itself.  Client MUST NOT
1590               set it to anyone else.  When this mode is set server MUST
1591               NOT deliver channel messages that are sent by normal users
1592               to this client.
1593
1594               A separate service could provide additional filtering
1595               features for accepting channel messages from certain
1596               sender.  However, this document does not specify such
1597               service.
1598
1599
1600            0x00000010    SILC_CUMODE_BLOCK_MESSAGES_ROBOTS
1601
1602               Marks that the client wishes not to receive any channel
1603               messages sent from robots.  Messages sent by users with
1604               the SILC_UMODE_ROBOT user mode set are not delivered.
1605               Client MAY set and unset this mode to itself.  Client MUST
1606               NOT set it to anyone else.  When this mode is set server
1607               MUST NOT deliver channel messages that are sent by robots
1608               to this client.
1609
1610
1611            0x00000020    SILC_CUMODE_QUIET
1612
1613               Marks that the client cannot talk on the channel.  This
1614               mode can be set by channel operator or channel founder to
1615               some other user that is not operator or founder.  The
1616               target client MUST NOT unset this mode.  When this mode
1617               is set the server MUST drop messages sent by this client
1618               to the channel.
1619
1620
1621         Reply messages to the command:
1622
1623         Max Arguments:  4
1624             Arguments:  (1) <Status Payload>  (2) <channel user mode mask>
1625                         (3) <Channel ID>      (4) <Client ID>
1626
1627         This command replies with the changed channel user mode mask that
1628         client MUST keep locally. The <Channel ID> is the specified
1629         channel.  The <Client ID> is the target client.
1630
1631         Status messages:
1632
1633             SILC_STATUS_OK
1634             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1635             SILC_STATUS_ERR_TOO_MANY_PARAMS
1636             SILC_STATUS_ERR_NOT_REGISTERED
1637             SILC_STATUS_ERR_NOT_ON_CHANNEL
1638             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1639             SILC_STATUS_ERR_BAD_CHANNEL_ID
1640             SILC_STATUS_ERR_NO_CHANNEL_ID
1641             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1642             SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
1643             SILC_STATUS_ERR_UNKNOWN_MODE
1644             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1645             SILC_STATUS_ERR_AUTH_FAILED
1646
1647
1648    19   SILC_COMMAND_KICK
1649
1650         Max Arguments:  3
1651             Arguments:  (1) <Channel ID>      (2) <Client ID>
1652                         (3) [<comment>]
1653
1654         This command is used by channel operators to remove a client from
1655         channel.  The <channel> argument is the channel the client to be
1656         removed is on currently.  Note that the "kicker" must be on the same
1657         channel.  If <comment> is provided it will be sent to the removed
1658         client.
1659
1660         After kicking the client the server MUST send the notify type
1661         SILC_NOTIFY_TYPE_KICKED to the channel and to its primary router.
1662         The client is removed from the channel after sending this notify.
1663         The kicked client MUST be removed from the invite list of the
1664         channel if it is explicitly added in the list.  The channel key
1665         MUST also be re-generated after kicking, unless the
1666         SILC_CMODE_PRIVKEY mode is set.
1667
1668         Reply messages to the command:
1669
1670         Max Arguments:  3
1671             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1672                         (3) <Client ID>
1673
1674         This command returns the Channel ID and Client ID that was kicked
1675         from the channel.
1676
1677         Status messages:
1678
1679             SILC_STATUS_OK
1680             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1681             SILC_STATUS_ERR_TOO_MANY_PARAMS
1682             SILC_STATUS_ERR_NOT_REGISTERED
1683             SILC_STATUS_ERR_NO_SUCH_CHANNEL
1684             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1685             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1686             SILC_STATUS_ERR_NO_CLIENT_ID
1687
1688
1689
1690    20   SILC_COMMAND_BAN
1691
1692         Max Arguments:  3
1693             Arguments:  (1) <Channel ID>         (2) [<add | del>]
1694                         (3) [<ban list>]
1695
1696         This command is used to manage the ban list of the channel
1697         indicated by the <Channel ID>.  A client that is banned from
1698         channel is no longer able to join the channel.  The client which
1699         is executing this command MUST have at least channel operator
1700         privileges on the channel.
1701
1702         The <add | del> is an argument of size of 1 byte where 0x00 means
1703         adding a client to ban list, and 0x01 means deleting a client
1704         from ban list.  The <ban list>, if present, indicates the
1705         information to be added to or removed from the ban list.  It
1706         may include a string for matching clients, public key of a
1707         client (Public Key Payload) or Client ID of a client.  The
1708         <ban list> is an Argument List Payload.
1709
1710         The following Argument Types has been defined for ban list
1711         Argument Payloads:
1712
1713           0x01 - Argument is an ban string of following format:
1714
1715             [<nickname>[@<server>]!][<username>]@[<hostname or IP/MASK>]
1716
1717             The <hostname> may also be in format of IP/MASK to indicate
1718             a network.
1719
1720           0x02 - Argument is the public key of a client
1721           0x03 - Argument is the Client ID of a client
1722
1723         If unknown type value is received or there is invalid amount of
1724         Argument Payloads present in the list, the command MUST be
1725         discarded.  When argument that is to be deleted from the ban
1726         list does not exist in the list the argument is ignored.
1727
1728         The server MUST send the notify type SILC_NOTIFY_TYPE_BAN to its
1729         primary router after adding to or removing from the ban list.
1730         The wildcards MAY be used with this command.  If this command
1731         is executed without the ban arguments the command merely replies
1732         with the current ban list.
1733
1734         Reply messages to the command:
1735
1736         Max Arguments:  3
1737             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1738                         (3) [<ban list>]
1739
1740         This command replies with the <Channel ID> of the channel and
1741         the current <ban list> of the channel if it exists.
1742
1743         Status messages:
1744
1745             SILC_STATUS_OK
1746             SILC_STATUS_ERR_NOT_REGISTERED
1747             SILC_STATUS_ERR_TOO_MANY_PARAMS
1748             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1749             SILC_STATUS_ERR_NO_CHANNEL_ID
1750             SILC_STATUS_ERR_NOT_ON_CHANNEL
1751             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1752             SILC_STATUS_ERR_RESOURCE_LIMIT
1753
1754
1755
1756
1757    21   SILC_COMMAND_DETACH
1758
1759         Max Arguments:  0
1760             Arguments:
1761
1762         This command is used to detach from the network.  Client can
1763         send this command to its server to indicate that it will be
1764         detached.  By detaching the client remains in the network but
1765         the actual network connection to the server is closed.  The
1766         client may then later resume the old session back.
1767
1768         When this command is received the server MUST check that the
1769         client is locally connected client, and set the user mode
1770         SILC_UMODE_DETACHED flag.  The SILC_NOTIFY_TYPE_UMODE_CHANGE
1771         MUST be also sent to routers.  The server then sends command
1772         reply to this command and closes the network connection.
1773         The server MUST NOT remove the client from its lists, or send
1774         any signoff notifications for this client.  See the [SILC1]
1775         for detailed information about detaching.
1776
1777         Reply messages to the command:
1778
1779         Max Arguments:  1
1780             Arguments:  (1) <Status Payload>
1781
1782         This command replies only with the status indication.
1783
1784         Status messages:
1785
1786             SILC_STATUS_OK
1787             SILC_STATUS_ERR_NOT_REGISTERED
1788
1789
1790
1791    22   SILC_COMMAND_WATCH
1792
1793         Max Arguments:  3
1794             Arguments:  (1) <Client ID>       (2) [<add nickname>]
1795                         (3) [<del nickname>]
1796
1797         This command is used to set up a watch for <add nickname>
1798         nickname.  When a user in the network appears with the
1799         nickname, or signoffs the network or user's mode is changed
1800         the client which set up the watch will be notified about
1801         this change.  This can be used to watch for certain nicknames
1802         in the network and receive notifications when for example a
1803         friend appears in the network or leaves the network.
1804
1805         The <del nickname> is a nickname that has been previously
1806         added to watch list and is now removed from it.  Notifications
1807         for that nickname will not be delivered anymore.
1808
1809         The <Client ID> is the Client ID of the sender of this command.
1810
1811         The nickname set to watch MUST NOT include any wildcards.
1812         Note also that a nickname may match several users since
1813         nicknames are not unique.  Implementations MAY set limits
1814         for how many nicknames client can watch.
1815
1816         When normal server receives this command from client it
1817         MUST send it to its router.  Router will process the command
1818         and actually keeps the watch list.
1819
1820         Reply messages to the command:
1821
1822         Max Arguments:  1
1823             Arguments:  (1) <Status Payload>
1824
1825         This command replies only with the status indication.
1826
1827         Status messages:
1828
1829             SILC_STATUS_OK
1830             SILC_STATUS_ERR_NOT_REGISTERED
1831             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1832             SILC_STATUS_ERR_TOO_MANY_PARAMS
1833             SILC_STATUS_ERR_BAD_NICKNAME
1834             SILC_STATUS_ERR_WILDCARDS
1835             SILC_STATUS_ERR_RESOURCE_LIMIT
1836             SILC_STATUS_ERR_NO_SUCH_NICK
1837             SILC_STATUS_ERR_NICKNAME_IN_USE
1838
1839
1840    23   SILC_COMMAND_SILCOPER
1841
1842         Max Arguments:  2
1843             Arguments:  (1) <username>  (2) <authentication payload>
1844
1845         This command is used by normal client to obtain router operator
1846         privileges (also known as SILC operator) on the router.  Note
1847         that router operator has privileges that supersedes the server
1848         operator privileges.
1849
1850         The <username> is the username set in the server configurations
1851         as operator.  The <authentication payload> is the data that the
1852         client is authenticated against.  It may be passphrase prompted
1853         for user on client's screen or it may be public key or certificate
1854         authentication data (data signed with private key).  The public
1855         key that router will use to verify the signature found in the
1856         payload should be verified.  It is recommended that the public
1857         key is saved locally in the router and router would not use
1858         any public keys received during the SKE.
1859
1860         Difference between router operator and server operator is that
1861         router operator is able to handle cell level properties while
1862         server operator (even on router server) is able to handle only
1863         local properties, such as, local connections and normal server
1864         administration.  The router operator is also able to use the
1865         SILC_COMMAND_KILL command.
1866
1867         After changing the mode server MUST send the notify type
1868         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
1869
1870         Reply messages to the command:
1871
1872         Max Arguments:  1
1873             Arguments:  (1) <Status Payload>
1874
1875         This command replies only with Status Payload.
1876
1877         Status messages:
1878
1879             SILC_STATUS_OK
1880             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1881             SILC_STATUS_ERR_TOO_MANY_PARAMS
1882             SILC_STATUS_ERR_NOT_REGISTERED
1883             SILC_STATUS_ERR_AUTH_FAILED
1884
1885
1886
1887
1888    24   SILC_COMMAND_LEAVE
1889
1890         Max Arguments:  1
1891             Arguments:  (1) <Channel ID>
1892
1893         This command is used by client to leave a channel the client is
1894         joined to.
1895
1896         When leaving channel the server MUST send the notify type
1897         SILC_NOTIFY_TYPE_LEAVE to its primary router and to the channel.
1898         The channel key MUST also be re-generated when leaving the channel
1899         and distribute it to all clients still currently on the channel.
1900         The key MUST NOT be re-generated if the SILC_CMODE_PRIVKEY mode
1901         is set.
1902
1903         Reply messages to the command:
1904
1905         Max Arguments:  2
1906             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1907
1908         The <Channel ID> is the ID of left channel.
1909
1910         Status messages:
1911
1912             SILC_STATUS_OK
1913             SILC_STATUS_ERR_NOT_REGISTERED
1914             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1915             SILC_STATUS_ERR_TOO_MANY_PARAMS
1916             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1917             SILC_STATUS_ERR_BAD_CHANNEL_ID
1918             SILC_STATUS_ERR_NO_CHANNEL_ID
1919
1920
1921    25   SILC_COMMAND_USERS
1922
1923         Max Arguments:  2
1924             Arguments:  (1) [<Channel ID>]  (2) [<channel name>]
1925
1926         This command is used to list user names currently on the requested
1927         channel; either the argument <Channel ID> or the <channel name>.
1928         One of these arguments must be present.  The server MUST resolve
1929         the joined clients and reply with a lists of users on the channel
1930         and with list of user modes on the channel.
1931
1932         If the requested channel is a private or secret channel, this
1933         command MUST NOT send the list of users, except if the sender is
1934         on the channel, or the sender is a server.  Otherwise, error is
1935         returned to the sender.
1936
1937         Reply messages to the command:
1938
1939         Max Arguments:  5
1940             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1941                         (3) <list count>      (4) <Client ID list>
1942                         (5) <client mode list>
1943
1944         This command replies with the Channel ID of the requested channel
1945         Client ID list of the users on the channel and list of their modes.
1946         The Client ID list has Client ID's of all users in the list.  The
1947         <Client ID list> is formed by adding Client ID's one after another.
1948         The <client mode list> is formed by adding client's user modes on
1949         the channel one after another (4 bytes (32 bits) each).  The <list
1950         count> of length of 4 bytes (32 bits), tells the number of entries
1951         in the lists.  Both lists MUST have equal number of entries.
1952
1953         Status messages:
1954
1955             SILC_STATUS_OK
1956             SILC_STATUS_ERR_NOT_REGISTERED
1957             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1958             SILC_STATUS_ERR_TOO_MANY_PARAMS
1959             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1960             SILC_STATUS_ERR_BAD_CHANNEL_ID
1961             SILC_STATUS_ERR_NO_CHANNEL_ID
1962             SILC_STATUS_ERR_NOT_ON_CHANNEL
1963
1964
1965    26   SILC_COMMAND_GETKEY
1966
1967         Max Arguments:  1
1968             Arguments:  (1) <ID Payload>
1969
1970         This command is used to fetch the public key of the client or
1971         server indicated by the <ID Payload>.  The public key is fetched
1972         from the server where to the client is connected.
1973
1974         Reply messages to the command:
1975
1976         Max Arguments:  3
1977             Arguments:  (1) <Status Payload>      (2) <ID Payload>
1978                         (3) [<Public Key Payload>]
1979
1980         This command replies with the client's or server's ID and with
1981         the <Public Key Payload>.
1982
1983         Status messages:
1984
1985             SILC_STATUS_OK
1986             SILC_STATUS_ERR_NOT_REGISTERED
1987             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1988             SILC_STATUS_ERR_TOO_MANY_PARAMS
1989             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1990             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
1991
1992
1993    27   SILC_COMMAND_SERVICE
1994
1995         Max Arguments:  256
1996             Arguments:  (1) [<service name>]    (2) [<auth payload>]
1997                         (n) [...]
1998
1999         This command is used to negotiate a service agreement with a
2000         remote server.  If this command is given without arguments it
2001         MAY return the service list, if it is publicly available.  The
2002         <service name> is a service specific identifier, and the
2003         <auth payload> MAY be used to authenticate the requester to the
2004         remote service.  The authentication to a service may be based
2005         on previous agreement with the requester and the service
2006         provider.  The command MAY also take additional service
2007         specific arguments.  The <service name> is UTF-8 string.
2008
2009         This document does not specify any services.  How the services
2010         are configured and put available in a server is also out of
2011         scope of this document.
2012
2013         This command MAY be used by client to start using some service
2014         in a server, but it also MAY be used by server to negotiate
2015         to start using a service in some other server or router.
2016
2017         After the negotiation is done both of the parties need to know
2018         from the service identifier how the service can be used.  The
2019         service can be considered to be a protocol which both of the
2020         parties need to support.
2021
2022         Reply messages to the command:
2023
2024         Max Arguments:  256
2025             Arguments:  (1) <Status Payload>      (2) [<service list>]
2026                         (3) [<service name>]      (n) [...]
2027
2028
2029         This command MAY reply with the <service list> when command is
2030         given without arguments, and the list is a comma separated list
2031         of service identifiers.  The <service name> is the service that
2032         the sender requested and this is provided when the server has
2033         accepted the sender to use the <service name>.  The command
2034         reply MAY also have additional service specific arguments.
2035
2036         Status messages:
2037
2038             SILC_STATUS_OK
2039             SILC_STATUS_ERR_NOT_REGISTERED
2040             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2041             SILC_STATUS_ERR_TOO_MANY_PARAMS
2042             SILC_STATUS_ERR_NO_SUCH_SERVICE
2043             SILC_STATUS_ERR_AUTH_FAILED
2044             SILC_STATUS_ERR_PERM_DENIED
2045
2046
2047
2048    28 - 199
2049
2050         Currently undefined commands.
2051
2052
2053    200 - 254
2054
2055         These commands are reserved for private use and will not be defined
2056         in this document.
2057
2058
2059    255  SILC_COMMAND_MAX
2060
2061         Reserved command.  This must not be sent.
2062 .in 3
2063
2064
2065 .ti 0
2066 2.4 SILC Command Status Payload
2067
2068 Command Status Payload is sent in command reply messages to indicate
2069 the status of the command.  The payload is one of argument in the
2070 command thus this is the data area in Command Argument Payload described
2071 in [SILC2].  The payload is only 2 bytes in length.  The following
2072 diagram represents the Command Status Payload (fields are always in
2073 MSB first order).
2074
2075
2076 .in 21
2077 .nf
2078                      1
2079  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2080 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2081 |     Status    |     Error     |
2082 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2083 .in 3
2084
2085 .ce
2086 Figure 6:  SILC Command Status Payload
2087
2088
2089 .in 6
2090 o Status (1 byte) - Indicates the status message type,
2091   error, start of list, entry of list or end of list.
2092
2093 o Error (1 byte) - Indicates the error if the Status
2094   field is some list status, which means there are list
2095   of errors.
2096 .in 3
2097
2098 The values in Status and Error fields are set according
2099 the following rules:
2100
2101 .in 6
2102 o If there is single reply and error has not occurred
2103   then Status field includes value SILC_STATUS_OK, and
2104   the Error field MUST be ignored (and set to zero
2105   value).
2106
2107 o If there is single error, then Status field includes
2108   one of the error values, and the Error field MUST be
2109   ignored (and set to zero value).
2110
2111 o If there will be multiple successful command replies
2112   then Status field includes SILC_STATUS_LIST_START,
2113   SILC_STATUS_LIST_ITEM or SILC_STATUS_LIST_END value,
2114   and Error field is set to SILC_STATUS_OK.
2115
2116 o If there are multiple error replies then Status field
2117   includes SILC_STATUS_LIST_START, SILC_STATUS_LIST_ITEM
2118   or SILC_STATUS_LIST_END value, and the Error field
2119   includes the error value.
2120 .in 3
2121
2122 This way it is possible to send single successful or
2123 single error reply, but also multiple successful and
2124 multiple error replies.  Note that it is possible to
2125 send both list of successful replies and list of error
2126 replies at the same time, however in this case the
2127 list of error replies MUST be sent after the successful
2128 replies.  This way the recipient may ignore the multiple
2129 errors if it wishes to do so.  Also note that in this
2130 case the successful and error replies belong to the
2131 same list.
2132
2133 All Status messages are described in the next section.
2134
2135
2136 .ti 0
2137 3 SILC Status Types
2138
2139 Status messages are returned in SILC protocol in command reply
2140 packet and in notify packet.  The SILC_PACKET_COMMAND_REPLY is
2141 the command reply packet and status types are sent inside the
2142 Status Payload as one of command reply argument, as defined in
2143 previous sections.  For SILC_PACKET_NOTIFY packet they can be sent
2144 as defined in [SILC2] for SILC_NOTIFY_TYPE_ERROR type.  The same
2145 types defined in this section are used in both cases.
2146
2147 When returning status messages in the command reply message they
2148 indicate whether the command was executed without errors.  If error
2149 occurred the status indicates which error occurred.  If error
2150 occurred the arguments to the command replies are dictated by the
2151 error type.  If arguments are to be sent, they are defined below
2152 with the error status types.
2153
2154 When sending status messages in SILC_NOTIFY_TYPE_ERROR notify type
2155 they always send some error status.  Usually they are sent to
2156 indicate that error occurred while processing some SILC packet.
2157 Please see the [SILC1] and [SILC2] for more information sending
2158 status types in SILC_NOTIFY_TYPE_ERROR notify.
2159
2160 The Status Types are only numeric values and the receiver must
2161 convert the numeric values into human readable messages if this
2162 is desired in the application.
2163
2164 List of all defined status types:
2165
2166 .in 0
2167    Generic status messages:
2168
2169    0    SILC_STATUS_OK
2170
2171         Ok status.  Everything went Ok.  The status payload maybe
2172         safely ignored in this case.
2173
2174    1    SILC_STATUS_LIST_START
2175
2176         Start of the list.  There will be several command replies and
2177         this reply is the start of the list.
2178
2179    2    SILC_STATUS_LIST_ITEM
2180
2181         Item in the list.  This is one of the item in the list but not the
2182         first or last one.
2183
2184    3    SILC_STATUS_LIST_END
2185
2186         End of the list.  There were several command replies and this
2187         reply is the last of the list.  There won't be other replies
2188         belonging to this list after this one.
2189
2190    4 - 9
2191
2192         Currently undefined and has been reserved for the future.
2193
2194
2195    Error status message:
2196
2197
2198
2199    10   SILC_STATUS_ERR_NO_SUCH_NICK
2200
2201         "No such nickname".  Requested nickname does not exist.
2202          The next argument MUST be the requested nickname.
2203
2204    11   SILC_STATUS_ERR_NO_SUCH_CHANNEL
2205
2206         "No such channel".  Requested channel name does not exist.
2207          The next argument MUST be the requested channel name.
2208
2209    12   SILC_STATUS_ERR_NO_SUCH_SERVER
2210
2211         "No such server".  Requested server name does not exist.
2212          The next argument MUST be the requested server name.
2213
2214    13   SILC_STATUS_ERR_INCOMPLETE_INFORMATION
2215
2216         "Incomplete registration information".  Information remote
2217         sent was incomplete.
2218
2219    14   SILC_STATUS_ERR_NO_RECIPIENT
2220
2221         "No recipient given".  Command required recipient which was
2222         not provided.
2223
2224    15   SILC_STATUS_ERR_UNKNOWN_COMMAND
2225
2226         "Unknown command".  Command sent to server is unknown by the
2227         server.
2228
2229    16   SILC_STATUS_ERR_WILDCARDS
2230
2231         "Wildcards cannot be used".  Wildcards were provided but they
2232         weren't permitted.
2233
2234    17   SILC_STATUS_ERR_NO_CLIENT_ID
2235
2236         "No Client ID given".  Client ID were expected as command
2237         parameter but were not found.
2238
2239    18   SILC_STATUS_ERR_NO_CHANNEL_ID
2240
2241         "No Channel ID given".  Channel ID were expected as command
2242         parameter but were not found.
2243
2244    19   SILC_STATUS_ERR_NO_SERVER_ID
2245
2246         "No Serve ID given".  Server ID were expected as command
2247         parameter but were not found.
2248
2249    20   SILC_STATUS_ERR_BAD_CLIENT_ID
2250
2251         "Bad Client ID".  Client ID provided were erroneous.
2252          The next argument MUST be the provided ID.
2253
2254    21   SILC_STATUS_ERR_BAD_CHANNEL_ID
2255
2256         "Bad Channel ID".  Channel ID provided were erroneous.
2257          The next argument MUST be the provided ID.
2258
2259    22   SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2260
2261         "No such Client ID".  Client ID provided does not exist.
2262         The unknown Client ID MUST be provided as next argument
2263         in the reply.
2264
2265    23   SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2266
2267         "No such Channel ID".  Channel ID provided does not exist.
2268         The unknown Channel ID MUST be provided as next argument
2269         in the reply.
2270
2271    24   SILC_STATUS_ERR_NICKNAME_IN_USE
2272
2273         "Nickname already exists".  Nickname created could not be
2274         registered because number of same nicknames were already set to
2275         maximum.  This is not expected to happen in real life but is
2276         possible to occur.
2277
2278    25   SILC_STATUS_ERR_NOT_ON_CHANNEL
2279
2280         "You are not on that channel".  The command were specified for
2281         channel user is not currently on.  The next argument MUST be the
2282         Channel ID.
2283
2284    26   SILC_STATUS_ERR_USER_NOT_ON_CHANNEL
2285
2286         "They are not on channel".  The requested target client is not
2287         on requested channel.  The next two arguments, in this order,
2288         MUST be the requested Client ID and Channel ID.
2289
2290    27   SILC_STATUS_ERR_USER_ON_CHANNEL
2291
2292         "User already on channel".  User were invited on channel they
2293         already are on.  The next two arguments, in this order, MUST be
2294         the  requested Client ID and Channel ID.
2295
2296    28   SILC_STATUS_ERR_NOT_REGISTERED
2297
2298         "You have not registered".  User executed command that requires
2299         the client to be registered on the server before it may be
2300         executed.
2301
2302    29   SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2303
2304         "Not enough parameters".  Command requires more parameters
2305         than provided.
2306
2307    30   SILC_STATUS_ERR_TOO_MANY_PARAMS
2308
2309         "Too many parameters".  Too many parameters were provided
2310         for the command.
2311
2312    31   SILC_STATUS_ERR_PERM_DENIED
2313
2314         "Permission denied".  Generic permission denied error status
2315         to indicate disallowed access.
2316
2317    32   SILC_STATUS_ERR_BANNED_FROM_SERVER
2318
2319         "You are banned from this server".  The client tried to register
2320         on server that has explicitly denied this host to connect.
2321
2322    33   SILC_STATUS_ERR_BAD_PASSWORD
2323
2324         "Cannot join channel. Incorrect password".  Password provided for
2325         channel were not accepted.  The next argument MUST be the
2326         Channel ID.
2327
2328    34   SILC_STATUS_ERR_CHANNEL_IS_FULL
2329
2330         "Cannot join channel. Channel is full".  The channel is full
2331         and client cannot be joined to it.  The next argument MUST be
2332         the Channel ID.
2333
2334    35   SILC_STATUS_ERR_NOT_INVITED
2335
2336         "Cannot join channel. You have not been invited".  The channel
2337         is invite only channel and client has not been invited.  The next
2338         argument MUST be the Channel ID.
2339
2340    36   SILC_STATUS_ERR_BANNED_FROM_CHANNEL
2341
2342         "Cannot join channel. You have been banned".  The client has
2343         been banned from the channel.  The next argument MUST be the
2344         Channel ID.
2345
2346    37   SILC_STATUS_ERR_UNKNOWN_MODE
2347
2348         "Unknown mode".  Mode provided by the client were unknown to
2349         the server.
2350
2351    38   SILC_STATUS_ERR_NOT_YOU
2352
2353         "Cannot change mode for other users".  User tried to change
2354         someone else's mode.
2355
2356    39   SILC_STATUS_ERR_NO_CHANNEL_PRIV
2357
2358         "Permission denied. You are not channel operator".  Command may
2359         be executed only by channel operator.  The next argument MUST be
2360         the Channel ID.
2361
2362    40   SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
2363
2364         "Permission denied. You are not channel founder".  Command may
2365         be executed only by channel operator.  The next argument MUST be
2366         the Channel ID.
2367
2368    41   SILC_STATUS_ERR_NO_SERVER_PRIV
2369
2370         "Permission denied. You are not server operator".  Command may
2371         be executed only by server operator.
2372
2373    42   SILC_STATUS_ERR_NO_ROUTER_PRIV
2374
2375         "Permission denied. You are not SILC operator".  Command may be
2376         executed only by router (SILC) operator.
2377
2378    43   SILC_STATUS_ERR_BAD_NICKNAME
2379
2380         "Bad nickname".  Nickname requested contained illegal characters
2381         or were malformed.
2382
2383    44   SILC_STATUS_ERR_BAD_CHANNEL
2384
2385         "Bad channel name".  Channel requested contained illegal characters
2386         or were malformed.
2387
2388    45   SILC_STATUS_ERR_AUTH_FAILED
2389
2390         "Authentication failed".  The authentication data sent as
2391         argument were wrong and thus authentication failed.
2392
2393    46   SILC_STATUS_ERR_UNKOWN_ALGORITHM
2394
2395         "The algorithm was not supported."  The server does not support the
2396         requested algorithm.  The next argument MUST be the algorithm name
2397         string.
2398
2399    47   SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2400
2401         "No such Server ID".  Server ID provided does not exist.
2402         The unknown Server ID MUST be provided as next argument
2403         in the reply.
2404
2405    48   SILC_STATUS_ERR_RESOURCE_LIMIT
2406
2407         "No more resources available".  This can mean that server cannot
2408         or will not accept something due to resource limitations.
2409
2410    49   SILC_STATUS_ERR_NO_SUCH_SERVICE
2411
2412         "Service does not exist".  Requested service identifier is
2413         unknown.  The next argument MUST be the service identifier.
2414
2415    50   SILC_STATUS_ERR_NOT_AUTHENTICATED
2416
2417         "You have not been authenticated".  Remote connection is not
2418         authenticated even though it is supposed to be.
2419
2420    51   SILC_STATUS_ERR_BAD_SERVER_ID
2421
2422         "Server ID is not valid".  Provided server ID is not valid.
2423         The next argument MUST be the provided ID.
2424
2425    52   SILC_STATUS_ERR_KEY_EXCHANGE_FAILED
2426
2427         "Key exchange failed".  Key Exchange protocol failed.
2428
2429    53   SILC_STATUS_ERR_BAD_VERSION
2430
2431         "Bad version".  Protocol or software version mismatch.
2432
2433    54   SILC_STATUS_ERR_TIMEDOUT
2434
2435         "Operation timed out".  Operation or service request timed
2436         out, and thus was not processed.
2437
2438    55   SILC_STATUS_ERR_UNSUPPORTED_PUBLIC_KEY
2439
2440         "Unsupported public key type".  The public key or certificate
2441         type is not supported in this implementation.
2442
2443    56   SILC_STATUS_ERR_OPERATION_ALLOWED
2444
2445         "Operation is not allowed".  A operation, for example a command,
2446         is not allowed or it's execution is not allowed.
2447
2448 .in 3
2449
2450
2451
2452 .ti 0
2453 4 Security Considerations
2454
2455 Security is central to the design of this protocol, and these security
2456 considerations permeate the specification.  Common security considerations
2457 such as keeping private keys truly private and using adequate lengths for
2458 symmetric and asymmetric keys must be followed in order to maintain the
2459 security of this protocol.
2460
2461
2462 .ti 0
2463 5 References
2464
2465 [SILC1]      Riikonen, P., "Secure Internet Live Conferencing (SILC),
2466              Protocol Specification", Internet Draft, May 2002.
2467
2468 [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
2469              May 2002.
2470
2471 [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication
2472              Protocols", Internet Draft, May 2002.
2473
2474 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
2475              RFC 1459, May 1993.
2476
2477 [IRC-ARCH]   Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
2478              April 2000.
2479
2480 [IRC-CHAN]   Kalt, C., "Internet Relay Chat: Channel Management", RFC
2481              2811, April 2000.
2482
2483 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
2484              2812, April 2000.
2485
2486 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
2487              2813, April 2000.
2488
2489 [SSH-TRANS]  Ylonen, T., et al, "SSH Transport Layer Protocol",
2490              Internet Draft.
2491
2492 [PGP]        Callas, J., et al, "OpenPGP Message Format", RFC 2440,
2493              November 1998.
2494
2495 [SPKI]       Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
2496              September 1999.
2497
2498 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key
2499              Infrastructure, Certificate and CRL Profile", RFC 2459,
2500              January 1999.
2501
2502 [Schneier]   Schneier, B., "Applied Cryptography Second Edition",
2503              John Wiley & Sons, New York, NY, 1996.
2504
2505 [Menezes]    Menezes, A., et al, "Handbook of Applied Cryptography",
2506              CRC Press 1997.
2507
2508 [OAKLEY]     Orman, H., "The OAKLEY Key Determination Protocol",
2509              RFC 2412, November 1998.
2510
2511 [ISAKMP]     Maughan D., et al, "Internet Security Association and
2512              Key Management Protocol (ISAKMP)", RFC 2408, November
2513              1998.
2514
2515 [IKE]        Harkins D., and Carrel D., "The Internet Key Exchange
2516              (IKE)", RFC 2409, November 1998.
2517
2518 [HMAC]       Krawczyk, H., "HMAC: Keyed-Hashing for Message
2519              Authentication", RFC 2104, February 1997.
2520
2521 [PKCS1]      Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
2522              Specifications, Version 2.0", RFC 2437, October 1998.
2523
2524 [RFC2119]    Bradner, S., "Key Words for use in RFCs to Indicate
2525              Requirement Levels", BCP 14, RFC 2119, March 1997.
2526
2527 [RFC2279]    Yergeau, F., "UTF-8, a transformation format of ISO
2528              10646", RFC 2279, January 1998.
2529
2530 [ATTRS]      Riikonen, P., "User Online Presence and Information
2531              Attributes", Internet Draft, May 2002.
2532
2533
2534 .ti 0
2535 6 Author's Address
2536
2537 .nf
2538 Pekka Riikonen
2539 Snellmaninkatu 34 A 15
2540 70100 Kuopio
2541 Finland
2542
2543 EMail: priikone@iki.fi
2544
2545
2546 .ti 0
2547 Appendix A
2548
2549 This appendix defines the usage of the <Requested Attributes> argument in
2550 the SILC_COMMAND_WHOIS command.  The attributes are defined in [ATTRS],
2551 and may be used to request additional information about the user.  Since
2552 the information that may be requested using the attributes is something
2553 that server cannot deliver to the sender, it is possible to send the WHOIS
2554 command directly to the destination client whom will then provide the
2555 requested attributes.  This requires the servers to relay the WHOIS
2556 command to the client, and it requires capability for handling the WHOIS
2557 command in the client end.
2558
2559 The <Requested Attributes> MAY include several attributes that are
2560 requested.  The format and encoding of the <Requested Attributes> is as
2561 defined in [ATTRS].  When <Requested Attributes> argument is set the
2562 server MAY process the attributes to see whether it can narrow down
2563 the WHOIS search, for example when searching with a nickname.  The
2564 normal servers MUST process the WHOIS command as normal WHOIS command,
2565 that is to send the command directly to the router.  The router MAY
2566 process the attributes, but it MUST send the command to the server
2567 that owns the requested client.
2568
2569 The server that owns the client and receives the command MUST check
2570 whether the client is detached from the network.  If it is detached,
2571 that is the user mode has the SILC_UMODE_DETACHED mode set, it SHOULD
2572 process the attributes and provide as many of the requested attributes
2573 as possible and then send reply back to the sender.  If the client is
2574 active in the network it MUST send the command to the client for
2575 processing.
2576
2577 The client receiving WHOIS command SHOULD check whether the
2578 <Requested Attributes> argument is set.  If it is not set then the
2579 WHOIS command SHOULD be discarded.  The client processes the requested
2580 attributes and SHOULD reply to each of the requested attribute with
2581 either valid value, or with an indication that the requested attribute
2582 is not known or supported.  This is to be done as defined in [ATTRS].
2583 The client always MUST send a reply to the command when some attributes
2584 were requested.  The client MAY also add additional attributes to the
2585 reply even if they were not requested.  The client MAY also digitally
2586 sign the attributes with ATTRIBUTE_USER_DIGITAL_SIGNATURE as defined
2587 in [ATTRS].  Then the client sends the reply back to the sender of
2588 the command.  The command reply that client assembles does not need
2589 to include any other argument but the <Status Payload> (1), and the
2590 <Attributes> (11).  The server receiving reply from client MUST allow
2591 this sort of command reply for WHOIS command.
2592
2593 The information received from the client MAY be cached in the
2594 server's end.  The caching may be desired for example if the client
2595 can be detached from the network.  This way the server is then able
2596 to provide at least partial information for a requester.  The
2597 server MAY also process the command reply and verify whether the
2598 attributes provided in the reply are actually valid.  If it can do
2599 this, and verify that they indeed are valid values it MAY append
2600 a digital signature at the end of the attributes with the
2601 ATTRIBUTE_SERVER_DIGITAL_SIGNATURE as defined in [ATTRS].  The
2602 server then MUST provide valid WHOIS command reply to the sender
2603 of the command.   Other servers and routers that receive the command
2604 reply en route to the original sender MAY also cache the information.
2605
2606 The client which receives the command reply to the WHOIS command
2607 SHOULD verify the ATTRIBUTE_USER_DIGITAL_SIGNATURE and the
2608 ATTRIBUTE_SERVER_DIGITAL_SIGNATURE if they are provided.
2609
2610
2611 .ti 0
2612 Full Copyright Statement
2613
2614 Copyright (C) The Internet Society (2003). All Rights Reserved.
2615
2616 This document and translations of it may be copied and furnished to
2617 others, and derivative works that comment on or otherwise explain it
2618 or assist in its implementation may be prepared, copied, published
2619 and distributed, in whole or in part, without restriction of any
2620 kind, provided that the above copyright notice and this paragraph are
2621 included on all such copies and derivative works. However, this
2622 document itself may not be modified in any way, such as by removing
2623 the copyright notice or references to the Internet Society or other
2624 Internet organizations, except as needed for the purpose of
2625 developing Internet standards in which case the procedures for
2626 copyrights defined in the Internet Standards process must be
2627 followed, or as required to translate it into languages other than
2628 English.
2629
2630 The limited permissions granted above are perpetual and will not be
2631 revoked by the Internet Society or its successors or assigns.
2632
2633 This document and the information contained herein is provided on an
2634 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
2635 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
2636 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
2637 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
2638 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.