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