Added SILC Thread Queue API
[silc.git] / public_html / html / whitepaper.php
1 <!-- This file is processed with html2ps to generate PostiScript. 
2      Do not edit the HTML syntax unless you know what you are doing. -->
3 <html>
4 <head>
5 <title>SILC Protocol White Paper</title>
6 <link rev=made href="mailto:priikone@silcnet.org">
7 <meta name="Author" content="Pekka Riikonen - SILC Project">
8 <meta name="Description"
9  content="SILC - Secure Internet Live Conferencing Protocol">
10 <meta name="Created" content="Version 1.0.5 / 15 Jab 2002">
11 </head>
12 <body bgcolor="#ffffff">
13
14 <font face="Helvetica">
15
16 <font size="6"><b>SILC Protocol White Paper</b></font><br>
17 <font size="2">Version 1.0.5 / 15 Jan 2002</font>
18
19 <p>
20 <h1>Introduction</h1>
21
22 Chat protocols are very popular on the Internet.  They have actually
23 been very popular since the very first chat protocols appeared on the net.
24 The Internet Relay Chat (IRC) was one of the first chat protocols, and quickly
25 gained the status of being the most popular chat on the net.  Today, IRC
26 has several competitors from various other so called Instant Messaging (IM)
27 protocols, such as ICQ.  However, all of these different chat protocols
28 have something in common; they are all insecure.
29 <p>
30
31 The security is important feature in applications and protocols in 
32 contemporary network environment.  The older chat protocols, however have
33 failed to meet the growing security requirements on the Internet.
34 It is not anymore enough to just provide services, like for example
35 chat services. Now, they need to be secure services.
36 <p>
37
38 The Secure Internet Live Conferencing (SILC) protocol is a new generation
39 chat protocol which provides full featured conferencing services, just
40 like any other contemporary chat protocol provides.  In addition, it
41 provides security by encrypting and authenticating the messages in
42 the network.  The security has been the primary goal of the SILC protocol
43 and the protocol has been designed from the day one security in mind.
44 All packets and messages travelling in the SILC Network are always
45 encrypted and authenticated.  The network topology is also different
46 from for example IRC network.  The SILC network topology attempts to be
47 more powerful and scalable than the IRC network.  The basic purpose
48 of the SILC protocol is to provide secure conferencing services.
49 <p>
50
51 The SILC Protocol have been developed as Open Source project.  The
52 protocol specifications are freely available and they have been submitted to
53 the IETF.  The very first implementations of the protocol are also already
54 available.
55
56 <p><br>
57 <h1>About This White Paper</h1>
58 <p>
59 The purpose of this white paper is to give short but deep enough introduction
60 to the SILC Protocol.  The document describes the purpose of the protocol
61 and how the protocol works in practice.  This document is intended for all
62 audience.  This document should be easy to understand for non-technical
63 person and still be detailed enough for technically oriented person.  See
64 the section <a href="#terms">Terms and Abbreviations</a> for terms used
65 in this document.
66 <p>
67
68 <p>
69 (c) Copyright 2001 - 2002 Pekka Riikonen 
70 (<a href="mailto:priikone at silcnet.org">priikone at silcnet.org</a>)
71 <p>
72 This document is free document; you can redistribute it and/or modify
73 it under the terms of the GNU General Public License as published by
74 the Free Software Foundation; either version 2 of the License, or
75 (at your option) any later version.  This document is distributed in
76 the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
77 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
78 See the GNU General Public License for more details.
79
80
81 <p><br>
82 <h1>SILC Protocol</h1>
83 <p>
84
85 The Secure Internet Live Conferencing (SILC) protocol provides secure
86 conferencing services over insecure network channel.  The SILC is IRC
87 like protocol, however it does not support IRC.  Strong cryptographic
88 methods are used to protect SILC packets inside the SILC network.  SILC
89 provides all the common conferencing services like channels, channel
90 messages, private messages, nicknames, various commands, and secure
91 file transfer.  Difference to other chat protocol is in the design of
92 the protocol.  The SILC protocol has been designed from the day one
93 security in mind and it shows in the protocol design.
94 <p>
95
96 The packets and messages in the SILC network are always encrypted and
97 authenticated.  It is not possible to send unencrypted messages in SILC
98 at all.  This assures that end user cannot even accidently send unencrypted
99 messages while thinking that it is encrypted.  This is one of the problems 
100 of most of the other chat protocols that provide so called plugin encryption.
101 They are not secure by default but try to provide security by applying
102 external security protocol such as PGP or SSL over the insecure chat
103 protocol.  In these cases the security is achieved usually by encrypting the
104 data while key management, message authentication and other security issues
105 may be left out, leaving the implementation vulnerable to various security
106 problems.  The other problem is also that the external protocols tend to
107 leave the network only partly secured; usually only two points in the
108 network are secured with for example SSL.  While SSL does provide provable
109 security it is not enough to provide security for a chat network as a whole.
110 <p>
111
112 SILC is secure in environment of mutual distrust between entities
113 in the network.  It is possible to encrypt messages end to end, so that only
114 the sender and the receiver is able to encrypt and decrypt messages.  It
115 is also possible to send messages to group of users, so that only the
116 specified group of users is able to encrypt and decrypt messages.  Many
117 times the protocol use keys that are generated by the servers, so that
118 if other external key exchange methods fail the network still remains
119 encrypted.  However, it is always possible to negotiate and use locally
120 generated keys to secure messages, so that the servers do not know the
121 key.
122 <p>
123
124 Like so many other contemporary chat protocols, SILC too provides
125 file transfer.  It is possible to transfer files securely between users
126 in the SILC Network.  The actual file transfer stream is always sent
127 outside the network peer to peer.  Before the file transfer is started
128 a key exchange protocol is executed to negotiate file transfer session
129 key.
130 <p>
131
132 The network topology is also different to various other chat protocols,
133 like for example IRC.  IRC has tree style network, but SILC network can be
134 described more as an hybrid ring-mesh network.  The routers in the network
135 form a ring, but they can also have other direct routers (secondary routes)
136 to other routers.  A router in the network is also called a cell, when it
137 has multiple servers and clients connected to it.  The cell can also have
138 backup routers in case the primary router becomes unresponsive.
139
140 <p><br>
141 <object data="silc_network.jpg" type="application/postscript">
142 <img src="silc_network.png" alt="SILC Network" align="center" border"0">
143 </object>
144 <p><br>
145
146 The diagram above illustrates a portion of the SILC network.  It shows
147 two cells that both have several servers, and backup routers and several
148 clients.  Clients can connect to server and routers if they want to.
149 The following sections will describe the entities of the SILC Network
150 in greater detail.
151 <p>
152
153
154 <p><br>
155 <h2>Clients</h2>
156 <p>
157
158 A client is a piece of software connecting to SILC server.  The software
159 is usually run by the end user, a real person that is.  The purpose of the
160 clients is to provide the end user an interface to the SILC services.
161 They are used to actually engage the conversations on the SILC Network,
162 and they can be used to execute various SILC commands.
163 <p>
164
165 The clients are distinquished from other clients by unique Client ID.
166 There cannot be multiple same Client IDs in the SILC Network at the same time.
167 The end user, however does not use Client IDs.  The end users usually selects
168 a preferred nickname they want to use, and identifies themself with that
169 nickname to other users on the network.  The nicknames are not unique in
170 the SILC Network.  There can be multiple same nicknames at the same time
171 on the network.  The maximum length for the nickname is 128 characters.
172 <p>
173
174 Most of the other chat protocols have unique nicknames.  This is where SILC
175 differs from most of the other chat protocols.  The purpose of this
176 feature is to make IRC style nickname wars obsolete, as no one owns their
177 nickname; there can always be somene else with the same nickname.
178 <p>
179
180 When client connects to the server the SILC Key Exchange (SKE) protocol and
181 SILC Connection Authentication protocol are executed.  The result of the
182 SKE protocol is the session key that the client and server use to secure
183 their communication.  All commands, for example, that the client sends
184 to the server are secured with the session key.  The session key expires
185 periodically and the rekey process can be executed with or without the
186 Perfect Forward Secrecy (PFS).  The connection authentication protocol is
187 used to authenticate the client to the server.  The server may allow the
188 client to connect without authentication, or it may require a passphrase or
189 public key based (or certificates) authentication.
190
191
192 <p><br>
193 <h2>Servers</h2>
194 <p>
195
196 Servers forms the basis for the SILC Network, by providing a point to which
197 clients may connect.  There are two kinds of servers in SILC; normal servers
198 and router servers.  The next section describes the function of router
199 server.
200 <p>
201
202 Normal servers connect to router server.  Normal servers cannot directly
203 connect to other normal servers.  Messages that are destined outside the
204 local server are always sent to the router for further routing.
205 The clients usually connect to the normal server, however, clients may
206 connect to router servers as well.  The SILC Network diagram above
207 illustrates how normal servers connects to the router server.
208 <p>
209
210 The servers are distinquished by other servers in the network by unique
211 Server ID.  There cannot be multiple same Server IDs in the SILC Network
212 at the same time.  The servers keep track of local information.  It knows
213 all locally connected clients and it knows all channels that its clients
214 have joined.  However, it does not know any global information.  It
215 usually does not keep track of global clients, however, it may cache
216 that information if it was queried.  The reason for this is that the
217 server does not need to keep global information up to date and thus
218 makes the server faster (and in the end the entire network faster).
219 They can always query the information from the router.
220 <p>
221
222 When server connects to its router the SILC Key Exchange (SKE) protocol
223 and the SILC Connection Authentication protocol are executed, just like
224 when client connects to server.  The SKE results in to the session key
225 that is used to secure the communication between the server and the
226 router.  The connection authentication protocol is used to authenticate
227 the server to the router.  The authentication is always based in either 
228 passphrase or public key (or certificates).
229
230
231 <p><br>
232 <h2>Routers</h2>
233 <p>
234
235 The router servers are servers that actually handles the message routing
236 in the network.  They are, however also normal servers and they do accept
237 client connections.  Each of the router in the network is called a cell.
238 A cell can have only one active router and it may have several servers
239 and several clients.  The cell, however may have backup routers that can
240 take over the tasks of the primary router if it becomes unresponsive.
241 The switch to the backup router should be transparent and only local
242 connections to the primary router are lost.  Other connections in the
243 cell are intact, and clients and servers merely experience some lag in
244 the network connection during the switch to the backup router.
245 <p>
246
247 The normal server knows only local information.  Router server on the
248 other hand knows local information and global information.  It considers
249 the cell as local and outside cells as global.  It knows all the clients
250 connected to the network, all created channels, and all routers and servers
251 in the network.  The server may query the global information if it is needed.
252 For example, when client sends WHOIS command, the server may query the
253 information from the router.  If the router does not know all the details
254 that the WHOIS command requires it can query the information from a router
255 or a server which knows all the details.  It may then cache that information.
256 <p>
257
258 The primary purpose of the router server is to route the messages to
259 local servers and local clients, and messages that are destined to outside
260 the cell are routed to the primary route or some other secondary
261 route if it is a faster route.  The routers in the network forms a ring.
262 Each router has a primary route to other router in the network.  Finally
263 the ring is closed by the last router using the first router in the
264 network as its primary route.
265
266 <p><br>
267 <object data="silc_routers.jpg" type="application/postscript">
268 <img src="silc_routers.png" alt="SILC Routers" align="center" border"0">
269 </object>
270 <p><br>
271
272 The diagram above illustrates how the routers forms a ring in the network.
273 A router may have several secondary routes which it may use when it
274 routes the packets.
275 <p>
276
277 When routers connect to its primary router the SKE and the SILC Connection
278 Authentication protocols are executed just like when normal server connects
279 to its router.  The session key is used to secure the communication between
280 the routers.  All the secondary routes also have their own session keys.
281
282
283 <p><br>
284 <h1>SILC Packet Protocol</h1>
285 <p>
286
287 The basis of SILC protocol relies in the SILC packets and they are with
288 out a doubt the most important part of the protocol.  The SILC Packet 
289 protocol is a binary packet protocol.  The protocol provides secure
290 binary packets and assures that the contents of the packets are secured
291 and authenticated.
292 <p>
293
294 Packets are used in the SILC protocol all the time to send for example
295 channel messages, private messages, commands and other information.  All
296 packets in SILC network are always encrypted and their integrity is
297 assured by computed Message Authentication Codes (MAC).  The protocol
298 defines several packet types and packet payloads.  Each packet type
299 usually has a specific packet payload that actually defines the contents
300 of the packet.  Hence, the actual data in the packet is the packet payload 
301 defined in the protocol.
302
303 <p><br>
304 <object data="silc_packet.jpg" type="application/postscript">
305 <img src="silc_packet.png" alt="Typical SILC Packet" align="center" border"0">
306 </object>
307 <p><br>
308
309 As the diagram above illustrates the SILC packet is constructed from the
310 SILC Packet Header that is included in all SILC packets, data area that
311 includes the packet payloads, and MAC area which assures the integrity of the
312 packet.  Entire SILC packet is always encrypted, except for the MAC area
313 which is never encrypted.  The encryption process and the key used,
314 however depends on the packet payload.  Some of the payloads are encrypted
315 with the session key and some are encrypted with other keys, for example
316 with channel message keys.  The SILC Packet Header is always encrypted with
317 the session key.  The MAC is computed from the SILC Packet Header and the
318 data area before encrypting the packet.
319
320
321 <p><br>
322 <h1>SILC Key Exchange Protocol</h1>
323 <p>
324
325 SILC Key Exchange Protocol (SKE) is used to exchange shared secret
326 between connecting entities.  The result of this protocol is a key material
327 used to secure the communication channel.  This protocol is executed when,
328 for example client connects to server.  It is also executed when server
329 connects to router.  And, there is no reason why it could not be executed
330 between two clients too, if two clients would need to create secret key.
331 The purpose of the SKE protocol is to create session keys to be used
332 in current SILC session.  The SKE is based on the Diffie-Hellman key
333 exchange algorithm, and is immune to for example man-in-the-middle attacks 
334 by using digital signatures.
335 <p>
336
337 This is the first protocol that is executed when creating connection to,
338 for example SILC server.  All the other protocols are always executed
339 after this protocol.  This way all the other protocols are secured since
340 the SKE creates the session key that is used to secure all subsequent
341 packets.  The session keys created in the SKE are valid only for some
342 period of time (usually an hour) or at most until the session ends.
343 The rekey process can be executed with or without the Perfect Forward
344 Secrecy (PFS).
345 <p>
346
347 The security properties that are used in the SILC session are also
348 negotiated during the SKE.  The protocol has initiator and responder.
349 The initator is the one who starts the SKE negotiation and responder is
350 the one who receives the SKE negotiation.  When the protocol is started
351 initiator sends a list of security properties that it supports.  The
352 responder then selects the security properties it supports and sends
353 its reply to the initiator.  The security properties includes ciphers,
354 hash functions, public key algorithms, HMAC functions and other
355 security properties.  The responder can always choose the properties
356 it supports.
357 <p>
358
359 After the security properties are selected the protocol continues
360 by performing the Diffie-Hellman key exchange algorithm.  At the same
361 time the intiator and responder also sends their public keys or
362 certificates to each other.  The initiator and responder also computes a
363 signature that the other party will verify.  By default the protocol is
364 executed in so called mutual authentication mode, where both of the
365 parties computes a signature which are verified by each other
366 independently.  This way both of the parties will have prove the
367 posession of the private key to the public key they are providing
368 in the protocol.  If any of the phases of the protocol are to fail the
369 connection is closed immeadiately.
370 <p>
371
372 The public key or certificate that is received during the SKE protocol
373 must be verified.  If it is not verified it would be possible to 
374 execute a man-in-the-middle attack against the SKE protocol.  If
375 certificates are used they can be verified by a third party Certification
376 Authority (CA).  Verifying a public key requires either confirming
377 a fingerprint of the public key over phone or email, or the server
378 can for example publish the fingerprint (and the public key) on some 
379 website.  In real life systems accepting the public key without
380 verification, however is often desired.  In many security protocols,
381 such as in SSH2, the public key is accepted without verification
382 in the first time when the connection is created.  The public key is
383 then cached on local hard disk.  When connecting next time to the
384 server the public key on local cache is verified against the public
385 key server sent.  In real life this works most of the time.  However,
386 if client (or server) cannot trust this, it must find some other way
387 to verify the received public key or certificate.
388
389
390 <p><br>
391 <h1>SILC Connection Authentication Protocol</h1>
392 <p>
393
394 Purpose of SILC Connection Authentication protocol is to authenticate the
395 connecting party with server or router.  This protocol is executed when
396 for example client connects to server.  It is also executed when server
397 connects to router.  Its other purpose is to provide information for the
398 server about which type of connection it is.  The type of the connection
399 defines whether it is client, server or router.  If it is client then
400 the server will create a new Client ID for the client.  If it is server
401 then it will except the server to send its Server ID.  Server IDs are
402 created by the servers and routers itself.
403 <p>
404
405 Since the SILC Connection Authentication protocol is always executed after
406 the SKE protocol, session keys has been established already.  This means
407 that all packets sent in the connection authentication protocol are encrypted 
408 and authenticated.
409 <p>
410
411 The authentication may be based either in passphrase or public key
412 encryption.  It is also possible to not require authentication at all.
413 If the authentication is based to passphrase the passphrase is sent
414 to the server.  As the packet sent by, for example client, is entirely
415 encrypted it is safe to send the passphrase inside the packet.
416 <p>
417
418 If the authentication is based to public key then, for example the client, 
419 signs data with its private key and sends it to the server.  The server
420 then verifies this signature by using the client's public key.  The
421 packet is also encrypted in the case of public key authentication.
422 <p>
423
424 If the authentication is to fail the connection to the server or router
425 will be refused.  If it is successful the connection is granted.  After
426 this the client is ready to communicate in the SILC Network.
427
428
429 <p><br>
430 <h1>Channels</h1>
431 <p>
432
433 A channel is a named group of one or more clients which will all receive
434 messages addressed to that channel.  The channel is created when first
435 client joins to it, and the channel ceases to exist when the last client
436 leaves it.  When channel exists, any client can reference it using the 
437 name of the channel.  Channel is a place where group of people can engage
438 conversation.
439 <p>
440
441 Channel names are unique in the SILC Network.  There cannot be multiple
442 same channels in the network at the same time.  However, channel has also
443 a Channel ID which is actually used to reference the channel in the
444 SILC Network.  The maximum length for the channel name is 256 characters.
445 <p>
446
447 Channels can have operators that can administrate the channel and operate
448 all of its modes.  There are two types of operators on the channel:
449 channel founder and channel operator.
450 <p>
451
452 The channel founder is the client which created the channel.  Channel
453 founder is channel operator with some more privileges.  Channel founder
454 can operate all of the channel's modes.  Furthermore, channel founder
455 privileges cannot be removed by any other operator on channel and channel
456 founder cannot be removed from the channel by force.  It is also possible
457 for the channel founder to regain its privileges at later time, even if
458 they have left the channel.
459 <p>
460
461 Channel operator is operator that can operate most of the channel's
462 modes and administrate the channel.  However, it cannot operate all
463 modes which are strictly reserved for channel founder.  Channel operator
464 is, however able to adminstrate the channel, set some modes on the
465 channel, remove a badly behaving client from the channel, and promote
466 other clients to become channel operator.
467
468
469 <p><br>
470 <h2>Channel Message Delivery</h2>
471 <p>
472
473 All clients that have joined the channel can send messages to the channel.
474 All channel messages are secured and authenticated by channel key.  The
475 channel key is generated by the server when the channel is created,
476 a client joins the channel, or a client leaves the channel.  The channel
477 key is also regenerated periodically.  The reason for the regeneration
478 of channel key everytime someone joins or leaves the channel is that
479 it prevents new clients joining the channel, and old clients leaving the
480 channel, to encrypt or decrypt old or new messages.  They can encrypt
481 and decrypt channel messages only when they have joined on the channel.
482 <p>
483
484 Channel keys are cell specific in the SILC Network.  Each cell that
485 have clients joined on a particular channel have also own key for the
486 channel.  That key is not shared by other cells in the network.  Inside
487 the cell the channel key is known by the router and all servers that
488 have clients on the channel and all clients that have joined the channel.
489
490 <p><br>
491 <object data="silc_channel.jpg" type="application/postscript">
492 <img src="silc_channel.png" alt="Channel Message Delivery" align="center" border"0">
493 </object>
494 <p><br>
495
496 The diagram above illustrates typical delivery of channel messages inside
497 a cell and between two cells.  Both of the cells have their own channel
498 key.  Both cells knows all clients joined on the channel.  When message
499 is sent to the channel by an client, it is encrypted with the current
500 channel key in that cell.  The servers and the router in the local cell
501 then routes the message to all local clients who have joined the channel.
502 If the channel has clients that belong to other cell in the network the
503 router will route the channel message to that cell.  When channel
504 messages are sent between routers they are first decrypted with the
505 current channel key, and then re-encrypted with the session key shared
506 between the two routers.  The router who receives the channel message
507 then decrypts it with the session and re-encrypts it with the
508 current channel key in that cell.  It then distributes the channel message
509 to all clients on the channel.  The clients who have joined the channel
510 always knows the current channel key and can decrypt all channel messages
511 they receive.  Note that normal servers in the SILC network never decrypt
512 the channel messages even though the have the key.  There is no reason
513 for servers to decrypt the message.  The router decrypts the message
514 only when sending it between two routers.
515 <p>
516
517 This method of channel message delivery is the default way to send
518 channel messages in the SILC Network.  However, this is not perfect
519 solution on all circumstances.  If the clients joined on a particular
520 channel cannot trust, or do not want to trust the servers and routers
521 in the SILC Network they can consider the fact, that servers and routers
522 knows the channel key is actually a breach of security.
523 <p>
524
525 If the clients on the other hand can trust their servers and routers
526 in the SILC Network this is the recommended way of sending channel
527 messages.  This method is the simplest method for end user since it
528 does not require any special settings before engaging the conversation
529 on the channel.  The client merely joins the channel, receives the
530 channel key from the server and can start the conversation on the
531 channel.
532 <p>
533
534 In addition of encrypting channel messages it also possible to digitally
535 sign all sent channel messages.  The receiver could then verify the
536 signature of each of the message using the sender's public key.
537
538
539 <p><br>
540 <h2>Channel Message Delivery With Channel Private Key</h2>
541 <p>
542
543 If the clients cannot trust the servers and routers in the SILC Network
544 they should not use the default way of sending the channel messages.
545 Instead, they should use channel private keys to encrypt and decrypt
546 the channel messages.  Channel private keys are keys that are known
547 only by the clients who have joined the channel.  Servers and
548 routers do not know the key and cannot decrypt the messages.  When
549 message is sent between two routers they are merely re-encrypted with
550 the session key but not decrypted since the router do not have the
551 key to do that.
552 <p>
553
554 The clients who have joined the channel must first agree on the channel
555 private key they are going to use.  The key may generally be anything.
556 It may be a passphrase or a random string, or the key may negotiated
557 using some key exchange protocol which provides negotiating the
558 key for multiple clients at the same time.
559 <p>
560
561 As the channel private key is actually entirely local setting in the
562 client, it is possible to set several channel private keys for one
563 channel.  It is possible to have multiple channel private keys that
564 are not known by all channel members.  When encrypting messages with
565 one channel private key only the clients who have that key can decrypt
566 the message.  The other key could be shared for example by all clients
567 on the channel and thus all clients can decrypt messages encrypted with
568 that key.  In this way it is actually possible to have a private group
569 conversation inside the channel while having global conversation at the
570 same time.
571
572
573 <p><br>
574 <h1>Private Messages</h1>
575 <p>
576 Private messages are messages that are sent from one client to another 
577 through the SILC Network.  They are private because they are not sent to
578 anyone else except to the true receiver of the message.  Private messages
579 can be used to engage private conversation with another client if channels
580 are not desired.
581 <p>
582
583 As all messages in SILC the private message are also encrypted and
584 authenticated.  There are several ways to secure private messages.  By
585 default private messages are encrypted using the session keys established
586 in the SKE protocol.  It is also possible to negotiate a private message
587 key between the two clients and encrypt the messages with that key.  It
588 is even possible to encrypt the messages with public key cryptosystem,
589 if desired.  The next sections will describe all these private message
590 delivery methods.
591
592 <p>
593 The SILC protocol provides these three methods of delivering private messages
594 because none of the methods alone can satisfy the security requirements
595 of all people.  The end user should decide the acceptable level of risk,
596 the required level of security and other security and usability aspects when
597 deciding what way of sending private message suites for them.
598 <p>
599
600 In addition of encrypting private messages it also possible to digitally
601 sign all sent private messages.  The receiver could then verify the
602 signature of each of the message using the sender's public key.
603
604
605 <p><br>
606 <h2>Private Message Delivery With Session Keys</h2>
607 <p>
608 Sending private messages are by default secured with session keys established
609 in the SKE protocol.  This means that the private message is always encrypted
610 with the session key of the next receiver of the message enroute to the 
611 receiving client.  This also means that the message is decrypted and
612 re-encrypted everytime it is sent further to the receiving client.
613
614 <p><br>
615 <object data="silc_priv1.jpg" type="application/postscript">
616 <img src="silc_priv1.png" alt="Basic Private Message Delivery" align="center" border"0">
617 </object>
618 <p><br>
619
620 As the diagram above shows the private messages sent by Client A to the
621 Client B travels through the SILC Network and is always decrypted and
622 re-encrypted with the session key of the next receiver.  The Client B then
623 finally decrypts the private messages that is encrypted with the session
624 key shared between the Client B and the Server Y.
625 <p>
626
627 This way of securing private messages is not perfect and cannot be used
628 in all circumstances.  If the clients having the conversation cannot trust
629 the servers and routers in the SILC Network they should not send private
630 messages that are secured in this manner.  Messages secured in this manner
631 can be decrypted by the servers and routers that the clients may consider
632 to be untrusted.
633 <p>
634
635 If the clients on the other hand trust the servers and routers in their 
636 SILC Network, or they do not care that servers can decrypt their messages,
637 sending private messages in this way is very simple from client's point
638 of view.  For servers and routers this of course means that they need
639 to decrypt and re-encrypt each private message.  Since this way of securing
640 private message cannot be used at all times the SILC protocol provides
641 other ways of securing private messages.
642
643
644 <p><br>
645 <h2>Private Message Delivery With Private Message Key</h2>
646 <p>
647 Private messages can be secured with private message key as well.  This
648 key is known only by the sender of the message and the receiver of the
649 message.  This way no one else except the sender and the receiver can encrypt
650 and decrypt the private messages.  The message is encrypted by the sender
651 with the private message key and all the servers and routers pass the message
652 through enroute to the receiver.  They cannot decrypt the message since
653 they do not have the key.  When sending private messages in this way it
654 does not matter whether the clients trust or do not trust the servers and
655 routers in the SILC network.
656
657 <p><br>
658 <object data="silc_priv2.jpg" type="application/postscript">
659 <img src="silc_priv2.png" alt="Private Messages with Private Message Key" align="center" border"0">
660 </object>
661 <p><br>
662
663 As the diagram above shows the Client A encrypts the message with private
664 message key and sends the message to the SILC Network.  All servers and
665 routers merely pass the message through since they cannot decrypt it.
666 The Client B then receives the message and decrypts it with the private
667 message key.
668 <p>
669
670 Sending private messages in this manner is always secure since the key is
671 shared only by the sender and the receiver.  The problem of this method
672 is that the sender and the receiver must somehow agree about the key
673 they are going to use.  The private message key can generally be anything.
674 It can be a passphrase that only the sender and the receiver knows.  They
675 could have been agreed to use some word or phrase as the key sometime
676 earlier before they started the conversation.  Or the key maybe from some
677 random string from a code book that only the sender and the receiver poses.
678 Or it can be a key that is negotiated using some key exchange protocol.
679 <p>
680
681 The problem however is fundamental.  How to agree to use some key when
682 you cannot reach the other person over secure channel?  The SILC protocol
683 solves this problem by providing a possiblity to negotiate the key
684 between two clients using the SKE protocol.  One or both of the clients
685 can set up the SKE server running in their host and ask the other client
686 to connect to it.  In this case the SKE is executed outside the SILC
687 Network.  As a result of the SKE protocol the clients have now shared
688 secret that they can use as private message key.  The key is known only
689 by the two clients that executed the SKE protocol.  They can then use
690 that key to secure all subsequent private messages.
691 <p>
692
693 Using this method of private messages delivery is recommended if the
694 clients cannot trust the servers and routers in the SILC Network.  The 
695 drawback is the extra phase of setting the private message key before
696 starting the conversation.  However, using the SKE protocol is the
697 recommended way to negotiate the private message key since it can be
698 automatized and does not cause any extra tasks for end user.
699
700
701 <p><br>
702 <h2>Private Message Delivery With Public Key Encryption</h2>
703 <p>
704 If the clients cannot trust the servers and routers in the SILC Network
705 they can use the private message key.  As described in the previous section
706 it is easy to set up with the SKE protocol.  However, sometimes the two
707 clients do not want to use any passphrases as private message key or
708 negotiate the key with SKE, or perhaps they are unable to negotiate the
709 key because of some other external problem.  The SILC protocol provides
710 yet another way of securing the private messages.  This way does not
711 require setting or negotiating private message key.  And, in this method
712 also it does not matter whether the clients trust or do not trust the
713 servers and routers in the SILC Network.  The method is public key
714 encryption.  The clients can encrypt the private messages with the
715 receiver's public key and send the message to the network.  The servers
716 and routers cannot decrypt the messages since they do not have the
717 receiver's private key.  The receiver on the other hand has the private
718 key which it uses to decrypt the message.
719 <p>
720
721 Even this method of private message delivery is not perfect.  The drawbacks
722 of this method is that the sender must first assure that the public key
723 it is using in the encryption is actually the receiver's public key.
724 This is a absolute requirement in this method.  If the sender cannot
725 authenticate the receiver's public key this method of private message
726 delivery should not be used.  In SILC protocol clients can fetch other
727 clients public keys from servers, but the client still must verify the
728 key.  Use of certificates can solve the problem.  The receiver's certificate
729 could be authenticated by a third party Certification Authority (CA).
730
731 <p>
732 Usually verifying the public key is not a problem since the receiver
733 can provide the public key on some website, or verify the fingerprint of
734 the key over email, or phone call.  The clients can also fetch the
735 public keys from SILC servers.  If both of the clients trust that the
736 public keys are authentic using this method of private message delivery
737 is very simple and recommended.
738
739
740 <p><br>
741 <h1>Secure File Transfers</h1>
742
743 The file transfer support in chat protocols are a absolute requirement
744 nowadays, and chat protocol without one is no chat protocol at all.  SILC
745 also supports file transfer with the addition that the file transfer
746 stream is secured.  When a user wants to transfer a file to another
747 user, the SILC Key Exchange (SKE) protocol is first executed to negotiate
748 a session key for the file transfer stream.  This key is then used to
749 protect the peer to peer stream between users.
750 <p>
751
752 The file transfer protocol used in SILC protocol is the SSH File Transfer
753 protocol (SFTP).  Even though the name of the protocol relates to SSH,
754 the actual file transfer protocol has nothing to do with Secure Shell.
755 The SFTP is totally independent file transfer protocol and its stream
756 is secured using SILC.  The SFTP is very good protocol because in addition
757 of providing simple file transfer support, it can also support complex
758 file and directory manipulation.
759 <p>
760
761 The support for file transfer in SILC has been designed so that using
762 practically any file transfer protocol is possible.  The mandatory protocol
763 is SFTP but in the future adding support for other protocols is also
764 possible.
765
766
767 <p><br>
768 <h1>Future of the Protocol</h1>
769
770 The current protocol version is 1.0.  This does not mean that the protocol
771 is perfect and does not need further development.  There is still features
772 that are missing from the protocol, and it is clear that the protocol needs
773 to mature a bit more.  There has been a talk about adding features like
774 permanent channels, more wide channel founder privileges, and other similar
775 features.  The network model of the protocol allows powerful routing
776 capabilities, however the routing is not fully defined yet in the protocol
777 and requires more in depth work.  The protocol is still in draft phase
778 and is open for new features.  However, it is our intention that the
779 protocol will be standardized in the future.
780
781
782 <p><br>
783 <h1>Conclusion</h1>
784
785 The Secure Internet Live Conferencing (SILC) protocol is a new generation
786 chat protocol that provides all the common conferencing services with
787 strong support for security.  It has wide range of security properties
788 that should meet the highest levels of security requirements, while not
789 forgetting easy of use.  The network topology offers new architectural
790 solution with better scalability over traditional chat protocols.
791
792
793 <p><br>
794 <h1>Further Information</h1>
795 <p>
796 More detailed information about the SILC protocol is available in the
797 SILC protocol specification documents.  There exists currently four
798 Internet Drafts that defines the protocol in great detail.  The Internet
799 Drafts are available from the following sources but also from the
800 <a href="http://www.ietf.org">IETF website</a>.
801 <p>
802
803 - <a href="http://silcnet.org/docs/draft-riikonen-silc-spec-04.txt">
804 Secure Internet Live Conferencing (SILC), Protocol Specification</a>
805 <br>
806
807 - <a href="http://silcnet.org/docs/draft-riikonen-silc-pp-04.txt">
808 SILC Packet Protocol</a>
809 <br>
810
811 - <a href="http://silcnet.org/docs/draft-riikonen-silc-ke-auth-04.txt">
812 SILC Key Exchange and Authentication Protocols</a>
813 <br>
814
815 - <a href="http://silcnet.org/docs/draft-riikonen-silc-commands-02.txt">
816 SILC Commands</a>
817 <p>
818
819 For comprehensive introduction to cryptography refer to the
820 <a href="http://www.ssh.com/tech/crypto/">Cryptography A-2-Z document</a>.
821
822 <p><br>
823 <a name="terms"></a>
824 <h1>Terms and Abbreviations</h1>
825 <p>
826
827 - Asymmetric cryptosystem
828 <p>
829 Asymmetric cryptosystem provides public encryption.  It has two keys,
830 one public key and one private key (also called as secret key).  The public
831 key is publicly available allowing anyone to encrypt messages with the
832 public key.  Only the posessor of the private key can decrypt those messages.
833 Difference to symmetric cryptosystem is that symmetric cryptosystem use only
834 one key, and the key is usually used to both encryption and decryption.  The
835 asymmetric cryptosystem is also called as public key encryption, public key
836 cryptosystem or public key algorithm.  SILC supports RSA and DSS asymmetric
837 cryptosystems.
838 <p>
839
840 - Authentication
841 <p>
842 The verification of the identity of a person, host or process in order
843 to gain access to a service or prove identity.  In data communications
844 it also means verifying the origin of a message.
845 <p>
846
847 - Certificate
848 <p>
849 Certificate is a digital document which can be used to verify the 
850 identity of a person or host.  In SILC, certificates can be used to prove
851 identity of clients, servers and routers.  Basically certificate is a public
852 key with subject name.  SILC supports X.509, OpenPGP and SPKI certificates.
853 Supported public keys are SILC style public key and SSH2 style public
854 key.
855 <p>
856
857 - Certification Authority (CA)
858 <p>
859 A third party entity that can verify identity of a person or host.  CA
860 is usually external company that provides certificates and their
861 verification services.
862 <p>
863
864 - Diffie-Hellman key exchange
865 <p>
866 First public key algorithm ever invented.  It is used to generate a secret
867 key between two or more parties.  It gets its security from the difficulty
868 of calculating discrete logarithms.
869 <p>
870
871 - Encryption
872 <p>
873 A mechanism (usually mathematical) to transfer plaintext (or cleartext)
874 to ciphertext to provide confidentiality.  A process to transfer
875 the ciphertext back to plaintext is called decryption.
876 <p>
877
878 - Integrity
879 <p>
880 The verification of data to detect any modifications.  If data is
881 modified enroute from the sender to the receiver, the modification will
882 be detected.
883 <p>
884
885 - HMAC
886 <p>
887 Hash Message Authentication Code.  Also called as keyed hash function.
888 It is a secret key authentication algorithm which proves that the message
889 is not modified and that the HMAC was computed by the sender of the
890 message.
891 <p>
892
893 - Key management
894 <p>
895 Key management is a set of processes and mechanisms which support key
896 exchange and maintainance of current keying relationships between parties,
897 including replacing older keys with new keys as necessary, by executing
898 rekey.
899 <p>
900
901 - Man-in-the-middle attack
902 <p>
903 An attack against two connecting entities where the attacker executes
904 key exchange protocol with both of the parties indepently without
905 their knowledge.  Both of the connecting entities will end up having secret
906 key with the attacker, and the attacker can encrypt and decrypt all the
907 messages that goes between the two entities.
908 <p>
909
910 - Message Authentication Code (MAC)
911 <p>
912 MAC provides message integrity by computing the MAC using a secret
913 key authentication algorithm (HMAC).
914 <p>
915
916 - Perfect Forward Secrecy (PFS)
917 <p>
918 A property of rekey (or key regeneration) which defines whether the
919 new key is derived from the old key.  If Perfect Forward Secrecy is
920 selected the new key is never dependent of the old key which means
921 that if the old key would get compromised at later time it will not
922 compromise the new key.  In SILC setting PFS in the SKE protocol means
923 executing the SKE protocol again.  If PFS is not selected the new key
924 is always derived from the old key.
925 <p>
926
927 - Rekey
928 <p>
929 A key regeneration process where the old key has expired or is not
930 secure anymore to use.  In this case rekey is performed and new key
931 is generated.
932 <p>
933
934 - Symmetric cryptosystem
935 <p>
936 Symmetric cryptosystem is one key cryptosystem where one key is used
937 usually to both encryption and decryption process.  The symmetric
938 cryptosystems are usually significantly faster than asymmetric cryptosystems.
939 DES, AES, Twofish and Blowfish are examples of symmetric cryptosystems.
940 SILC supports all the common symmetric cryptosystems including AES.
941 SILC does not support DES as it is insecure and 3DES as it is too slow.
942
943
944 </font>
945
946 </body>
947 </html>