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