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