Updates to CodingStyle and drafts.
[runtime.git] / doc / draft-riikonen-silc-spec-00.nroff
1 .pl 10.0i
2 .po 0
3 .ll 7.2i
4 .lt 7.2i
5 .nr LL 7.2i
6 .nr LT 7.2i
7 .ds LF Riikonen
8 .ds RF FORMFEED[Page %]
9 .ds CF
10 .ds LH Internet Draft
11 .ds RH 28 June 2000
12 .ds CH Secure Internet Live Conferencing
13 .na
14 .hy 0
15 .in 0
16 .nf
17 Network Working Group                                      P. Riikonen
18 Internet-Draft
19 draft-riikonen-silc-spec-00.txt                           28 June 2000
20 Expires: 28 Jan 2001
21
22 .in 3
23
24 .ce 2
25 Secure Internet Live Conferencing (SILC),
26 Protocol Specification
27
28 .ti 0
29 Status of this Memo
30
31 This document is an Internet-Draft.  Internet-Drafts are working
32 documents of the Internet Engineering Task Force (IETF), its areas,
33 and its working groups.  Note that other groups may also distribute
34 working documents as Internet-Drafts.
35
36 Internet-Drafts are draft documents valid for a maximum of six
37 months and may be updated, replaced, or obsoleted by other 
38 documents at any time. It is inappropriate to use Internet-Drafts  
39 as reference material or to cite them other than as 
40 ``work in progress.''
41
42 To learn the current status of any Internet-Draft, please check the
43 ``1id-abstracts.txt'' listing contained in the Internet-Drafts
44 Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
45 munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
46 ftp.isi.edu (US West Coast).
47
48 The distribution of this memo is unlimited.
49
50
51 .ti 0
52 Abstract
53
54 This memo describes a Secure Internet Live Conferencing (SILC)
55 protocol which provides secure conferencing services over insecure
56 network channel.  SILC is IRC [IRC] like protocol, however, it is 
57 not equivalent to IRC and does not support IRC.  Strong cryptographic
58 methods are used to protect SILC packets inside SILC network.  Two
59 other Internet Drafts relates very closely to this memo;  SILC Packet
60 Protocol [SILC2] and SILC Key Exchange and Authentication Protocols
61 [SILC3].
62
63
64
65
66
67
68
69
70 .ti 0
71 Table of Contents
72
73 .nf
74 1 Introduction ..................................................  3
75 2 SILC Concepts .................................................  3
76   2.1 SILC Network Topology .....................................  4
77   2.2 Communication Inside a Cell ...............................  5
78   2.3 Communication in the Network ..............................  6
79   2.4 Channel Communication .....................................  7
80 3 SILC Specification ............................................  7
81   3.1 Client ....................................................  7
82       3.1.1 Client ID ...........................................  8
83   3.2 Server ....................................................  8
84       3.2.1 Server's Local ID List ..............................  9
85       3.2.2 Server ID ........................................... 10
86       3.2.3 SILC Server Ports ................................... 10
87   3.3 Router .................................................... 11
88       3.3.1 Router's Local ID List .............................. 11
89       3.3.2 Router's Global ID List ............................. 12
90       3.3.3 Router's Server ID .................................. 12
91   3.4 Channels .................................................. 12
92       3.4.1 Channel ID .......................................... 13
93   3.5 Operators ................................................. 14
94   3.6 SILC Commands ............................................. 14
95   3.7 SILC Packets .............................................. 15
96   3.8 Packet Encryption ......................................... 15
97       3.8.1 Determination of the Source and the Destination ..... 16
98       3.8.2 Client To Client .................................... 16
99       3.8.3 Client To Channel ................................... 17
100       3.8.4 Server To Server .................................... 18
101   3.9 Key Exchange And Authentication ........................... 18
102   3.10 Algorithms ............................................... 19
103       3.10.1 Ciphers ............................................ 19
104       3.10.2 Public Key Algorithms .............................. 20
105       3.10.3 MAC Algorithms ..................................... 20
106       3.10.4 Compression Algorithms ............................. 20
107   3.11 SILC Public Key .......................................... 21
108 4 SILC Procedures ............................................... 23
109   4.1 Creating Client Connection ................................ 23
110   4.2 Creating Server Connection ................................ 24
111   4.3 Joining to a Channel ...................................... 25
112   4.4 Channel Key Generation .................................... 26
113   4.5 Private Message Sending and Reception ..................... 27
114   4.6 Private Message Key Generation ............................ 27
115   4.7 Channel Message Sending and Reception ..................... 28
116   4.8 Session Key Regeneration .................................. 28
117   4.9 Command Sending and Reception ............................. 29
118 5 SILC Commands ................................................. 29
119   5.1 SILC Commands Syntax ...................................... 29
120   5.2 SILC Commands List ........................................ 31
121   5.3 SILC Command Status Types ................................. 54
122       5.3.1 SILC Command Status Payload ......................... 54
123       5.3.2 SILC Command Status List ............................ 54
124 6 Security Considerations ....................................... 58
125 7 References .................................................... 59
126 8 Author's Address .............................................. 60
127
128
129 .ti 0
130 List of Figures
131
132 .nf
133 Figure 1:  SILC Network Topology
134 Figure 2:  Communication Inside cell
135 Figure 3:  Communication Between Cells
136 Figure 4:  SILC Public Key
137 Figure 5:  SILC Command Status Payload
138
139
140 .ti 0
141 1. Introduction
142
143 This document describes a Secure Internet Live Conferencing (SILC)
144 protocol which provides secure conferencing services over insecure
145 network channel.  SILC is IRC [IRC] like protocol, however, it is 
146 not equivalent to IRC and does not support IRC.  Strong cryptographic
147 methods are used to protect SILC packets inside SILC network.  Two
148 other Internet Drafts relates very closely to this memo;  SILC Packet
149 Protocol [SILC2] and SILC Key Exchange and Authentication Protocols
150 [SILC3].
151
152 The protocol uses extensively packets as conferencing protocol 
153 requires message and command sending.  The SILC Packet Protocol is
154 described in [SILC2] and should be read to fully comprehend this
155 document and protocol.  [SILC2] also describes the packet encryption
156 and decryption in detail.
157
158 The security of SILC protocol and for any security protocol for that
159 matter is based on strong and secure key exchange protocol.  The SILC
160 Key Exchange protocol is described in [SILC3] along with connection
161 authentication protocol and should be read to fully comprehend this
162 document and protocol.
163
164 The SILC protocol has been developed to work on TCP/IP network
165 protocol, although it could be made to work on other network protocols
166 with only minor changes.  However, it is recommended that TCP/IP
167 protocol is used under SILC protocol.  Typical implementation would
168 be made in client-server model.
169
170
171 .ti 0
172 2. SILC Concepts
173
174 This section describes various SILC protocol concepts that forms the 
175 actual protocol, and in the end, the actual SILC network.  The mission
176 of the protocol is to deliver messages from clients to other clients 
177 through routers and servers in secure manner.  The messages may also 
178 be delivered from one client to many clients forming a group, also 
179 known as a channel.
180
181 This section does not focus to security issues, instead basic network 
182 concepts are introduced to make the topology of the SILC network 
183 clear.
184
185
186 .ti 0
187 2.1 SILC Network Topology
188
189 SILC network is a cellular network as opposed to tree style network 
190 topology.  The rationale for this is to have servers that can perform 
191 specific kind of tasks what other servers cannot perform.  This leads 
192 to two kinds of servers; normal SILC servers and SILC routers.  
193 A difference between normal server and router server is that routers 
194 knows everything about everything in the network.  They also do the 
195 actual routing of the messages to the correct receiver.  Normal servers 
196 knows only about local information and nothing about global information.
197 This makes the network faster as there are less servers that needs to 
198 keep global information up to date at all time.
199
200 This, on the other hand, leads to cellular like network, where routers 
201 are in the centrum on the cell and servers are connected to the router.
202 Following diagram represents SILC network topology.
203
204
205 .in 8
206 .nf
207   ---- ---- ----         ---- ---- ----
208  | S8 | S5 | S4 |       | S7 | S5 | S6 |
209  ----- ---- -----       ----- ---- -----
210 | S7 | S/R1 | S2 | --- | S8 | S/R2 | S4 |
211  ---- ------ ----       ---- ------ ----
212  | S6 | S3 | S1 |       | S1 | S3 | S2 |         ---- ----
213   ---- ---- ----         ---- ---- ----         | S3 | S1 |
214      Cell 1.   \\             Cell 2.  | \\____  ----- -----
215                 |                     |        | S4 | S/R4 |
216     ---- ---- ----         ---- ---- ----       ---- ------
217    | S7 | S4 | S2 |       | S1 | S3 | S2 |      | S2 | S5 |
218    ----- ---- -----       ----- ---- -----       ---- ----
219   | S6 | S/R3 | S1 | --- | S4 | S/R5 | S5 |       Cell 4.
220    ---- ------ ----       ---- ------ ----
221    | S8 | S5 | S3 |       | S6 | S7 | S8 |     ... etc ...
222     ---- ---- ----         ---- ---- ----
223        Cell 3.                Cell 5.
224 .in 3
225
226 .ce
227 Figure 1:  SILC Network Topology
228
229
230 A cell is formed when a server or servers connect to one router.  In
231 SILC network normal server cannot directly connect to other normal
232 server.  Normal server may only connect to SILC router which then
233 routes the messages to the other servers in the cell.  Router servers
234 on the other hand may connect to other routers to form the actual SILC 
235 network, as seen in above figure.  However, router is also normal SILC 
236 server; clients may connect to it the same way as to normal SILC 
237 servers.  Normal server also cannot have active connections to more 
238 than one router.  Normal server cannot be connected to two different 
239 cells.  Router servers, on the other hand, may have as many router to 
240 router connections as needed.
241
242 There are many issues in this network topology that needs to be careful
243 about.  Issues like the size of the cells, the number of the routers in 
244 the SILC network and the capacity requirements of the routers.  These
245 issues should be discussed in the Internet Community and additional
246 documents on the issue will be written.
247
248
249 .ti 0
250 2.2 Communication Inside a Cell
251
252 It is always guaranteed that inside a cell message is delivered to the 
253 recipient with at most two server hops.  Client who is connected to
254 server in the cell and is talking on channel to other client connected 
255 to other server in the same cell, will have its messages delivered from 
256 its local server first to the router of the cell, and from the router 
257 to the other server in the cell.  Following diagram represents this 
258 scenario.
259
260
261 .in 25
262 .nf
263 1 --- S1     S4 --- 5
264          S/R
265  2 -- S2     S3
266      /        |
267     4         3
268 .in 3
269
270
271 .ce
272 Figure 2:  Communication Inside cell
273
274
275 Example:  Client 1. connected to Server 1. message sent to
276           Client 4. connected to Server 2. travels from Server 1.
277           first to Router which routes the message to Server 2.
278           which then sends it to the Client 4.  All the other
279           servers in the cell will not see the routed message.
280
281
282 If client is connected directly to the router, as router is also normal 
283 SILC server, the messages inside the cell are always delivered only with 
284 one server hop.  If clients communicating with each other are connected 
285 to the same server, no router interaction is needed.  This is the optimal
286 situation of message delivery in the SILC network.
287
288
289 .ti 0
290 2.3 Communication in the Network
291
292 If the message is destined to server that does not belong to local cell 
293 the message is routed to the router server to which the destination 
294 server belongs, if the local router is connected to destination router.
295 If there is no direct connection to the destination router, the local
296 router routes the message to its primary route.  Following diagram
297 represents message sending between cells.
298
299
300 .in 16
301 .nf
302 1 --- S1     S4 --- 5            S2 --- 1
303          S/R - - - - - - - - S/R
304  2 -- S2     S3           S1
305      /        |             \\
306     4         3              2
307
308    Cell 1.               Cell 2.
309 .in 3
310
311
312 .ce
313 Figure 3:  Communication Between Cells
314
315
316 Example:  Client 5. connected to Server 4. in Cell 1. message sent
317           to Client 2. connected to Server 1. in Cell 2. travels
318           from Server 4. to Router which routes the message to
319           Router in Cell 2, which then routes the message to 
320           Server 1.  All the other servers and routers in the
321           network will not see the routed message.
322
323
324 The optimal case of message delivery from client point of view is
325 when clients are connected directly to the routers and the messages
326 are delivered from one router to the other router.
327
328
329
330
331
332 .ti 0 
333 2.4 Channel Communication
334
335 Messages may be sent to group of clients as well.  Sending messages to
336 many clients works the same way as sending messages point to point, from
337 message delivery point of view.  Security issues are another matter
338 which are not discussed in this section.
339
340 Router server handles the message routing to multiple recipients.  If 
341 any recipient is not in the same cell as the sender the messages are 
342 routed further.
343
344 Server distributes the channel message to its local clients who are 
345 joined to the channel.  Also, router distributes the message to its 
346 local clients on the channel.
347
348
349 .ti 0
350 3. SILC Specification
351
352 This section describes the SILC protocol.  However, [SILC2] and
353 [SILC3] describes other important protocols that are part of this SILC
354 specification and must be read.
355
356
357 .ti 0
358 3.1 Client
359
360 A client is a piece of software connecting to SILC server.  SILC client 
361 cannot be SILC server.  Purpose of clients is to provide the user 
362 interface of the SILC services for end user.  Clients are distinguished
363 from other clients by unique Client ID.  Client ID is a 128 bit ID that
364 is used in the communication in the SILC network.  The client ID is 
365 based on the nickname selected by the user.  User uses logical nicknames
366 in communication which are then mapped to the corresponding Client ID.
367 Client ID's are low level identifications and must not be seen by the
368 end user.
369
370 Clients provide other information about the end user as well. Information
371 such as the nickname of the user, username and the hostname of the end 
372 user and user's real name.  See section 3.2 Server for information of 
373 the requirements of keeping this information.
374
375 The nickname selected by the user is not unique in the SILC network.
376 There can be 2^8 same nicknames for one IP address. As for comparison to
377 IRC [IRC] where nicknames are unique this is a fundamental difference
378 between SILC and IRC.  This causes the server names to be used along
379 with the nicknames to identify specific users when sending messages.
380 This feature of SILC makes IRC style nickname-wars obsolete as no one
381 owns their nickname; there can always be someone else with the same
382 nickname.  Another difference is that there are no limit of the length
383 of the nickname in the SILC.
384
385
386 .ti 0
387 3.1.1 Client ID
388
389 Client ID is used to identify users in the SILC network.  The Client ID
390 is unique to the extent that there can be 2^128 different Client ID's.
391 Collisions are not expected to happen.  The Client ID is defined as 
392 follows.
393
394 .in 6
395 128 bit Client ID based on IPv4 addresses:
396
397 32 bit  ServerID IP address (bits 1-32)
398  8 bit  Random number
399 88 bit  Truncated MD5 hash value of the nickname
400
401 o Server ID IP address - Indicates the server where this
402   client is coming from.  The IP address hence equals the
403   server IP address where to the client has connected.
404
405 o Random number - Random number to further unify the
406   Client ID.  This makes it possible to have 2^8 same
407   nicknames from the same server IP address.
408
409 o MD5 hash - MD5 hash value of the nickname is truncated
410   taking 88 bits from the start of the hash value.  This
411   hash value is used to search the user's Client ID from
412   the ID lists.
413
414 .in 3
415 Collisions could occur when more than 2^8 clients using same nickname
416 from the same server IP address is connected to the SILC network.  
417 Server must be able to handle this situation by refusing to accept 
418 anymore of that nickname.
419
420 Another possible collision may happen with the truncated hash value of
421 the nickname.  It could be possible to have same truncated hash value for
422 two different nicknames.  However, this is not expected to happen nor
423 cause any problems if it would occur.  Nicknames are usually logical and
424 it is unlikely to have two distinct logical nicknames produce same
425 truncated hash value.
426
427
428 .ti 0
429 3.2 Server
430
431 Servers are the most important parts of the SILC network.  They form the
432 basis of the SILC, providing a point to which clients may connect to.
433 There are two kinds of servers in SILC; normal servers and router servers.
434 This section focuses on the normal server and router server is described
435 in the section 3.3 Router.
436
437 Normal servers may not directly connect to other normal server.  Normal
438 servers may only directly connect to router server.  If the message sent
439 by the client is destined outside the local server it is always sent to
440 the router server for further routing.  Server may only have one active
441 connection to router on same port.  Normal server may not connect to other
442 cell's router except in situations where its cell's router is unavailable.
443
444 Servers and routers in the SILC network are considered to be trusted.
445 With out a doubt, servers that are set to work on ports above 1023 are
446 not considered to be trusted.  Also, the service provider acts important
447 role in the server's trustworthy.
448
449
450 .ti 0
451 3.2.1 Server's Local ID List
452
453 Normal server keeps various information about the clients and their end
454 users connected to it.  Every normal server must keep list of all locally
455 connected clients, Client ID's, nicknames, usernames and hostnames and
456 user's real name.  Normal servers only keeps local information and it
457 does not keep any global information.  Hence, normal servers knows only
458 about their locally connected clients.  This makes servers efficient as
459 they don't have to worry about global clients.  Server is also responsible
460 of creating the Client ID's for their clients.
461
462 Normal server also keeps information about locally created channels and
463 their Channel ID's.
464
465 Hence, local list for normal server includes:
466
467 .in 6
468 server list        - Router connection
469    o Server name
470    o Server IP address
471    o Server ID
472    o Sending key
473    o Receiving key
474    o Public key
475
476 client list        - All clients in server
477    o Nickname
478    o Username@host
479    o Real name
480    o Client ID
481    o Sending key
482    o Receiving key
483
484
485
486 channel list       - All channels in server
487    o Channel name
488    o Channel ID
489    o Client ID's on channel
490    o Client ID modes on channel
491    o Channel key
492 .in 3
493
494
495
496 .ti 0
497 3.2.2 Server ID
498
499 Servers are distinguished from other servers by unique 64 bit Server ID.
500 The Server ID is used in the SILC to route messages to correct servers.
501 Server ID's also provide information for Client ID's, see section 3.1.1
502 Client ID.  Server ID is defined as follows.
503
504 .in 6
505 64 bit Server ID based on IPv4 addresses:
506
507 32 bit  IP address of the server
508 16 bit  Port
509 16 bit  Random number
510
511 o IP address of the server - This is the real IP address of
512   the server.
513
514 o Port - This is the port the server is binded to.
515
516 o Random number - This is used to further unify the Server ID.
517
518 .in 3
519 Collisions are not expected to happen in any conditions.  The Server ID
520 is always created by the server itself and server is resposible of
521 distributing it to the router.
522
523
524 .ti 0
525 3.2.3 SILC Server Ports
526
527 SILC uses currently TCP port 334 on SILC network.  However, this is not
528 official port assigned for SILC.  Official port has been requested by 
529 the IANA.
530
531 If there are needs to create new SILC networks in the future the port
532 numbers must be officially assigned by the IANA.  Most convenience case
533 would be to assign port numbers upwards from 334.
534
535 Server on network above privileged ports (>1023) should not be trusted
536 as they could have been set up by untrusted party.
537
538
539 .ti 0
540 3.3 Router
541
542 Router server in SILC network is responsible for keeping the cell together
543 and routing messages to other servers and to other routers.  Router server
544 is also a normal server thus clients may connect to it as it would be
545 just normal SILC server.
546
547 However, router servers has a lot of important tasks that normal servers
548 do not have.  Router server knows everything about everything in the SILC.
549 They know all clients currently on SILC, all servers and routers and all
550 channels in SILC.  Routers are the only servers in SILC that care about
551 global information and keeping them up to date at all time.  And, this
552 is what they must do.
553
554
555 .ti 0
556 3.3.1 Router's Local ID List
557
558 Router server as well must keep local list of connected clients and
559 locally created channels.  However, this list is extended to include all
560 the informations of the entire cell, not just the server itself as for
561 normal servers.
562
563 However, on router this list is a lot smaller since routers do not keep
564 information about user's nickname, username and hostname and real name
565 since these are not needed by the router.  Router keeps only information
566 that it needs.
567
568 Hence, local list for router includes:
569
570 .in 6
571 server list        - All servers in the cell
572    o Server name
573    o Server ID
574    o Router's Server ID
575    o Sending key
576    o Receiving key
577
578 client list        - All clients in the cell
579    o Client ID
580
581 channel list       - All channels in the cell
582    o Channel ID
583    o Client ID's on channel
584    o Client ID modes on channel
585    o Channel key
586 .in 3
587
588
589 Note that locally connected clients and other information include all the
590 same information as defined in section section 3.2.1 Server's Local ID
591 List.
592
593
594 .ti 0
595 3.3.2 Router's Global ID List
596
597 Router server must also keep global list.  Normal servers do not have
598 global list as they know only about local information.  Global list
599 includes all the clients on SILC, their Client ID's, all created channels
600 and their Channel ID's and all servers and routers on SILC and their
601 Server ID's.  That is said, global list is for global information and the
602 list must not include the local information already on the router's local
603 list.
604
605 Note that the global list does not include information like nicknames,
606 usernames and hostnames or user's real names.  Router does not keep
607 these informations as they are not needed by the router.  This 
608 information is available from the client's server which maybe queried
609 when needed.
610
611 Hence, global list includes:
612
613 .in 6
614 server list        - All servers in SILC
615    o Server name
616    o Server ID
617    o Router's Server ID
618
619 client list        - All clients in SILC
620    o Client ID
621
622 channel list       - All channels in SILC
623    o Channel ID
624    o Client ID's on channel
625    o Client ID modes on channel
626 .in 3
627
628
629 .ti 0
630 3.3.3 Router's Server ID
631
632 Router's Server ID's are equivalent to normal Server ID's.  As routers
633 are normal servers as well same types of ID's applies for routers as well.
634 Thus, see section 3.2.2 Server ID.  Server ID's for routers are always
635 created by the remote router where the router is connected to.
636
637
638 .ti 0
639 3.4 Channels
640
641 A channel is a named group of one or more clients which will all receive
642 messages addressed to that channel.  The channel is created when first
643 client requests JOIN command to the channel, and the channel ceases to
644 exist when the last client leaves it.  When channel exists, any client
645 can reference it using the name of the channel.
646
647 Channel names are unique although the real uniqueness comes from 64 bit
648 Channel ID that unifies each channel.  However, channel names are still
649 unique and no two global channels with same name may exist.  Channel name
650 is a string which begins with `#' character.  There is no limit on the
651 length of the channel name.  Channel names may not contain any spaces
652 (`  '), any non-printable ASCII characters, commas (`,') and wildcard
653 characters.
654
655 Channels can have operators that can administrate the channel and
656 operate all of its modes.  Following operators on channel exist on SILC
657 network.
658
659 .in 6
660 o Channel founder - When channel is created the joining client becomes
661   channel founder.  Channel founder is channel operator with some more
662   privileges.  Basically, channel founder can fully operate the channel
663   and all of its modes.  The privileges are limited only to the particular
664   channel.  There can be only one channel founder per channel.  Channel
665   founder supersedes channel operator's privileges.
666
667   Channel founder privileges cannot be removed by any other operator on
668   channel.  When channel founder leaves the channel there is no channel
669   founder on the channel.  Channel founder also cannot be removed by
670   force from the channel.
671
672 o Channel operator - When client joins to channel that has not existed
673   previously it will become automatically channel operator (and channel
674   founder discussed above).  Channel operator is able administrate the
675   channel, set some modes on channel, remove a badly behaving client from
676   the channel and promote other clients to become channel operator.
677   The privileges are limited only to the particular channel.
678
679   Normal channel user may be promoted (opped) to channel operator
680   gaining channel operator privileges.  Channel founder or other channel
681   operator may also demote (deop) channel operator to normal channel
682   user.
683 .in 3
684
685
686 .ti 0
687 3.4.1 Channel ID
688
689 Channels are distinguished from other channels by unique Channel ID.
690 The Channel ID is a 64 bit ID and collisions are not expected to happen
691 in any conditions.  Channel names are just for logical use of channels.
692 The Channel ID is created by the server where the channel is created.
693 The Channel ID is defined as follows.
694
695 .in 6
696 64 bit Channel ID based on IPv4 addresses:
697
698 32 bit  Router's Server ID IP address (bits 1-32)
699 16 bit  Router's Server ID port (bits 33-48)
700 16 bit  Random number
701
702 o Router's Server ID IP address - Indicates the IP address of 
703   the router of the cell where this channel is created.  This is 
704   taken from the router's Server ID.  This way SILC router knows 
705   where this channel resides in the SILC network.
706
707 o Router's Server ID port - Indicates the port of the channel on 
708   the server.  This is taken from the router's Server ID.
709
710 o Random number - To further unify the Channel ID.  This makes
711   sure that there are no collisions.  This also means that
712   in a cell there can be 2^16 channels.
713 .in 3
714
715
716 .ti 0
717 3.5 Operators
718
719 Operators are normal users with extra privileges to their server or
720 router.  Usually these people are SILC server and router administrators
721 that take care of their own server and clients on them.  The purpose of
722 operators is to administrate the SILC server or router.  However, even
723 an operator with highest privileges is not able to enter invite-only
724 channel, to gain access to the contents of a encrypted and authenticated
725 packets traveling in the SILC network or to gain channel operator
726 privileges on public channels without being promoted.  They have the
727 same privileges as everyone else except they are able to administrate
728 their server or router.
729
730
731 .ti 0
732 3.6 SILC Commands
733
734 Commands are very important part on SILC network especially for client
735 which uses commands to operate on the SILC network.  Commands are used
736 to set nickname, join to channel, change modes and many other things.
737
738 Client usually sends the commands and server replies by sending a reply
739 packet to the command.  Server may also send commands usually to serve
740 the original client's request.  However, server may not send command
741 to client and there are some commands that server must not send.
742
743 Note that the command reply is usually sent only after client has sent
744 the command request but server is allowed to send command reply packet
745 to client even if client has not requested the command.  Client may,
746 however, choose not to accept the command reply, but there are some
747 command replies that the client should accept.  Example of a such
748 command reply is reply to SILC_COMMAND_CMODE command that the server
749 uses to distribute the channel mode on all clients on the channel
750 when the mode has changed.
751
752 It is expected that some of the commands may be miss-used by clients
753 resulting various problems on the server side.  Every implementation
754 should assure that commands may not be executed more than once, say,
755 in two (2) seconds.  This should be sufficient to prevent the miss-use
756 of commands.
757
758 SILC commands are described in section 5 SILC Commands.
759
760
761 .ti 0
762 3.7 SILC Packets
763
764 Packets are naturally the most important part of the protocol and the
765 packets are what actually makes the protocol.  Packets in SILC network
766 are always encrypted using, usually, the shared secret session key
767 or some other key, for example, channel key, when encrypting channel
768 messages.  The SILC Packet Protocol is a wide protocol and is described
769 in [SILC2].  This document does not define or describe details of
770 SILC packets.
771
772
773 .ti 0
774 3.8 Packet Encryption
775
776 All packets passed in SILC network must be encrypted.  This section
777 defines how packets must be encrypted in the SILC network.  The detailed
778 description of the actual encryption process of the packets are
779 described in [SILC2].
780
781 Client and its server shares secret symmetric session key which is
782 established by the SILC Key Exchange Protocol, described in [SILC3]. 
783 Every packet sent from client to server, with exception of packets for
784 channels, are encrypted with this session key.
785
786 Channels has their own key that are shared by every client on the channel.
787 However, the channel keys are cell specific thus one cell does not know
788 the channel key of the other cell, even if that key is for same channel.
789 Channel key is also known by the routers and all servers that has clients
790 on the channel.  However, channels may have channel private keys that
791 are entirely local setting for client.  All clients on the channel must
792 know the channel private key before hand to be able to talk on the
793 channel.  In this case, no server or router knows the key for channel.
794
795 Server shares secret symmetric session key with router which is
796 established by the SILC Key Exchange Protocol.  Every packet passed from
797 server to router, with exception of packets for channels, are encrypted
798 with the shared session key.  Same way, router server shares secret
799 symmetric key with its primary route.  However, every packet passed
800 from router to other router, including packets for channels, are
801 encrypted with the shared session key.  Every router connection has
802 their own session keys.
803
804
805 .ti 0
806 3.8.1 Determination of the Source and the Destination
807
808 The source and the destination of the packet needs to be determined
809 to be able to route the packets to correct receiver.  This information
810 is available in the SILC Packet Header which is included in all packets
811 sent in SILC network.  The SILC Packet Header is described in [SILC2].
812
813 The header is always encrypted with the session key who is next receiver
814 of the packet along the route.  The receiver of the packet, for example
815 a router along the route, is able to determine the sender and the
816 destination of the packet by decrypting the SILC Packet Header and
817 checking the ID's attached to the header.  The ID's in the header will
818 tell to where the packet needs to be sent and where it is coming from.
819
820 The header in the packet does not change during the routing of the
821 packet.  The original sender, for example client, assembles the packet
822 and the packet header and server or router between the sender and the
823 receiver must not change the packet header.
824
825 Note that the packet and the packet header may be encrypted with
826 different keys.  For example, packets to channels are encrypted with
827 the channel key, however, the header is encrypted with the session key
828 as described above.  However, the header and the packet may be encrypted
829 with same key.  This is case, for example, with command packets.
830
831
832 .ti 0
833 3.8.2 Client To Client
834
835 Process of message delivery and encryption from client to another
836 client is as follows.
837
838 Example:  Private message from client to another client on different
839           servers.  Clients do not share private message delivery
840           keys; normal session keys are used.
841
842 o Client 1. sends encrypted packet to its server.  The packet is
843   encrypted with the session key shared between client and its
844   server.
845
846 o Server determines the destination of the packet and decrypts
847   the packet.  Server encrypts the packet with session key shared
848   between the server and its router, and sends the packet to the
849   router.
850
851 o Router determines the destination of the packet and decrypts
852   the packet.  Router encrypts the packet with session key 
853   shared between the router and the destination server, and sends
854   the packet to the server.
855
856 o Server determines the client to which the packet is destined
857   to and decrypts the packet.  Server encrypts the packet with
858   session key shared between the server and the destination client,
859   and sends the packet to the client.
860
861 o Client 2. decrypts the packet.
862
863
864 Example:  Private message from client to another client on different
865           servers.  Clients has established secret shared private
866           message delivery key with each other and that is used in 
867           the message encryption.
868
869 o Client 1. sends encrypted packet to its server.  The packet is
870   encrypted with the private message delivery key shared between
871   clients.
872
873 o Server determines the destination of the packet and sends the 
874   packet to the router.
875
876 o Router determines the destination of the packet and sends the
877   packet to the server.
878
879 o Server determines the client to which the packet is destined
880   to and sends the packet to the client.
881
882 o Client 2. decrypts the packet with the secret shared key.
883
884
885 If clients share secret key with each other the private message
886 delivery is much simpler since servers and routers between the
887 clients do not need to decrypt and re-encrypt the packet.
888
889 The process for clients on same server is much simpler as there are
890 no need to send the packet to the router.  The process for clients 
891 on different cells is same as above except that the packet is routed 
892 outside the cell.  The router of the destination cell routes the 
893 packet to the destination same way as described above.
894
895
896 .ti 0
897 3.8.3 Client To Channel
898
899 Process of message delivery from client on channel to all the clients
900 on the channel.
901
902 Example:  Channel of four users; two on same server, other two on
903           different cells.  Client sends message to the channel.
904
905 o Client 1. encrypts the packet with channel key and sends the
906   packet to its server.
907
908 o Server determines local clients on the channel and sends the
909   packet to the Client on the same server.  Server then sends
910   the packet to its router for further routing.
911
912 o Router determines local clients on the channel, if found
913   sends packet to the local clients.  Router determines global
914   clients on the channel and sends the packet to its primary
915   router or fastest route.
916
917 o (Other router(s) do the same thing and sends the packet to
918    the server(s))
919
920 o Server determines local clients on the channel and sends the
921   packet to the client.
922
923 o All clients receiving the packet decrypts the packet.
924
925
926 .ti 0
927 3.8.4 Server To Server
928
929 Server to server packet delivery and encryption is described in above
930 examples. Router to router packet delivery is analogous to server to
931 server.  However, some packets, such as channel packets, are processed
932 differently.  These cases are described later in this document and
933 more in detail in [SILC2].
934
935
936 .ti 0
937 3.9 Key Exchange And Authentication
938
939 Key exchange is done always when for example client connects to server
940 but also when server and router and router and router connects to each
941 other.  The purpose of key exchange protocol is to provide secure key
942 material to be used in the communication.  The key material is used to
943 derive various security parameters used to secure SILC packets.  The
944 SILC Key Exchange protocol is described in detail in [SILC3].
945
946 Authentication is done after key exchange protocol has been successfully
947 completed.  The purpose of authentication is to authenticate for example
948 client connecting to the server.  However, Usually clients are accepted
949 to connect to server without explicit authentication.  Servers are
950 required use authentication protocol when connecting.  The authentication
951 may be based on passphrase (pre-shared-secret) or public key.  The
952 connection authentication protocol is described in detail in [SILC3].
953
954
955 .ti 0
956 3.10 Algorithms
957
958 This section defines all the allowed algorithms that can be used in
959 the SILC protocol.  This includes mandatory cipher, mandatory public
960 key algorithm and MAC algorithms.
961
962
963 .ti 0
964 3.10.1 Ciphers
965
966 Cipher is the encryption algorithm that is used to protect the data
967 in the SILC packets.  See [SILC2] of the actual encryption process and
968 definition of how it must be done.  SILC has a mandatory algorithm that
969 must be supported in order to be compliant with this protocol.
970
971 Following ciphers are defined in SILC protocol:
972
973 .in 6
974 blowfish-cbc    Blowfish in CBC mode  (mandatory)
975 twofish-cbc     Twofish in CBC mode   (optional)
976 rc6-cbc         RC6 in CBC mode       (optional)
977 rc5-cbc         RC5 in CBC mode       (optional)
978 mars-cbc        Mars in CBC mode      (optional)
979 none            No encryption         (optional)
980 .in 3
981
982
983 All algorithms must use minimum of 128 bit key, by default.  Several
984 algorithms, however, supports longer keys and it is recommended to use
985 longer keys if they are available.
986
987 Algorithm none does not perform any encryption process at all and 
988 thus is not recommended to be used.  It is recommended that no client
989 or server implementation would accept none algorithms except in special
990 debugging mode.
991
992 Additional ciphers may be defined to be used in SILC by using the
993 same name format as above.
994
995
996
997
998
999
1000 .ti 0
1001 3.10.2 Public Key Algorithms
1002
1003 Public keys are used in SILC to authenticate entities in SILC network
1004 and to perform other tasks related to public key cryptography.  The 
1005 public keys are also used in the SILC Key Exchange protocol [SILC3].
1006
1007 Following public key algorithms are defined in SILC protocol:
1008
1009 .in 6
1010 rsa        RSA  (mandatory)
1011 dss        DSS  (optional)
1012 .in 3
1013
1014 Both of the algorithms are described in [Scheneir] and [Menezes].
1015
1016 Additional public key algorithms may be defined to be used in SILC.
1017
1018
1019 .ti 0
1020 3.10.3 MAC Algorithms
1021
1022 Data integrity is protected by computing a message authentication code
1023 (MAC) of the packet data.  See [SILC2] for details how to compute the
1024 MAC.
1025
1026 Following MAC algorithms are defined in SILC protocol:
1027
1028 .in 6
1029 hmac-sha1        HMAC-SHA1, length = 20  (mandatory)
1030 hmac-md5         HMAC-MD5, length = 16   (optional)
1031 none             No MAC                  (optional)
1032 .in 3
1033
1034 The none MAC is not recommended to be used as the packet is not
1035 authenticated when MAC is not computed.  It is recommended that no
1036 client or server would accept none MAC except in special debugging
1037 mode.
1038
1039 The HMAC algorithm is described in [HMAC] and hash algorithms that
1040 are used as part of the HMACs are described in [Scheneir] and in
1041 [Menezes]
1042
1043 Additional MAC algorithms may be defined to be used in SILC.
1044
1045
1046 .ti 0
1047 3.10.4 Compression Algorithms
1048
1049 SILC protocol supports compression that may be applied to unencrypted
1050 data.  It is recommended to use compression on slow links as it may
1051 significantly speed up the data transmission.  By default, SILC does not
1052 use compression which is the mode that must be supported by all SILC
1053 implementations.
1054
1055 Following compression algorithms are defined:
1056
1057 .in 6
1058 none        No compression               (mandatory)
1059 zlib        GBU ZLIB (LZ77) compression  (optional)
1060 .in 3
1061
1062 Additional compression algorithms may be defined to be used in SILC.
1063
1064
1065 .ti 0
1066 3.11 SILC Public Key
1067
1068 This section defines the type and format of the SILC public key.  All
1069 implementations must support this public key type.  See [SILC3] for
1070 other optional public key and certificate types allowed in SILC
1071 protocol.  Public keys in SILC may be used to authenticate entities
1072 and to perform other tasks related to public key cryptography.
1073
1074 The format of the SILC Public Key is as follows:
1075
1076
1077 .in 5
1078 .nf
1079                      1                   2                   3
1080  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1081 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1082 |                        Public Key Length                      |
1083 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1084 |     Algorithm Name Length     |                               |
1085 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1086 |                                                               |
1087 ~                         Algorithm Name                        ~
1088 |                                                               |
1089 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1090 |       Identifier Length       |                               |
1091 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1092 |                                                               |
1093 ~                           Identifier                          ~
1094 |                                                               |
1095 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1096 |                                                               |
1097 ~                           Public Data                         ~
1098 |                                                               |
1099 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1100 .in 3
1101
1102 .ce
1103 Figure 4:  SILC Public Key
1104
1105
1106 .in 6
1107 o Public Key Length (4 bytes) - Indicates the full length
1108   of the public key, not including this field.
1109
1110 o Algorithm Name Length (2 bytes) - Indicates the length
1111   of the Algorithm Length field, not including this field.
1112
1113 o Algorithm name (variable length) - Indicates the name
1114   of the public key algorithm that the key is.  See the
1115   section 3.10.2 Public Key Algorithms for defined names.
1116
1117 o Identifier Length (2 bytes) - Indicates the length of
1118   the Identifier field, not including this field.
1119
1120 o Identifier (variable length) - Indicates the identifier
1121   of the public key.  This data can be used to identify
1122   the owner of the key.  The identifier is of following
1123   format:
1124
1125      UN   User name
1126      HN   Host name or IP address
1127      RN   Real name
1128      E    EMail address
1129      O    Organization
1130      C    Country
1131
1132
1133   Examples of an identifier:
1134
1135     `UN=priikone, HN=poseidon.pspt.fi, E=priikone@poseidon.pspt.fi'
1136
1137     `UN=sam, HN=dummy.fi, RN=Sammy Sam, O=Company XYZ, C=Finland'
1138
1139   At least user name (UN) and host name (HN) must be provided as
1140   identifier.  The fields are separated by commas (`,').  If
1141   comma is in the identifier string it must be written as `\\,',
1142   for example, `O=Company XYZ\\, Inc.'.
1143
1144 o Public Data (variable length) - Includes the actual
1145   public data of the public key.
1146
1147   The format of this field for RSA algorithm is
1148   as follows:
1149
1150      4 bytes            Length of e
1151      variable length    e
1152      4 bytes            Length of n
1153      variable length    n
1154
1155
1156   The format of this field for DSS algorithm is
1157   as follows:
1158
1159      4 bytes            Length of p
1160      variable length    p
1161      4 bytes            Length of q
1162      variable length    q
1163      4 bytes            Length of g
1164      variable length    g
1165      4 bytes            Length of y
1166      variable length    y
1167
1168   The variable length fields are multiple precession
1169   integers encoded as strings in both examples.
1170
1171   Other algorithms must define their own type of this
1172   field if they are used.
1173 .in 3
1174
1175 All fields in the public key are in MSB (most significant byte first)
1176 order.
1177
1178
1179 .ti 0
1180 4 SILC Procedures
1181
1182 This section describes various SILC procedures such as how the 
1183 connections are created and registered, how channels are created and
1184 so on.  The section describes the procedures only generally as details
1185 are described in [SILC2] and [SILC3].
1186
1187
1188 .ti 0
1189 4.1 Creating Client Connection
1190
1191 This section descibres the procedure when client connects to SILC server.
1192 When client connects to server the server must perform IP address lookup
1193 and reverse IP address lookup to assure that the origin host really is
1194 who it claims to be.  Client, host, connecting to server must have 
1195 both valid IP address and fully qualified domain name (FQDN).
1196
1197 After that client and server performs SILC Key Exchange protocol which
1198 will provide the key material used later in the communication.  The
1199 key exchange protocol must be completed successfully before the connection
1200 registration may continue.  The SILC Key Exchange protocol is described
1201 in [SILC3].
1202
1203 Typical server implementation would keep a list of connections that it
1204 allows to connect to the server.  The implementation would check, for
1205 example, the connecting client's IP address from the connection list
1206 before the SILC Key Exchange protocol has been started.  Reason for
1207 this is that if the host is not allowed to connect to the server there
1208 is no reason to perform a key exchange protocol.
1209
1210 After successful key exchange protocol the client and server performs
1211 connection authentication protocol.  The purpose of the protocol is to
1212 authenticate the client connecting to the server.  Flexible
1213 implementation could also accept the client to connect to the server
1214 without explicit authentication.  However, if authentication is
1215 desired for a specific client it may be based on passphrase or
1216 public key authentication.  If authentication fails the connection
1217 must be terminated.  The connection authentication protocol is described
1218 in [SILC3].
1219
1220 After successful key exchange and authentication protocol the client
1221 registers itself by sending SILC_PACKET_NEW_CLIENT packet to the
1222 server.  This packet includes various information about the client
1223 that the server uses to create the client.  Server creates the client
1224 and sends SILC_PACKET_NEW_ID to the client which includes the created
1225 Client ID that the client must start using after that.  After that
1226 all SILC packets from the client must have the Client ID as the
1227 Source ID in the SILC Packet Header, described in [SILC2].
1228
1229 Client must also get the server's Server ID that is to be used as
1230 Destination ID in the SILC Packet Header when communicating with
1231 the server (for example when sending commands to the server).  The
1232 ID may be resolved in two ways.  Client can take the ID from an
1233 previously received packet from server that must include the ID,
1234 or to send SILC_COMMAND_INFO command and receive the Server ID as
1235 command reply.
1236
1237 Server may choose not to use the information received in the
1238 SILC_PACKET_NEW_CLIENT packet.  For example, if public key or 
1239 certificate were used in the authentication, server may use those
1240 informations rather than what it received from client.  This is suitable
1241 way to get the true information about client if it is available.
1242
1243 The nickname of client is initially set to the username sent in the
1244 SILC_PACKET_NEW_CLIENT packet.  User should set the nickname to more
1245 suitable by sending SILC_COMMAND_NICK command.  However, this is not
1246 required as part of registration process.
1247
1248 Server must also distribute the information about newly registered
1249 client to its router (or if the server is router, to all routers in
1250 the SILC network).  More information about this in [SILC2].
1251
1252
1253 .ti 0
1254 4.2 Creating Server Connection
1255
1256 This section descibres the procedure when server connects to its
1257 router (or when router connects to other router, the cases are
1258 equivalent).  The procedure is very much alike when client connects
1259 to the server thus it is not repeated here.
1260
1261 One difference is that server must perform connection authentication
1262 protocol with proper authentication.  Proper authentication is based
1263 on passphrase or public key authentication.
1264
1265 After server and router has successfully performed the key exchange
1266 and connection authentication protocol, the server register itself
1267 to the router by sending SILC_PACKET_NEW_SERVER packet.  This packet
1268 includes the server's Server ID that it has created by itself and
1269 other relevant information about the server.
1270
1271 After router has received the SILC_PACKET_NEW_SERVER packet it
1272 distributes the information about newly registered server to all routers
1273 in the SILC network.  More information about this in [SILC2].
1274
1275 As client needed to resolve the destination ID this must be done by the
1276 server that connected to the router, as well.  The way to resolve it is
1277 to get the ID from previously received packet.  Server must also start
1278 using its own Server ID as Source ID in SILC Packet Header and the
1279 router's Server ID as Destination when communicating with the router.
1280
1281 If the server has already connected clients and locally created
1282 channels the server must distribute these informations to the router.
1283 The distribution is done by sending packet SILC_PACKET_NEW_CHANNEL.
1284 See [SILC2] for more information on this.
1285
1286
1287 .ti 0
1288 4.3 Joining to a Channel
1289
1290 This section describes the procedure when client joins to a channel.
1291 Client may join to channel by sending command SILC_COMMAND_JOIN to the
1292 server.  If the receiver receiving join command is normal server the
1293 server must check its local list whether this channel already exists
1294 locally.  This would indicate that some client connected to the server
1295 has already joined to the channel.  If this is case the client is
1296 joined to the client, new channel key is created and information about
1297 newly joined channel is sent to the router.  The new channel key is
1298 also distributed to the router and to all clients on the channel.
1299
1300 If the channel does not exist in the local list the command must be
1301 sent to the router which will then perform the actual joining
1302 procedure.  When server receives the reply to the command from the
1303 router it must be distributed to the client who sent the command
1304 originally.  Server will also receive the channel key from the server
1305 that it must distribute to the client who originally requested the
1306 join command.  The server must also save the channel key.
1307
1308 If the receiver of the join command is router it must first check its
1309 local list whether anyone in the cell has already joined to the channel.
1310 If this is the case the client is joined to the channel and reply is
1311 sent to the client.  If the command was sent by server the command reply
1312 is sent to the server who sent it.  Then the router must also create
1313 new channel key and distribute it to all clients on the channel and
1314 all servers that has clients on the channel.
1315
1316 If the channel does not exist on the router's local list it must
1317 check the global list whether the channel exists at all.  If it does
1318 the client is joined to the channel as described previously.  If
1319 the channel does not exist the channel is created and the client
1320 is joined to the channel.  The channel key is also created and
1321 distributed as previously described.  The client joining to the created
1322 channel is made automatically channel founder and both channel founder
1323 and channel operator privileges is set for the client.
1324
1325 When the router joins the client to the channel it must send 
1326 information about newly joined client to all routers in the SILC 
1327 network.  Also, if the channel was created in the process, information
1328 about newly created channel must also be distributed to all routers.
1329 The distribution of newly created channel is done by sending packet
1330 SILC_PACKET_NEW_CHANNEL.
1331
1332 It is important to note that new channel key is created always when
1333 new client joins to channel, whether the channel has existed previously
1334 or not.  This way the new client on the channel is not able to decrypt
1335 any of the old traffic on the channel.
1336
1337 Client who receives the reply to the join command must start using
1338 the received Channel ID in the channel message communication thereafter.
1339 However, client must not start communicating on the channel before
1340 it has received the packet SILC_PACKET_CHANNEL_KEY.
1341
1342 If client wants to know the other clients currently on the channel
1343 the client must send SILC_COMMAND_NAMES command to receive a list of
1344 channel users.  Server implementation, however, may send command reply
1345 packet to SILC_COMMAND_NAMES command after client has joined to the
1346 channel even if the client has not sent the command.
1347
1348
1349 .ti 0
1350 4.4 Channel Key Generation
1351
1352 Channel keys are created by router who creates the channel by taking
1353 enough randomness from cryptographically strong random number generator.
1354 The key is generated always when channel is created, when new client
1355 joins a channel and after the key has expired.  Key could expire for
1356 example in an hour.
1357
1358 The key must also be re-generated whenever some client leaves a channel.
1359 In this case the key is created from scratch by taking enough randomness
1360 from the random number generator.  After that the key is distributed to
1361 all clients on the channel.  However, channel keys are cell specific thus
1362 the key is created only on the cell where the client, who leaved the
1363 channel, exists.  While the server or router is creating the new channel
1364 key, no other client may join to the channel.  Messages that are sent
1365 while creating the new key are still processed with the old key.  After
1366 server has sent the SILC_PACKET_CHANNEL_KEY packet must client start
1367 using the new key.  If server creates the new key the server must also
1368 send the new key to its router.  See [SILC2] on more information about
1369 how channel messages must be encrypted and decrypted when router is
1370 processing them.
1371
1372
1373 .ti 0
1374 4.5 Private Message Sending and Reception
1375
1376 Private messages are sent point to point.  Client explicitly destines
1377 a private message to specific client that is delivered to only to that
1378 client.  No other client may receive the private message.  The receiver
1379 of the private message is destined in the SILC Packet Header as any
1380 other packet as well.
1381
1382 If the sender of a private message does not know the receiver's Client
1383 ID, it must resolve it from server.  There are two ways to resolve the
1384 client ID from server; it is recommended that client ipmlementations
1385 send SILC_COMMAND_IDENTIFY command to receive the Client ID.  Client
1386 may also send SILC_COMMAND_WHOIS command to receive the Client ID.
1387 If the sender has received earlier a private message from the receiver
1388 it should have cached the Client ID from the SILC Packet Header.
1389
1390 Receiver of a private message should not explicitly trust the nickname
1391 that it receives in the Private Message Payload, described in [SILC2].
1392 Implementations could resolve the nickname from server, as described
1393 previously, and compare the received Client ID and the SILC Packet
1394 Header's Client ID.  The nickname in the payload is merely provided
1395 to be displayed for end user.
1396
1397 See [SILC2] for describtion of private message encryption and decryption
1398 process.
1399
1400
1401 .ti 0
1402 4.6 Private Message Key Generation
1403
1404 Private message may be protected by key generated by client.  The key
1405 may be generated and sent to the other client by sending packet
1406 SILC_PACKET_PRIVATE_MESSAGE_KEY which travels through the network
1407 and is secured by session keys.  After that the private message key
1408 is used in the private message communication between those clients.
1409 See more information about how this works technically in [SILC2].
1410
1411 Other choice is to entirely use keys that are not sent through
1412 the SILC network at all.  This significantly adds security.  This key
1413 would be pre-shared-key that is known by both of the clients.  Both
1414 agree about using the key and starts sending packets that indicate
1415 that the private message is secured using private message key.  This
1416 is the technical aspect mentioned previously that is described
1417 in [SILC2].
1418
1419 If the private message keys are not set to be used, which is the
1420 case by default in SILC, the private messages are secured by using
1421 normal session keys established by SILC Key Exchange protocol.
1422
1423
1424 .ti 0
1425 4.7 Channel Message Sending and Reception
1426
1427 Channel messages are delivered to group of users.  The group forms a
1428 channel and all clients on the channel receives messages sent to the
1429 channel.
1430
1431 Channel messages are destined to channel by specifying the Channel ID
1432 as Destination ID in the SILC Packet Header.  The server must then
1433 distribute the message to all clients on the channel by sending the
1434 channel message destined explicitly to a client on the channel.
1435
1436 See [SILC2] for describtion of channel message encryption and decryption
1437 process.
1438
1439
1440 .ti 0
1441 4.8 Session Key Regeneration
1442
1443 Session keys should be regenerated peridiocally, say, once in an hour.
1444 The re-key process is started by sending SILC_PACKET_REKEY packet to
1445 other end, to indicate that re-key must be performed.
1446
1447 If perfect forward secrecy (PFS) flag was selected in the SILC Key
1448 Exchange protocol [SILC3] the re-key must cause new key exchange with
1449 SKE protocol.  In this case the protocol is secured with the old key
1450 and the protocol results to new key material.  See [SILC3] for more
1451 information.  After the SILC_PACKET_REKEY packet is sent the sender
1452 will perform the SKE protocol.
1453
1454 If PFS flag was not set, which is the default case, then re-key is done
1455 without executing SKE protocol.  In this case, the new key is created by
1456 hashing the old key with hash function selected earlier in the SKE
1457 protocol.  If the digest length of the hash function is too short for the
1458 key, then the key is distributed as described in section Processing the
1459 Key Material in [SILC3].  After both parties has regenerated the session
1460 key, both send SILC_PACKET_REKEY_DONE packet to each other.  These packets
1461 are still secured with the old key.  After these packets, following
1462 packets must be protected with the new key.
1463
1464
1465 .ti 0
1466 4.9 Command Sending and Reception
1467
1468 Client usually sends the commands in the SILC network.  In this case
1469 the client simply sends the command packet to server and the server
1470 processes it and replies with command reply packet.
1471
1472 However, if the server is not able to process the command, it is usually
1473 sent to the server's router.  This is case for example with commands such
1474 as, SILC_COMMAND_JOIN and SILC_COMMAND_WHOIS commands.  However, there
1475 are other commands as well.  For example, if client sends the WHOIS
1476 command requesting specific information about some client the server must
1477 send the WHOIS command to router so that all clients in SILC network
1478 are searched.  The router, on the other hand, sends the WHOIS command
1479 to further to receive the exact information about the requested client.
1480 The WHOIS command travels all the way to the server who owns the client
1481 and it replies with command reply packet.  Finally, the server who
1482 sent the command receives the command reply and it must be able to
1483 determine which client sent the original command.  The server then
1484 sends command reply to the client.  Implementations should have some
1485 kind of cache to handle, for example, WHOIS information.  Servers
1486 and routers along the route could all cache the information for faster
1487 referencing in the future.
1488
1489 The commands sent by server may be sent hop by hop until someone is able
1490 to process the command.  However, it is preferred to destine the command
1491 as precisely as it is possible.  In this case, other routers en route
1492 must route the command packet by checking the true sender and true
1493 destination of the packet.  However, servers and routers must not route
1494 command reply packets to clients coming from other server.  Client
1495 must not accept command reply packet originated from anyone else but
1496 from its own server.
1497
1498
1499 .ti 0
1500 5 SILC Commands
1501
1502 .ti 0
1503 5.1 SILC Commands Syntax
1504
1505 This section briefly describes the syntax of the command notions
1506 in this document.  Every field in command is separated from each
1507 other by whitespaces (` ') indicating that each field is independent
1508 argument and each argument must have own Command Argument Payload.
1509 The number of maximum arguments are defined with each command
1510 separately.  The Command Argument Payload is described in [SILC2].
1511
1512 Every command defines specific number for each argument.  Currently,
1513 they are defined in ascending order; first argument has number one 
1514 (1), second has number two (2) and so on.  This number is set into the
1515 Argument Type field in the Command Argument Payload.  This makes it
1516 possible to send the arguments in free order as the number must be
1517 used to identify the type of the argument.  This makes is it also
1518 possible to have multiple optional arguments in commands and in
1519 command replies.  The number of argument is marked in parentheses
1520 before the actual argument.
1521
1522 .in 6
1523 Example:  Arguments:  (1) <nickname> (2) <username@host>
1524 .in 3
1525    
1526
1527 Every command replies with Status Payload.  This payload tells the
1528 sender of the command whether the command was completed succefully or
1529 whether there was an error.  If error occured the payload includes the
1530 error type.  In the next section the Status Payload is not described 
1531 as it is common to all commands and has been described here.  Commands 
1532 may reply with other arguments as well.  These arguments are command 
1533 specific and are described in the next section.
1534
1535 Example command:
1536 .in 6
1537
1538 EXAMPLE_COMMAND
1539
1540 .in 8
1541 Max Arguments:  3
1542     Arguments:  (1) <nickname>[@<server>]  (2) <message>
1543                 (3) [<count>]
1544
1545 The command has maximum of 3 arguments.  However, only first
1546 and second arguments are mandatory.
1547
1548 First argument <nickname> is mandatory but may have optional
1549 <nickname@server> format as well.  Second argument is mandatory
1550 <message> argument.  Third argument is optional <count> argument.
1551
1552 The numbers in parentheses are the argument specific numbers
1553 that specify the type of the argument in Command Argument Payload.
1554 The receiver always knows that, say, argument number two (2) is
1555 <message> argument, regardles of the ordering of the arguments in
1556 the Command Payload.
1557
1558
1559
1560
1561
1562 Reply messages to the command:
1563
1564 Max Arguments:  4
1565     Arguments:  (1) <Status Payload>  (2) [<channel list>]
1566                 (3) <idle time>       (4) [<away message>]
1567
1568 This command may reply with maximum of 4 arguments.  However,
1569 only the first and third arguments are mandatory.  The numbers
1570 in the parentheses have the same meaning as in the upper
1571 command sending specification.
1572
1573 Every command reply with <Status Payload>, it is mandatory 
1574 argument for all command replies and for this reason it is not
1575 described in the command reply descriptions.
1576
1577 Status messages:
1578
1579     SILC_STATUS_OK
1580     SILC_STATUS_ERR_TOO_MANY_TARGETS
1581     SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1582     SILC_STATUS_ERR_NO_SUCH_NICK
1583
1584 Every command reply also defines set of status message that it
1585 may return inside the <Status Payload>.  All status messages
1586 are defined in the section 5.3 SILC Command Status Types.
1587 .in 3
1588
1589
1590 .ti 0
1591 5.2 SILC Commands List
1592
1593 This section lists all SILC commands, however, it is expected that a
1594 implementation and especially client implementation has many more
1595 commands that has only local affect.  These commands are official
1596 SILC commands that has both client and server sides and cannot be
1597 characterized as local commands.
1598
1599 List of all defined commands in SILC follows.
1600
1601 .in 0
1602    0    SILC_COMMAND_NONE
1603
1604         None.  This is reserved command and must not be sent.
1605
1606
1607    2    SILC_COMMAND_WHOIS
1608
1609         Max Arguments:  2
1610             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1611
1612         Whois.  Whois command is used to query various information about
1613         specific user.  The user maybe requested by their nickname and
1614         server name.  The query may find multiple matching users as
1615         there are no unique nicknames in the SILC.  The <count> option
1616         maybe given to narrow down the number of accepted results.  If
1617         this is not defined there are no limit of accepted results.
1618         The query may also be narrowed down by defining the server name
1619         of the nickname.
1620
1621         To prevent miss-use of this service wildcards in the nickname
1622         or in the servername are not permitted.  It is not allowed
1623         to request all users on some server.  The WHOIS requests must 
1624         be based on specific nickname request.
1625
1626         The WHOIS request must be always forwarded to router by server
1627         so that all users are searched.  However, the server still must
1628         search its locally connected clients.  The server must send
1629         this command to the server who owns the requested client.  That
1630         server must reply to the command.
1631
1632         Reply messages to the command:
1633
1634         Max Arguments:  7
1635             Arguments:  (1) <Status Payload>       (2) <Client ID> 
1636                         (3) <nickname>[@<server>]  (4) <username@host> 
1637                         (5) <real name>            (6) [<channel list>] 
1638                         (7) [<idle time>]
1639
1640         This command may reply with several command reply messages to
1641         form a list of results.  In this case the status payload will
1642         include STATUS_LIST_START status in the first reply and
1643         STATUS_LIST_END in the last reply to indicate the end of the
1644         list.  If there are only one reply the status is set to normal
1645         STATUS_OK.
1646
1647         The command replies include the Client ID of the nickname,
1648         nickname and servername, username and hostnamea and users real
1649         name.  Client should process these replies only after the last
1650         reply has been received with the STATUS_LIST_END status.  If the
1651         <count> option were defined in the query there will be only
1652         <count> many replies from the server.
1653
1654         Status messages:
1655
1656             SILC_STATUS_OK
1657             SILC_STATUS_LIST_START
1658             SILC_STATUS_LIST_END
1659             SILC_STATUS_ERR_NO_SUCH_NICK
1660             SILC_STATUS_ERR_WILDCARDS
1661             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1662             SILC_STATUS_ERR_TOO_MANY_PARAMS
1663
1664
1665    3    SILC_COMMAND_WHOWAS
1666
1667         Max Arguments:  2
1668             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1669
1670         Whowas.  This command is used to query history information about
1671         specific user.  The user maybe requested by their nickname and 
1672         server name.  The query may find multiple matching users as there
1673         are no unique nicknames in the SILC.  The <count> option maybe
1674         given to narrow down the number of accepted results.  If this
1675         is not defined there are no limit of accepted results.  The query
1676         may also be narrowed down by defining the server name of the 
1677         nickname.
1678
1679         To prevent miss-use of this service wildcards in the nickname
1680         or in the servername are not permitted.  The WHOWAS requests must 
1681         be based on specific nickname request.
1682
1683         The WHOWAS request must be always forwarded to router by server
1684         so that all users are searched.  However, the server still must
1685         search its locally connected clients.
1686
1687         Reply messages to the command:
1688
1689         Max Arguments:  3
1690             Arguments:  (1) <Status Payload>  (2) <nickname>[@<server>]
1691                         (3) <username@host>
1692
1693         This command may reply with several command reply messages to form
1694         a list of results.  In this case the status payload will include
1695         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
1696         the last reply to indicate the end of the list.  If there are only 
1697         one reply the status is set to normal STATUS_OK.
1698
1699         The command replies with nickname and username and hostname.
1700         Every server must keep history for some period of time of its
1701         locally connected clients.
1702
1703         Status messages:
1704
1705             SILC_STATUS_OK
1706             SILC_STATUS_LIST_START
1707             SILC_STATUS_LIST_END
1708             SILC_STATUS_ERR_NO_SUCH_NICK
1709             SILC_STATUS_ERR_WILDCARDS
1710             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1711             SILC_STATUS_ERR_TOO_MANY_PARAMS
1712
1713
1714    4    SILC_COMMAND_IDENTIFY
1715
1716         Max Arguments:  2
1717             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1718
1719         Identify.  Identify command is almost analogous to WHOIS command,
1720         except that it does not return as much information.  Only relevant
1721         information such as Client ID is returned.  This is usually used
1722         to get the Client ID of a client used in the communication with
1723         the client.
1724
1725         The query may find multiple matching users as there are no unique 
1726         nicknames in the SILC.  The <count> option maybe given to narrow 
1727         down the number of accepted results.  If this is not defined there 
1728         are no limit of accepted results.  The query may also be narrowed 
1729         down by defining the server name of the nickname.
1730
1731         To prevent miss-use of this service wildcards in the nickname
1732         or in the servername are not permitted.  It is not allowed
1733         to request all users on some server.  The IDENTIFY requests must 
1734         be based on specific nickname request.
1735
1736         Implementations may not want to give interface access to this
1737         commands as it is hardly a command that would be used a end user.
1738         However, it must be implemented as it is used with private message
1739         sending.
1740
1741         The IDENTIFY must be always forwarded to router by server so that
1742         all users are searched.  However, server must still search its
1743         locally connected clients.
1744
1745         Reply messages to the command:
1746
1747         Max Arguments:  4
1748             Arguments:  (1) <Status Payload>         (2) <Client ID>
1749                         (3) [<nickname>[@<server>]]  (4) [<username@host>]
1750
1751         This command may reply with several command reply messages to form
1752         a list of results.  In this case the status payload will include
1753         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
1754         the last reply to indicate the end of the list.  If there are only 
1755         one reply the status is set to normal STATUS_OK.
1756
1757         The command replies with Client ID of the nickname and if more
1758         information is available it may reply with nickname and username
1759         and hostname.  If the <count> option were defined in the query
1760         there will be only <count> many replies from the server.
1761
1762         Status messages:
1763
1764             SILC_STATUS_OK
1765             SILC_STATUS_LIST_START
1766             SILC_STATUS_LIST_END
1767             SILC_STATUS_ERR_NO_SUCH_NICK
1768             SILC_STATUS_ERR_WILDCARDS
1769             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1770             SILC_STATUS_ERR_TOO_MANY_PARAMS
1771
1772
1773    5    SILC_COMMAND_NICK
1774
1775         Max Arguments:  1
1776             Arguments:  (1) <nickname>
1777
1778         Set/change nickname.  This command is used to set nickname for
1779         user.  There is no limit of the length of the nickname in SILC.
1780         Nickname must not include any spaces (` '), non-printable
1781         characters, commas (`,') and any wildcard characters.  Note:
1782         nicknames in SILC are case-sensitive which must be taken into
1783         account when searching clients by nickname.
1784
1785         Reply messages to the command:
1786
1787         Max Arguments:  2
1788             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
1789
1790         This command is replied always with New ID Payload that is
1791         generated by the server every time user changes their nickname.
1792         Client receiving this payload must start using the received
1793         Client ID as its current valid Client ID.  The New ID Payload
1794         is described in [SILC2].
1795
1796         Status messages:
1797
1798             SILC_STATUS_OK
1799             SILC_STATUS_ERR_WILDCARDS
1800             SILC_STATUS_ERR_NICKNAME_IN_USE
1801             SILC_STATUS_ERR_BAD_NICKNAME
1802             SILC_STATUS_ERR_NOT_REGISTERED
1803             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1804             SILC_STATUS_ERR_TOO_MANY_PARAMS
1805
1806
1807    6    SILC_COMMAND_LIST
1808
1809         Max Arguments:  2
1810             Arguments:  (1) [<Channel ID>] [<server>]
1811
1812         The list command is used to list channels and their topics on
1813         current server.  If the <Channel ID> parameter is used, only the
1814         status of that channel is displayed.  Secret channels are not
1815         listed at all.  Private channels are listed with status indicating
1816         that the channel is private.
1817
1818         If the <server> argument is specified the specified server's
1819         channels are listed.  In this case the command must be sent to
1820         the server who owns the channel that was requested.
1821
1822         Reply messages to the command:
1823
1824         Max Arguments:  3
1825             Arguments:  (1) <Status Payload>  (2) <channel>
1826                         (3) <topic>
1827
1828         This command may reply with several command reply messages to form
1829         a list of results.  In this case the status payload will include
1830         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
1831         the last reply to indicate the end of the list.  If there are only 
1832         one reply the status is set to normal STATUS_OK.
1833
1834         This command replies with channel name and the topic of the
1835         channel.  If the channel is private channel the <topic> includes
1836         "*private*" string.
1837
1838         Status messages:
1839
1840             SILC_STATUS_OK
1841             SILC_STATUS_LIST_START
1842             SILC_STATUS_LIST_END
1843             SILC_STATUS_ERR_WILDCARDS
1844             SILC_STATUS_ERR_NOT_REGISTERED
1845             SILC_STATUS_ERR_TOO_MANY_PARAMS
1846             SILC_STATUS_ERR_NO_SUCH_CHANNEL
1847             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1848             SILC_STATUS_ERR_NO_SUCH_SERVER
1849
1850
1851
1852
1853
1854
1855
1856    7    SILC_COMMAND_TOPIC
1857
1858         Max Arguments:  2
1859             Arguments:  (1) <Channel ID>  (2) [<server>]]
1860
1861         This command is used to change or view the topic of a channel.
1862         The topic for channel <Channel ID> is returned if there is no
1863         <topic> given.  If the <topic> parameter is present, the topic
1864         for that channel will be changed, if the channel modes permit
1865         this action.
1866
1867         Reply messages to the command:
1868
1869         Max Arguments:  2
1870             Arguments:  (1) <Status Payload>  (2) [<topic>]
1871
1872         The command may reply with the topic of the channel if it is
1873         set.
1874
1875         Status messages:
1876
1877             SILC_STATUS_OK
1878             SILC_STATUS_ERR_NOT_ON_CHANNEL
1879             SILC_STATUS_ERR_WILDCARDS
1880             SILC_STATUS_ERR_NOT_REGISTERED
1881             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1882             SILC_STATUS_ERR_NO_SUCH_CHANNEL
1883             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1884             SILC_STATUS_ERR_NO_CHANNEL_ID
1885             SILC_STATUS_ERR_BAD_CHANNEL_ID
1886             SILC_STATUS_ERR_TOO_MANY_PARAMS
1887             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1888
1889
1890    8    SILC_COMMAND_INVITE
1891
1892         Max Arguments:  2
1893             Arguments:  (1) <Client ID>  (2) <channel>
1894
1895         This command is used to invite other clients to join to the
1896         channel.  There is no requirement that the channel the target
1897         client is being invited to must exist or be a valid channel.
1898         The <Client ID> argument is the target client's ID that is being
1899         invited.
1900
1901         Reply messages to the command:
1902
1903
1904         Max Arguments:  2
1905             Arguments:  (1) <Status Payload>
1906
1907         This command replies only with Status Payload.
1908
1909         Status messages:
1910
1911             SILC_STATUS_OK
1912             SILC_STATUS_ERR_NOT_ON_CHANNEL
1913             SILC_STATUS_ERR_WILDCARDS
1914             SILC_STATUS_ERR_NOT_REGISTERED
1915             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1916             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1917             SILC_STATUS_ERR_TOO_MANY_PARAMS
1918             SILC_STATUS_ERR_NO_RECIPIENT
1919             SILC_STATUS_ERR_USER_ON_CHANNEL
1920             SILC_STATUS_ERR_NO_CLIENT_ID
1921
1922
1923    9    SILC_COMMAND_QUIT
1924
1925         Max Arguments:  1
1926             Arguments:  (1) [<quit message>]
1927
1928         This command is used by client to end SILC session.  The server
1929         must close the connection to a client which sends this command.
1930         if <quit message> is given it will be sent to other clients on
1931         channel if the client is on channel when quitting.
1932
1933         Reply messages to the command:
1934
1935         This command does not reply anything.
1936
1937
1938    10   SILC_COMMAND_KILL
1939
1940         Max Arguments:  2
1941             Arguments:  (1) <Client ID>  (2) [<comment>]
1942
1943         This command is used by SILC operators to remove a client from
1944         SILC network.  The removing has temporary effects and client may
1945         reconnect to SILC network.  The <Client ID> is the client to be
1946         removed from SILC.  The <comment> argument may be provided to 
1947         give to the removed client some information why it was removed
1948         from the network.
1949
1950         Reply messages to the command:
1951
1952         Max Arguments:  1
1953             Arguments:  (1) <Status Payload>
1954
1955         This command replies only with Status Payload.
1956
1957         Status messages:
1958
1959             SILC_STATUS_OK
1960             SILC_STATUS_ERR_WILDCARDS
1961             SILC_STATUS_ERR_NOT_REGISTERED
1962             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1963             SILC_STATUS_ERR_TOO_MANY_PARAMS
1964             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1965             SILC_STATUS_ERR_NO_CLIENT_ID
1966
1967
1968    11   SILC_COMMAND_INFO
1969
1970         Max Arguments:  1
1971             Arguments:  (1) [<server>]
1972
1973         This command is used to fetch various information about a server.
1974         If <server> argument is specified the command must be sent to
1975         the requested server.
1976
1977         Reply messages to the command:
1978
1979         Max Arguments:  3
1980             Arguments:  (1) <Status Payload>  (2) <Server ID>
1981                         (3) <string>
1982
1983         This command replies with the Server ID of the server and a
1984         string which tells the information about the server.
1985
1986         Status messages:
1987
1988             SILC_STATUS_OK
1989             SILC_STATUS_ERR_WILDCARDS
1990             SILC_STATUS_ERR_NOT_REGISTERED
1991             SILC_STATUS_ERR_TOO_MANY_PARAMS
1992             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
1993             SILC_STATUS_ERR_NO_SUCH_SERVER
1994
1995
1996
1997
1998
1999
2000    12   SILC_COMMAND_CONNECT
2001
2002         Max Arguments:  2
2003             Arguments:  (1) <Server ID>  
2004                         (2) [<remote server/router>[:<port>]]
2005
2006         This command is used by operators to force a server to try to
2007         establish a new connection to another router (if the connecting
2008         server is normal server) or server (if the conneceting server is
2009         router server).  Operator may specify the server/router to be
2010         connected by setting <remote server> argument.
2011
2012         Reply messages to the command:
2013
2014         Max Arguments:  1
2015             Arguments:  (1) <Status Payload>
2016
2017         This command replies only with Status Payload.
2018
2019         Status messages:
2020
2021             SILC_STATUS_OK
2022             SILC_STATUS_ERR_WILDCARDS
2023             SILC_STATUS_ERR_NOT_REGISTERED
2024             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2025             SILC_STATUS_ERR_TOO_MANY_PARAMS
2026             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2027             SILC_STATUS_ERR_NO_SERVER_PRIV
2028             SILC_STATUS_ERR_NO_ROUTER_PRIV
2029
2030
2031    13   SILC_COMMAND_PING
2032
2033         Max Arguments:  1
2034             Arguments:  (1) <Server ID>
2035
2036         This command is used by clients to test the communication
2037         channel to its server if client suspects that the communication
2038         is not working correctly.  The <Server ID> is the ID of the
2039         server the client is connected to.
2040
2041         Reply messages to the command:
2042
2043         Max Arguments:  1
2044             Arguments:  (1) <Status Payload>
2045
2046         This command replies only with Status Payload.  Server returns
2047         SILC_STATUS_OK in Status Payload if pinging was successful.
2048
2049         Status messages:
2050
2051             SILC_STATUS_OK
2052             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2053             SILC_STATUS_ERR_TOO_MANY_PARAMS
2054             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2055             SILC_STATUS_ERR_NOT_REGISTERED
2056
2057
2058    14   SILC_COMMAND_OPER
2059
2060         Max Arguments:  2
2061             Arguments:  (1) <username>  (2) <authentication data>
2062
2063         This command is used by normal client to obtain server operator
2064         privileges on some server or router.  Note that router operator
2065         has router privileges that supersedes the server operator
2066         privileges and this does not obtain those privileges.  Client
2067         must use SILCOPER command to obtain router level privileges.
2068
2069         The <username> is the username set in the server configurations
2070         as operator.  The <authentication data> is the data that the
2071         client is authenticated against.  It may be passphrase prompted
2072         for user on client's screen or it may be public key
2073         authentication data (data signed with private key), or 
2074         certificate.
2075
2076         Reply messages to the command:
2077
2078         Max Arguments:  1
2079             Arguments:  (1) <Status Payload>
2080
2081         This command replies only with Status Payload.
2082
2083         Status messages:
2084
2085             SILC_STATUS_OK
2086             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2087             SILC_STATUS_ERR_TOO_MANY_PARAMS
2088             SILC_STATUS_ERR_NOT_REGISTERED
2089             SILC_STATUS_ERR_BAD_PASSWORD
2090             SILC_STATUS_ERR_AUTH_FAILED
2091
2092
2093
2094
2095
2096
2097
2098    15   SILC_COMMAND_JOIN
2099
2100         Max Arguments:  3
2101             Arguments:  (1) <channel>  (2) [<passphrase>] 
2102                         (3) [<cipher>]
2103
2104         Join to channel/create new channel.  This command is used to
2105         join to a channel.  If the channel does not exist the channel is
2106         created on the server receiving the join request.  The channel 
2107         may be protected with passphrase.  If this is the case the 
2108         passphrase must be sent along the join command.
2109
2110         The name of the <channel> must not include any spaces (` '),
2111         non-printable characters, commas (`,') or any wildcard characters.
2112
2113         Cipher to be used to secure the traffic on the channel may be
2114         requested by sending the name of the requested <cipher>.  This
2115         is used only if the channel does not exist and is created.  If
2116         the channel already exists the cipher set previously for the
2117         channel will be used to secure the traffic.
2118
2119         The server must check whether the user is allowed to join to
2120         the requested channel.  Various modes set to the channel affect
2121         the ability of the user to join the channel.  These conditions
2122         are:
2123
2124             o  The user must be invited to the channel if the channel
2125                is invite-only channel.
2126
2127             o  The Client ID/nickname/username/hostname must not match
2128                any active bans.
2129
2130             o  The correct passphrase must be provided if passphrase 
2131                is set to the channel.
2132
2133             o  The user count limit, if set, must not be reached.
2134
2135         Reply messages to the command:
2136
2137         Max Arguments:  5
2138             Arguments:  (1) <Status Payload>  (2) <channel> 
2139                         (3) <Channel ID>      (4) <channel mode mask>
2140                         (5) [<topic>]
2141
2142         This command replies with the channel name requested by the
2143         client, channel ID of the channel and topic of the channel
2144         if it exists.  It also replies with the channel mode mask
2145         which tells all the modes set on the channel.  If the
2146         channel is created the mode mask is zero (0).
2147
2148         Client must not start transmitting to the channel even after
2149         server has replied to this command.  Client is permitted to 
2150         start transmitting on channel after server has sent packet 
2151         SILC_PACKET_CHANNEL_KEY to the client.
2152
2153         Status messages:
2154
2155             SILC_STATUS_OK
2156             SILC_STATUS_ERR_WILDCARDS
2157             SILC_STATUS_ERR_NOT_REGISTERED
2158             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2159             SILC_STATUS_ERR_TOO_MANY_PARAMS
2160             SILC_STATUS_ERR_BAD_PASSWORD
2161             SILC_STATUS_ERR_CHANNEL_IS_FULL
2162             SILC_STATUS_ERR_NOT_INVITED
2163             SILC_STATUS_ERR_BANNED_FROM_CHANNEL
2164             SILC_STATUS_ERR_BAD_CHANNEL
2165             SILC_STATUS_ERR_USER_ON_CHANNEL
2166
2167
2168    16   SILC_COMMAND_MOTD
2169
2170         Max Arguments:  1
2171             Arguments:  (1) <server>
2172
2173         This command is used to query the Message of the Day of a server.
2174
2175         Reply messages to the command:
2176
2177         Max Arguments:  2
2178             Arguments:  (1) <Status Payload>  (2) [<motd>]
2179
2180         This command replies with the motd message if it exists.
2181
2182         Status messages:
2183
2184             SILC_STATUS_OK
2185             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2186             SILC_STATUS_ERR_TOO_MANY_PARAMS
2187             SILC_STATUS_ERR_NOT_REGISTERED
2188             SILC_STATUS_ERR_NO_SUCH_SERVER
2189
2190
2191
2192
2193
2194
2195    17   SILC_COMMAND_UMODE
2196
2197         Max Arguments:  2
2198             Arguments:  (1) <Client ID>  (2) <client mode mask>
2199
2200         This command is used by client to set/unset modes for itself.
2201         However, there are some modes that the client may not set itself,
2202         but they will be set by server.  However, client may unset any
2203         mode.  Modes may be masked together ORing them thus having
2204         several modes set.  Client must keep its client mode mask
2205         locally so that the mode setting/unsetting would work without
2206         problems.  Client may change only its own modes.
2207
2208         Following client modes are defined:
2209
2210            0x0000    SILC_UMODE_NONE
2211
2212               No specific mode for client.  This is the initial
2213               setting when new client is created.  The client is
2214               normal client now.
2215
2216
2217            0x0001    SILC_UMODE_SERVER_OPERATOR
2218
2219               Marks the user as server operator.  Client cannot
2220               set this mode itself.  Server sets this mode to the
2221               client when client attains the server operator
2222               privileges by SILC_COMMAND_OPER command.  Client
2223               may unset the mode itself.
2224
2225
2226            0x0002    SILC_UMODE_ROUTER_OPERATOR
2227
2228               Marks the user as router (SILC) operator.  Client
2229               cannot this mode itself.  Router sets this mode to
2230               the client when client attains the router operator
2231               privileges by SILC_COMMAND_SILCOPER command.  Client
2232               may unset the mode itself.
2233
2234         Reply messages to the command:
2235
2236         Max Arguments:  2
2237             Arguments:  (1) <Status Payload>  (2) <client mode mask>
2238
2239         This command replies with the changed client mode mask that
2240         the client is required to keep locally.
2241
2242
2243         Status messages:
2244
2245             SILC_STATUS_OK
2246             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2247             SILC_STATUS_ERR_TOO_MANY_PARAMS
2248             SILC_STATUS_ERR_NOT_REGISTERED
2249             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2250             SILC_STATUS_ERR_BAD_CLIENT_ID
2251             SILC_STATUS_ERR_NOT_YOU
2252             SILC_STATUS_ERR_UNKNOWN_MODE
2253             SILC_STATUS_ERR_NO_RECIPIENT
2254             SILC_STATUS_ERR_NO_CLIENT_ID
2255
2256
2257    18   SILC_COMMAND_CMODE
2258
2259         Max Arguments:  6
2260             Arguments:  (1) <Channel ID>    (2) <channel mode mask>
2261                         (3) [<user limit>]  (4) [<passphrase>]
2262                         (5) [<Client ID>]   (6) [<cipher>[:<key len>]]
2263
2264         This command is used by client to set or change channel flags on
2265         a channel.  Channel has several modes that set various properties
2266         of a channel.  Modes may be masked together by ORing them thus
2267         having several modes set.  The <Channel ID> is the ID of the
2268         target channel.  The client changing channel mode must be on
2269         the same channel and poses sufficient privileges to be able to
2270         change the mode.
2271
2272         Following channel modes are defined:
2273
2274            0x0000    SILC_CMODE_NONE
2275
2276               No specific mode on channel.  This is the default when
2277               channel is created.  This means that channel is just plain
2278               normal channel.
2279
2280
2281            0x0001    SILC_CMODE_PRIVATE
2282
2283               Channel is private channel.  Private channels are shown
2284               in the channel list listed with SILC_COMMAND_LIST command
2285               with indicatioin that the channel is private.  Also,
2286               client on private channel will no be detected to be on
2287               the channel as the channel is not shown in the client's
2288               currently joined channel list.  Channel founder and 
2289               channel operator may set/unset this mode.
2290
2291               Typical implementation would use [+|-]p on user interface
2292               to set/unset this mode.
2293
2294
2295            0x0002    SILC_CMODE_SECRET
2296
2297               Channel is secret channel.  Secret channels are not shown
2298               in the list listed with SILC_COMMAND_LIST command.  Secret
2299               channels can be considered to be invisible channels.
2300               Channel founder and channel operator may set/unset this
2301               mode.
2302
2303               Typical implementation would use [+|-]s on user interface
2304               to set/unset this mode.
2305
2306
2307            0x0004    SILC_CMODE_PRIVKEY
2308
2309               Channel uses private channel key to protect the traffic
2310               on the channel.  When this mode is set the client will be
2311               responsible to set the key it wants to use to encrypt and
2312               decrypt the traffic on channel.  Server generated channel
2313               keys are not used at all.  This mode provides additional
2314               security as clients on channel may agree to use private
2315               channel key that even servers do not know.  Naturally,
2316               this requires that every client on the channel knows
2317               the key before hand (it is considered to be pre-shared-
2318               key).  This specification does not define how the private
2319               channel key is set as it is entirely local setting on
2320               client end.
2321
2322               As it is local setting it is possible to have several
2323               private channel keys on one channel.  In this case several
2324               clients can talk on same channel but only those clients
2325               that share the key with the message sender will be able
2326               to hear the talking.  Client should not display those
2327               message for the end user that it is not able to decrypt
2328               when this mode is set.
2329
2330               Only channel founder may set/unset this mode.  If this
2331               mode is unset the server will distribute new channel
2332               key to all clients on the channel which will be used
2333               thereafter.
2334
2335               Typical implementation would use [+|-]k on user interface
2336               to set/unset this mode.
2337
2338
2339            0x0008    SILC_CMODE_INVITE
2340
2341               Channel is invite only channel.  Client may join to this
2342               channel only if it is invited to the channel.  Channel
2343               founder and channel operator may set/unset this mode.
2344
2345               Typical implementation would use [+|-]i on user interface
2346               to set/unset this mode.
2347
2348
2349            0x0010    SILC_CMODE_TOPIC
2350
2351               The topic of the channel may only be set by client that
2352               is channel founder or channel operator.  Normal clients
2353               on channel will not be able to set topic when this mode
2354               is set.  Channel founder and channel operator may set/
2355               unset this mode.
2356
2357               Typical implementation would use [+|-]t on user interface
2358               to set/unset this mode.
2359
2360
2361            0x0020    SILC_CMODE_ULIMIT
2362
2363               User limit has been set to the channel.  New clients
2364               may not join to the channel when the limit set is
2365               reached.  Channel founder and channel operator may set/
2366               unset the limit.  The <user limit> argument is the
2367               number of limited users.
2368
2369               Typical implementation would use [+|-]l on user interface
2370               to set/unset this mode.
2371
2372
2373            0x0040    SILC_CMODE_PASSPHRASE
2374
2375               Passphrase has been set to the channel.  Client may
2376               join to the channel only if it is able to provide the
2377               correct passphrase.  Setting passphrases to channel
2378               is entirely safe as all commands are protected in the
2379               SILC network.  Only channel founder may set/unset
2380               the passphrase.  The <passphrase> argument is the
2381               set passphrase.
2382
2383               Typical implementation would use [+|-]a on user interface
2384               to set/unset this mode.
2385
2386
2387            0x0080    SILC_CMODE_BAN
2388
2389               Ban mask has been set to the channel.  The ban mask
2390               may be used to ban specific clients to join the channel.
2391               The <ban mask> argument is the set ban mask.  When
2392               unsetting a ban mask the mask must be provided as
2393               argument.  Channel founder and channel operator may
2394               set/unset this mode.  Channel founder may not be
2395               added to the ban list.
2396
2397               Typical implementation would use [+|-]b on user interface
2398               to set/unset this mode.
2399
2400         
2401            0x0100    SILC_CMODE_OPERATOR
2402
2403               Sets channel operator privileges on the channel for a
2404               client on the channel.  The <Client ID> argument is the
2405               target client on the channel.  Channel founder and
2406               channel operator may set/unset (promote/demote) this
2407               mode.
2408
2409               Typical implementation would use [+|-]o on user interface
2410               to set/unset this mode.
2411
2412
2413            0x0200    SILC_CMODE_CIPHER
2414
2415               Sets specific cipher to be used to protect channel
2416               traffic.  The <cipher> argument is the requested cipher.
2417               When set or unset the server must re-generate new
2418               channel key.  If <key len> argument is specified with
2419               <cipher> argument the new key is generated of <key len>
2420               length.
2421
2422               Typical implementation would use [+|-]c on user interface
2423               to set/unset this mode.
2424
2425
2426         To make the mode system work, client must keep the channel mode
2427         mask locally so that the mode setting and unsetting would work
2428         without problems.  The client receives the initial channel mode
2429         mask when it joins to the channel.  When the mode changes on
2430         channel the server distributes the changed channel mode mask to
2431         all clients on the channel by sending SILC_COMMAND_CMODE command
2432         reply packet.
2433
2434
2435         Reply messages to the command:
2436
2437         Max Arguments:  2
2438             Arguments:  (1) <Status Payload>  (2) <channel mode mask>
2439
2440         This command replies with the changed channel mode mask that
2441         client is required to keep locally.  The same mask is also
2442         sent to all clients on channel by sending additional command
2443         reply to them.
2444
2445         Status messages:
2446
2447             SILC_STATUS_OK
2448             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2449             SILC_STATUS_ERR_TOO_MANY_PARAMS
2450             SILC_STATUS_ERR_NOT_REGISTERED
2451             SILC_STATUS_ERR_NOT_ON_CHANNEL
2452             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2453             SILC_STATUS_ERR_BAD_CHANNEL_ID
2454             SILC_STATUS_ERR_NO_CHANNEL_ID
2455             SILC_STATUS_ERR_NO_CHANNEL_PRIV
2456             SILC_STATUS_ERR_UNKNOWN_MODE
2457             SILC_STATUS_ERR_NO_CLIENT_ID
2458
2459
2460    19   SILC_COMMAND_KICK
2461
2462         Max Arguments:  3
2463             Arguments:  (1) <channel>  (2) <Client ID>  
2464                         (3) [<comment>]
2465
2466         This command is used by channel operators to remove a client from
2467         channel.  The <channel> argument is the channel the client to be
2468         removed is on currently.  Note that the "kicker" must be on the same
2469         channel.  If <comment> is provided it will be sent to the removed
2470         client.
2471
2472         Reply messages to the command:
2473
2474         Max Arguments:  1
2475             Arguments:  (1) <Status Payload>
2476
2477         This command replies only with Status Payload.
2478
2479         Status messages:
2480
2481             SILC_STATUS_OK
2482             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2483             SILC_STATUS_ERR_TOO_MANY_PARAMS
2484             SILC_STATUS_ERR_NOT_REGISTERED
2485             SILC_STATUS_ERR_NO_SUCH_CHANNEL
2486             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2487             SILC_STATUS_ERR_NO_CHANNEL_PRIV
2488             SILC_STATUS_ERR_NO_CLIENT_ID
2489
2490
2491    20   SILC_COMMAND_RESTART
2492
2493         Max Arguments:  0
2494             Arguments:  None
2495
2496         This command may only be used by server operator to force a
2497         server to restart itself.
2498
2499         Reply messages to the command:
2500
2501         Max Arguments:  1
2502             Arguments:  (1) <Status Payload>
2503
2504         This command replies only with Status Payload.
2505
2506         Status messages:
2507
2508             SILC_STATUS_OK
2509             SILC_STATUS_ERR_NOT_REGISTERED
2510             SILC_STATUS_ERR_NO_SERVER_PRIV
2511
2512
2513    21   SILC_COMMAND_CLOSE
2514
2515         Max Arguments:  1
2516             Arguments:  (1) <Server ID>
2517
2518         This command is used only by operator to close connection to a
2519         remote site.  The <Server ID> argument is the ID of the remote
2520         site and must be valid.
2521
2522         Reply messages to the command:
2523
2524         Max Arguments:  1
2525             Arguments:  (1) <Status Payload>
2526
2527         This command replies only with Status Payload.
2528
2529
2530
2531         Status messages:
2532
2533             SILC_STATUS_OK
2534             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2535             SILC_STATUS_ERR_TOO_MANY_PARAMS
2536             SILC_STATUS_ERR_NOT_REGISTERED
2537             SILC_STATUS_ERR_NO_SUCH_SERVER
2538             SILC_STATUS_ERR_NO_SERVER_PRIV
2539             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2540
2541
2542    22   SILC_COMMAND_DIE
2543
2544         Max Arguments:  0
2545             Arguments:  None
2546
2547         This command is used only by operator to shutdown the server.
2548         All connections to the server will be closed and the server is
2549         shutdown.
2550
2551         Reply messages to the command:
2552
2553         Max Arguments:  1
2554             Arguments:  (1) <Status Payload>
2555
2556         This command replies only with Status Payload.
2557
2558         Status messages:
2559
2560             SILC_STATUS_OK
2561             SILC_STATUS_ERR_NOT_REGISTERED
2562             SILC_STATUS_ERR_NO_SERVER_PRIV
2563
2564
2565    23   SILC_COMMAND_SILCOPER
2566
2567         Max Arguments:  2
2568             Arguments:  (1) <username>  (2) <authentication data>
2569
2570         This command is used by normal client to obtain router operator
2571         privileges (also known as SILC operator) on some router.  Note
2572         that router operator has router privileges that supersedes the
2573         server operator privileges.
2574
2575         The <username> is the username set in the server configurations
2576         as operator.  The <authentication data> is the data that the
2577         client is authenticated against.  It may be passphrase prompted
2578         for user on client's screen or it may be public key
2579         authentication data (data signed with private key), or 
2580         certificate.
2581
2582         Difference between router operator and server operator is that
2583         router operator is able to handle cell level properties while
2584         server operator (even on router server) is able to handle only
2585         local properties, such as, local connections and normal server
2586         administration.
2587
2588         Reply messages to the command:
2589
2590         Max Arguments:  1
2591             Arguments:  (1) <Status Payload>
2592
2593         This command replies only with Status Payload.
2594
2595         Status messages:
2596
2597             SILC_STATUS_OK
2598             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2599             SILC_STATUS_ERR_TOO_MANY_PARAMS
2600             SILC_STATUS_ERR_NOT_REGISTERED
2601             SILC_STATUS_ERR_BAD_PASSWORD
2602             SILC_STATUS_ERR_AUTH_FAILED
2603
2604
2605    24   SILC_COMMAND_LEAVE
2606
2607         Max Arguments:  1
2608             Arguments:  (1) <Channel ID>
2609
2610         This command is used by client to leave a channel the client is
2611         joined to.  After a client has leaved the channel the server
2612         must create new key for the channel and distribute to all clients
2613         still currently on the channel.
2614
2615         Reply messages to the command:
2616
2617         Max Arguments:  1
2618             Arguments:  (1) <Status Payload>
2619
2620         This command replies only with Status Payload.
2621
2622         Status messages:
2623
2624             SILC_STATUS_OK
2625             SILC_STATUS_ERR_NOT_REGISTERED
2626             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2627             SILC_STATUS_ERR_TOO_MANY_PARAMS
2628             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2629             SILC_STATUS_ERR_BAD_CHANNEL_ID
2630             SILC_STATUS_ERR_NO_CHANNEL_ID
2631
2632
2633    25   SILC_COMMAND_NAMES
2634
2635         Max Arguments:  1
2636             Arguments:  (1) <Channel ID>
2637
2638         This command is used to list user names currently on the requested
2639         channel; argument <Channel ID>.  The server must resolve the
2640         user names and send a comma (`,') separated list of user names
2641         on the channel.  Server or router may resolve the names by sending
2642         SILC_COMMAND_WHOIS commands.
2643
2644         If the requested channel is a private or secret channel, this
2645         command must not send the list of users, as private and secret
2646         channels cannot be seen by outside.  In this case the returned
2647         name list may include a indication that the server could not 
2648         resolve the names of the users on the channel.
2649
2650         Reply messages to the command:
2651
2652         Max Arguments:  2
2653             Arguments:  (1) <Status Payload>  (2) <name list>
2654
2655         This command replies with the comma separated list of users on
2656         the channel.
2657
2658         Status messages:
2659
2660             SILC_STATUS_OK
2661             SILC_STATUS_ERR_NOT_REGISTERED
2662             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2663             SILC_STATUS_ERR_TOO_MANY_PARAMS
2664             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2665             SILC_STATUS_ERR_BAD_CHANNEL_ID
2666             SILC_STATUS_ERR_NO_CHANNEL_ID
2667             SILC_STATUS_ERR_NOT_ON_CHANNEL
2668
2669
2670    26 - 254
2671
2672         Currently undefined commands.
2673
2674
2675    255  SILC_COMMAND_MAX
2676
2677         Reserved command.  This must not be sent.
2678 .in 3
2679
2680
2681 .ti 0
2682 5.3 SILC Command Status Types
2683
2684 .ti 0
2685 5.3.1 SILC Command Status Payload
2686
2687 Command Status Payload is sent in command reply messages to indicate
2688 the status of the command.  The payload is one of argument in the
2689 command thus this is the data area in Command Argument Payload described
2690 in [SILC2].  The payload is only 2 bytes of length.  Following diagram
2691 represents the Command Status Payload (field is always in MSB order).
2692
2693
2694 .in 21
2695 .nf
2696                      1
2697  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2698 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2699 |        Status Message         |
2700 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2701 .in 3
2702
2703 .ce
2704 Figure 5:  SILC Command Status Payload
2705
2706
2707 .in 6
2708 o Status Message (2 bytes) - Indicates the status message.
2709   All Status messages are described in the next section.
2710 .in 3
2711
2712
2713 .ti 0
2714 5.3.2 SILC Command Status List
2715
2716 Command Status messages are returned in the command reply messages
2717 to indicate whether the command were executed without errors.  If error
2718 has occured the status tells which error occured.  Status payload only
2719 sends numeric reply about the status.  Receiver of the payload must
2720 convert the numeric values into human readable error messages.  The
2721 list of status messages below has an example human readable error
2722 messages that client may display for the user.
2723
2724 List of all defined command status messages following.
2725
2726 .in 0
2727    Generic status messages:
2728
2729    0    SILC_STATUS_OK
2730
2731         Ok status.  Everything went Ok.  The status payload maybe
2732         safely ignored in this case.
2733
2734    1    SILC_STATUS_LIST_START
2735
2736         Start of the list.  There will be several command replies and
2737         this reply is the start of the list.
2738
2739    2    SILC_STATUS_LIST_END
2740
2741         End of the list.  There were several command replies and this
2742         reply is the last of the list.  There won't be other replies
2743         beloning to this list after this one.
2744
2745    3 - 9
2746
2747         Currently undefined and has been reserved for the future.
2748
2749
2750    Error status message:
2751
2752    10   SILC_STATUS_ERR_NO_SUCH_NICK
2753
2754         "No such nickname".  Requested nickname does not exist.
2755
2756    11   SILC_STATUS_ERR_NO_SUCH_CHANNEL
2757
2758         "No such channel".  Requested channel name does not exist.
2759
2760    12   SILC_STATUS_ERR_NO_SUCH_SERVER
2761
2762         "No such server".  Requested server name does not exist.
2763
2764    13   SILC_STATUS_ERR_TOO_MANY_TARGETS
2765
2766         "Duplicate recipients. No message delivered".  Message were
2767         tried to be sent to recipient which has several occurrences in 
2768         the recipient list.
2769
2770    14   SILC_STATUS_ERR_NO_RECIPIENT
2771
2772         "No recipient given".  Command required recipient which was
2773         not provided.
2774
2775    15   SILC_STATUS_ERR_UNKNOWN_COMMAND
2776
2777         "Unknown command".  Command sent to server is unknown by the
2778         server.
2779
2780
2781
2782    16   SILC_STATUS_ERR_WILDCARDS
2783
2784         "Wildcards cannot be used".  Wildcards were provided but they
2785         weren't permitted.
2786
2787    17   SILC_STATUS_ERR_NO_CLIENT_ID
2788
2789         "No Client ID given".  Client ID were expected as command
2790         parameter but were not found.
2791
2792    18   SILC_STATUS_ERR_NO_CHANNEL_ID
2793
2794         "No Channel ID given".  Channel ID were expected as command
2795         parameter but were not found.
2796
2797    19   SILC_STATUS_ERR_BAD_CLIENT_ID
2798
2799         "Bad Client ID".  Client ID provided were erroneous.
2800
2801    20   SILC_STATUS_ERR_BAD_CHANNEL_ID
2802
2803         "Bad Channel ID".  Channel ID provided were erroneous.
2804
2805    21   SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2806
2807         "No such Client ID".  Client ID provided does not exist.
2808
2809
2810    22   SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2811
2812         "No such Channel ID".  Channel ID provided does not exist.
2813
2814    23   SILC_STATUS_ERR_NICKNAME_IN_USE
2815
2816         "Nickname already exists".  Nickname created could not be 
2817         registered because number of same nicknames were already set to
2818         maximum.  This is not expected to happen in real life but is
2819         possible to occur.
2820
2821    24   SILC_STATUS_ERR_NOT_ON_CHANNEL
2822
2823         "You are not on that channel".  The command were specified for
2824         client user is not currently on.
2825
2826    25   SILC_STATUS_ERR_USER_ON_CHANNEL
2827
2828         "User already on channel".  User were invited on channel they
2829         already are on.
2830
2831    26   SILC_STATUS_ERR_NOT_REGISTERED
2832
2833         "You have not registered".  User executed command that requires
2834         the client to be registered on the server before it may be
2835         executed.
2836
2837    27   SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2838
2839         "Not enough parameters".  Command requires more parameters
2840         than provided.
2841
2842    28   SILC_STATUS_ERR_TOO_MANY_PARAMS
2843
2844         "Too many parameters".  Too many parameters were provided
2845         for the command.
2846
2847    29   SILC_STATUS_ERR_PERM_DENIED
2848
2849         "Your host is not among the privileged".  The client tried to
2850         register on server that does not allow this host to connect.
2851
2852    30   SILC_STATUS_ERR_BANNED_FROM_SERVER
2853
2854         "You are banned from this server".  The client tried to register
2855         on server that has explicitly denied this host to connect.
2856
2857    31   SILC_STATUS_ERR_BAD_PASSWORD
2858
2859         "Cannot join channel. Incorrect password".  Password provided for 
2860         channel were not accepted.
2861
2862    32   SILC_STATUS_ERR_CHANNEL_IS_FULL
2863
2864         "Cannot join channel. Channel is full".  The channel is full
2865         and client cannot be joined to it.
2866
2867    33   SILC_STATUS_ERR_NOT_INVITED
2868
2869         "Cannot join channel. You have not been invited".  The channel
2870         is invite only channel and client has not been invited.
2871
2872    34   SILC_STATUS_ERR_BANNED_FROM_CHANNEL
2873
2874         "Cannot join channel. You have been banned".  The client has
2875         been banned from the channel.
2876
2877
2878
2879    35   SILC_STATUS_ERR_UNKNOWN_MODE
2880
2881         "Unknown mode".  Mode provided by the client were unknown to
2882         the server.
2883
2884    36   SILC_STATUS_ERR_NOT_YOU
2885
2886         "Cannot change mode for other users".  User tried to change
2887         someone else's mode.
2888
2889    37   SILC_STATUS_ERR_NO_CHANNEL_PRIV
2890
2891         "Permission denied. You are not channel operator".  Command may 
2892         be executed only by channel operator.
2893
2894    38   SILC_STATUS_ERR_NO_SERVER_PRIV
2895
2896         "Permission denied. You are not server operator".  Command may
2897         be executed only by server operator.
2898
2899    39   SILC_STATUS_ERR_NO_ROUTER_PRIV
2900
2901         "Permission denied. You are not SILC operator".  Command may be
2902         executed only by router (SILC) operator.
2903
2904    40   SILC_STATUS_ERR_BAD_NICKNAME
2905
2906         "Bad nickname".  Nickname requested contained illegal characters
2907         or were malformed.
2908
2909    41   SILC_STATUS_ERR_BAD_CHANNEL
2910
2911         "Bad channel name".  Channel requested contained illegal characters
2912         or were malformed.
2913
2914    42   SILC_STATUS_ERR_AUTH_FAILED
2915
2916         "Authentication failed".  The authentication data sent as 
2917         argument were wrong and thus authentication failed.
2918 .in 3
2919
2920
2921 .ti 0
2922 6 Security Considerations
2923
2924 Security is central to the design of this protocol, and these security
2925 considerations permeate the specification.
2926
2927
2928
2929
2930
2931 .ti 0
2932 7 References
2933
2934 [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
2935              June 2000.
2936
2937 [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication 
2938              Protocols", Internet Draft, June 2000.
2939
2940 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
2941              RFC 1459, May 1993.
2942
2943 [SSH-TRANS]  Ylonen, T., et al, "SSH Transport Layer Protocol", 
2944              Internet Draft.
2945
2946 [PGP]        Callas, J., et al, "OpenPGP Message Format", RFC 2440,
2947              November 1998.
2948
2949 [SPKI]       Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
2950              September 1999.
2951
2952 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key 
2953              Infrastructure, Certificate and CRL Profile", RFC 2459,
2954              January 1999.
2955
2956 [Schneier]   Schneier, B., "Applied Cryptography Second Edition",
2957              John Wiley & Sons, New York, NY, 1996.
2958
2959 [Menezes]    Menezes, A., et al, "Handbook of Applied Cryptography",
2960              CRC Press 1997.
2961
2962 [OAKLEY]     Orman, H., "The OAKLEY Key Determination Protocol",
2963              RFC 2412, November 1998.
2964
2965 [ISAKMP]     Maughan D., et al, "Internet Security Association and
2966              Key Management Protocol (ISAKMP)", RFC 2408, November
2967              1998.
2968
2969 [IKE]        Harkins D., and Carrel D., "The Internet Key Exhange
2970              (IKE)", RFC 2409, November 1998.
2971
2972 [HMAC]       Krawczyk, H., "HMAC: Keyed-Hashing for Message
2973              Authentication", RFC 2104, February 1997.
2974
2975
2976
2977
2978
2979
2980
2981 .ti 0
2982 8 Author's Address
2983
2984 .nf
2985 Pekka Riikonen
2986 Kasarmikatu 11 A4
2987 70110 Kuopio
2988 Finland
2989
2990 EMail: priikone@poseidon.pspt.fi