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