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