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