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