d74f969f2e2ae4e8f76725eacf6dcb7e656752b4
[crypto.git] / doc / draft-riikonen-silc-spec-06.nroff
1 .pl 10.0i
2 .po 0
3 .ll 7.2i
4 .lt 7.2i
5 .nr LL 7.2i
6 .nr LT 7.2i
7 .ds LF Riikonen
8 .ds RF FORMFEED[Page %]
9 .ds CF
10 .ds LH Internet Draft
11 .ds RH 25 November 2002
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-06.txt                         25 November 2002
20 Expires: 25 April 2003
21
22 .in 3
23
24 .ce 3
25 Secure Internet Live Conferencing (SILC),
26 Protocol Specification
27 <draft-riikonen-silc-spec-06.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 the SILC network.
60 Three other Internet Drafts relates very closely to this memo;
61 SILC Packet Protocol [SILC2], SILC Key Exchange and Authentication
62 Protocols [SILC3] and SILC Commands [SILC4].
63
64
65
66
67
68
69 .ti 0
70 Table of Contents
71
72 .nf
73 1 Introduction ..................................................  3
74   1.1 Requirements Terminology ..................................  4
75 2 SILC Concepts .................................................  4
76   2.1 SILC Network Topology .....................................  4
77   2.2 Communication Inside a Cell ...............................  6
78   2.3 Communication in the Network ..............................  6
79   2.4 Channel Communication .....................................  7
80   2.5 Router Connections ........................................  8
81 3 SILC Specification ............................................  8
82   3.1 Client ....................................................  9
83       3.1.1 Client ID ...........................................  9
84   3.2 Server .................................................... 10
85       3.2.1 Server's Local ID List .............................. 10
86       3.2.2 Server ID ........................................... 11
87       3.2.3 SILC Server Ports ................................... 12
88   3.3 Router .................................................... 12
89       3.3.1 Router's Local ID List .............................. 13
90       3.3.2 Router's Global ID List ............................. 13
91       3.3.3 Router's Server ID .................................. 14
92   3.4 Channels .................................................. 14
93       3.4.1 Channel ID .......................................... 15
94   3.5 Operators ................................................. 16
95   3.6 SILC Commands ............................................. 16
96   3.7 SILC Packets .............................................. 17
97   3.8 Packet Encryption ......................................... 17
98       3.8.1 Determination of the Source and the Destination ..... 18
99       3.8.2 Client To Client .................................... 18
100       3.8.3 Client To Channel ................................... 20
101       3.8.4 Server To Server .................................... 20
102   3.9 Key Exchange And Authentication ........................... 20
103       3.9.1 Authentication Payload .............................. 21
104   3.10 Algorithms ............................................... 23
105       3.10.1 Ciphers ............................................ 23
106              3.10.1.1 CBC Mode .................................. 24
107              3.10.1.2 CTR Mode .................................. 24
108              3.10.1.3 Randomized CBC Mode ....................... 25
109       3.10.2 Public Key Algorithms .............................. 26
110       3.10.3 Hash Functions ..................................... 26
111       3.10.4 MAC Algorithms ..................................... 27
112       3.10.5 Compression Algorithms ............................. 27
113   3.11 SILC Public Key .......................................... 27
114   3.12 SILC Version Detection ................................... 30
115   3.13 Backup Routers ........................................... 30
116       3.13.1 Switching to Backup Router ......................... 32
117       3.13.2 Resuming Primary Router ............................ 33
118       3.13.3 Discussion on Backup Router Scheme ................. 35
119 4 SILC Procedures ............................................... 36
120   4.1 Creating Client Connection ................................ 36
121   4.2 Creating Server Connection ................................ 38
122       4.2.1 Announcing Clients, Channels and Servers ............ 38
123   4.3 Joining to a Channel ...................................... 39
124   4.4 Channel Key Generation .................................... 41
125   4.5 Private Message Sending and Reception ..................... 41
126   4.6 Private Message Key Generation ............................ 42
127   4.7 Channel Message Sending and Reception ..................... 43
128   4.8 Session Key Regeneration .................................. 43
129   4.9 Command Sending and Reception ............................. 44
130   4.10 Closing Connection ....................................... 44
131   4.11 Detaching and Resuming a Session ......................... 45
132 5 Security Considerations ....................................... 47
133 6 References .................................................... 48
134 7 Author's Address .............................................. 49
135
136
137
138 .ti 0
139 List of Figures
140
141 .nf
142 Figure 1:  SILC Network Topology
143 Figure 2:  Communication Inside cell
144 Figure 3:  Communication Between Cells
145 Figure 4:  Router Connections
146 Figure 5:  SILC Public Key
147 Figure 6:  Counter Block
148
149
150 .ti 0
151 1. Introduction
152
153 This document describes a Secure Internet Live Conferencing (SILC)
154 protocol which provides secure conferencing services over insecure
155 network channel.  SILC is IRC [IRC] like protocol, however, it is 
156 not equivalent to IRC and does not support IRC.  Some of the SILC's
157 features are not found in IRC but in traditional Instant Message (IM)
158 protocols.  SILC combines features from both of these chat protocol
159 styles, and SILC can be implemented as either IRC-like system or
160 IM-like system.
161
162 Strong cryptographic methods are used to protect SILC packets inside
163 the SILC network.  Three other Internet Drafts relates very closely
164 to this memo; SILC Packet Protocol [SILC2], SILC Key Exchange and
165 Authentication Protocols [SILC3] and SILC Commands [SILC4].
166
167 The protocol uses extensively packets as conferencing protocol 
168 requires message and command sending.  The SILC Packet Protocol is
169 described in [SILC2] and should be read to fully comprehend this
170 document and protocol.  [SILC2] also describes the packet encryption
171 and decryption in detail.  The SILC Packet Protocol provides secured
172 and authenticated packets, and the protocol is designed to be compact.
173 This makes SILC also suitable in environment of low bandwidth
174 requirements such as mobile networks.  All packet payloads in SILC
175 can be also compressed.
176
177 The security of SILC protocol, and for any security protocol for that
178 matter, is based on strong and secure key exchange protocol.  The SILC
179 Key Exchange protocol is described in [SILC3] along with connection
180 authentication protocol and should be read to fully comprehend this
181 document and protocol.
182
183 The SILC protocol has been developed to work on TCP/IP network
184 protocol, although it could be made to work on other network protocols
185 with only minor changes.  However, it is recommended that TCP/IP
186 protocol is used under SILC protocol.  Typical implementation would
187 be made in client-server model.
188
189
190 .ti 0
191 1.1 Requirements Terminology
192
193 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, 
194 MAY, and OPTIONAL, when they appear in this document, are to be
195 interpreted as described in [RFC2119].
196
197
198 .ti 0
199 2. SILC Concepts
200
201 This section describes various SILC protocol concepts that forms the 
202 actual protocol, and in the end, the actual SILC network.  The mission
203 of the protocol is to deliver messages from clients to other clients 
204 through routers and servers in secure manner.  The messages may also 
205 be delivered from one client to many clients forming a group, also 
206 known as a channel.
207
208 This section does not focus to security issues.  Instead, basic network 
209 concepts are introduced to make the topology of the SILC network 
210 clear.
211
212
213 .ti 0
214 2.1 SILC Network Topology
215
216 SILC network is a cellular network as opposed to tree style network 
217 topology.  The rationale for this is to have servers that can perform 
218 specific kind of tasks what other servers cannot perform.  This leads 
219 to two kinds of servers; normal SILC servers and SILC routers.
220
221 A difference between normal server and router server is that routers 
222 knows everything about everything in the network.  They also do the 
223 actual routing of the messages to the correct receiver.  Normal servers 
224 knows only about local information and nothing about global information.
225 This makes the network faster as there are less servers that needs to 
226 keep global information up to date at all time.
227
228 This, on the other hand, leads to cellular like network, where routers 
229 are in the center of the cell and servers are connected to the router.
230
231
232 The following diagram represents SILC network topology.
233
234 .in 8
235 .nf
236   ---- ---- ----         ---- ---- ----
237  | S8 | S5 | S4 |       | S7 | S5 | S6 |
238  ----- ---- -----       ----- ---- -----
239 | S7 | S/R1 | S2 | --- | S8 | S/R2 | S4 |
240  ---- ------ ----       ---- ------ ----
241  | S6 | S3 | S1 |       | S1 | S3 | S2 |         ---- ----
242   ---- ---- ----         ---- ---- ----         | S3 | S1 |
243      Cell 1.   \\             Cell 2.  | \\____  ----- -----
244                 |                     |        | S4 | S/R4 |
245     ---- ---- ----         ---- ---- ----       ---- ------
246    | S7 | S4 | S2 |       | S1 | S3 | S2 |      | S2 | S5 |
247    ----- ---- -----       ----- ---- -----       ---- ----
248   | S6 | S/R3 | S1 | --- | S4 | S/R5 | S5 | ____/ Cell 4.
249    ---- ------ ----       ---- ------ ----
250    | S8 | S5 | S3 |       | S6 | S7 | S8 |     ... etc ...
251     ---- ---- ----         ---- ---- ----
252        Cell 3.                Cell 5.
253 .in 3
254
255 .ce
256 Figure 1:  SILC Network Topology
257
258
259 A cell is formed when a server or servers connect to one router.  In
260 SILC network normal server cannot directly connect to other normal
261 server.  Normal server may only connect to SILC router which then
262 routes the messages to the other servers in the cell.  Router servers
263 on the other hand may connect to other routers to form the actual SILC 
264 network, as seen in above figure.  However, router is also normal SILC 
265 server; clients may connect to it the same way as to normal SILC 
266 server.  Normal server also cannot have active connections to more 
267 than one router.  Normal server cannot be connected to two different 
268 cells.  Router servers, on the other hand, may have as many router to 
269 router connections as needed.
270
271 There are many issues in this network topology that needs to be careful
272 about.  Issues like the size of the cells, the number of the routers in 
273 the SILC network and the capacity requirements of the routers.  These
274 issues should be discussed in the Internet Community and additional
275 documents on the issue may be written.
276
277
278 .ti 0
279 2.2 Communication Inside a Cell
280
281 It is always guaranteed that inside a cell message is delivered to the 
282 recipient with at most two server hops.  A client which is connected to
283 server in the cell and is talking on channel to other client connected 
284 to other server in the same cell, will have its messages delivered from 
285 its local server first to the router of the cell, and from the router 
286 to the other server in the cell.
287
288 The following diagram represents this scenario:
289
290
291 .in 25
292 .nf
293 1 --- S1     S4 --- 5
294          S/R
295  2 -- S2     S3
296      /        |
297     4         3
298 .in 3
299
300
301 .ce
302 Figure 2:  Communication Inside cell
303
304
305 Example:  Client 1. connected to Server 1. send message to
306           Client 4. connected to Server 2. travels from Server 1.
307           first to Router which routes the message to Server 2.
308           which then sends it to the Client 4.  All the other
309           servers in the cell will not see the routed message.
310
311
312 If the client is connected directly to the router, as router is also normal
313 SILC server, the messages inside the cell are always delivered only with 
314 one server hop.  If clients communicating with each other are connected 
315 to the same server, no router interaction is needed.  This is the optimal
316 situation of message delivery in the SILC network.
317
318
319 .ti 0
320 2.3 Communication in the Network
321
322 If the message is destined to server that does not belong to local cell 
323 the message is routed to the router server to which the destination 
324 server belongs, if the local router is connected to destination router.
325 If there is no direct connection to the destination router, the local
326 router routes the message to its primary route.  The following diagram
327 represents message sending between cells.
328
329
330
331
332
333 .in 16
334 .nf
335 1 --- S1     S4 --- 5            S2 --- 1
336          S/R - - - - - - - - S/R
337  2 -- S2     S3           S1
338      /        |             \\
339     4         3              2
340
341    Cell 1.               Cell 2.
342 .in 3
343
344
345 .ce
346 Figure 3:  Communication Between Cells
347
348
349 Example:  Client 5. connected to Server 4. in Cell 1. sends message
350           to Client 2. connected to Server 1. in Cell 2. travels
351           from Server 4. to Router which routes the message to
352           Router in Cell 2, which then routes the message to 
353           Server 1.  All the other servers and routers in the
354           network will not see the routed message.
355
356
357 The optimal case of message delivery from the client point of view is
358 when clients are connected directly to the routers and the messages
359 are delivered from one router to the other.
360
361
362 .ti 0 
363 2.4 Channel Communication
364
365 Messages may be sent to group of clients as well.  Sending messages to
366 many clients works the same way as sending messages point to point, from
367 message delivery point of view.  Security issues are another matter
368 which are not discussed in this section.
369
370 Router server handles the message routing to multiple recipients.  If 
371 any recipient is not in the same cell as the sender the messages are 
372 routed further.
373
374 Server distributes the channel message to its local clients which are 
375 joined to the channel.  Router also distributes the message to its 
376 local clients on the channel.
377
378
379
380 .ti 0
381 2.5 Router Connections
382
383 Router connections play very important role in making the SILC like
384 network topology to work.  For example, sending broadcast packets in
385 SILC network require special connections between routers; routers must
386 be connected in a specific way.
387
388 Every router has their primary route which is a connection to another
389 router in the network.  Unless there is only two routers in the network
390 must not routers use each other as their primary routes.  The router
391 connections in the network must form a ring.
392
393 Example with three routers in the network:
394
395
396 .in 16
397 .nf
398     S/R1 - < - < - < - < - < - < - S/R2
399      \\                               /
400       v                             ^
401        \\ - > -  > - S/R3 - > - > - /
402 .in 3
403
404
405 .ce
406 Figure 4:  Router Connections
407
408
409 Example:  Network with three routers.  Router 1. uses Router 2. as its
410           primary router.  Router 2. uses Router 3. as its primary router,
411           and Router 3. uses Router 1. as its primary router.  There may
412           be other direct connections between the routers but they must
413           not be used as primary routes.
414
415 The above example is applicable to any amount of routers in the network
416 except for two routers.  If there are only two routers in the network both
417 routers must be able to handle situation where they use each other as their
418 primary routes.
419
420 The issue of router connections are very important especially with SILC
421 broadcast packets.  Usually all router wide information in the network is
422 distributed by SILC broadcast packets.  This sort of ring network, with
423 ability to have other direct routes in the network cause interesting
424 routing problems.  The [SILC2] discusses the routing of packets in this
425 sort of network in more detail.
426
427
428 .ti 0
429 3. SILC Specification
430
431 This section describes the SILC protocol.  However, [SILC2] and
432 [SILC3] describes other important protocols that are part of this SILC
433 specification and must be read.
434
435
436 .ti 0
437 3.1 Client
438
439 A client is a piece of software connecting to SILC server.  SILC client 
440 cannot be SILC server.  Purpose of clients is to provide the user 
441 interface of the SILC services for end user.  Clients are distinguished
442 from other clients by unique Client ID.  Client ID is a 128 bit ID that
443 is used in the communication in the SILC network.  The client ID is 
444 based on the nickname selected by the user.  User uses logical nicknames
445 in communication which are then mapped to the corresponding Client ID.
446 Client ID's are low level identifications and must not be seen by the
447 end user.
448
449 Clients provide other information about the end user as well. Information
450 such as the nickname of the user, username and the host name of the end 
451 user and user's real name.  See section 3.2 Server for information of 
452 the requirements of keeping this information.
453
454 The nickname selected by the user is not unique in the SILC network.
455 There can be 2^8 same nicknames for one IP address.  As for comparison
456 to IRC [IRC] where nicknames are unique this is a fundamental difference
457 between SILC and IRC.  This causes the server names or client's host names
458 to be used along with the nicknames to identify specific users when sending
459 messages.  This feature of SILC makes IRC style nickname-wars obsolete as
460 no one owns their nickname; there can always be someone else with the same
461 nickname.  The maximum length of nickname is 128 bytes.
462
463
464 .ti 0
465 3.1.1 Client ID
466
467 Client ID is used to identify users in the SILC network.  The Client ID
468 is unique to the extent that there can be 2^128 different Client ID's,
469 and ID's based on IPv6 addresses extends this to 2^224 different Client
470 ID's.  Collisions are not expected to happen.  The Client ID is defined
471 as follows.
472
473
474
475 .in 6
476 128 bit Client ID based on IPv4 addresses:
477
478 32 bit  Server ID IP address (bits 1-32)
479  8 bit  Random number or counter
480 88 bit  Truncated MD5 hash value of the nickname
481
482 224 bit Client ID based on IPv6 addresses:
483
484 128 bit  Server ID IP address (bits 1-128)
485   8 bit  Random number or counter
486  88 bit  Truncated MD5 hash value of the nickname
487
488 o Server ID IP address - Indicates the server where this
489   client is coming from.  The IP address hence equals the
490   server IP address where to the client has connected.
491
492 o Random number or counter - Random number to further 
493   randomize the Client ID.  Another choice is to use
494   a counter starting from the zero (0).  This makes it
495   possible to have 2^8 same nicknames from the same
496   server IP address.
497
498 o MD5 hash - MD5 hash value of the lowercase nickname is
499   truncated taking 88 bits from the start of the hash value.
500   This hash value is used to search the user's Client ID
501   from the ID lists.  Note that the nickname MUST be in
502   lowercase format.
503
504 .in 3
505 Collisions could occur when more than 2^8 clients using same nickname
506 from the same server IP address is connected to the SILC network.  
507 Server MUST be able to handle this situation by refusing to accept 
508 anymore of that nickname.
509
510 Another possible collision may happen with the truncated hash value of
511 the nickname.  It could be possible to have same truncated hash value for
512 two different nicknames.  However, this is not expected to happen nor
513 cause any problems if it would occur.  Nicknames are usually logical and
514 it is unlikely to have two distinct logical nicknames produce same
515 truncated hash value.
516
517
518 .ti 0
519 3.2 Server
520
521 Servers are the most important parts of the SILC network.  They form the
522 basis of the SILC, providing a point to which clients may connect to.
523 There are two kinds of servers in SILC; normal servers and router servers.
524 This section focus on the normal server and router server is described
525 in the section 3.3 Router.
526
527 Normal servers MUST NOT directly connect to other normal server.  Normal
528 servers may only directly connect to router server.  If the message sent
529 by the client is destined outside the local server it is always sent to
530 the router server for further routing.  Server may only have one active
531 connection to router on same port.  Normal server MUST NOT connect to other
532 cell's router except in situations where its cell's router is unavailable.
533
534
535 .ti 0
536 3.2.1 Server's Local ID List
537
538 Normal server keeps various information about the clients and their end
539 users connected to it.  Every normal server MUST keep list of all locally
540 connected clients, Client ID's, nicknames, usernames and host names and
541 user's real name.  Normal servers only keeps local information and it
542 does not keep any global information.  Hence, normal servers knows only
543 about their locally connected clients.  This makes servers efficient as
544 they don't have to worry about global clients.  Server is also responsible
545 of creating the Client ID's for their clients.
546
547 Normal server also keeps information about locally created channels and
548 their Channel ID's.
549
550
551 Hence, local list for normal server includes:
552
553 .in 6
554 server list        - Router connection
555    o Server name
556    o Server IP address
557    o Server ID
558    o Sending key
559    o Receiving key
560    o Public key
561
562 client list        - All clients in server
563    o Nickname
564    o Username@host
565    o Real name
566    o Client ID
567    o Sending key
568    o Receiving key
569    o Public key
570
571
572 channel list       - All channels in server
573    o Channel name
574    o Channel ID
575    o Client ID's on channel
576    o Client ID modes on channel
577    o Channel key
578 .in 3
579
580
581 .ti 0
582 3.2.2 Server ID
583
584 Servers are distinguished from other servers by unique 64 bit Server ID 
585 (for IPv4) or 160 bit Server ID (for IPv6).  The Server ID is used in
586 the SILC to route messages to correct servers.  Server ID's also provide
587 information for Client ID's, see section 3.1.1 Client ID.  Server ID is
588 defined as follows.
589
590 .in 6
591 64 bit Server ID based on IPv4 addresses:
592
593 32 bit  IP address of the server
594 16 bit  Port
595 16 bit  Random number
596
597 160 bit Server ID based on IPv6 addresses:
598
599 128 bit  IP address of the server
600  16 bit  Port
601  16 bit  Random number
602
603 o IP address of the server - This is the real IP address of
604   the server.
605
606 o Port - This is the port the server is bound to.
607
608 o Random number - This is used to further randomize the Server ID.
609
610 .in 3
611 Collisions are not expected to happen in any conditions.  The Server ID
612 is always created by the server itself and server is responsible of
613 distributing it to the router.
614
615
616 .ti 0
617 3.2.3 SILC Server Ports
618
619 The following ports has been assigned by IANA for the SILC protocol:
620
621 .in 10
622 silc            706/tcp    SILC
623 silc            706/udp    SILC
624 .in 3
625
626
627 If there are needs to create new SILC networks in the future the port
628 numbers must be officially assigned by the IANA.
629
630 Server on network above privileged ports (>1023) SHOULD NOT be trusted
631 as they could have been set up by untrusted party.
632
633
634 .ti 0
635 3.3 Router
636
637 Router server in SILC network is responsible for keeping the cell together
638 and routing messages to other servers and to other routers.  Router server
639 is also a normal server thus clients may connect to it as it would be
640 just normal SILC server.
641
642 However, router servers has a lot of important tasks that normal servers
643 do not have.  Router server knows everything about everything in the SILC.
644 They know all clients currently on SILC, all servers and routers and all
645 channels in SILC.  Routers are the only servers in SILC that care about
646 global information and keeping them up to date at all time.  And, this
647 is what they must do.
648
649
650 .ti 0
651 3.3.1 Router's Local ID List
652
653 Router server as well MUST keep local list of connected clients and
654 locally created channels.  However, this list is extended to include all
655 the informations of the entire cell, not just the server itself as for
656 normal servers.
657
658 However, on router this list is a lot smaller since routers do not need
659 to keep information about user's nickname, username and host name and real
660 name since these are not needed by the router.  The router keeps only
661 information that it needs.
662
663
664 Hence, local list for router includes:
665
666 .in 6
667 server list        - All servers in the cell
668    o Server name
669    o Server ID
670    o Router's Server ID
671    o Sending key
672    o Receiving key
673
674 client list        - All clients in the cell
675    o Client ID
676
677
678 channel list       - All channels in the cell
679    o Channel ID
680    o Client ID's on channel
681    o Client ID modes on channel
682    o Channel key
683 .in 3
684
685
686 Note that locally connected clients and other information include all the
687 same information as defined in section section 3.2.1 Server's Local ID
688 List.
689
690
691 .ti 0
692 3.3.2 Router's Global ID List
693
694 Router server MUST also keep global list.  Normal servers do not have
695 global list as they know only about local information.  Global list
696 includes all the clients on SILC, their Client ID's, all created channels
697 and their Channel ID's and all servers and routers on SILC and their
698 Server ID's.  That is said, global list is for global information and the
699 list must not include the local information already on the router's local
700 list.
701
702 Note that the global list does not include information like nicknames,
703 usernames and host names or user's real names.  Router does not need to
704 keep these informations as they are not needed by the router.  This 
705 information is available from the client's server which maybe queried
706 when needed.
707
708 Hence, global list includes:
709
710 .in 6
711 server list        - All servers in SILC
712    o Server name
713    o Server ID
714    o Router's Server ID
715
716 client list        - All clients in SILC
717    o Client ID
718
719 channel list       - All channels in SILC
720    o Channel ID
721    o Client ID's on channel
722    o Client ID modes on channel
723 .in 3
724
725
726
727 .ti 0
728 3.3.3 Router's Server ID
729
730 Router's Server ID's are equivalent to normal Server ID's.  As routers
731 are normal servers as well same types of ID's applies for routers as well.
732 Thus, see section 3.2.2 Server ID.
733
734
735 .ti 0
736 3.4 Channels
737
738 A channel is a named group of one or more clients which will all receive
739 messages addressed to that channel.  The channel is created when first
740 client requests JOIN command to the channel, and the channel ceases to
741 exist when the last client has left it.  When channel exists, any client
742 can reference it using the name of the channel.  If the channel has
743 a founder mode set and last client leaves the channel the channel does
744 not cease to exist.  The founder mode can be used to make permanent
745 channels in the network.  The founder of the channel can regain the
746 channel founder privileges on the channel later when he joins the
747 channel.
748
749 Channel names are unique although the real uniqueness comes from 64 bit
750 Channel ID.  However, channel names are still unique and no two global
751 channels with same name may exist.  The channel name is a string of
752 maximum length of 256 bytes.  Channel names MUST NOT contain any
753 whitespaces (`  '), any non-printable ASCII characters, commas (`,')
754 and wildcard characters.
755
756 Channels can have operators that can administrate the channel and
757 operate all of its modes.  The following operators on channel exist on
758 the SILC network.
759
760 .in 6
761 o Channel founder - When channel is created the joining client becomes
762   channel founder.  Channel founder is channel operator with some more
763   privileges.  Basically, channel founder can fully operate the channel
764   and all of its modes.  The privileges are limited only to the
765   particular channel.  There can be only one channel founder per
766   channel. Channel founder supersedes channel operator's privileges.
767
768   Channel founder privileges cannot be removed by any other operator on
769   channel.  When channel founder leaves the channel there is no channel
770   founder on the channel.  However, it is possible to set a mode for
771   the channel which allows the original channel founder to regain the
772   founder privileges even after leaving the channel.  Channel founder
773   also cannot be removed by force from the channel.
774
775 o Channel operator - When client joins to channel that has not existed
776   previously it will become automatically channel operator (and channel
777   founder discussed above).  Channel operator is able administrate the
778   channel, set some modes on channel, remove a badly behaving client
779   from the channel and promote other clients to become channel
780   operator.  The privileges are limited only to the particular channel.
781
782   Normal channel user may be promoted (opped) to channel operator
783   gaining channel operator privileges.  Channel founder or other
784   channel operator may also demote (deop) channel operator to normal
785   channel user.
786 .in 3
787
788
789 .ti 0
790 3.4.1 Channel ID
791
792 Channels are distinguished from other channels by unique Channel ID.
793 The Channel ID is a 64 bit ID (for IPv4) or 160 bit ID (for IPv6), and
794 collisions are not expected to happen in any conditions.  Channel names
795 are just for logical use of channels.  The Channel ID is created by the
796 server where the channel is created.  The Channel ID is defined as
797 follows.
798
799 .in 6
800 64 bit Channel ID based on IPv4 addresses:
801
802 32 bit  Router's Server ID IP address (bits 1-32)
803 16 bit  Router's Server ID port (bits 33-48)
804 16 bit  Random number
805
806 160 bit Channel ID based on IPv6 addresses:
807
808 128 bit  Router's Server ID IP address (bits 1-128)
809  16 bit  Router's Server ID port (bits 129-144)
810  16 bit  Random number
811
812 o Router's Server ID IP address - Indicates the IP address of 
813   the router of the cell where this channel is created.  This is 
814   taken from the router's Server ID.  This way SILC router knows 
815   where this channel resides in the SILC network.
816
817 o Router's Server ID port - Indicates the port of the channel on 
818   the server.  This is taken from the router's Server ID.
819
820 o Random number - To further randomize the Channel ID.  This makes
821   sure that there are no collisions.  This also means that
822   in a cell there can be 2^16 channels.
823 .in 3
824
825
826 .ti 0
827 3.5 Operators
828
829 Operators are normal users with extra privileges to their server or
830 router.  Usually these people are SILC server and router administrators
831 that take care of their own server and clients on them.  The purpose of
832 operators is to administrate the SILC server or router.  However, even
833 an operator with highest privileges is not able to enter invite-only
834 channel, to gain access to the contents of a encrypted and authenticated
835 packets traveling in the SILC network or to gain channel operator
836 privileges on public channels without being promoted.  They have the
837 same privileges as everyone else except they are able to administrate
838 their server or router.
839
840
841 .ti 0
842 3.6 SILC Commands
843
844 Commands are very important part on SILC network especially for client
845 which uses commands to operate on the SILC network.  Commands are used
846 to set nickname, join to channel, change modes and many other things.
847
848 Client usually sends the commands and server replies by sending a reply
849 packet to the command.  Server MAY also send commands usually to serve
850 the original client's request.  Usually server cannot send commands to
851 clients, however there MAY be commands that allow the server to send
852 commands to client.  By default servers MAY send commands only to other
853 servers and routers.
854
855 Note that the command reply is usually sent only after client has sent
856 the command request but server is allowed to send command reply packet
857 to client even if client has not requested the command.  Client MAY
858 choose to ignore the command reply.
859
860 It is expected that some of the commands may be miss-used by clients
861 resulting various problems on the server side.  Every implementation
862 SHOULD assure that commands may not be executed more than once, say,
863 in two (2) seconds.  However, to keep response rate up, allowing for
864 example five (5) commands before limiting is allowed.  It is RECOMMENDED
865 that commands such as SILC_COMMAND_NICK, SILC_COMMAND_JOIN, 
866 SILC_COMMAND_LEAVE and SILC_COMMAND_KILL SHOULD be limited in all cases
867 as they require heavy operations.  This should be sufficient to prevent
868 the miss-use of commands.
869
870 SILC commands are described in [SILC4].
871
872
873 .ti 0
874 3.7 SILC Packets
875
876 Packets are naturally the most important part of the protocol and the
877 packets are what actually makes the protocol.  Packets in SILC network
878 are always encrypted using, usually the shared secret session key
879 or some other key, for example, channel key, when encrypting channel
880 messages.  It is not possible to send packet in SILC network without
881 encryption.  The SILC Packet Protocol is a wide protocol and is described
882 in [SILC2].  This document does not define or describe details of
883 SILC packets.
884
885
886 .ti 0
887 3.8 Packet Encryption
888
889 All packets passed in SILC network MUST be encrypted.  This section
890 defines how packets must be encrypted in the SILC network.  The detailed
891 description of the actual encryption process of the packets are
892 described in [SILC2].
893
894 Client and its server shares secret symmetric session key which is
895 established by the SILC Key Exchange Protocol, described in [SILC3]. 
896 Every packet sent from client to server, with exception of packets for
897 channels, are encrypted with this session key.
898
899 Channels has a channel key that are shared by every client on the channel.
900 However, the channel keys are cell specific thus one cell does not know
901 the channel key of the other cell, even if that key is for same channel.
902 Channel key is also known by the routers and all servers that has clients
903 on the channel.  However, channels MAY have channel private keys that
904 are entirely local setting for the client.  All clients on the channel
905 MUST know the channel private key before hand to be able to talk on the
906 channel.  In this case, no server or router know the key for channel.
907
908 Server shares secret symmetric session key with router which is
909 established by the SILC Key Exchange Protocol.  Every packet passed from
910 server to router, with exception of packets for channels, are encrypted
911 with the shared session key.  Same way, router server shares secret
912 symmetric key with its primary route.  However, every packet passed
913 from router to other router, including packets for channels, are
914 encrypted with the shared session key.  Every router connection has
915 their own session keys.
916
917
918 .ti 0
919 3.8.1 Determination of the Source and the Destination
920
921 The source and the destination of the packet needs to be determined
922 to be able to route the packets to correct receiver.  This information
923 is available in the SILC Packet Header which is included in all packets
924 sent in SILC network.  The SILC Packet Header is described in [SILC2].
925
926 The header MUST be encrypted with the session key who is next receiver
927 of the packet along the route.  The receiver of the packet, for example
928 a router along the route, is able to determine the sender and the
929 destination of the packet by decrypting the SILC Packet Header and
930 checking the ID's attached to the header.  The ID's in the header will
931 tell to where the packet needs to be sent and where it is coming from.
932
933 The header in the packet MUST NOT change during the routing of the
934 packet.  The original sender, for example client, assembles the packet
935 and the packet header and server or router between the sender and the
936 receiver MUST NOT change the packet header.  Note however, that some
937 packets such as commands may resent by a server to serve the client's
938 original command.  In this case the command packet send by the server
939 includes the server's IDs.
940
941 Note that the packet and the packet header may be encrypted with
942 different keys.  For example, packets to channels are encrypted with
943 the channel key, however, the header is encrypted with the session key
944 as described above.  However, the header and the packet may be encrypted
945 with same key.  This is the case, for example, with command packets.
946
947
948 .ti 0
949 3.8.2 Client To Client
950
951 The process of message delivery and encryption from client to another
952 client is as follows.
953
954 Example:  Private message from client to another client on different
955           servers.  Clients do not share private message delivery
956           keys; normal session keys are used.
957
958 o Client 1. sends encrypted packet to its server.  The packet is
959   encrypted with the session key shared between client and its
960   server.
961
962 o Server determines the destination of the packet and decrypts
963   the packet.  Server encrypts the packet with session key shared
964   between the server and its router, and sends the packet to the
965   router.
966
967 o Router determines the destination of the packet and decrypts
968   the packet.  Router encrypts the packet with session key 
969   shared between the router and the destination server, and sends
970   the packet to the server.
971
972 o Server determines the client to which the packet is destined
973   to and decrypts the packet.  Server encrypts the packet with
974   session key shared between the server and the destination client,
975   and sends the packet to the client.
976
977 o Client 2. decrypts the packet.
978
979
980 Example:  Private message from client to another client on different
981           servers.  Clients has established secret shared private
982           message delivery key with each other and that is used in 
983           the message encryption.
984
985 o Client 1. sends encrypted packet to its server.  The packet header
986   is encrypted with the session key shared between the client and
987   server, and the private message is encrypted with the private
988   message delivery key shared between clients.
989
990 o Server determines the destination of the packet and sends the 
991   packet to the router.
992
993 o Router determines the destination of the packet and sends the
994   packet to the server.
995
996 o Server determines the client to which the packet is destined
997   to and sends the packet to the client.
998
999 o Client 2. decrypts the packet with the secret shared key.
1000
1001
1002 If clients share secret key with each other the private message
1003 delivery is much simpler since servers and routers between the
1004 clients do not need to decrypt and re-encrypt the packet.
1005
1006 The process for clients on same server is much simpler as there are
1007 no need to send the packet to the router.  The process for clients 
1008 on different cells is same as above except that the packet is routed 
1009 outside the cell.  The router of the destination cell routes the 
1010 packet to the destination same way as described above.
1011
1012
1013 .ti 0
1014 3.8.3 Client To Channel
1015
1016 Process of message delivery from client on channel to all the clients
1017 on the channel.
1018
1019 Example:  Channel of four users; two on same server, other two on
1020           different cells.  Client sends message to the channel.
1021
1022 o Client 1. encrypts the packet with channel key and sends the
1023   packet to its server.
1024
1025 o Server determines local clients on the channel and sends the
1026   packet to the Client on the same server.  Server then sends
1027   the packet to its router for further routing.
1028
1029 o Router determines local clients on the channel, if found
1030   sends packet to the local clients.  Router determines global
1031   clients on the channel and sends the packet to its primary
1032   router or fastest route.
1033
1034 o (Other router(s) do the same thing and sends the packet to
1035    the server(s))
1036
1037 o Server determines local clients on the channel and sends the
1038   packet to the client.
1039
1040 o All clients receiving the packet decrypts the packet.
1041
1042
1043 .ti 0
1044 3.8.4 Server To Server
1045
1046 Server to server packet delivery and encryption is described in above
1047 examples. Router to router packet delivery is analogous to server to
1048 server.  However, some packets, such as channel packets, are processed
1049 differently.  These cases are described later in this document and
1050 more in detail in [SILC2].
1051
1052
1053 .ti 0
1054 3.9 Key Exchange And Authentication
1055
1056 Key exchange is done always when for example client connects to server
1057 but also when server and router, and router and router connects to each
1058 other.  The purpose of key exchange protocol is to provide secure key
1059 material to be used in the communication.  The key material is used to
1060 derive various security parameters used to secure SILC packets.  The
1061 SILC Key Exchange protocol is described in detail in [SILC3].
1062
1063 Authentication is done after key exchange protocol has been successfully
1064 completed.  The purpose of authentication is to authenticate for example
1065 client connecting to the server.  However, usually clients are accepted
1066 to connect to server without explicit authentication.  Servers are
1067 required use authentication protocol when connecting.  The authentication
1068 may be based on passphrase (pre-shared-secret) or public key.  All
1069 passphrases sent in SILC protocol MUST be UTF-8 [RFC2279] encoded.
1070 The connection authentication protocol is described in detail in [SILC3].
1071
1072
1073 .ti 0
1074 3.9.1 Authentication Payload
1075
1076 Authentication payload is used separately from the SKE and the Connection
1077 Authentication protocol.  It can be used during the session to authenticate
1078 with the remote.  For example, the client can authenticate itself to the
1079 server to become server operator.  In this case, Authentication Payload is
1080 used.
1081
1082 The format of the Authentication Payload is as follows:
1083
1084 .in 5
1085 .nf
1086                      1                   2                   3
1087  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
1088 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1089 |        Payload Length         |     Authentication Method     |
1090 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1091 |      Public Data Length       |                               |
1092 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1093 |                                                               |
1094 ~                           Public Data                         ~
1095 |                                                               |
1096 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1097 |   Authentication Data Length  |                               |
1098 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1099 |                                                               |
1100 ~                       Authentication Data                     ~
1101 |                                                               |
1102 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1103 .in 3
1104  
1105 .ce
1106 Figure 5:  Authentication Payload
1107
1108
1109 .in 6
1110 o Payload Length (2 bytes) - Length of the entire payload.
1111
1112 o Authentication Method (2 bytes) - The method of the
1113   authentication.  The authentication methods are defined
1114   in [SILC2] in the Connection Auth Request Payload.  The NONE 
1115   authentication method SHOULD NOT be used.
1116
1117 o Public Data Length (2 bytes) - Indicates the length of
1118   the Public Data field.
1119
1120 o Public Data (variable length) - This is defined only if
1121   the authentication method is public key.  If it is any other
1122   this field MAY include a random data for padding purposes.
1123   However, in this case the field MUST be ignored by the
1124   receiver.
1125
1126   When the authentication method is public key this includes
1127   128 to 4096 bytes of non-zero random data that is used in
1128   the signature process, described subsequently.
1129
1130 o Authentication Data Length (2 bytes) - Indicates the
1131   length of the Authentication Data field.  If zero (0)
1132   value is found in this field the payload MUST be 
1133   discarded.
1134
1135 o Authentication Data (variable length) - Authentication 
1136   method dependent authentication data.
1137 .in 3
1138
1139
1140 If the authentication method is password based, the Authentication
1141 Data field includes the plaintext UTF-8 encoded password.  It is safe
1142 to send plaintext password since the entire payload is encrypted.  In
1143 this case the Public Data Length is set to zero (0), but MAY also include
1144 random data for padding purposes.  It is also RECOMMENDED that maximum
1145 amount of padding is applied to SILC packet when using password based
1146 authentication.  This way it is not possible to approximate the length
1147 of the password from the encrypted packet.
1148
1149 If the authentication method is public key based (or certificate)
1150 the Authentication Data is computed as follows:
1151
1152   HASH = hash(random bytes | ID | public key (or certificate));
1153   Authentication Data = sign(HASH);
1154
1155 The hash() and the sign() are the hash function and the public key
1156 cryptography function selected in the SKE protocol, unless otherwise
1157 stated in the context where this payload is used.  The public key
1158 is SILC style public key unless certificates are used.  The ID is the
1159 entity's ID (Client or Server ID) which is authenticating itself.  The
1160 ID encoding is described in [SILC2].  The random bytes are non-zero
1161 random bytes of length between 128 and 4096 bytes, and will be included
1162 into the Public Data field as is.
1163
1164 The receiver will compute the signature using the random data received
1165 in the payload, the ID associated to the connection and the public key
1166 (or certificate) received in the SKE protocol.  After computing the
1167 receiver MUST verify the signature.  In case of public key authentication
1168 also this payload is encrypted.
1169
1170
1171 .ti 0
1172 3.10 Algorithms
1173
1174 This section defines all the allowed algorithms that can be used in
1175 the SILC protocol.  This includes mandatory cipher, mandatory public
1176 key algorithm and MAC algorithms.
1177
1178
1179 .ti 0
1180 3.10.1 Ciphers
1181
1182 Cipher is the encryption algorithm that is used to protect the data
1183 in the SILC packets.  See [SILC2] of the actual encryption process and
1184 definition of how it must be done.  SILC has a mandatory algorithm that
1185 must be supported in order to be compliant with this protocol.
1186
1187 The following ciphers are defined in SILC protocol:
1188
1189 aes-256-cbc          AES in CBC mode, 256 bit key            (REQUIRED)
1190 aes-256-ctr          AES in CTR mode, 256 bit key            (RECOMMENDED)
1191 aes-256-rcbc         AES in randomized CBC mode, 256 bit key (OPTIONAL)
1192 aes-192-<mode>       AES in <mode> mode, 192 bit key         (OPTIONAL)
1193 aes-128-<mode>       AES in <mode> mode, 128 bit key         (RECOMMENDED)
1194 twofish-256-<mode>   Twofish in <mode> mode, 256 bit key     (OPTIONAL)
1195 twofish-192-<mode>   Twofish in <mode> mode, 192 bit key     (OPTIONAL)
1196 twofish-128-<mode>   Twofish in <mode> mode, 128 bit key     (OPTIONAL)
1197 cast-256-<mode>      CAST-256 in <mode> mode, 256 bit key    (OPTIONAL)
1198 cast-192-<mode>      CAST-256 in <mode> mode, 192 bit key    (OPTIONAL)
1199 cast-128-<mode>      CAST-256 in <mode> mode, 128 bit key    (OPTIONAL)
1200 serpent-<len>-<mode> Serpent in <mode> mode, <len> bit key   (OPTIONAL)
1201 rc6-<len>-<mode>     RC6 in <mode> mode, <len> bit key       (OPTIONAL)
1202 mars-<len>-<mode>    MARS in <mode> mode, <len> bit key      (OPTIONAL)
1203 none                 No encryption                           (OPTIONAL)
1204
1205 The <mode> is either "cbc", "ctr" or "rcbc".  Other encryption modes MAY
1206 be defined as to be used in SILC using the same format.  The <len> is
1207 either 256, 192 or 128 bit key length.  Also, additional ciphers MAY be
1208 defined to be used in SILC by using the same name format as above.
1209
1210 Algorithm "none" does not perform any encryption process at all and 
1211 thus is not recommended to be used.  It is recommended that no client
1212 or server implementation would accept none algorithm except in special
1213 debugging mode.
1214
1215
1216 .ti 0
1217 3.10.1.1 CBC Mode
1218
1219 The "cbc" encryption mode is CBC mode with inter-packet chaining.  This
1220 means that the Initial Vector (IV) for the next encryption block is
1221 the previous ciphertext block.  The very first IV MUST be random and is
1222 generated as described in [SILC3].
1223
1224
1225 .ti 0
1226 3.10.1.2 CTR Mode
1227
1228 The "ctr" encryption mode is CTR mode.  The CTR mode in SILC is stateful
1229 in encryption and decryption.  Both sender and receiver maintain the
1230 counter for the CTR mode and thus can precompute the key stream for
1231 encryption and decryption.  By default, CTR mode does not require
1232 plaintext padding, however implementations MAY apply padding to the
1233 packets.  If the last key block is larger than the last plaintext block
1234 the resulted value is truncated to the size of the plaintext block and
1235 the most significant bits are used.  When sending authentication data
1236 inside packets the maximum amount of padding SHOULD be applied with
1237 CTR mode as well.
1238
1239 In CTR mode only the encryption operation of the cipher is used.  The
1240 decryption operation is not needed since both encryption and decryption
1241 process is simple XOR with the plaintext block and the key stream block.
1242
1243 The counter block is used to create the key for the CTR mode.  When
1244 SILC specifications refer to Initial Vector (IV) in general cases, in
1245 case of CTR mode it refers to the counter block.  The format of the
1246 128 bit counter block is as follows:
1247
1248 .in 5
1249 .nf
1250                      1                   2                   3
1251  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
1252 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1253 |                   Truncated HASH from SKE                     |
1254 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1255 |                Sending/Receiving IV from SKE                  |
1256 |                                                               |
1257 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1258 |                        Block Counter                          |
1259 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1260 .in 3
1261
1262 .ce
1263 Figure 6:  Counter Block
1264
1265 .in 6
1266 o Truncated HASH from SKE (4 bytes) - This value is the 32 most
1267   significant bits from the HASH value that was computed as a
1268   result of SKE protocol.  This acts as session identifier and
1269   each rekey MUST produce a new HASH value.
1270
1271 o Sending/Receiving IV from SKE (8 bytes) - This value is the 64
1272   most significant bits from the Sending IV or Receiving IV
1273   generated in the SKE protocol.  When this mode is used to
1274   encrypt sending traffic the Sending IV is used, when used to
1275   decrypt receiving traffic the Receiving IV is used.  This
1276   assures that two parties of the protocol use different IV
1277   for sending traffic.  Each rekey MUST produce a new value.
1278
1279 o Block Counter (4 bytes) - This is the counter value for the
1280   counter block and is MSB ordered number starting from one (1)
1281   value for first block and incrementing for subsequent blocks.
1282   The same value MUST NOT be used twice.  The rekey MUST be
1283   performed before this counter value wraps.
1284 .in 3
1285
1286 CTR mode MUST NOT be used with "none" MAC.  Implementations also MUST
1287 assure that the same counter block is not used to encrypt more than
1288 one block.  Also, the key material used with CTR mode MUST be fresh
1289 key material.  Static keys (pre-shared keys) MUST NOT be used with
1290 CTR mode.  For this reason using CTR mode to encrypt for example
1291 channel messages or private messages with a pre-shared key is
1292 inappropriate.  For private messages, the Key Agreement could be
1293 performed to produce fresh key material.
1294
1295 If the IV Included flag was negotiated in SKE, implementations SHOULD
1296 still use the same counter block format as defined above.  However, 
1297 implementations are RECOMMENDED to replace the Truncated HASH field
1298 with a 32 bit random value for each IV (counter block) per encrypted
1299 SILC packet.  Also note, that in this case the decryption process is
1300 not stateful and receiver cannot precompute the key stream.
1301
1302
1303 .ti 0
1304 3.10.1.3 Randomized CBC Mode
1305
1306 The "rcbc" encryption mode is CBC mode with randomized IV.  This means
1307 that each IV for each packet MUST be chosen randomly (same IV is used
1308 to encrypt all blocks in the given packet).  In this mode the IV is
1309 appended at the end of the last ciphertext block and thus delivered to
1310 the recipient.  This mode increases the ciphertext size by one
1311 ciphertext block.  Note also that some data payloads in SILC are capable
1312 of delivering the IV to the recipient.  When explicitly encrypting these
1313 payloads with randomized CBC the IV MUST NOT be appended at the end
1314 of the ciphertext.
1315
1316
1317 .ti 0
1318 3.10.2 Public Key Algorithms
1319
1320 Public keys are used in SILC to authenticate entities in SILC network
1321 and to perform other tasks related to public key cryptography.  The 
1322 public keys are also used in the SILC Key Exchange protocol [SILC3].
1323
1324 The following public key algorithms are defined in SILC protocol:
1325
1326 .in 6
1327 rsa        RSA  (REQUIRED)
1328 dss        DSS  (OPTIONAL)
1329 .in 3
1330
1331 DSS is described in [Menezes].  The RSA MUST be implemented according
1332 PKCS #1 [PKCS1].  The mandatory PKCS #1 implementation in SILC MUST be
1333 compliant to either PKCS #1 version 1.5 or newer with the following
1334 notes: The signature encoding is always in same format as the encryption
1335 encoding regardless of the PKCS #1 version.  The signature with appendix
1336 (with hash algorithm OID in the data) MUST NOT be used in the SILC.  The
1337 rationale for this is that there is no binding between the PKCS #1 OIDs
1338 and the hash algorithms used in the SILC protocol.  Hence, the encoding
1339 is always in PKCS #1 version 1.5 format.
1340
1341 Additional public key algorithms MAY be defined to be used in SILC.
1342
1343 When signatures are computed in SILC the computing of the signature is
1344 represented as sign().  The signature computing procedure is dependent
1345 of the public key algorithm, and the public key or certificate encoding.
1346 When using SILC public key the signature is computed as described in
1347 previous paragraph for RSA and DSS keys.  If the hash function is not
1348 specified separately for signing process sha1 MUST be used.  When using
1349 SSH2 public keys the signature is computed as described in [SSH-TRANS].
1350 When using X.509 version 3 certificates the signature is computed as
1351 described in [PKCS7].  When using OpenPGP certificates the signature is
1352 computed as described in [PGP].
1353
1354
1355 .ti 0
1356 3.10.3 Hash Functions
1357
1358 Hash functions are used as part of MAC algorithms defined in the next
1359 section.  They are also used in the SILC Key Exchange protocol defined
1360 in the [SILC3].
1361
1362 The following Hash algorithm are defined in SILC protocol:
1363
1364 .in 6
1365 sha1             SHA-1, length = 20      (REQUIRED)
1366 md5              MD5, length = 16        (RECOMMENDED)
1367 .in 3
1368
1369
1370
1371 .ti 0
1372 3.10.4 MAC Algorithms
1373
1374 Data integrity is protected by computing a message authentication code
1375 (MAC) of the packet data.  See [SILC2] for details how to compute the
1376 MAC.
1377
1378 The following MAC algorithms are defined in SILC protocol:
1379
1380 .in 6
1381 hmac-sha1-96     HMAC-SHA1, length = 12 bytes  (REQUIRED)
1382 hmac-md5-96      HMAC-MD5, length = 12 bytes   (OPTIONAL)
1383 hmac-sha1        HMAC-SHA1, length = 20 bytes  (OPTIONAL)
1384 hmac-md5         HMAC-MD5, length = 16 bytes   (OPTIONAL)
1385 none             No MAC                        (OPTIONAL)
1386 .in 3
1387
1388 The "none" MAC is not recommended to be used as the packet is not
1389 authenticated when MAC is not computed.  It is recommended that no
1390 client or server would accept none MAC except in special debugging
1391 mode.
1392
1393 The HMAC algorithm is described in [HMAC] and hash algorithms that
1394 are used as part of the HMACs are described in [Scheneir] and in
1395 [Menezes].
1396
1397 Additional MAC algorithms MAY be defined to be used in SILC.
1398
1399
1400 .ti 0
1401 3.10.5 Compression Algorithms
1402
1403 SILC protocol supports compression that may be applied to unencrypted
1404 data.  It is recommended to use compression on slow links as it may
1405 significantly speed up the data transmission.  By default, SILC does not
1406 use compression which is the mode that must be supported by all SILC
1407 implementations.
1408
1409 The following compression algorithms are defined:
1410
1411 .in 6
1412 none        No compression               (REQUIRED)
1413 zlib        GNU ZLIB (LZ77) compression  (OPTIONAL)
1414 .in 3
1415
1416 Additional compression algorithms MAY be defined to be used in SILC.
1417
1418
1419 .ti 0
1420 3.11 SILC Public Key
1421
1422 This section defines the type and format of the SILC public key.  All
1423 implementations MUST support this public key type.  See [SILC3] for
1424 other optional public key and certificate types allowed in the SILC
1425 protocol.  Public keys in SILC may be used to authenticate entities
1426 and to perform other tasks related to public key cryptography.
1427
1428 The format of the SILC Public Key is as follows:
1429
1430
1431 .in 5
1432 .nf
1433                      1                   2                   3
1434  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
1435 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1436 |                        Public Key Length                      |
1437 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1438 |     Algorithm Name Length     |                               |
1439 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1440 |                                                               |
1441 ~                         Algorithm Name                        ~
1442 |                                                               |
1443 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1444 |       Identifier Length       |                               |
1445 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1446 |                                                               |
1447 ~                           Identifier                          ~
1448 |                                                               |
1449 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1450 |                                                               |
1451 ~                           Public Data                         ~
1452 |                                                               |
1453 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1454 .in 3
1455
1456 .ce
1457 Figure 5:  SILC Public Key
1458
1459
1460 .in 6
1461 o Public Key Length (4 bytes) - Indicates the full length
1462   of the public key, not including this field.
1463
1464 o Algorithm Name Length (2 bytes) - Indicates the length
1465   of the Algorithm Length field, not including this field.
1466
1467 o Algorithm name (variable length) - Indicates the name
1468   of the public key algorithm that the key is.  See the
1469   section 3.10.2 Public Key Algorithms for defined names.
1470
1471 o Identifier Length (2 bytes) - Indicates the length of
1472   the Identifier field, not including this field.
1473
1474 o Identifier (variable length) - Indicates the identifier
1475   of the public key.  This data can be used to identify
1476   the owner of the key.  The identifier is of the following
1477   format:
1478
1479      UN   User name
1480      HN   Host name or IP address
1481      RN   Real name
1482      E    EMail address
1483      O    Organization
1484      C    Country
1485
1486
1487   Examples of an identifier:
1488
1489     `UN=priikone, HN=poseidon.pspt.fi, E=priikone@poseidon.pspt.fi'
1490
1491     `UN=sam, HN=dummy.fi, RN=Sammy Sam, O=Company XYZ, C=Finland'
1492
1493   At least user name (UN) and host name (HN) MUST be provided as
1494   identifier.  The fields are separated by commas (`,').  If
1495   comma is in the identifier string it must be written as `\\,',
1496   for example, `O=Company XYZ\\, Inc.'.
1497
1498 o Public Data (variable length) - Includes the actual
1499   public data of the public key.
1500
1501   The format of this field for RSA algorithm is
1502   as follows:
1503
1504      4 bytes            Length of e
1505      variable length    e
1506      4 bytes            Length of n
1507      variable length    n
1508
1509
1510   The format of this field for DSS algorithm is
1511   as follows:
1512
1513      4 bytes            Length of p
1514      variable length    p
1515      4 bytes            Length of q
1516      variable length    q
1517      4 bytes            Length of g
1518      variable length    g
1519      4 bytes            Length of y
1520      variable length    y
1521
1522   The variable length fields are multiple precession
1523   integers encoded as strings in both examples.
1524
1525   Other algorithms must define their own type of this
1526   field if they are used.
1527 .in 3
1528
1529 All fields in the public key are in MSB (most significant byte first)
1530 order.  All strings in the public key are UTF-8 encoded.
1531
1532 If an external protocol need to refer to SILC Public Key by name, the
1533 name "silc-rsa" and "silc-dss" for SILC Public Key based on RSA algorithm
1534 and SILC Public Key based on DSS algorithm, respectively, are to be used.
1535 However, this SILC specification does not use these names directly, and 
1536 they are defined here for external protocols (protocols that may like 
1537 to use SILC Public Key).
1538
1539
1540 .ti 0
1541 3.12 SILC Version Detection
1542
1543 The version detection of both client and server is performed at the
1544 connection phase while executing the SILC Key Exchange protocol.  The
1545 version identifier is exchanged between initiator and responder.  The
1546 version identifier is of the following format:
1547
1548 .in 6
1549 SILC-<protocol version>-<software version>
1550 .in 3
1551
1552 The version strings are of the following format:
1553
1554 .in 6
1555 protocol version = <major>.<minor>
1556 software version = <major>[.<minor>[.<build or vendor string>]]
1557 .in 3
1558
1559 Protocol version MAY provide both major and minor version.  Currently
1560 implementations MUST set the protocol version and accept at least the 
1561 protocol version as SILC-1.2-<software version>.  If new protocol version 
1562 causes incompatibilities with older version the <minor> version number 
1563 MUST be incremented.  The <major> is incremented if new protocol version 
1564 is fully incompatible.
1565
1566 Software version MAY provide major, minor and build (vendor) version.
1567 The software version MAY be freely set and accepted.  The version string 
1568 MUST consist of printable US-ASCII characters.
1569
1570
1571 Thus, the version strings could be, for example:
1572
1573 .in 6
1574 SILC-1.1-2.0.2
1575 SILC-1.0-1.2
1576 SILC-1.2-1.0.VendorXYZ
1577 SILC-1.2-2.4.5 Vendor Limited
1578 .in 3
1579
1580
1581 .ti 0
1582 3.13 Backup Routers
1583
1584 Backup routers may exist in the cell in addition of the primary router.
1585 However, they must not be active routers and act as routers in the cell.
1586 Only one router may be acting as primary router in the cell.  In the case
1587 of failure of the primary router may one of the backup routers become
1588 active.  The purpose of backup routers are in case of failure of the
1589 primary router to maintain working connections inside the cell and outside
1590 the cell and to avoid netsplits.
1591
1592 Backup routers are normal servers in the cell that are prepared to take
1593 over the tasks of the primary router if needed.  They need to have at
1594 least one direct and active connection to the primary router of the cell.
1595 This communication channel is used to send the router information to
1596 the backup router.  When the backup router connects to the primary router
1597 of the cell it MUST present itself as router server in the Connection
1598 Authentication protocol, even though it is normal server as long as the
1599 primary router is available.  Reason for this is that the configuration
1600 needed in the responder end requires usually router connection level
1601 configuration.  The responder, however must understand and treat the
1602 connection as normal server (except when feeding router level data to
1603 the backup router).
1604
1605 Backup router must know everything that the primary router knows to be
1606 able to take over the tasks of the primary router.  It is the primary
1607 router's responsibility to feed the data to the backup router.  If the
1608 backup router does not know all the data in the case of failure some
1609 connections may be lost.  The primary router of the cell must consider
1610 the backup router being actual router server when it feeds the data to
1611 it.
1612
1613 In addition of having direct connection to the primary router of the
1614 cell, the backup router must also have connection to the same router
1615 the primary router of the cell is connected.  However, it must not be
1616 active router connection meaning that the backup router must not use
1617 that channel as its primary route and it must not notify the router
1618 about having connected servers, channels and clients behind it.  It
1619 merely connects to the router.  This sort of connection is later
1620 referred as being passive connection.  Some keepalive actions may be
1621 needed by the router to keep the connection alive.
1622
1623 It is required that other normal servers have passive connections to
1624 the backup router(s) in the cell.  Some keepalive actions may be needed
1625 by the server to keep the connection alive.  After they notice the
1626 failure of the primary router they must start using the connection to
1627 the first backup router as their primary route.
1628
1629 Also, if any other router in the network is using the cell's primary
1630 router as its own primary router, it must also have passive connection
1631 to the cell's backup router.  It too is prepared to switch to use the
1632 backup router as its new primary router as soon as the original primary
1633 router becomes unresponsive.
1634
1635 All of the parties of this protocol knows which one is the backup router
1636 of the cell from their local configuration.  Each of the entity must
1637 be configured accordingly and care must be taken when configuring the
1638 backup routers, servers and other routers in the network.
1639
1640 It must be noted that some of the channel messages and private messages
1641 may be lost during the switch to the backup router.  The announcements
1642 assures that the state of the network is not lost during the switch.
1643
1644 It is RECOMMENDED that there would be at least one backup router in
1645 the cell.  It is NOT RECOMMENDED to have all servers in the cell acting
1646 as backup routers as it requires establishing several connections to
1647 several servers in the cell.  Large cells can easily have several
1648 backup routers in the cell.
1649
1650 The order of the backup routers are decided at the configuration phase.
1651 All the parties of this protocol must be configured accordingly to 
1652 understand the order of the backup routers.  It is not required that
1653 the backup server is actually active server in the cell.  Backup router
1654 may be a spare server in the cell that does not accept normal client
1655 connections at all.  It may be reserved purely for the backup purposes.
1656 These, however, are cell management issues.
1657
1658 If also the first backup router is down as well and there is another
1659 backup router in the cell then it will start acting as the primary
1660 router as described above.
1661
1662
1663 .ti 0
1664 3.13.1 Switching to Backup Router
1665
1666 When the primary router of the cell becomes unresponsive, for example
1667 by sending EOF to the connection, all the parties of this protocol MUST
1668 replace the old connection to the primary router with first configured
1669 backup router.  The backup router usually needs to do local modifications
1670 to its database in order to update all the information needed to maintain
1671 working routes.  The backup router must understand that clients that
1672 were originated from the primary router are now originated from some of
1673 the existing server connections and must update them accordingly.  It
1674 must also remove those clients that were owned by the primary router
1675 since those connections were lost when the primary router became
1676 unresponsive.
1677
1678 All the other parties of the protocol must also update their local
1679 database to understand that the route to the primary router will now go
1680 to the backup router.
1681
1682 Servers connected to the backup router MUST send SILC_PACKET_RESUME_ROUTER
1683 packet with type number 21, to indicate that the server will start using
1684 the backup router as primary router.  The backup router MUST NOT allow
1685 this action if it detects that primary is still up and running.  If
1686 backup router knows that primary is up and running it MUST send type
1687 number 22 back to the server.  The server then MUST NOT use the backup
1688 as primary router, but must try to establish connection back to the
1689 primary router.  If the action is allowed type number 21 is sent back
1690 to the server from the backup router.
1691
1692 The servers connected to the backup router must then announce their
1693 clients, channels, channel users, channel user modes and channel modes
1694 to the backup router.  This is to assure that none of the important notify 
1695 packets were lost during the switch to the backup router.  The backup
1696 router must check which of these announced entities it already have
1697 and distribute the new ones to the primary route.
1698
1699 The backup router too must announce its servers, clients, channels
1700 and other information to the new primary router.  The primary router
1701 of the backup router too must announce its informations to the backup
1702 router.  Both must process only the ones they do not know about.  If
1703 any of the announced modes does not match then they are enforced in
1704 normal manner defined later in this specification.
1705
1706
1707 .ti 0
1708 3.13.2 Resuming Primary Router
1709
1710 Usually the primary router is unresponsive only a short period of time
1711 and it is intended that the original router of the cell will resume
1712 its position as primary router when it comes back online.  The backup
1713 router that is now acting as primary router of the cell must constantly
1714 try to connect to the original primary router of the cell.  It is
1715 RECOMMENDED that it would try to reconnect in 30 second intervals to
1716 the primary router.
1717
1718 When the connection is established to the primary router the backup
1719 resuming protocol is executed.  The protocol is advanced as follows:
1720
1721   1. Backup router sends SILC_PACKET_RESUME_ROUTER packet with type
1722      value 1 the primary router that came back online.  The packet
1723      will indicate the primary router has been replaced by the backup
1724      router.  After sending the packet the backup router will announce
1725      all of its channels, channel users, modes etc. to the primary
1726      router.
1727
1728      If the primary knows that it has not been replaced (for example
1729      the backup itself disconnected from the primary router and thinks
1730      that it is now primary in the cell) the primary router send
1731      SILC_PACKET_FAILURE with the type value 1 back to the backup
1732      router.  If backup receives this it MUST NOT continue with the
1733      backup resuming protocol.
1734
1735   2. Backup router sends SILC_PACKET_RESUME_ROUTER packet with type
1736      value 2 to its current primary router to indicate that it will
1737      resign as being primary router.  Then, backup router sends the
1738      SILC_PACKET_RESUME_ROUTER packet with type value 1 to all
1739      connected servers to also indicate that it will resign as being
1740      primary router.
1741
1742   3. Backup router also send SILC_PACKET_RESUME_ROUTER packet with
1743      type value 2 to the router that is using the backup router
1744      currently as its primary router.
1745
1746   4. Any server and router that receives the SILC_PACKET_RESUME_ROUTER
1747      with type value 1 or 2 must reconnect immediately to the
1748      primary router of the cell that came back online.  After they
1749      have created the connection they MUST NOT use that connection
1750      as active primary route but still route all packets to the
1751      backup router.  After the connection is created they MUST send
1752      SILC_PACKET_RESUME_ROUTER with type value 3 back to the
1753      backup router.  The session ID value found in the first packet
1754      MUST be set in this packet.
1755
1756   5. Backup router MUST wait for all packets with type value 3 before
1757      it continues with the protocol.  It knows from the session ID values
1758      set in the packet when it have received all packets.  The session
1759      value should be different in all packets it have sent earlier.
1760      After the packets is received the backup router sends the
1761      SILC_PACKET_RESUME_ROUTER packet with type value 4 to the
1762      primary router that came back online.  This packet will indicate 
1763      that the backup router is now ready to resign as being primary
1764      router.  The session ID value in this packet MUST be the same as
1765      in first packet sent to the primary router.  During this time
1766      the backup router must still route all packets it is receiving
1767      from server connections.
1768
1769   6. The primary router receives the packet and send the
1770      SILC_PACKET_RESUME_ROUTER with type value 5 to all connected servers
1771      including the backup router.  It also sends the packet with type
1772      value 6 to its primary router, and to the router that is using
1773      it as its primary router.  The Session ID value in this packet
1774      SHOULD be zero (0).
1775
1776   7. Any server and router that receives the SILC_PACKET_RESUME_ROUTER
1777      with type value 5 or 6 must switch their primary route to the
1778      new primary router and remove the route for the backup router, since
1779      it is not anymore the primary router of the cell.  They must also
1780      update their local database to understand that the clients are
1781      not originated from the backup router but from the locally connected
1782      servers.  After that they MUST announce their channels, channel
1783      users, modes etc. to the primary router.  They must not use the
1784      backup router connection after this and the connection is considered
1785      to be passive connection.  The implementations SHOULD be able
1786      to disable the connection without closing the actual link.
1787
1788 After this protocol is executed the backup router is now again normal
1789 server in the cell that has the backup link to the primary router.  The
1790 primary router feeds the router specific data again to the backup router.
1791 All server connections in the backup router are considered passive
1792 connections.
1793
1794 When the primary router of the cell comes back online and connects
1795 to its primary router, the remote primary router must send the 
1796 SILC_PACKET_RESUME_ROUTER with type value 20 indicating that the
1797 connection is not allowed since the router has been replaced by an
1798 backup router.  The session ID value in this packet SHOULD be zero (0).
1799 When the router receives this packet it must not use the connection
1800 as active connection but to understand that it cannot act as primary
1801 router in the cell.  It must wait that the backup router connects to
1802 it, and the backup resuming protocol is executed.
1803
1804 The following type values has been defined for SILC_PACKET_RESUME_ROUTER
1805 packet:
1806
1807   1    SILC_SERVER_BACKUP_START
1808   2    SILC_SERVER_BACKUP_START_GLOBAL
1809   3    SILC_SERVER_BACKUP_START_CONNECTED
1810   4    SILC_SERVER_BACKUP_START_ENDING
1811   5    SILC_SERVER_BACKUP_START_RESUMED
1812   6    SILC_SERVER_BACKUP_START_RESUMED_GLOBAL
1813   20   SILC_SERVER_BACKUP_START_REPLACED
1814   21   SILC_SERVER_BACKUP_START_USE
1815   22   SILC_SERVER_BACKUP_START_USE_DENIED
1816
1817 If any other value is found in the type field the packet must be 
1818 discarded.  The SILC_PACKET_RESUME_ROUTER packet and its payload
1819 is defined in [SILC2].
1820
1821
1822 .ti 0
1823 3.13.3 Discussion on Backup Router Scheme
1824
1825 It is clear that this backup router support is not able to handle all
1826 possible situations arising in unreliable network environment.  This
1827 scheme for example does not handle situation when the router actually
1828 does not go offline but the network link goes down temporarily.  It would
1829 require some intelligence to figure out when it is best time to switch
1830 to the backup router.  To make it even more complicated it is possible
1831 that the backup router may have not lost the network link to the primary
1832 router.
1833
1834 Other possible situation is when the network link is lost temporarily
1835 between two primary routers in the SILC network.  Unless the routers
1836 notice the link going down they cannot perhaps find alternative routes.
1837 Worst situation is when the link goes down only for a short period of
1838 time, thus causing lag.  Should the routers or servers find alternative
1839 routes if they cannot get response from the router during the lag?
1840 When alternative routes are being found it must be careful not to
1841 mess up existing primary routes between routers in the network.
1842
1843 It is suggested that the current backup router scheme is only temporary
1844 solution and existing backup router protocols are studied further.  It
1845 is also suggested that the backup router specification will be separated
1846 from this SILC specification Internet-Draft and additional specification
1847 is written on the subject.
1848
1849
1850 .ti 0
1851 4 SILC Procedures
1852
1853 This section describes various SILC procedures such as how the 
1854 connections are created and registered, how channels are created and
1855 so on.  The section describes the procedures only generally as details
1856 are described in [SILC2] and [SILC3].
1857
1858
1859 .ti 0
1860 4.1 Creating Client Connection
1861
1862 This section describes the procedure when client connects to SILC server.
1863 When client connects to server the server MUST perform IP address lookup
1864 and reverse IP address lookup to assure that the origin host really is
1865 who it claims to be.  Client, host, connecting to server SHOULD have 
1866 both valid IP address and fully qualified domain name (FQDN).
1867
1868 After that the client and server performs SILC Key Exchange protocol
1869 which will provide the key material used later in the communication.
1870 The key exchange protocol MUST be completed successfully before the
1871 connection registration may continue.  The SILC Key Exchange protocol
1872 is described in [SILC3].
1873
1874 Typical server implementation would keep a list of connections that it
1875 allows to connect to the server.  The implementation would check, for
1876 example, the connecting client's IP address from the connection list
1877 before the SILC Key Exchange protocol has been started.  Reason for
1878 this is that if the host is not allowed to connect to the server there
1879 is no reason to perform the key exchange protocol.
1880
1881 After successful key exchange protocol the client and server performs
1882 connection authentication protocol.  The purpose of the protocol is to
1883 authenticate the client connecting to the server.  Flexible
1884 implementation could also accept the client to connect to the server
1885 without explicit authentication.  However, if authentication is
1886 desired for a specific client it may be based on passphrase or
1887 public key authentication.  If authentication fails the connection
1888 MUST be terminated.  The connection authentication protocol is described
1889 in [SILC3].
1890
1891 After successful key exchange and authentication protocol the client
1892 registers itself by sending SILC_PACKET_NEW_CLIENT packet to the
1893 server.  This packet includes various information about the client
1894 that the server uses to create the client.  Server creates the client
1895 and sends SILC_PACKET_NEW_ID to the client which includes the created
1896 Client ID that the client MUST start using after that.  After that
1897 all SILC packets from the client MUST have the Client ID as the
1898 Source ID in the SILC Packet Header, described in [SILC2].
1899
1900 Client MUST also get the server's Server ID that is to be used as
1901 Destination ID in the SILC Packet Header when communicating with
1902 the server (for example when sending commands to the server).  The
1903 ID may be resolved in two ways.  Client can take the ID from an
1904 previously received packet from server that MUST include the ID,
1905 or to send SILC_COMMAND_INFO command and receive the Server ID as
1906 command reply.
1907
1908 Server MAY choose not to use the information received in the
1909 SILC_PACKET_NEW_CLIENT packet.  For example, if public key or 
1910 certificate were used in the authentication, server MAY use those
1911 informations rather than what it received from client.  This is suitable
1912 way to get the true information about client if it is available.
1913
1914 The nickname of client is initially set to the username sent in the
1915 SILC_PACKET_NEW_CLIENT packet.  User should set the nickname to more
1916 suitable by sending SILC_COMMAND_NICK command.  However, this is not
1917 required as part of registration process.
1918
1919 Server MUST also distribute the information about newly registered
1920 client to its router (or if the server is router, to all routers in
1921 the SILC network).  More information about this in [SILC2].
1922
1923 Router server MUST also check whether some client in the local cell
1924 is watching for the nickname this new client has, and send the 
1925 SILC_NOTIFY_TYPE_WATCH to the watcher.
1926
1927
1928 .ti 0
1929 4.2 Creating Server Connection
1930
1931 This section describes the procedure when server connects to its
1932 router (or when router connects to other router, the cases are
1933 equivalent).  The procedure is very much alike when client connects
1934 to the server thus it is not repeated here.
1935
1936 One difference is that server MUST perform connection authentication
1937 protocol with proper authentication.  A proper authentication is based
1938 on passphrase authentication or public key authentication based on
1939 digital signatures.
1940
1941 After server and router has successfully performed the key exchange
1942 and connection authentication protocol, the server register itself
1943 to the router by sending SILC_PACKET_NEW_SERVER packet.  This packet
1944 includes the server's Server ID that it has created by itself and
1945 other relevant information about the server.
1946
1947 After router has received the SILC_PACKET_NEW_SERVER packet it
1948 distributes the information about newly registered server to all routers
1949 in the SILC network.  More information about this in [SILC2].
1950
1951 As client needed to resolve the destination ID this MUST be done by the
1952 server that connected to the router, as well.  The way to resolve it is
1953 to get the ID from previously received packet.  The server MAY also 
1954 use SILC_COMMAND_INFO command to resolve the ID.  Server MUST also start
1955 using its own Server ID as Source ID in SILC Packet Header and the
1956 router's Server ID as Destination when communicating with the router.
1957
1958
1959 .ti 0
1960 4.2.1 Announcing Clients, Channels and Servers
1961
1962 After server or router has connected to the remote router, and it already
1963 has connected clients and channels it MUST announce them to the router.
1964 If the server is router server, also all the local servers in the cell
1965 MUST be announced.
1966
1967 All clients are announced by compiling a list of ID Payloads into the
1968 SILC_PACKET_NEW_ID packet.  All channels are announced by compiling a
1969 list of Channel Payloads into the SILC_PACKET_NEW_CHANNEL packet.
1970 Channels' mode and founder public key and other channel mode specific
1971 data is announced by sending SILC_NOTIFY_TYPE_CMODE_CHANGE notify list.
1972 Also, the channel users on the channels must be announced by compiling a
1973 list of Notify Payloads with the SILC_NOTIFY_TYPE_JOIN notify type into
1974 the SILC_PACKET_NOTIFY packet.  The users' modes on the channel must 
1975 also be announced by compiling list of Notify Payloads with the 
1976 SILC_NOTIFY_TYPE_CUMODE_CHANGE notify type into the SILC_PACKET_NOTIFY
1977 packet.
1978
1979 The router MUST also announce the local servers by compiling list of
1980 ID Payloads into the SILC_PACKET_NEW_ID packet.
1981
1982 Also, clients' modes (user modes in SILC) MUST be announced.  This is
1983 done by compiling a list of Notify Payloads with SILC_NOTIFY_UMODE_CHANGE
1984 notify type into the SILC_PACKET_NOTIFY packet.  Also, channel's topics
1985 MUST be announced by compiling a list of Notify Payloads with the
1986 SILC_NOTIFY_TOPIC_SET notify type into the SILC_PACKET_NOTIFY packet.
1987
1988 The router which receives these lists MUST process them and broadcast
1989 the packets to its primary route.  When processing the announced channels
1990 and channel users the router MUST check whether a channel exists already
1991 with the same name.  If channel exists with the same name it MUST check
1992 whether the Channel ID is different.  If the Channel ID is different the
1993 router MUST send the notify type SILC_NOTIFY_TYPE_CHANNEL_CHANGE to the
1994 server to force the channel ID change to the ID the router has.  If the
1995 mode of the channel is different the router MUST send the notify type
1996 SILC_NOTIFY_TYPE_CMODE_CHANGE to the server to force the mode change
1997 to the mode that the router has.
1998
1999 The router MUST also generate new channel key and distribute it to the
2000 channel.  The key MUST NOT be generated if the SILC_CMODE_PRIVKEY mode
2001 is set.
2002
2003 If the channel has channel founder on the router the router MUST send
2004 the notify type SILC_NOTIFY_TYPE_CUMODE_CHANGE to the server to force
2005 the mode change for the channel founder on the server.  The channel 
2006 founder privileges MUST be removed.
2007
2008 The router processing the channels MUST also compile a list of
2009 Notify Payloads with the SILC_NOTIFY_TYPE_JOIN notify type into the
2010 SILC_PACKET_NOTIFY and send the packet to the server.  This way the
2011 server (or router) will receive the clients on the channel that
2012 the router has.
2013
2014
2015 .ti 0
2016 4.3 Joining to a Channel
2017
2018 This section describes the procedure when client joins to a channel.
2019 Client joins to channel by sending command SILC_COMMAND_JOIN to the
2020 server.  If the receiver receiving join command is normal server the
2021 server MUST check its local list whether this channel already exists
2022 locally.  This would indicate that some client connected to the server
2023 has already joined to the channel.  If this is case the client is
2024 joined to the channel, new channel key is created and information about
2025 newly joined channel is sent to the router.  The router is informed
2026 by sending SILC_NOTIFY_TYPE_JOIN notify type.  The notify type MUST
2027 also be sent to the local clients on the channel.  The new channel key
2028 is also sent to the router and to local clients on the channel.
2029
2030 If the channel does not exist in the local list the client's command
2031 MUST be sent to the router which will then perform the actual joining
2032 procedure.  When server receives the reply to the command from the
2033 router it MUST be sent to the client which sent the command originally.
2034 Server will also receive the channel key from the server that it MUST
2035 send to the client which originally requested the join command.  The
2036 server MUST also save the channel key.
2037
2038 If the receiver of the join command is router it MUST first check its
2039 local list whether anyone in the cell has already joined to the channel.
2040 If this is the case the client is joined to the channel and reply is
2041 sent to the client.  If the command was sent by server the command reply
2042 is sent to the server which sent it.  Then the router MUST also create
2043 new channel key and distribute it to all clients on the channel and
2044 all servers that has clients on the channel.  Router MUST also send
2045 the SILC_NOTIFY_TYPE_JOIN notify type to local clients on the channel
2046 and to local servers that has clients on the channel.
2047
2048 If the channel does not exist on the router's local list it MUST
2049 check the global list whether the channel exists at all.  If it does
2050 the client is joined to the channel as described previously.  If
2051 the channel does not exist the channel is created and the client
2052 is joined to the channel.  The channel key is also created and
2053 distributed as previously described.  The client joining to the created
2054 channel is made automatically channel founder and both channel founder
2055 and channel operator privileges is set for the client.
2056
2057 If the router created the channel in the process, information about the
2058 new channel MUST be broadcasted to all routers.  This is done by 
2059 broadcasting SILC_PACKET_NEW_CHANNEL packet to the router's primary
2060 route.  When the router joins the client to the channel it MUST also
2061 send information about newly joined client to all routers in the SILC
2062 network.  This is done by broadcasting the SILC_NOTIFY_TYPE_JOIN notify
2063 type to the router's primary route. 
2064
2065 It is important to note that new channel key is created always when
2066 new client joins to channel, whether the channel has existed previously
2067 or not.  This way the new client on the channel is not able to decrypt
2068 any of the old traffic on the channel.  Client which receives the reply to
2069 the join command MUST start using the received Channel ID in the channel
2070 message communication thereafter.  Client also receives the key for the
2071 channel in the command reply.  Note that the channel key is never
2072 generated if the SILC_CMODE_PRIVKEY mode is set.
2073
2074
2075
2076 .ti 0
2077 4.4 Channel Key Generation
2078
2079 Channel keys are created by router which creates the channel by taking
2080 enough randomness from cryptographically strong random number generator.
2081 The key is generated always when channel is created, when new client
2082 joins a channel and after the key has expired.  Key could expire for
2083 example in an hour.
2084
2085 The key MUST also be re-generated whenever some client leaves a channel.
2086 In this case the key is created from scratch by taking enough randomness
2087 from the random number generator.  After that the key is distributed to
2088 all clients on the channel.  However, channel keys are cell specific thus
2089 the key is created only on the cell where the client, which left the
2090 channel, exists.  While the server or router is creating the new channel
2091 key, no other client may join to the channel.  Messages that are sent
2092 while creating the new key are still processed with the old key.  After
2093 server has sent the SILC_PACKET_CHANNEL_KEY packet MUST client start
2094 using the new key.  If server creates the new key the server MUST also
2095 send the new key to its router.  See [SILC2] on more information about
2096 how channel messages must be encrypted and decrypted when router is
2097 processing them.
2098
2099 When client receives the SILC_PACKET_CHANNEL_KEY packet with the
2100 Channel Key Payload it MUST process the key data to create encryption
2101 and decryption key, and to create the HMAC key that is used to compute
2102 the MACs of the channel messages.  The processing is as follows:
2103
2104   channel_key  = raw key data
2105   HMAC key     = hash(raw key data)
2106
2107 The raw key data is the key data received in the Channel Key Payload.
2108 The hash() function is the hash function used in the HMAC of the channel.
2109 Note that the server also MUST save the channel key.
2110
2111
2112 .ti 0
2113 4.5 Private Message Sending and Reception
2114
2115 Private messages are sent point to point.  Client explicitly destine
2116 a private message to specific client that is delivered to only to that
2117 client.  No other client may receive the private message.  The receiver
2118 of the private message is destined in the SILC Packet Header as any
2119 other packet as well.
2120
2121 If the sender of a private message does not know the receiver's Client
2122 ID, it MUST resolve it from server.  There are two ways to resolve the
2123 client ID from server; it is RECOMMENDED that client implementations
2124 send SILC_COMMAND_IDENTIFY command to receive the Client ID.  Client
2125 MAY also send SILC_COMMAND_WHOIS command to receive the Client ID.
2126 If the sender has received earlier a private message from the receiver
2127 it should have cached the Client ID from the SILC Packet Header.
2128
2129 If server receives a private message packet which includes invalid
2130 destination Client ID the server MUST send SILC_NOTIFY_TYPE_ERROR
2131 notify to the client with error status indicating that such Client ID
2132 does not exist.
2133
2134 See [SILC2] for description of private message encryption and decryption
2135 process.
2136
2137
2138 .ti 0
2139 4.6 Private Message Key Generation
2140
2141 Private message MAY be protected with a key generated by the client.
2142 The key may be generated and sent to the other client by sending packet
2143 SILC_PACKET_PRIVATE_MESSAGE_KEY which travels through the network
2144 and is secured by session keys.  After that the private message key
2145 is used in the private message communication between those clients.
2146 The key sent inside the payload SHOULD be randomly generated.  This
2147 packet MUST NOT be used to send pre-shared keys.
2148
2149 Other choice is to entirely use keys that are not sent through
2150 the SILC network at all.  This significantly adds security.  This key
2151 could be a pre-shared-key that is known by both of the clients.  Both
2152 agree about using the key and starts sending packets that indicate
2153 that the private message is secured using private message key.  In
2154 case of pre-shared keys (static keys) the IV used in encryption SHOULD
2155 be chosen randomly.
2156
2157 It is also possible to negotiate fresh key material by performing
2158 Key Agreement.  The SILC_PACKET_KEY_AGREEMENT packet MAY be used to
2159 negotiate the fresh key material.  In this case the resulted key
2160 material is used to secure the private messages.  Also, the IV used
2161 in encryption is used as defined in [SILC3], unless otherwise stated
2162 by the encryption mode used.  By performing Key Agreement the clients
2163 may negotiate the cipher and HMAC to be used in the private message
2164 encryption and to negotiate additional security parameters.
2165
2166 If the key is pre-shared key or other key material not generated by
2167 Key Agreement, then the key material SHOULD be processed as defined
2168 in [SILC3].  In the processing, however, the HASH, as defined in
2169 [SILC3] MUST be ignored.  After processing the key material it is
2170 employed as defined in [SILC3].  In this case also, implementations
2171 SHOULD use the SILC protocol's mandatory cipher and HMAC in private
2172 message encryption.
2173
2174
2175 .ti 0
2176 4.7 Channel Message Sending and Reception
2177
2178 Channel messages are delivered to group of users.  The group forms a
2179 channel and all clients on the channel receives messages sent to the
2180 channel.
2181
2182 Channel messages are destined to channel by specifying the Channel ID
2183 as Destination ID in the SILC Packet Header.  The server MUST then
2184 distribute the message to all clients on the channel by sending the
2185 channel message destined explicitly to a client on the channel.
2186
2187 If server receives a channel message packet which includes invalid
2188 destination Channel ID the server MUST send SILC_NOTIFY_TYPE_ERROR
2189 notify to the sender with error status indicating that such Channel ID
2190 does not exist.
2191
2192 See the [SILC2] for description of channel message routing for router
2193 servers, and channel message encryption and decryption process.
2194
2195
2196 .ti 0
2197 4.8 Session Key Regeneration
2198
2199 Session keys MUST be regenerated periodically, say, once in an hour.
2200 The re-key process is started by sending SILC_PACKET_REKEY packet to
2201 other end, to indicate that re-key must be performed.  The initiator
2202 of the connection SHOULD initiate the re-key.
2203
2204 If perfect forward secrecy (PFS) flag was selected in the SILC Key
2205 Exchange protocol [SILC3] the re-key MUST cause new key exchange with
2206 SKE protocol.  In this case the protocol is secured with the old key
2207 and the protocol results to new key material.  See [SILC3] for more
2208 information.  After the SILC_PACKET_REKEY packet is sent the sender
2209 will perform the SKE protocol.
2210
2211 If PFS flag was set the resulted key material is processed as described
2212 in the section Processing the Key Material in [SILC3].  The difference
2213 with re-key in the processing is that the initial data for the hash 
2214 function is just the resulted key material and not the HASH as it
2215 is not computed at all with re-key.  Other than that, the key processing
2216 it equivalent to normal SKE negotiation.
2217
2218 If PFS flag was not set, which is the default case, then re-key is done
2219 without executing SKE protocol.  In this case, the new key is created by
2220 providing the current sending encryption key to the SKE protocol's key
2221 processing function.  The process is described in the section Processing
2222 the Key Material in [SILC3].  The difference in the processing is that
2223 the initial data for the hash function is the current sending encryption
2224 key and not the SKE's KEY and HASH values.  Other than that, the key
2225 processing is equivalent to normal SKE negotiation.
2226
2227 After both parties has regenerated the session key, both MUST send
2228 SILC_PACKET_REKEY_DONE packet to each other.  These packets are still
2229 secured with the old key.  After these packets, the subsequent packets
2230 MUST be protected with the new key.
2231
2232
2233 .ti 0
2234 4.9 Command Sending and Reception
2235
2236 Client usually sends the commands in the SILC network.  In this case
2237 the client simply sends the command packet to server and the server
2238 processes it and replies with command reply packet.  See the [SILC3]
2239 for detailed description of all commands.
2240
2241 However, if the server is not able to process the command, it is sent 
2242 to the server's router.  This is case for example with commands such
2243 as, SILC_COMMAND_JOIN and SILC_COMMAND_WHOIS commands.  However, there
2244 are other commands as well.  For example, if client sends the WHOIS
2245 command requesting specific information about some client the server must
2246 send the WHOIS command to router so that all clients in SILC network
2247 are searched.  The router, on the other hand, sends the WHOIS command
2248 further to receive the exact information about the requested client.
2249 The WHOIS command travels all the way to the server which owns the client
2250 and it replies with command reply packet.  Finally, the server which
2251 sent the command receives the command reply and it must be able to
2252 determine which client sent the original command.  The server then
2253 sends command reply to the client.  Implementations should have some
2254 kind of cache to handle, for example, WHOIS information.  Servers
2255 and routers along the route could all cache the information for faster
2256 referencing in the future.
2257
2258 The commands sent by server may be sent hop by hop until someone is able
2259 to process the command.  However, it is preferred to destine the command
2260 as precisely as it is possible.  In this case, other routers en route
2261 MUST route the command packet by checking the true sender and true
2262 destination of the packet.  However, servers and routers MUST NOT route
2263 command reply packets to clients coming from other server.  Client
2264 MUST NOT accept command reply packet originated from anyone else but
2265 from its own server.
2266
2267
2268 .ti 0
2269 4.10 Closing Connection
2270
2271 When remote client connection is closed the server MUST send the notify
2272 type SILC_NOTIFY_TYPE_SIGNOFF to its primary router and to all channels
2273 the client was joined.  The server MUST also save the client's information
2274 for a period of time for history purposes.
2275
2276 When remote server or router connection is closed the server or router
2277 MUST also remove all the clients that was behind the server or router
2278 from the SILC Network.  The server or router MUST also send the notify
2279 type SILC_NOTIFY_TYPE_SERVER_SIGNOFF to its primary router and to all
2280 local clients that are joined on the same channels with the remote 
2281 server's or router's clients.
2282
2283 Router server MUST also check whether some client in the local cell
2284 is watching for the nickname this client has, and send the 
2285 SILC_NOTIFY_TYPE_WATCH to the watcher, unless the client which left
2286 the network has the SILC_UMODE_REJECT_WATCHING user mode set.
2287
2288
2289 .ti 0
2290 4.11 Detaching and Resuming a Session
2291
2292 SILC protocol provides a possibility for a client to detach itself from
2293 the network without actually signing off from the network.  The client
2294 connection to the server is closed but the client remains as valid client
2295 in the network.  The client may then later resume its session back from
2296 any server in the network.
2297
2298 When client wishes to detach from the network it MUST send the
2299 SILC_COMMAND_DETACH command to its server.  The server then MUST set
2300 SILC_UMODE_DETACHED mode to the client and send SILC_NOTIFY_UMODE_CHANGE
2301 notify to its primary router, which will then MUST broadcast it further
2302 to other routers in the network.  This user mode indicates that the
2303 client is detached from the network.  Implementations MUST NOT use
2304 the SILC_UMODE_DETACHED flag to determine whether a packet can be sent
2305 to the client.  All packets MUST still be sent to the client even if
2306 client is detached from the network.  Only the server that originally
2307 had the active client connection is able to make the decision after it
2308 notices that the network connection is not active.  In this case the
2309 default case is to discard the packet.
2310
2311 The SILC_UMODE_DETACHED flag cannot be set by client itself directly
2312 with SILC_COMMAND_UMODE command, but only implicitly by sending the
2313 SILC_COMMAND_DETACH command.  The flag also cannot be unset by the
2314 client, server or router with SILC_COMMAND_UMODE command, but only
2315 implicitly by sending and receiving the SILC_PACKET_RESUME_CLIENT
2316 packet.
2317
2318 When the client wishes to resume its session in the SILC Network it
2319 connects to a server in the network, which MAY also be a different
2320 from the original server, and performs normal procedures regarding
2321 creating a connection as described in section 4.1.  After the SKE
2322 and the Connection Authentication protocols has been successfully
2323 completed the client MUST NOT send SILC_PACKET_NEW_CLIENT packet, but
2324 MUST send SILC_PACKET_RESUME_CLIENT packet.  This packet is used to
2325 perform the resuming procedure.  The packet MUST include the detached
2326 client's Client ID, which the client must know.  It also includes
2327 Authentication Payload which includes signature made with the client's
2328 private key.  The signature is computed as defined in the section
2329 3.9.1.  Thus, the authentication method MUST be based in public key
2330 authentication.
2331
2332 When server receives the SILC_PACKET_RESUME_CLIENT packet it MUST
2333 do the following:  Server checks that the Client ID is valid client
2334 and that it has the SILC_UMODE_DETACHED mode set.  Then it verifies
2335 the Authentication Payload with the detached client's public key.
2336 If it does not have the public key it retrieves it by sending
2337 SILC_COMMAND_GETKEY command to the server that has the public key from
2338 the original client connection.  The server MUST NOT use the public
2339 key received in the SKE protocol for this connection.  If the
2340 signature is valid the server unsets the SILC_UMODE_DETACHED flag,
2341 and sends the SILC_PACKET_RESUME_CLIENT packet to its primary router.
2342 The routers MUST broadcast the packet and unset the SILC_UMODE_DETACHED
2343 flag when the packet is received.  If the server is router server it
2344 also MUST send the SILC_PACKET_RESUME_CLIENT packet to the original
2345 server whom owned the detached client.
2346
2347 The servers and routers that receives the SILC_PACKET_RESUME_CLIENT
2348 packet MUST know whether the packet already has been received for
2349 the client.  It is protocol error to attempt to resume the client
2350 session from more than one server.  The implementations could set
2351 internal flag that indicates that the client is resumed.  If router
2352 receive SILC_PACKET_RESUME_CLIENT packet for client that is already
2353 resumed the client MUST be killed from the network.  This would
2354 indicate that the client is attempting to resume the session more
2355 than once which is protocol error.  In this case the router sends
2356 SILC_NOTIFY_TYPE_KILLED to the client.  All routers that detect
2357 the same situation MUST also send the notify for the client.
2358
2359 The servers and routers that receive the SILC_PACKET_RESUME_CLIENT
2360 must also understand that the client may not be found behind the
2361 same server that it originally came from.  They must update their
2362 caches according this.  The server that now owns the client session
2363 MUST check whether the Client ID of the resumed client is based
2364 on the server's Server ID.  If it is not it creates a new Client
2365 ID and send SILC_NOTIFY_TYPE_NICK_CHANGE to the network.  It MUST
2366 also send the channel keys of all channels that the client is
2367 joined to the client since it does not have them.  Whether the
2368 Client ID was changed or not the server MUST send SILC_PACKET_NEW_ID
2369 packet to the client.  Only after this the client is resumed back
2370 to the network and may start sending packets and messages.
2371
2372 It is also possible that the server does not know about the channels
2373 that the client has joined.  In this case it join the client internally
2374 to the channels, generate new channel keys and distribute the keys
2375 to the channels as described in section 4.4.
2376
2377 It is implementation issue for how long servers keep detached client
2378 sessions.  It is RECOMMENDED that the detached sessions would be
2379 persistent as long as the server is running.
2380
2381
2382 .ti 0
2383 5 Security Considerations
2384
2385 Security is central to the design of this protocol, and these security
2386 considerations permeate the specification.  Common security considerations
2387 such as keeping private keys truly private and using adequate lengths for
2388 symmetric and asymmetric keys must be followed in order to maintain the
2389 security of this protocol.
2390
2391 Special attention must also be paid on the servers and routers that are
2392 running the SILC service.  The SILC protocol's security depends greatly
2393 on the security and the integrity of the servers and administrators that
2394 are running the service.  It is recommended that some form of registration
2395 is required by the server and router administrator prior acceptance to
2396 the SILC Network.  Even though, the SILC protocol is secure in a network
2397 of mutual distrust between clients, servers, routers and administrators
2398 of the servers, the client should be able to trust the servers they are
2399 using if they wish to do so.
2400
2401 It however must be noted that if the client requires absolute security
2402 by not trusting any of the servers or routers in the SILC Network, it can
2403 be accomplished by negotiating private keys outside the SILC Network,
2404 either using SKE or some other key exchange protocol, or to use some
2405 other external means for distributing the keys.  This applies for all 
2406 messages, private messages and channel messages.
2407
2408 It is important to note that SILC, like any other security protocol is
2409 not full proof system; the SILC servers and routers could very well be
2410 compromised.  However, to provide acceptable level of security and
2411 usability for end user the protocol use many times session keys or other
2412 keys generated by the servers to secure the messages.  This is
2413 intentional design feature to allow ease of use for end user.  This way
2414 the network is still usable, and remains encrypted even if the external
2415 means of distributing the keys is not working.  The implementation,
2416 however, may like to not follow this design feature, and always negotiate
2417 the keys outside SILC network.  This is acceptable solution and many times
2418 recommended.  The implementation still must be able to work with the
2419 server generated keys.
2420
2421 If this is unacceptable for the client or end user, the private keys
2422 negotiated outside the SILC Network should always be used.  In the end
2423 it is always implementor's choice whether to negotiate private keys by
2424 default or whether to use the keys generated by the servers.
2425
2426 It is also recommended that router operators in the SILC Network would
2427 form a joint forum to discuss the router and SILC Network management
2428 issues.  Also, router operators along with the cell's server operators
2429 should have a forum to discuss the cell management issues.
2430
2431
2432 .ti 0
2433 6 References
2434
2435 [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
2436              May 2002.
2437
2438 [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication 
2439              Protocols", Internet Draft, May 2002.
2440
2441 [SILC4]      Riikonen, P., "SILC Commands", Internet Draft, May 2002.
2442
2443 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
2444              RFC 1459, May 1993.
2445
2446 [IRC-ARCH]   Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
2447              April 2000.
2448
2449 [IRC-CHAN]   Kalt, C., "Internet Relay Chat: Channel Management", RFC
2450              2811, April 2000.
2451
2452 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
2453              2812, April 2000.
2454
2455 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
2456              2813, April 2000.
2457
2458 [SSH-TRANS]  Ylonen, T., et al, "SSH Transport Layer Protocol", 
2459              Internet Draft.
2460
2461 [PGP]        Callas, J., et al, "OpenPGP Message Format", RFC 2440,
2462              November 1998.
2463
2464 [SPKI]       Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
2465              September 1999.
2466
2467 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key 
2468              Infrastructure, Certificate and CRL Profile", RFC 2459,
2469              January 1999.
2470
2471 [Schneier]   Schneier, B., "Applied Cryptography Second Edition",
2472              John Wiley & Sons, New York, NY, 1996.
2473
2474 [Menezes]    Menezes, A., et al, "Handbook of Applied Cryptography",
2475              CRC Press 1997.
2476
2477 [OAKLEY]     Orman, H., "The OAKLEY Key Determination Protocol",
2478              RFC 2412, November 1998.
2479
2480 [ISAKMP]     Maughan D., et al, "Internet Security Association and
2481              Key Management Protocol (ISAKMP)", RFC 2408, November
2482              1998.
2483
2484 [IKE]        Harkins D., and Carrel D., "The Internet Key Exchange
2485              (IKE)", RFC 2409, November 1998.
2486
2487 [HMAC]       Krawczyk, H., "HMAC: Keyed-Hashing for Message
2488              Authentication", RFC 2104, February 1997.
2489
2490 [PKCS1]      Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
2491              Specifications, Version 2.0", RFC 2437, October 1998.
2492
2493 [RFC2119]    Bradner, S., "Key Words for use in RFCs to Indicate
2494              Requirement Levels", BCP 14, RFC 2119, March 1997.
2495
2496 [RFC2279]    Yergeau, F., "UTF-8, a transformation format of ISO
2497              10646", RFC 2279, January 1998.
2498
2499 [PKCS7]      Kalinski, B., "PKCS #7: Cryptographic Message Syntax,
2500              Version 1.5", RFC 2315, March 1998.
2501
2502
2503 .ti 0
2504 7 Author's Address
2505
2506 .nf
2507 Pekka Riikonen
2508 Snellmaninkatu 34 A 15
2509 70100 Kuopio
2510 Finland
2511
2512 EMail: priikone@iki.fi
2513
2514 This Internet-Draft expires 25 April 2003