361e865f4f86b0f84ef1251c71b35ab68ff2068e
[silc.git] / public_html / docs / draft-riikonen-silc-spec-00.txt
1
2
3
4
5
6
7 Network Working Group                                      P. Riikonen
8 Internet-Draft
9 draft-riikonen-silc-spec-00.txt                           28 June 2000
10 Expires: 28 Jan 2001
11
12
13                  Secure Internet Live Conferencing (SILC),
14                           Protocol Specification
15
16 Status of this Memo
17
18    This document is an Internet-Draft.  Internet-Drafts are working
19    documents of the Internet Engineering Task Force (IETF), its areas,
20    and its working groups.  Note that other groups may also distribute
21    working documents as Internet-Drafts.
22
23    Internet-Drafts are draft documents valid for a maximum of six
24    months and may be updated, replaced, or obsoleted by other
25    documents at any time. It is inappropriate to use Internet-Drafts
26    as reference material or to cite them other than as
27    ``work in progress.''
28
29    To learn the current status of any Internet-Draft, please check the
30    ``1id-abstracts.txt'' listing contained in the Internet-Drafts
31    Shadow Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
32    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
33    ftp.isi.edu (US West Coast).
34
35    The distribution of this memo is unlimited.
36
37
38 Abstract
39
40    This memo describes a Secure Internet Live Conferencing (SILC)
41    protocol which provides secure conferencing services over insecure
42    network channel.  SILC is IRC [IRC] like protocol, however, it is
43    not equivalent to IRC and does not support IRC.  Strong cryptographic
44    methods are used to protect SILC packets inside SILC network.  Two
45    other Internet Drafts relates very closely to this memo;  SILC Packet
46    Protocol [SILC2] and SILC Key Exchange and Authentication Protocols
47    [SILC3].
48
49
50
51
52
53
54
55
56
57
58 Riikonen                                                        [Page 1]
59 \f
60 Internet Draft      Secure Internet Live Conferencing       28 June 2000
61
62
63 Table of Contents
64
65    1 Introduction ..................................................  3
66    2 SILC Concepts .................................................  3
67      2.1 SILC Network Topology .....................................  4
68      2.2 Communication Inside a Cell ...............................  5
69      2.3 Communication in the Network ..............................  6
70      2.4 Channel Communication .....................................  7
71    3 SILC Specification ............................................  7
72      3.1 Client ....................................................  7
73          3.1.1 Client ID ...........................................  8
74      3.2 Server ....................................................  8
75          3.2.1 Server's Local ID List ..............................  9
76          3.2.2 Server ID ........................................... 10
77          3.2.3 SILC Server Ports ................................... 10
78      3.3 Router .................................................... 11
79          3.3.1 Router's Local ID List .............................. 11
80          3.3.2 Router's Global ID List ............................. 12
81          3.3.3 Router's Server ID .................................. 12
82      3.4 Channels .................................................. 12
83          3.4.1 Channel ID .......................................... 13
84      3.5 Operators ................................................. 14
85      3.6 SILC Commands ............................................. 14
86      3.7 SILC Packets .............................................. 15
87      3.8 Packet Encryption ......................................... 15
88          3.8.1 Determination of the Source and the Destination ..... 16
89          3.8.2 Client To Client .................................... 16
90          3.8.3 Client To Channel ................................... 17
91          3.8.4 Server To Server .................................... 18
92      3.9 Key Exchange And Authentication ........................... 18
93      3.10 Algorithms ............................................... 19
94          3.10.1 Ciphers ............................................ 19
95          3.10.2 Public Key Algorithms .............................. 20
96          3.10.3 MAC Algorithms ..................................... 20
97          3.10.4 Compression Algorithms ............................. 20
98      3.11 SILC Public Key .......................................... 21
99    4 SILC Procedures ............................................... 23
100      4.1 Creating Client Connection ................................ 23
101      4.2 Creating Server Connection ................................ 24
102      4.3 Joining to a Channel ...................................... 25
103      4.4 Channel Key Generation .................................... 26
104      4.5 Private Message Sending and Reception ..................... 27
105      4.6 Private Message Key Generation ............................ 27
106      4.7 Channel Message Sending and Reception ..................... 28
107      4.8 Session Key Regeneration .................................. 28
108      4.9 Command Sending and Reception ............................. 29
109    5 SILC Commands ................................................. 29
110      5.1 SILC Commands Syntax ...................................... 29
111
112
113
114 Riikonen                                                        [Page 2]
115 \f
116 Internet Draft      Secure Internet Live Conferencing       28 June 2000
117
118
119      5.2 SILC Commands List ........................................ 31
120      5.3 SILC Command Status Types ................................. 54
121          5.3.1 SILC Command Status Payload ......................... 54
122          5.3.2 SILC Command Status List ............................ 54
123    6 Security Considerations ....................................... 58
124    7 References .................................................... 59
125    8 Author's Address .............................................. 60
126
127
128 List of Figures
129
130    Figure 1:  SILC Network Topology
131    Figure 2:  Communication Inside cell
132    Figure 3:  Communication Between Cells
133    Figure 4:  SILC Public Key
134    Figure 5:  SILC Command Status Payload
135
136
137 1. Introduction
138
139    This document describes a Secure Internet Live Conferencing (SILC)
140    protocol which provides secure conferencing services over insecure
141    network channel.  SILC is IRC [IRC] like protocol, however, it is
142    not equivalent to IRC and does not support IRC.  Strong cryptographic
143    methods are used to protect SILC packets inside SILC network.  Two
144    other Internet Drafts relates very closely to this memo;  SILC Packet
145    Protocol [SILC2] and SILC Key Exchange and Authentication Protocols
146    [SILC3].
147
148    The protocol uses extensively packets as conferencing protocol
149    requires message and command sending.  The SILC Packet Protocol is
150    described in [SILC2] and should be read to fully comprehend this
151    document and protocol.  [SILC2] also describes the packet encryption
152    and decryption in detail.
153
154    The security of SILC protocol and for any security protocol for that
155    matter is based on strong and secure key exchange protocol.  The SILC
156    Key Exchange protocol is described in [SILC3] along with connection
157    authentication protocol and should be read to fully comprehend this
158    document and protocol.
159
160    The SILC protocol has been developed to work on TCP/IP network
161    protocol, although it could be made to work on other network protocols
162    with only minor changes.  However, it is recommended that TCP/IP
163    protocol is used under SILC protocol.  Typical implementation would
164    be made in client-server model.
165
166
167
168
169
170 Riikonen                                                        [Page 3]
171 \f
172 Internet Draft      Secure Internet Live Conferencing       28 June 2000
173
174
175 2. SILC Concepts
176
177    This section describes various SILC protocol concepts that forms the
178    actual protocol, and in the end, the actual SILC network.  The mission
179    of the protocol is to deliver messages from clients to other clients
180    through routers and servers in secure manner.  The messages may also
181    be delivered from one client to many clients forming a group, also
182    known as a channel.
183
184    This section does not focus to security issues, instead basic network
185    concepts are introduced to make the topology of the SILC network
186    clear.
187
188
189 2.1 SILC Network Topology
190
191    SILC network is a cellular network as opposed to tree style network
192    topology.  The rationale for this is to have servers that can perform
193    specific kind of tasks what other servers cannot perform.  This leads
194    to two kinds of servers; normal SILC servers and SILC routers.
195    A difference between normal server and router server is that routers
196    knows everything about everything in the network.  They also do the
197    actual routing of the messages to the correct receiver.  Normal servers
198    knows only about local information and nothing about global information.
199    This makes the network faster as there are less servers that needs to
200    keep global information up to date at all time.
201
202    This, on the other hand, leads to cellular like network, where routers
203    are in the centrum on the cell and servers are connected to the router.
204    Following diagram represents SILC network topology.
205
206
207           ---- ---- ----         ---- ---- ----
208          | S8 | S5 | S4 |       | S7 | S5 | S6 |
209          ----- ---- -----       ----- ---- -----
210         | S7 | S/R1 | S2 | --- | S8 | S/R2 | S4 |
211          ---- ------ ----       ---- ------ ----
212          | S6 | S3 | S1 |       | S1 | S3 | S2 |         ---- ----
213           ---- ---- ----         ---- ---- ----         | S3 | S1 |
214              Cell 1.   \             Cell 2.  | \____  ----- -----
215                         |                     |        | S4 | S/R4 |
216             ---- ---- ----         ---- ---- ----       ---- ------
217            | S7 | S4 | S2 |       | S1 | S3 | S2 |      | S2 | S5 |
218            ----- ---- -----       ----- ---- -----       ---- ----
219           | S6 | S/R3 | S1 | --- | S4 | S/R5 | S5 |       Cell 4.
220            ---- ------ ----       ---- ------ ----
221            | S8 | S5 | S3 |       | S6 | S7 | S8 |     ... etc ...
222             ---- ---- ----         ---- ---- ----
223
224
225
226 Riikonen                                                        [Page 4]
227 \f
228 Internet Draft      Secure Internet Live Conferencing       28 June 2000
229
230
231                Cell 3.                Cell 5.
232
233                      Figure 1:  SILC Network Topology
234
235
236    A cell is formed when a server or servers connect to one router.  In
237    SILC network normal server cannot directly connect to other normal
238    server.  Normal server may only connect to SILC router which then
239    routes the messages to the other servers in the cell.  Router servers
240    on the other hand may connect to other routers to form the actual SILC
241    network, as seen in above figure.  However, router is also normal SILC
242    server; clients may connect to it the same way as to normal SILC
243    servers.  Normal server also cannot have active connections to more
244    than one router.  Normal server cannot be connected to two different
245    cells.  Router servers, on the other hand, may have as many router to
246    router connections as needed.
247
248    There are many issues in this network topology that needs to be careful
249    about.  Issues like the size of the cells, the number of the routers in
250    the SILC network and the capacity requirements of the routers.  These
251    issues should be discussed in the Internet Community and additional
252    documents on the issue will be written.
253
254
255 2.2 Communication Inside a Cell
256
257    It is always guaranteed that inside a cell message is delivered to the
258    recipient with at most two server hops.  Client who is connected to
259    server in the cell and is talking on channel to other client connected
260    to other server in the same cell, will have its messages delivered from
261    its local server first to the router of the cell, and from the router
262    to the other server in the cell.  Following diagram represents this
263    scenario.
264
265
266                          1 --- S1     S4 --- 5
267                                   S/R
268                           2 -- S2     S3
269                               /        |
270                              4         3
271
272
273                    Figure 2:  Communication Inside cell
274
275
276    Example:  Client 1. connected to Server 1. message sent to
277              Client 4. connected to Server 2. travels from Server 1.
278              first to Router which routes the message to Server 2.
279
280
281
282 Riikonen                                                        [Page 5]
283 \f
284 Internet Draft      Secure Internet Live Conferencing       28 June 2000
285
286
287              which then sends it to the Client 4.  All the other
288              servers in the cell will not see the routed message.
289
290
291    If client is connected directly to the router, as router is also normal
292    SILC server, the messages inside the cell are always delivered only with
293    one server hop.  If clients communicating with each other are connected
294    to the same server, no router interaction is needed.  This is the optimal
295    situation of message delivery in the SILC network.
296
297
298 2.3 Communication in the Network
299
300    If the message is destined to server that does not belong to local cell
301    the message is routed to the router server to which the destination
302    server belongs, if the local router is connected to destination router.
303    If there is no direct connection to the destination router, the local
304    router routes the message to its primary route.  Following diagram
305    represents message sending between cells.
306
307
308                 1 --- S1     S4 --- 5            S2 --- 1
309                          S/R - - - - - - - - S/R
310                  2 -- S2     S3           S1
311                      /        |             \
312                     4         3              2
313
314                    Cell 1.               Cell 2.
315
316
317                   Figure 3:  Communication Between Cells
318
319
320    Example:  Client 5. connected to Server 4. in Cell 1. message sent
321              to Client 2. connected to Server 1. in Cell 2. travels
322              from Server 4. to Router which routes the message to
323              Router in Cell 2, which then routes the message to
324              Server 1.  All the other servers and routers in the
325              network will not see the routed message.
326
327
328    The optimal case of message delivery from client point of view is
329    when clients are connected directly to the routers and the messages
330    are delivered from one router to the other router.
331
332
333
334
335
336
337
338 Riikonen                                                        [Page 6]
339 \f
340 Internet Draft      Secure Internet Live Conferencing       28 June 2000
341
342
343 2.4 Channel Communication
344
345    Messages may be sent to group of clients as well.  Sending messages to
346    many clients works the same way as sending messages point to point, from
347    message delivery point of view.  Security issues are another matter
348    which are not discussed in this section.
349
350    Router server handles the message routing to multiple recipients.  If
351    any recipient is not in the same cell as the sender the messages are
352    routed further.
353
354    Server distributes the channel message to its local clients who are
355    joined to the channel.  Also, router distributes the message to its
356    local clients on the channel.
357
358
359 3. SILC Specification
360
361    This section describes the SILC protocol.  However, [SILC2] and
362    [SILC3] describes other important protocols that are part of this SILC
363    specification and must be read.
364
365
366 3.1 Client
367
368    A client is a piece of software connecting to SILC server.  SILC client
369    cannot be SILC server.  Purpose of clients is to provide the user
370    interface of the SILC services for end user.  Clients are distinguished
371    from other clients by unique Client ID.  Client ID is a 128 bit ID that
372    is used in the communication in the SILC network.  The client ID is
373    based on the nickname selected by the user.  User uses logical nicknames
374    in communication which are then mapped to the corresponding Client ID.
375    Client ID's are low level identifications and must not be seen by the
376    end user.
377
378    Clients provide other information about the end user as well. Information
379    such as the nickname of the user, username and the hostname of the end
380    user and user's real name.  See section 3.2 Server for information of
381    the requirements of keeping this information.
382
383    The nickname selected by the user is not unique in the SILC network.
384    There can be 2^8 same nicknames for one IP address. As for comparison to
385    IRC [IRC] where nicknames are unique this is a fundamental difference
386    between SILC and IRC.  This causes the server names to be used along
387    with the nicknames to identify specific users when sending messages.
388    This feature of SILC makes IRC style nickname-wars obsolete as no one
389    owns their nickname; there can always be someone else with the same
390    nickname.  Another difference is that there are no limit of the length
391
392
393
394 Riikonen                                                        [Page 7]
395 \f
396 Internet Draft      Secure Internet Live Conferencing       28 June 2000
397
398
399    of the nickname in the SILC.
400
401
402 3.1.1 Client ID
403
404    Client ID is used to identify users in the SILC network.  The Client ID
405    is unique to the extent that there can be 2^128 different Client ID's.
406    Collisions are not expected to happen.  The Client ID is defined as
407    follows.
408
409       128 bit Client ID based on IPv4 addresses:
410
411       32 bit  ServerID IP address (bits 1-32)
412        8 bit  Random number
413       88 bit  Truncated MD5 hash value of the nickname
414
415       o Server ID IP address - Indicates the server where this
416         client is coming from.  The IP address hence equals the
417         server IP address where to the client has connected.
418
419       o Random number - Random number to further unify the
420         Client ID.  This makes it possible to have 2^8 same
421         nicknames from the same server IP address.
422
423       o MD5 hash - MD5 hash value of the nickname is truncated
424         taking 88 bits from the start of the hash value.  This
425         hash value is used to search the user's Client ID from
426         the ID lists.
427
428    Collisions could occur when more than 2^8 clients using same nickname
429    from the same server IP address is connected to the SILC network.
430    Server must be able to handle this situation by refusing to accept
431    anymore of that nickname.
432
433    Another possible collision may happen with the truncated hash value of
434    the nickname.  It could be possible to have same truncated hash value for
435    two different nicknames.  However, this is not expected to happen nor
436    cause any problems if it would occur.  Nicknames are usually logical and
437    it is unlikely to have two distinct logical nicknames produce same
438    truncated hash value.
439
440
441 3.2 Server
442
443    Servers are the most important parts of the SILC network.  They form the
444    basis of the SILC, providing a point to which clients may connect to.
445    There are two kinds of servers in SILC; normal servers and router servers.
446    This section focuses on the normal server and router server is described
447
448
449
450 Riikonen                                                        [Page 8]
451 \f
452 Internet Draft      Secure Internet Live Conferencing       28 June 2000
453
454
455    in the section 3.3 Router.
456
457    Normal servers may not directly connect to other normal server.  Normal
458    servers may only directly connect to router server.  If the message sent
459    by the client is destined outside the local server it is always sent to
460    the router server for further routing.  Server may only have one active
461    connection to router on same port.  Normal server may not connect to other
462    cell's router except in situations where its cell's router is unavailable.
463
464    Servers and routers in the SILC network are considered to be trusted.
465    With out a doubt, servers that are set to work on ports above 1023 are
466    not considered to be trusted.  Also, the service provider acts important
467    role in the server's trustworthy.
468
469
470 3.2.1 Server's Local ID List
471
472    Normal server keeps various information about the clients and their end
473    users connected to it.  Every normal server must keep list of all locally
474    connected clients, Client ID's, nicknames, usernames and hostnames and
475    user's real name.  Normal servers only keeps local information and it
476    does not keep any global information.  Hence, normal servers knows only
477    about their locally connected clients.  This makes servers efficient as
478    they don't have to worry about global clients.  Server is also responsible
479    of creating the Client ID's for their clients.
480
481    Normal server also keeps information about locally created channels and
482    their Channel ID's.
483
484    Hence, local list for normal server includes:
485
486       server list        - Router connection
487          o Server name
488          o Server IP address
489          o Server ID
490          o Sending key
491          o Receiving key
492          o Public key
493
494       client list        - All clients in server
495          o Nickname
496          o Username@host
497          o Real name
498          o Client ID
499          o Sending key
500          o Receiving key
501
502
503
504
505
506 Riikonen                                                        [Page 9]
507 \f
508 Internet Draft      Secure Internet Live Conferencing       28 June 2000
509
510
511       channel list       - All channels in server
512          o Channel name
513          o Channel ID
514          o Client ID's on channel
515          o Client ID modes on channel
516          o Channel key
517
518
519
520 3.2.2 Server ID
521
522    Servers are distinguished from other servers by unique 64 bit Server ID.
523    The Server ID is used in the SILC to route messages to correct servers.
524    Server ID's also provide information for Client ID's, see section 3.1.1
525    Client ID.  Server ID is defined as follows.
526
527       64 bit Server ID based on IPv4 addresses:
528
529       32 bit  IP address of the server
530       16 bit  Port
531       16 bit  Random number
532
533       o IP address of the server - This is the real IP address of
534         the server.
535
536       o Port - This is the port the server is binded to.
537
538       o Random number - This is used to further unify the Server ID.
539
540    Collisions are not expected to happen in any conditions.  The Server ID
541    is always created by the server itself and server is resposible of
542    distributing it to the router.
543
544
545 3.2.3 SILC Server Ports
546
547    SILC uses currently TCP port 334 on SILC network.  However, this is not
548    official port assigned for SILC.  Official port has been requested by
549    the IANA.
550
551    If there are needs to create new SILC networks in the future the port
552    numbers must be officially assigned by the IANA.  Most convenience case
553    would be to assign port numbers upwards from 334.
554
555    Server on network above privileged ports (>1023) should not be trusted
556    as they could have been set up by untrusted party.
557
558
559
560
561
562 Riikonen                                                       [Page 10]
563 \f
564 Internet Draft      Secure Internet Live Conferencing       28 June 2000
565
566
567 3.3 Router
568
569    Router server in SILC network is responsible for keeping the cell together
570    and routing messages to other servers and to other routers.  Router server
571    is also a normal server thus clients may connect to it as it would be
572    just normal SILC server.
573
574    However, router servers has a lot of important tasks that normal servers
575    do not have.  Router server knows everything about everything in the SILC.
576    They know all clients currently on SILC, all servers and routers and all
577    channels in SILC.  Routers are the only servers in SILC that care about
578    global information and keeping them up to date at all time.  And, this
579    is what they must do.
580
581
582 3.3.1 Router's Local ID List
583
584    Router server as well must keep local list of connected clients and
585    locally created channels.  However, this list is extended to include all
586    the informations of the entire cell, not just the server itself as for
587    normal servers.
588
589    However, on router this list is a lot smaller since routers do not keep
590    information about user's nickname, username and hostname and real name
591    since these are not needed by the router.  Router keeps only information
592    that it needs.
593
594    Hence, local list for router includes:
595
596       server list        - All servers in the cell
597          o Server name
598          o Server ID
599          o Router's Server ID
600          o Sending key
601          o Receiving key
602
603       client list        - All clients in the cell
604          o Client ID
605
606       channel list       - All channels in the cell
607          o Channel ID
608          o Client ID's on channel
609          o Client ID modes on channel
610          o Channel key
611
612
613    Note that locally connected clients and other information include all the
614    same information as defined in section section 3.2.1 Server's Local ID
615
616
617
618 Riikonen                                                       [Page 11]
619 \f
620 Internet Draft      Secure Internet Live Conferencing       28 June 2000
621
622
623    List.
624
625
626 3.3.2 Router's Global ID List
627
628    Router server must also keep global list.  Normal servers do not have
629    global list as they know only about local information.  Global list
630    includes all the clients on SILC, their Client ID's, all created channels
631    and their Channel ID's and all servers and routers on SILC and their
632    Server ID's.  That is said, global list is for global information and the
633    list must not include the local information already on the router's local
634    list.
635
636    Note that the global list does not include information like nicknames,
637    usernames and hostnames or user's real names.  Router does not keep
638    these informations as they are not needed by the router.  This
639    information is available from the client's server which maybe queried
640    when needed.
641
642    Hence, global list includes:
643
644       server list        - All servers in SILC
645          o Server name
646          o Server ID
647          o Router's Server ID
648
649       client list        - All clients in SILC
650          o Client ID
651
652       channel list       - All channels in SILC
653          o Channel ID
654          o Client ID's on channel
655          o Client ID modes on channel
656
657
658 3.3.3 Router's Server ID
659
660    Router's Server ID's are equivalent to normal Server ID's.  As routers
661    are normal servers as well same types of ID's applies for routers as well.
662    Thus, see section 3.2.2 Server ID.  Server ID's for routers are always
663    created by the remote router where the router is connected to.
664
665
666 3.4 Channels
667
668    A channel is a named group of one or more clients which will all receive
669    messages addressed to that channel.  The channel is created when first
670    client requests JOIN command to the channel, and the channel ceases to
671
672
673
674 Riikonen                                                       [Page 12]
675 \f
676 Internet Draft      Secure Internet Live Conferencing       28 June 2000
677
678
679    exist when the last client leaves it.  When channel exists, any client
680    can reference it using the name of the channel.
681
682    Channel names are unique although the real uniqueness comes from 64 bit
683    Channel ID that unifies each channel.  However, channel names are still
684    unique and no two global channels with same name may exist.  Channel name
685    is a string which begins with `#' character.  There is no limit on the
686    length of the channel name.  Channel names may not contain any spaces
687    (`  '), any non-printable ASCII characters, commas (`,') and wildcard
688    characters.
689
690    Channels can have operators that can administrate the channel and
691    operate all of its modes.  Following operators on channel exist on SILC
692    network.
693
694       o Channel founder - When channel is created the joining client becomes
695         channel founder.  Channel founder is channel operator with some more
696         privileges.  Basically, channel founder can fully operate the channel
697         and all of its modes.  The privileges are limited only to the particular
698         channel.  There can be only one channel founder per channel.  Channel
699         founder supersedes channel operator's privileges.
700
701         Channel founder privileges cannot be removed by any other operator on
702         channel.  When channel founder leaves the channel there is no channel
703         founder on the channel.  Channel founder also cannot be removed by
704         force from the channel.
705
706       o Channel operator - When client joins to channel that has not existed
707         previously it will become automatically channel operator (and channel
708         founder discussed above).  Channel operator is able administrate the
709         channel, set some modes on channel, remove a badly behaving client from
710         the channel and promote other clients to become channel operator.
711         The privileges are limited only to the particular channel.
712
713         Normal channel user may be promoted (opped) to channel operator
714         gaining channel operator privileges.  Channel founder or other channel
715         operator may also demote (deop) channel operator to normal channel
716         user.
717
718
719 3.4.1 Channel ID
720
721    Channels are distinguished from other channels by unique Channel ID.
722    The Channel ID is a 64 bit ID and collisions are not expected to happen
723    in any conditions.  Channel names are just for logical use of channels.
724    The Channel ID is created by the server where the channel is created.
725    The Channel ID is defined as follows.
726
727
728
729
730 Riikonen                                                       [Page 13]
731 \f
732 Internet Draft      Secure Internet Live Conferencing       28 June 2000
733
734
735       64 bit Channel ID based on IPv4 addresses:
736
737       32 bit  Router's Server ID IP address (bits 1-32)
738       16 bit  Router's Server ID port (bits 33-48)
739       16 bit  Random number
740
741       o Router's Server ID IP address - Indicates the IP address of
742         the router of the cell where this channel is created.  This is
743         taken from the router's Server ID.  This way SILC router knows
744         where this channel resides in the SILC network.
745
746       o Router's Server ID port - Indicates the port of the channel on
747         the server.  This is taken from the router's Server ID.
748
749       o Random number - To further unify the Channel ID.  This makes
750         sure that there are no collisions.  This also means that
751         in a cell there can be 2^16 channels.
752
753
754 3.5 Operators
755
756    Operators are normal users with extra privileges to their server or
757    router.  Usually these people are SILC server and router administrators
758    that take care of their own server and clients on them.  The purpose of
759    operators is to administrate the SILC server or router.  However, even
760    an operator with highest privileges is not able to enter invite-only
761    channel, to gain access to the contents of a encrypted and authenticated
762    packets traveling in the SILC network or to gain channel operator
763    privileges on public channels without being promoted.  They have the
764    same privileges as everyone else except they are able to administrate
765    their server or router.
766
767
768 3.6 SILC Commands
769
770    Commands are very important part on SILC network especially for client
771    which uses commands to operate on the SILC network.  Commands are used
772    to set nickname, join to channel, change modes and many other things.
773
774    Client usually sends the commands and server replies by sending a reply
775    packet to the command.  Server may also send commands usually to serve
776    the original client's request.  However, server may not send command
777    to client and there are some commands that server must not send.
778
779    Note that the command reply is usually sent only after client has sent
780    the command request but server is allowed to send command reply packet
781    to client even if client has not requested the command.  Client may,
782    however, choose not to accept the command reply, but there are some
783
784
785
786 Riikonen                                                       [Page 14]
787 \f
788 Internet Draft      Secure Internet Live Conferencing       28 June 2000
789
790
791    command replies that the client should accept.  Example of a such
792    command reply is reply to SILC_COMMAND_CMODE command that the server
793    uses to distribute the channel mode on all clients on the channel
794    when the mode has changed.
795
796    It is expected that some of the commands may be miss-used by clients
797    resulting various problems on the server side.  Every implementation
798    should assure that commands may not be executed more than once, say,
799    in two (2) seconds.  This should be sufficient to prevent the miss-use
800    of commands.
801
802    SILC commands are described in section 5 SILC Commands.
803
804
805 3.7 SILC Packets
806
807    Packets are naturally the most important part of the protocol and the
808    packets are what actually makes the protocol.  Packets in SILC network
809    are always encrypted using, usually, the shared secret session key
810    or some other key, for example, channel key, when encrypting channel
811    messages.  The SILC Packet Protocol is a wide protocol and is described
812    in [SILC2].  This document does not define or describe details of
813    SILC packets.
814
815
816 3.8 Packet Encryption
817
818    All packets passed in SILC network must be encrypted.  This section
819    defines how packets must be encrypted in the SILC network.  The detailed
820    description of the actual encryption process of the packets are
821    described in [SILC2].
822
823    Client and its server shares secret symmetric session key which is
824    established by the SILC Key Exchange Protocol, described in [SILC3].
825    Every packet sent from client to server, with exception of packets for
826    channels, are encrypted with this session key.
827
828    Channels has their own key that are shared by every client on the channel.
829    However, the channel keys are cell specific thus one cell does not know
830    the channel key of the other cell, even if that key is for same channel.
831    Channel key is also known by the routers and all servers that has clients
832    on the channel.  However, channels may have channel private keys that
833    are entirely local setting for client.  All clients on the channel must
834    know the channel private key before hand to be able to talk on the
835    channel.  In this case, no server or router knows the key for channel.
836
837    Server shares secret symmetric session key with router which is
838    established by the SILC Key Exchange Protocol.  Every packet passed from
839
840
841
842 Riikonen                                                       [Page 15]
843 \f
844 Internet Draft      Secure Internet Live Conferencing       28 June 2000
845
846
847    server to router, with exception of packets for channels, are encrypted
848    with the shared session key.  Same way, router server shares secret
849    symmetric key with its primary route.  However, every packet passed
850    from router to other router, including packets for channels, are
851    encrypted with the shared session key.  Every router connection has
852    their own session keys.
853
854
855 3.8.1 Determination of the Source and the Destination
856
857    The source and the destination of the packet needs to be determined
858    to be able to route the packets to correct receiver.  This information
859    is available in the SILC Packet Header which is included in all packets
860    sent in SILC network.  The SILC Packet Header is described in [SILC2].
861
862    The header is always encrypted with the session key who is next receiver
863    of the packet along the route.  The receiver of the packet, for example
864    a router along the route, is able to determine the sender and the
865    destination of the packet by decrypting the SILC Packet Header and
866    checking the ID's attached to the header.  The ID's in the header will
867    tell to where the packet needs to be sent and where it is coming from.
868
869    The header in the packet does not change during the routing of the
870    packet.  The original sender, for example client, assembles the packet
871    and the packet header and server or router between the sender and the
872    receiver must not change the packet header.
873
874    Note that the packet and the packet header may be encrypted with
875    different keys.  For example, packets to channels are encrypted with
876    the channel key, however, the header is encrypted with the session key
877    as described above.  However, the header and the packet may be encrypted
878    with same key.  This is case, for example, with command packets.
879
880
881 3.8.2 Client To Client
882
883    Process of message delivery and encryption from client to another
884    client is as follows.
885
886    Example:  Private message from client to another client on different
887              servers.  Clients do not share private message delivery
888              keys; normal session keys are used.
889
890    o Client 1. sends encrypted packet to its server.  The packet is
891      encrypted with the session key shared between client and its
892      server.
893
894    o Server determines the destination of the packet and decrypts
895
896
897
898 Riikonen                                                       [Page 16]
899 \f
900 Internet Draft      Secure Internet Live Conferencing       28 June 2000
901
902
903      the packet.  Server encrypts the packet with session key shared
904      between the server and its router, and sends the packet to the
905      router.
906
907    o Router determines the destination of the packet and decrypts
908      the packet.  Router encrypts the packet with session key
909      shared between the router and the destination server, and sends
910      the packet to the server.
911
912    o Server determines the client to which the packet is destined
913      to and decrypts the packet.  Server encrypts the packet with
914      session key shared between the server and the destination client,
915      and sends the packet to the client.
916
917    o Client 2. decrypts the packet.
918
919
920    Example:  Private message from client to another client on different
921              servers.  Clients has established secret shared private
922              message delivery key with each other and that is used in
923              the message encryption.
924
925    o Client 1. sends encrypted packet to its server.  The packet is
926      encrypted with the private message delivery key shared between
927      clients.
928
929    o Server determines the destination of the packet and sends the
930      packet to the router.
931
932    o Router determines the destination of the packet and sends the
933      packet to the server.
934
935    o Server determines the client to which the packet is destined
936      to and sends the packet to the client.
937
938    o Client 2. decrypts the packet with the secret shared key.
939
940
941    If clients share secret key with each other the private message
942    delivery is much simpler since servers and routers between the
943    clients do not need to decrypt and re-encrypt the packet.
944
945    The process for clients on same server is much simpler as there are
946    no need to send the packet to the router.  The process for clients
947    on different cells is same as above except that the packet is routed
948    outside the cell.  The router of the destination cell routes the
949    packet to the destination same way as described above.
950
951
952
953
954 Riikonen                                                       [Page 17]
955 \f
956 Internet Draft      Secure Internet Live Conferencing       28 June 2000
957
958
959 3.8.3 Client To Channel
960
961    Process of message delivery from client on channel to all the clients
962    on the channel.
963
964    Example:  Channel of four users; two on same server, other two on
965              different cells.  Client sends message to the channel.
966
967    o Client 1. encrypts the packet with channel key and sends the
968      packet to its server.
969
970    o Server determines local clients on the channel and sends the
971      packet to the Client on the same server.  Server then sends
972      the packet to its router for further routing.
973
974    o Router determines local clients on the channel, if found
975      sends packet to the local clients.  Router determines global
976      clients on the channel and sends the packet to its primary
977      router or fastest route.
978
979    o (Other router(s) do the same thing and sends the packet to
980       the server(s))
981
982    o Server determines local clients on the channel and sends the
983      packet to the client.
984
985    o All clients receiving the packet decrypts the packet.
986
987
988 3.8.4 Server To Server
989
990    Server to server packet delivery and encryption is described in above
991    examples. Router to router packet delivery is analogous to server to
992    server.  However, some packets, such as channel packets, are processed
993    differently.  These cases are described later in this document and
994    more in detail in [SILC2].
995
996
997 3.9 Key Exchange And Authentication
998
999    Key exchange is done always when for example client connects to server
1000    but also when server and router and router and router connects to each
1001    other.  The purpose of key exchange protocol is to provide secure key
1002    material to be used in the communication.  The key material is used to
1003    derive various security parameters used to secure SILC packets.  The
1004    SILC Key Exchange protocol is described in detail in [SILC3].
1005
1006    Authentication is done after key exchange protocol has been successfully
1007
1008
1009
1010 Riikonen                                                       [Page 18]
1011 \f
1012 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1013
1014
1015    completed.  The purpose of authentication is to authenticate for example
1016    client connecting to the server.  However, Usually clients are accepted
1017    to connect to server without explicit authentication.  Servers are
1018    required use authentication protocol when connecting.  The authentication
1019    may be based on passphrase (pre-shared-secret) or public key.  The
1020    connection authentication protocol is described in detail in [SILC3].
1021
1022
1023 3.10 Algorithms
1024
1025    This section defines all the allowed algorithms that can be used in
1026    the SILC protocol.  This includes mandatory cipher, mandatory public
1027    key algorithm and MAC algorithms.
1028
1029
1030 3.10.1 Ciphers
1031
1032    Cipher is the encryption algorithm that is used to protect the data
1033    in the SILC packets.  See [SILC2] of the actual encryption process and
1034    definition of how it must be done.  SILC has a mandatory algorithm that
1035    must be supported in order to be compliant with this protocol.
1036
1037    Following ciphers are defined in SILC protocol:
1038
1039       blowfish-cbc    Blowfish in CBC mode  (mandatory)
1040       twofish-cbc     Twofish in CBC mode   (optional)
1041       rc6-cbc         RC6 in CBC mode       (optional)
1042       rc5-cbc         RC5 in CBC mode       (optional)
1043       mars-cbc        Mars in CBC mode      (optional)
1044       none            No encryption         (optional)
1045
1046
1047    All algorithms must use minimum of 128 bit key, by default.  Several
1048    algorithms, however, supports longer keys and it is recommended to use
1049    longer keys if they are available.
1050
1051    Algorithm none does not perform any encryption process at all and
1052    thus is not recommended to be used.  It is recommended that no client
1053    or server implementation would accept none algorithms except in special
1054    debugging mode.
1055
1056    Additional ciphers may be defined to be used in SILC by using the
1057    same name format as above.
1058
1059
1060
1061
1062
1063
1064
1065
1066 Riikonen                                                       [Page 19]
1067 \f
1068 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1069
1070
1071 3.10.2 Public Key Algorithms
1072
1073    Public keys are used in SILC to authenticate entities in SILC network
1074    and to perform other tasks related to public key cryptography.  The
1075    public keys are also used in the SILC Key Exchange protocol [SILC3].
1076
1077    Following public key algorithms are defined in SILC protocol:
1078
1079       rsa        RSA  (mandatory)
1080       dss        DSS  (optional)
1081
1082    Both of the algorithms are described in [Scheneir] and [Menezes].
1083
1084    Additional public key algorithms may be defined to be used in SILC.
1085
1086
1087 3.10.3 MAC Algorithms
1088
1089    Data integrity is protected by computing a message authentication code
1090    (MAC) of the packet data.  See [SILC2] for details how to compute the
1091    MAC.
1092
1093    Following MAC algorithms are defined in SILC protocol:
1094
1095       hmac-sha1        HMAC-SHA1, length = 20  (mandatory)
1096       hmac-md5         HMAC-MD5, length = 16   (optional)
1097       none             No MAC                  (optional)
1098
1099    The none MAC is not recommended to be used as the packet is not
1100    authenticated when MAC is not computed.  It is recommended that no
1101    client or server would accept none MAC except in special debugging
1102    mode.
1103
1104    The HMAC algorithm is described in [HMAC] and hash algorithms that
1105    are used as part of the HMACs are described in [Scheneir] and in
1106    [Menezes]
1107
1108    Additional MAC algorithms may be defined to be used in SILC.
1109
1110
1111 3.10.4 Compression Algorithms
1112
1113    SILC protocol supports compression that may be applied to unencrypted
1114    data.  It is recommended to use compression on slow links as it may
1115    significantly speed up the data transmission.  By default, SILC does not
1116    use compression which is the mode that must be supported by all SILC
1117    implementations.
1118
1119
1120
1121
1122 Riikonen                                                       [Page 20]
1123 \f
1124 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1125
1126
1127    Following compression algorithms are defined:
1128
1129       none        No compression               (mandatory)
1130       zlib        GBU ZLIB (LZ77) compression  (optional)
1131
1132    Additional compression algorithms may be defined to be used in SILC.
1133
1134
1135 3.11 SILC Public Key
1136
1137    This section defines the type and format of the SILC public key.  All
1138    implementations must support this public key type.  See [SILC3] for
1139    other optional public key and certificate types allowed in SILC
1140    protocol.  Public keys in SILC may be used to authenticate entities
1141    and to perform other tasks related to public key cryptography.
1142
1143    The format of the SILC Public Key is as follows:
1144
1145
1146                           1                   2                   3
1147       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
1148      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1149      |                        Public Key Length                      |
1150      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1151      |     Algorithm Name Length     |                               |
1152      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1153      |                                                               |
1154      ~                         Algorithm Name                        ~
1155      |                                                               |
1156      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1157      |       Identifier Length       |                               |
1158      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
1159      |                                                               |
1160      ~                           Identifier                          ~
1161      |                                                               |
1162      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1163      |                                                               |
1164      ~                           Public Data                         ~
1165      |                                                               |
1166      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1167
1168                         Figure 4:  SILC Public Key
1169
1170
1171       o Public Key Length (4 bytes) - Indicates the full length
1172         of the public key, not including this field.
1173
1174       o Algorithm Name Length (2 bytes) - Indicates the length
1175
1176
1177
1178 Riikonen                                                       [Page 21]
1179 \f
1180 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1181
1182
1183         of the Algorithm Length field, not including this field.
1184
1185       o Algorithm name (variable length) - Indicates the name
1186         of the public key algorithm that the key is.  See the
1187         section 3.10.2 Public Key Algorithms for defined names.
1188
1189       o Identifier Length (2 bytes) - Indicates the length of
1190         the Identifier field, not including this field.
1191
1192       o Identifier (variable length) - Indicates the identifier
1193         of the public key.  This data can be used to identify
1194         the owner of the key.  The identifier is of following
1195         format:
1196
1197            UN   User name
1198            HN   Host name or IP address
1199            RN   Real name
1200            E    EMail address
1201            O    Organization
1202            C    Country
1203
1204
1205         Examples of an identifier:
1206
1207           `UN=priikone, HN=poseidon.pspt.fi, E=priikone@poseidon.pspt.fi'
1208
1209           `UN=sam, HN=dummy.fi, RN=Sammy Sam, O=Company XYZ, C=Finland'
1210
1211         At least user name (UN) and host name (HN) must be provided as
1212         identifier.  The fields are separated by commas (`,').  If
1213         comma is in the identifier string it must be written as `\,',
1214         for example, `O=Company XYZ\, Inc.'.
1215
1216       o Public Data (variable length) - Includes the actual
1217         public data of the public key.
1218
1219         The format of this field for RSA algorithm is
1220         as follows:
1221
1222            4 bytes            Length of e
1223            variable length    e
1224            4 bytes            Length of n
1225            variable length    n
1226
1227
1228         The format of this field for DSS algorithm is
1229         as follows:
1230
1231
1232
1233
1234 Riikonen                                                       [Page 22]
1235 \f
1236 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1237
1238
1239            4 bytes            Length of p
1240            variable length    p
1241            4 bytes            Length of q
1242            variable length    q
1243            4 bytes            Length of g
1244            variable length    g
1245            4 bytes            Length of y
1246            variable length    y
1247
1248         The variable length fields are multiple precession
1249         integers encoded as strings in both examples.
1250
1251         Other algorithms must define their own type of this
1252         field if they are used.
1253
1254    All fields in the public key are in MSB (most significant byte first)
1255    order.
1256
1257
1258 4 SILC Procedures
1259
1260    This section describes various SILC procedures such as how the
1261    connections are created and registered, how channels are created and
1262    so on.  The section describes the procedures only generally as details
1263    are described in [SILC2] and [SILC3].
1264
1265
1266 4.1 Creating Client Connection
1267
1268    This section descibres the procedure when client connects to SILC server.
1269    When client connects to server the server must perform IP address lookup
1270    and reverse IP address lookup to assure that the origin host really is
1271    who it claims to be.  Client, host, connecting to server must have
1272    both valid IP address and fully qualified domain name (FQDN).
1273
1274    After that client and server performs SILC Key Exchange protocol which
1275    will provide the key material used later in the communication.  The
1276    key exchange protocol must be completed successfully before the connection
1277    registration may continue.  The SILC Key Exchange protocol is described
1278    in [SILC3].
1279
1280    Typical server implementation would keep a list of connections that it
1281    allows to connect to the server.  The implementation would check, for
1282    example, the connecting client's IP address from the connection list
1283    before the SILC Key Exchange protocol has been started.  Reason for
1284    this is that if the host is not allowed to connect to the server there
1285    is no reason to perform a key exchange protocol.
1286
1287
1288
1289
1290 Riikonen                                                       [Page 23]
1291 \f
1292 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1293
1294
1295    After successful key exchange protocol the client and server performs
1296    connection authentication protocol.  The purpose of the protocol is to
1297    authenticate the client connecting to the server.  Flexible
1298    implementation could also accept the client to connect to the server
1299    without explicit authentication.  However, if authentication is
1300    desired for a specific client it may be based on passphrase or
1301    public key authentication.  If authentication fails the connection
1302    must be terminated.  The connection authentication protocol is described
1303    in [SILC3].
1304
1305    After successful key exchange and authentication protocol the client
1306    registers itself by sending SILC_PACKET_NEW_CLIENT packet to the
1307    server.  This packet includes various information about the client
1308    that the server uses to create the client.  Server creates the client
1309    and sends SILC_PACKET_NEW_ID to the client which includes the created
1310    Client ID that the client must start using after that.  After that
1311    all SILC packets from the client must have the Client ID as the
1312    Source ID in the SILC Packet Header, described in [SILC2].
1313
1314    Client must also get the server's Server ID that is to be used as
1315    Destination ID in the SILC Packet Header when communicating with
1316    the server (for example when sending commands to the server).  The
1317    ID may be resolved in two ways.  Client can take the ID from an
1318    previously received packet from server that must include the ID,
1319    or to send SILC_COMMAND_INFO command and receive the Server ID as
1320    command reply.
1321
1322    Server may choose not to use the information received in the
1323    SILC_PACKET_NEW_CLIENT packet.  For example, if public key or
1324    certificate were used in the authentication, server may use those
1325    informations rather than what it received from client.  This is suitable
1326    way to get the true information about client if it is available.
1327
1328    The nickname of client is initially set to the username sent in the
1329    SILC_PACKET_NEW_CLIENT packet.  User should set the nickname to more
1330    suitable by sending SILC_COMMAND_NICK command.  However, this is not
1331    required as part of registration process.
1332
1333    Server must also distribute the information about newly registered
1334    client to its router (or if the server is router, to all routers in
1335    the SILC network).  More information about this in [SILC2].
1336
1337
1338 4.2 Creating Server Connection
1339
1340    This section descibres the procedure when server connects to its
1341    router (or when router connects to other router, the cases are
1342    equivalent).  The procedure is very much alike when client connects
1343
1344
1345
1346 Riikonen                                                       [Page 24]
1347 \f
1348 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1349
1350
1351    to the server thus it is not repeated here.
1352
1353    One difference is that server must perform connection authentication
1354    protocol with proper authentication.  Proper authentication is based
1355    on passphrase or public key authentication.
1356
1357    After server and router has successfully performed the key exchange
1358    and connection authentication protocol, the server register itself
1359    to the router by sending SILC_PACKET_NEW_SERVER packet.  This packet
1360    includes the server's Server ID that it has created by itself and
1361    other relevant information about the server.
1362
1363    After router has received the SILC_PACKET_NEW_SERVER packet it
1364    distributes the information about newly registered server to all routers
1365    in the SILC network.  More information about this in [SILC2].
1366
1367    As client needed to resolve the destination ID this must be done by the
1368    server that connected to the router, as well.  The way to resolve it is
1369    to get the ID from previously received packet.  Server must also start
1370    using its own Server ID as Source ID in SILC Packet Header and the
1371    router's Server ID as Destination when communicating with the router.
1372
1373    If the server has already connected clients and locally created
1374    channels the server must distribute these informations to the router.
1375    The distribution is done by sending packet SILC_PACKET_NEW_CHANNEL.
1376    See [SILC2] for more information on this.
1377
1378
1379 4.3 Joining to a Channel
1380
1381    This section describes the procedure when client joins to a channel.
1382    Client may join to channel by sending command SILC_COMMAND_JOIN to the
1383    server.  If the receiver receiving join command is normal server the
1384    server must check its local list whether this channel already exists
1385    locally.  This would indicate that some client connected to the server
1386    has already joined to the channel.  If this is case the client is
1387    joined to the client, new channel key is created and information about
1388    newly joined channel is sent to the router.  The new channel key is
1389    also distributed to the router and to all clients on the channel.
1390
1391    If the channel does not exist in the local list the command must be
1392    sent to the router which will then perform the actual joining
1393    procedure.  When server receives the reply to the command from the
1394    router it must be distributed to the client who sent the command
1395    originally.  Server will also receive the channel key from the server
1396    that it must distribute to the client who originally requested the
1397    join command.  The server must also save the channel key.
1398
1399
1400
1401
1402 Riikonen                                                       [Page 25]
1403 \f
1404 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1405
1406
1407    If the receiver of the join command is router it must first check its
1408    local list whether anyone in the cell has already joined to the channel.
1409    If this is the case the client is joined to the channel and reply is
1410    sent to the client.  If the command was sent by server the command reply
1411    is sent to the server who sent it.  Then the router must also create
1412    new channel key and distribute it to all clients on the channel and
1413    all servers that has clients on the channel.
1414
1415    If the channel does not exist on the router's local list it must
1416    check the global list whether the channel exists at all.  If it does
1417    the client is joined to the channel as described previously.  If
1418    the channel does not exist the channel is created and the client
1419    is joined to the channel.  The channel key is also created and
1420    distributed as previously described.  The client joining to the created
1421    channel is made automatically channel founder and both channel founder
1422    and channel operator privileges is set for the client.
1423
1424    When the router joins the client to the channel it must send
1425    information about newly joined client to all routers in the SILC
1426    network.  Also, if the channel was created in the process, information
1427    about newly created channel must also be distributed to all routers.
1428    The distribution of newly created channel is done by sending packet
1429    SILC_PACKET_NEW_CHANNEL.
1430
1431    It is important to note that new channel key is created always when
1432    new client joins to channel, whether the channel has existed previously
1433    or not.  This way the new client on the channel is not able to decrypt
1434    any of the old traffic on the channel.
1435
1436    Client who receives the reply to the join command must start using
1437    the received Channel ID in the channel message communication thereafter.
1438    However, client must not start communicating on the channel before
1439    it has received the packet SILC_PACKET_CHANNEL_KEY.
1440
1441    If client wants to know the other clients currently on the channel
1442    the client must send SILC_COMMAND_NAMES command to receive a list of
1443    channel users.  Server implementation, however, may send command reply
1444    packet to SILC_COMMAND_NAMES command after client has joined to the
1445    channel even if the client has not sent the command.
1446
1447
1448 4.4 Channel Key Generation
1449
1450    Channel keys are created by router who creates the channel by taking
1451    enough randomness from cryptographically strong random number generator.
1452    The key is generated always when channel is created, when new client
1453    joins a channel and after the key has expired.  Key could expire for
1454    example in an hour.
1455
1456
1457
1458 Riikonen                                                       [Page 26]
1459 \f
1460 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1461
1462
1463    The key must also be re-generated whenever some client leaves a channel.
1464    In this case the key is created from scratch by taking enough randomness
1465    from the random number generator.  After that the key is distributed to
1466    all clients on the channel.  However, channel keys are cell specific thus
1467    the key is created only on the cell where the client, who leaved the
1468    channel, exists.  While the server or router is creating the new channel
1469    key, no other client may join to the channel.  Messages that are sent
1470    while creating the new key are still processed with the old key.  After
1471    server has sent the SILC_PACKET_CHANNEL_KEY packet must client start
1472    using the new key.  If server creates the new key the server must also
1473    send the new key to its router.  See [SILC2] on more information about
1474    how channel messages must be encrypted and decrypted when router is
1475    processing them.
1476
1477
1478 4.5 Private Message Sending and Reception
1479
1480    Private messages are sent point to point.  Client explicitly destines
1481    a private message to specific client that is delivered to only to that
1482    client.  No other client may receive the private message.  The receiver
1483    of the private message is destined in the SILC Packet Header as any
1484    other packet as well.
1485
1486    If the sender of a private message does not know the receiver's Client
1487    ID, it must resolve it from server.  There are two ways to resolve the
1488    client ID from server; it is recommended that client ipmlementations
1489    send SILC_COMMAND_IDENTIFY command to receive the Client ID.  Client
1490    may also send SILC_COMMAND_WHOIS command to receive the Client ID.
1491    If the sender has received earlier a private message from the receiver
1492    it should have cached the Client ID from the SILC Packet Header.
1493
1494    Receiver of a private message should not explicitly trust the nickname
1495    that it receives in the Private Message Payload, described in [SILC2].
1496    Implementations could resolve the nickname from server, as described
1497    previously, and compare the received Client ID and the SILC Packet
1498    Header's Client ID.  The nickname in the payload is merely provided
1499    to be displayed for end user.
1500
1501    See [SILC2] for describtion of private message encryption and decryption
1502    process.
1503
1504
1505 4.6 Private Message Key Generation
1506
1507    Private message may be protected by key generated by client.  The key
1508    may be generated and sent to the other client by sending packet
1509    SILC_PACKET_PRIVATE_MESSAGE_KEY which travels through the network
1510    and is secured by session keys.  After that the private message key
1511
1512
1513
1514 Riikonen                                                       [Page 27]
1515 \f
1516 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1517
1518
1519    is used in the private message communication between those clients.
1520    See more information about how this works technically in [SILC2].
1521
1522    Other choice is to entirely use keys that are not sent through
1523    the SILC network at all.  This significantly adds security.  This key
1524    would be pre-shared-key that is known by both of the clients.  Both
1525    agree about using the key and starts sending packets that indicate
1526    that the private message is secured using private message key.  This
1527    is the technical aspect mentioned previously that is described
1528    in [SILC2].
1529
1530    If the private message keys are not set to be used, which is the
1531    case by default in SILC, the private messages are secured by using
1532    normal session keys established by SILC Key Exchange protocol.
1533
1534
1535 4.7 Channel Message Sending and Reception
1536
1537    Channel messages are delivered to group of users.  The group forms a
1538    channel and all clients on the channel receives messages sent to the
1539    channel.
1540
1541    Channel messages are destined to channel by specifying the Channel ID
1542    as Destination ID in the SILC Packet Header.  The server must then
1543    distribute the message to all clients on the channel by sending the
1544    channel message destined explicitly to a client on the channel.
1545
1546    See [SILC2] for describtion of channel message encryption and decryption
1547    process.
1548
1549
1550 4.8 Session Key Regeneration
1551
1552    Session keys should be regenerated peridiocally, say, once in an hour.
1553    The re-key process is started by sending SILC_PACKET_REKEY packet to
1554    other end, to indicate that re-key must be performed.
1555
1556    If perfect forward secrecy (PFS) flag was selected in the SILC Key
1557    Exchange protocol [SILC3] the re-key must cause new key exchange with
1558    SKE protocol.  In this case the protocol is secured with the old key
1559    and the protocol results to new key material.  See [SILC3] for more
1560    information.  After the SILC_PACKET_REKEY packet is sent the sender
1561    will perform the SKE protocol.
1562
1563    If PFS flag was not set, which is the default case, then re-key is done
1564    without executing SKE protocol.  In this case, the new key is created by
1565    hashing the old key with hash function selected earlier in the SKE
1566    protocol.  If the digest length of the hash function is too short for the
1567
1568
1569
1570 Riikonen                                                       [Page 28]
1571 \f
1572 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1573
1574
1575    key, then the key is distributed as described in section Processing the
1576    Key Material in [SILC3].  After both parties has regenerated the session
1577    key, both send SILC_PACKET_REKEY_DONE packet to each other.  These packets
1578    are still secured with the old key.  After these packets, following
1579    packets must be protected with the new key.
1580
1581
1582 4.9 Command Sending and Reception
1583
1584    Client usually sends the commands in the SILC network.  In this case
1585    the client simply sends the command packet to server and the server
1586    processes it and replies with command reply packet.
1587
1588    However, if the server is not able to process the command, it is usually
1589    sent to the server's router.  This is case for example with commands such
1590    as, SILC_COMMAND_JOIN and SILC_COMMAND_WHOIS commands.  However, there
1591    are other commands as well.  For example, if client sends the WHOIS
1592    command requesting specific information about some client the server must
1593    send the WHOIS command to router so that all clients in SILC network
1594    are searched.  The router, on the other hand, sends the WHOIS command
1595    to further to receive the exact information about the requested client.
1596    The WHOIS command travels all the way to the server who owns the client
1597    and it replies with command reply packet.  Finally, the server who
1598    sent the command receives the command reply and it must be able to
1599    determine which client sent the original command.  The server then
1600    sends command reply to the client.  Implementations should have some
1601    kind of cache to handle, for example, WHOIS information.  Servers
1602    and routers along the route could all cache the information for faster
1603    referencing in the future.
1604
1605    The commands sent by server may be sent hop by hop until someone is able
1606    to process the command.  However, it is preferred to destine the command
1607    as precisely as it is possible.  In this case, other routers en route
1608    must route the command packet by checking the true sender and true
1609    destination of the packet.  However, servers and routers must not route
1610    command reply packets to clients coming from other server.  Client
1611    must not accept command reply packet originated from anyone else but
1612    from its own server.
1613
1614
1615 5 SILC Commands
1616
1617 5.1 SILC Commands Syntax
1618
1619    This section briefly describes the syntax of the command notions
1620    in this document.  Every field in command is separated from each
1621    other by whitespaces (` ') indicating that each field is independent
1622    argument and each argument must have own Command Argument Payload.
1623
1624
1625
1626 Riikonen                                                       [Page 29]
1627 \f
1628 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1629
1630
1631    The number of maximum arguments are defined with each command
1632    separately.  The Command Argument Payload is described in [SILC2].
1633
1634    Every command defines specific number for each argument.  Currently,
1635    they are defined in ascending order; first argument has number one
1636    (1), second has number two (2) and so on.  This number is set into the
1637    Argument Type field in the Command Argument Payload.  This makes it
1638    possible to send the arguments in free order as the number must be
1639    used to identify the type of the argument.  This makes is it also
1640    possible to have multiple optional arguments in commands and in
1641    command replies.  The number of argument is marked in parentheses
1642    before the actual argument.
1643
1644       Example:  Arguments:  (1) <nickname> (2) <username@host>
1645
1646
1647    Every command replies with Status Payload.  This payload tells the
1648    sender of the command whether the command was completed succefully or
1649    whether there was an error.  If error occured the payload includes the
1650    error type.  In the next section the Status Payload is not described
1651    as it is common to all commands and has been described here.  Commands
1652    may reply with other arguments as well.  These arguments are command
1653    specific and are described in the next section.
1654
1655    Example command:
1656
1657       EXAMPLE_COMMAND
1658
1659         Max Arguments:  3
1660             Arguments:  (1) <nickname>[@<server>]  (2) <message>
1661                         (3) [<count>]
1662
1663         The command has maximum of 3 arguments.  However, only first
1664         and second arguments are mandatory.
1665
1666         First argument <nickname> is mandatory but may have optional
1667         <nickname@server> format as well.  Second argument is mandatory
1668         <message> argument.  Third argument is optional <count> argument.
1669
1670         The numbers in parentheses are the argument specific numbers
1671         that specify the type of the argument in Command Argument Payload.
1672         The receiver always knows that, say, argument number two (2) is
1673         <message> argument, regardles of the ordering of the arguments in
1674         the Command Payload.
1675
1676
1677
1678
1679
1680
1681
1682 Riikonen                                                       [Page 30]
1683 \f
1684 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1685
1686
1687         Reply messages to the command:
1688
1689         Max Arguments:  4
1690             Arguments:  (1) <Status Payload>  (2) [<channel list>]
1691                         (3) <idle time>       (4) [<away message>]
1692
1693         This command may reply with maximum of 4 arguments.  However,
1694         only the first and third arguments are mandatory.  The numbers
1695         in the parentheses have the same meaning as in the upper
1696         command sending specification.
1697
1698         Every command reply with <Status Payload>, it is mandatory
1699         argument for all command replies and for this reason it is not
1700         described in the command reply descriptions.
1701
1702         Status messages:
1703
1704             SILC_STATUS_OK
1705             SILC_STATUS_ERR_TOO_MANY_TARGETS
1706             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1707             SILC_STATUS_ERR_NO_SUCH_NICK
1708
1709         Every command reply also defines set of status message that it
1710         may return inside the <Status Payload>.  All status messages
1711         are defined in the section 5.3 SILC Command Status Types.
1712
1713
1714 5.2 SILC Commands List
1715
1716    This section lists all SILC commands, however, it is expected that a
1717    implementation and especially client implementation has many more
1718    commands that has only local affect.  These commands are official
1719    SILC commands that has both client and server sides and cannot be
1720    characterized as local commands.
1721
1722    List of all defined commands in SILC follows.
1723
1724    0    SILC_COMMAND_NONE
1725
1726         None.  This is reserved command and must not be sent.
1727
1728
1729    2    SILC_COMMAND_WHOIS
1730
1731         Max Arguments:  2
1732             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1733
1734         Whois.  Whois command is used to query various information about
1735
1736
1737
1738 Riikonen                                                       [Page 31]
1739 \f
1740 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1741
1742
1743         specific user.  The user maybe requested by their nickname and
1744         server name.  The query may find multiple matching users as
1745         there are no unique nicknames in the SILC.  The <count> option
1746         maybe given to narrow down the number of accepted results.  If
1747         this is not defined there are no limit of accepted results.
1748         The query may also be narrowed down by defining the server name
1749         of the nickname.
1750
1751         To prevent miss-use of this service wildcards in the nickname
1752         or in the servername are not permitted.  It is not allowed
1753         to request all users on some server.  The WHOIS requests must
1754         be based on specific nickname request.
1755
1756         The WHOIS request must be always forwarded to router by server
1757         so that all users are searched.  However, the server still must
1758         search its locally connected clients.  The server must send
1759         this command to the server who owns the requested client.  That
1760         server must reply to the command.
1761
1762         Reply messages to the command:
1763
1764         Max Arguments:  7
1765             Arguments:  (1) <Status Payload>       (2) <Client ID>
1766                         (3) <nickname>[@<server>]  (4) <username@host>
1767                         (5) <real name>            (6) [<channel list>]
1768                         (7) [<idle time>]
1769
1770         This command may reply with several command reply messages to
1771         form a list of results.  In this case the status payload will
1772         include STATUS_LIST_START status in the first reply and
1773         STATUS_LIST_END in the last reply to indicate the end of the
1774         list.  If there are only one reply the status is set to normal
1775         STATUS_OK.
1776
1777         The command replies include the Client ID of the nickname,
1778         nickname and servername, username and hostnamea and users real
1779         name.  Client should process these replies only after the last
1780         reply has been received with the STATUS_LIST_END status.  If the
1781         <count> option were defined in the query there will be only
1782         <count> many replies from the server.
1783
1784         Status messages:
1785
1786             SILC_STATUS_OK
1787             SILC_STATUS_LIST_START
1788             SILC_STATUS_LIST_END
1789             SILC_STATUS_ERR_NO_SUCH_NICK
1790             SILC_STATUS_ERR_WILDCARDS
1791
1792
1793
1794 Riikonen                                                       [Page 32]
1795 \f
1796 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1797
1798
1799             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1800             SILC_STATUS_ERR_TOO_MANY_PARAMS
1801
1802
1803    3    SILC_COMMAND_WHOWAS
1804
1805         Max Arguments:  2
1806             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1807
1808         Whowas.  This command is used to query history information about
1809         specific user.  The user maybe requested by their nickname and
1810         server name.  The query may find multiple matching users as there
1811         are no unique nicknames in the SILC.  The <count> option maybe
1812         given to narrow down the number of accepted results.  If this
1813         is not defined there are no limit of accepted results.  The query
1814         may also be narrowed down by defining the server name of the
1815         nickname.
1816
1817         To prevent miss-use of this service wildcards in the nickname
1818         or in the servername are not permitted.  The WHOWAS requests must
1819         be based on specific nickname request.
1820
1821         The WHOWAS request must be always forwarded to router by server
1822         so that all users are searched.  However, the server still must
1823         search its locally connected clients.
1824
1825         Reply messages to the command:
1826
1827         Max Arguments:  3
1828             Arguments:  (1) <Status Payload>  (2) <nickname>[@<server>]
1829                         (3) <username@host>
1830
1831         This command may reply with several command reply messages to form
1832         a list of results.  In this case the status payload will include
1833         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
1834         the last reply to indicate the end of the list.  If there are only
1835         one reply the status is set to normal STATUS_OK.
1836
1837         The command replies with nickname and username and hostname.
1838         Every server must keep history for some period of time of its
1839         locally connected clients.
1840
1841         Status messages:
1842
1843             SILC_STATUS_OK
1844             SILC_STATUS_LIST_START
1845             SILC_STATUS_LIST_END
1846             SILC_STATUS_ERR_NO_SUCH_NICK
1847
1848
1849
1850 Riikonen                                                       [Page 33]
1851 \f
1852 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1853
1854
1855             SILC_STATUS_ERR_WILDCARDS
1856             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1857             SILC_STATUS_ERR_TOO_MANY_PARAMS
1858
1859
1860    4    SILC_COMMAND_IDENTIFY
1861
1862         Max Arguments:  2
1863             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
1864
1865         Identify.  Identify command is almost analogous to WHOIS command,
1866         except that it does not return as much information.  Only relevant
1867         information such as Client ID is returned.  This is usually used
1868         to get the Client ID of a client used in the communication with
1869         the client.
1870
1871         The query may find multiple matching users as there are no unique
1872         nicknames in the SILC.  The <count> option maybe given to narrow
1873         down the number of accepted results.  If this is not defined there
1874         are no limit of accepted results.  The query may also be narrowed
1875         down by defining the server name of the nickname.
1876
1877         To prevent miss-use of this service wildcards in the nickname
1878         or in the servername are not permitted.  It is not allowed
1879         to request all users on some server.  The IDENTIFY requests must
1880         be based on specific nickname request.
1881
1882         Implementations may not want to give interface access to this
1883         commands as it is hardly a command that would be used a end user.
1884         However, it must be implemented as it is used with private message
1885         sending.
1886
1887         The IDENTIFY must be always forwarded to router by server so that
1888         all users are searched.  However, server must still search its
1889         locally connected clients.
1890
1891         Reply messages to the command:
1892
1893         Max Arguments:  4
1894             Arguments:  (1) <Status Payload>         (2) <Client ID>
1895                         (3) [<nickname>[@<server>]]  (4) [<username@host>]
1896
1897         This command may reply with several command reply messages to form
1898         a list of results.  In this case the status payload will include
1899         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
1900         the last reply to indicate the end of the list.  If there are only
1901         one reply the status is set to normal STATUS_OK.
1902
1903
1904
1905
1906 Riikonen                                                       [Page 34]
1907 \f
1908 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1909
1910
1911         The command replies with Client ID of the nickname and if more
1912         information is available it may reply with nickname and username
1913         and hostname.  If the <count> option were defined in the query
1914         there will be only <count> many replies from the server.
1915
1916         Status messages:
1917
1918             SILC_STATUS_OK
1919             SILC_STATUS_LIST_START
1920             SILC_STATUS_LIST_END
1921             SILC_STATUS_ERR_NO_SUCH_NICK
1922             SILC_STATUS_ERR_WILDCARDS
1923             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1924             SILC_STATUS_ERR_TOO_MANY_PARAMS
1925
1926
1927    5    SILC_COMMAND_NICK
1928
1929         Max Arguments:  1
1930             Arguments:  (1) <nickname>
1931
1932         Set/change nickname.  This command is used to set nickname for
1933         user.  There is no limit of the length of the nickname in SILC.
1934         Nickname must not include any spaces (` '), non-printable
1935         characters, commas (`,') and any wildcard characters.  Note:
1936         nicknames in SILC are case-sensitive which must be taken into
1937         account when searching clients by nickname.
1938
1939         Reply messages to the command:
1940
1941         Max Arguments:  2
1942             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
1943
1944         This command is replied always with New ID Payload that is
1945         generated by the server every time user changes their nickname.
1946         Client receiving this payload must start using the received
1947         Client ID as its current valid Client ID.  The New ID Payload
1948         is described in [SILC2].
1949
1950         Status messages:
1951
1952             SILC_STATUS_OK
1953             SILC_STATUS_ERR_WILDCARDS
1954             SILC_STATUS_ERR_NICKNAME_IN_USE
1955             SILC_STATUS_ERR_BAD_NICKNAME
1956             SILC_STATUS_ERR_NOT_REGISTERED
1957             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1958             SILC_STATUS_ERR_TOO_MANY_PARAMS
1959
1960
1961
1962 Riikonen                                                       [Page 35]
1963 \f
1964 Internet Draft      Secure Internet Live Conferencing       28 June 2000
1965
1966
1967    6    SILC_COMMAND_LIST
1968
1969         Max Arguments:  2
1970             Arguments:  (1) [<Channel ID>] [<server>]
1971
1972         The list command is used to list channels and their topics on
1973         current server.  If the <Channel ID> parameter is used, only the
1974         status of that channel is displayed.  Secret channels are not
1975         listed at all.  Private channels are listed with status indicating
1976         that the channel is private.
1977
1978         If the <server> argument is specified the specified server's
1979         channels are listed.  In this case the command must be sent to
1980         the server who owns the channel that was requested.
1981
1982         Reply messages to the command:
1983
1984         Max Arguments:  3
1985             Arguments:  (1) <Status Payload>  (2) <channel>
1986                         (3) <topic>
1987
1988         This command may reply with several command reply messages to form
1989         a list of results.  In this case the status payload will include
1990         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
1991         the last reply to indicate the end of the list.  If there are only
1992         one reply the status is set to normal STATUS_OK.
1993
1994         This command replies with channel name and the topic of the
1995         channel.  If the channel is private channel the <topic> includes
1996         "*private*" string.
1997
1998         Status messages:
1999
2000             SILC_STATUS_OK
2001             SILC_STATUS_LIST_START
2002             SILC_STATUS_LIST_END
2003             SILC_STATUS_ERR_WILDCARDS
2004             SILC_STATUS_ERR_NOT_REGISTERED
2005             SILC_STATUS_ERR_TOO_MANY_PARAMS
2006             SILC_STATUS_ERR_NO_SUCH_CHANNEL
2007             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2008             SILC_STATUS_ERR_NO_SUCH_SERVER
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018 Riikonen                                                       [Page 36]
2019 \f
2020 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2021
2022
2023    7    SILC_COMMAND_TOPIC
2024
2025         Max Arguments:  2
2026             Arguments:  (1) <Channel ID>  (2) [<server>]]
2027
2028         This command is used to change or view the topic of a channel.
2029         The topic for channel <Channel ID> is returned if there is no
2030         <topic> given.  If the <topic> parameter is present, the topic
2031         for that channel will be changed, if the channel modes permit
2032         this action.
2033
2034         Reply messages to the command:
2035
2036         Max Arguments:  2
2037             Arguments:  (1) <Status Payload>  (2) [<topic>]
2038
2039         The command may reply with the topic of the channel if it is
2040         set.
2041
2042         Status messages:
2043
2044             SILC_STATUS_OK
2045             SILC_STATUS_ERR_NOT_ON_CHANNEL
2046             SILC_STATUS_ERR_WILDCARDS
2047             SILC_STATUS_ERR_NOT_REGISTERED
2048             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2049             SILC_STATUS_ERR_NO_SUCH_CHANNEL
2050             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2051             SILC_STATUS_ERR_NO_CHANNEL_ID
2052             SILC_STATUS_ERR_BAD_CHANNEL_ID
2053             SILC_STATUS_ERR_TOO_MANY_PARAMS
2054             SILC_STATUS_ERR_NO_CHANNEL_PRIV
2055
2056
2057    8    SILC_COMMAND_INVITE
2058
2059         Max Arguments:  2
2060             Arguments:  (1) <Client ID>  (2) <channel>
2061
2062         This command is used to invite other clients to join to the
2063         channel.  There is no requirement that the channel the target
2064         client is being invited to must exist or be a valid channel.
2065         The <Client ID> argument is the target client's ID that is being
2066         invited.
2067
2068         Reply messages to the command:
2069
2070
2071
2072
2073
2074 Riikonen                                                       [Page 37]
2075 \f
2076 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2077
2078
2079         Max Arguments:  2
2080             Arguments:  (1) <Status Payload>
2081
2082         This command replies only with Status Payload.
2083
2084         Status messages:
2085
2086             SILC_STATUS_OK
2087             SILC_STATUS_ERR_NOT_ON_CHANNEL
2088             SILC_STATUS_ERR_WILDCARDS
2089             SILC_STATUS_ERR_NOT_REGISTERED
2090             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2091             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2092             SILC_STATUS_ERR_TOO_MANY_PARAMS
2093             SILC_STATUS_ERR_NO_RECIPIENT
2094             SILC_STATUS_ERR_USER_ON_CHANNEL
2095             SILC_STATUS_ERR_NO_CLIENT_ID
2096
2097
2098    9    SILC_COMMAND_QUIT
2099
2100         Max Arguments:  1
2101             Arguments:  (1) [<quit message>]
2102
2103         This command is used by client to end SILC session.  The server
2104         must close the connection to a client which sends this command.
2105         if <quit message> is given it will be sent to other clients on
2106         channel if the client is on channel when quitting.
2107
2108         Reply messages to the command:
2109
2110         This command does not reply anything.
2111
2112
2113    10   SILC_COMMAND_KILL
2114
2115         Max Arguments:  2
2116             Arguments:  (1) <Client ID>  (2) [<comment>]
2117
2118         This command is used by SILC operators to remove a client from
2119         SILC network.  The removing has temporary effects and client may
2120         reconnect to SILC network.  The <Client ID> is the client to be
2121         removed from SILC.  The <comment> argument may be provided to
2122         give to the removed client some information why it was removed
2123         from the network.
2124
2125         Reply messages to the command:
2126
2127
2128
2129
2130 Riikonen                                                       [Page 38]
2131 \f
2132 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2133
2134
2135         Max Arguments:  1
2136             Arguments:  (1) <Status Payload>
2137
2138         This command replies only with Status Payload.
2139
2140         Status messages:
2141
2142             SILC_STATUS_OK
2143             SILC_STATUS_ERR_WILDCARDS
2144             SILC_STATUS_ERR_NOT_REGISTERED
2145             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2146             SILC_STATUS_ERR_TOO_MANY_PARAMS
2147             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2148             SILC_STATUS_ERR_NO_CLIENT_ID
2149
2150
2151    11   SILC_COMMAND_INFO
2152
2153         Max Arguments:  1
2154             Arguments:  (1) [<server>]
2155
2156         This command is used to fetch various information about a server.
2157         If <server> argument is specified the command must be sent to
2158         the requested server.
2159
2160         Reply messages to the command:
2161
2162         Max Arguments:  3
2163             Arguments:  (1) <Status Payload>  (2) <Server ID>
2164                         (3) <string>
2165
2166         This command replies with the Server ID of the server and a
2167         string which tells the information about the server.
2168
2169         Status messages:
2170
2171             SILC_STATUS_OK
2172             SILC_STATUS_ERR_WILDCARDS
2173             SILC_STATUS_ERR_NOT_REGISTERED
2174             SILC_STATUS_ERR_TOO_MANY_PARAMS
2175             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2176             SILC_STATUS_ERR_NO_SUCH_SERVER
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186 Riikonen                                                       [Page 39]
2187 \f
2188 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2189
2190
2191    12   SILC_COMMAND_CONNECT
2192
2193         Max Arguments:  2
2194             Arguments:  (1) <Server ID>
2195                         (2) [<remote server/router>[:<port>]]
2196
2197         This command is used by operators to force a server to try to
2198         establish a new connection to another router (if the connecting
2199         server is normal server) or server (if the conneceting server is
2200         router server).  Operator may specify the server/router to be
2201         connected by setting <remote server> argument.
2202
2203         Reply messages to the command:
2204
2205         Max Arguments:  1
2206             Arguments:  (1) <Status Payload>
2207
2208         This command replies only with Status Payload.
2209
2210         Status messages:
2211
2212             SILC_STATUS_OK
2213             SILC_STATUS_ERR_WILDCARDS
2214             SILC_STATUS_ERR_NOT_REGISTERED
2215             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2216             SILC_STATUS_ERR_TOO_MANY_PARAMS
2217             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2218             SILC_STATUS_ERR_NO_SERVER_PRIV
2219             SILC_STATUS_ERR_NO_ROUTER_PRIV
2220
2221
2222    13   SILC_COMMAND_PING
2223
2224         Max Arguments:  1
2225             Arguments:  (1) <Server ID>
2226
2227         This command is used by clients to test the communication
2228         channel to its server if client suspects that the communication
2229         is not working correctly.  The <Server ID> is the ID of the
2230         server the client is connected to.
2231
2232         Reply messages to the command:
2233
2234         Max Arguments:  1
2235             Arguments:  (1) <Status Payload>
2236
2237         This command replies only with Status Payload.  Server returns
2238         SILC_STATUS_OK in Status Payload if pinging was successful.
2239
2240
2241
2242 Riikonen                                                       [Page 40]
2243 \f
2244 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2245
2246
2247         Status messages:
2248
2249             SILC_STATUS_OK
2250             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2251             SILC_STATUS_ERR_TOO_MANY_PARAMS
2252             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2253             SILC_STATUS_ERR_NOT_REGISTERED
2254
2255
2256    14   SILC_COMMAND_OPER
2257
2258         Max Arguments:  2
2259             Arguments:  (1) <username>  (2) <authentication data>
2260
2261         This command is used by normal client to obtain server operator
2262         privileges on some server or router.  Note that router operator
2263         has router privileges that supersedes the server operator
2264         privileges and this does not obtain those privileges.  Client
2265         must use SILCOPER command to obtain router level privileges.
2266
2267         The <username> is the username set in the server configurations
2268         as operator.  The <authentication data> is the data that the
2269         client is authenticated against.  It may be passphrase prompted
2270         for user on client's screen or it may be public key
2271         authentication data (data signed with private key), or
2272         certificate.
2273
2274         Reply messages to the command:
2275
2276         Max Arguments:  1
2277             Arguments:  (1) <Status Payload>
2278
2279         This command replies only with Status Payload.
2280
2281         Status messages:
2282
2283             SILC_STATUS_OK
2284             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2285             SILC_STATUS_ERR_TOO_MANY_PARAMS
2286             SILC_STATUS_ERR_NOT_REGISTERED
2287             SILC_STATUS_ERR_BAD_PASSWORD
2288             SILC_STATUS_ERR_AUTH_FAILED
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298 Riikonen                                                       [Page 41]
2299 \f
2300 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2301
2302
2303    15   SILC_COMMAND_JOIN
2304
2305         Max Arguments:  3
2306             Arguments:  (1) <channel>  (2) [<passphrase>]
2307                         (3) [<cipher>]
2308
2309         Join to channel/create new channel.  This command is used to
2310         join to a channel.  If the channel does not exist the channel is
2311         created on the server receiving the join request.  The channel
2312         may be protected with passphrase.  If this is the case the
2313         passphrase must be sent along the join command.
2314
2315         The name of the <channel> must not include any spaces (` '),
2316         non-printable characters, commas (`,') or any wildcard characters.
2317
2318         Cipher to be used to secure the traffic on the channel may be
2319         requested by sending the name of the requested <cipher>.  This
2320         is used only if the channel does not exist and is created.  If
2321         the channel already exists the cipher set previously for the
2322         channel will be used to secure the traffic.
2323
2324         The server must check whether the user is allowed to join to
2325         the requested channel.  Various modes set to the channel affect
2326         the ability of the user to join the channel.  These conditions
2327         are:
2328
2329             o  The user must be invited to the channel if the channel
2330                is invite-only channel.
2331
2332             o  The Client ID/nickname/username/hostname must not match
2333                any active bans.
2334
2335             o  The correct passphrase must be provided if passphrase
2336                is set to the channel.
2337
2338             o  The user count limit, if set, must not be reached.
2339
2340         Reply messages to the command:
2341
2342         Max Arguments:  5
2343             Arguments:  (1) <Status Payload>  (2) <channel>
2344                         (3) <Channel ID>      (4) <channel mode mask>
2345                         (5) [<topic>]
2346
2347         This command replies with the channel name requested by the
2348         client, channel ID of the channel and topic of the channel
2349         if it exists.  It also replies with the channel mode mask
2350         which tells all the modes set on the channel.  If the
2351
2352
2353
2354 Riikonen                                                       [Page 42]
2355 \f
2356 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2357
2358
2359         channel is created the mode mask is zero (0).
2360
2361         Client must not start transmitting to the channel even after
2362         server has replied to this command.  Client is permitted to
2363         start transmitting on channel after server has sent packet
2364         SILC_PACKET_CHANNEL_KEY to the client.
2365
2366         Status messages:
2367
2368             SILC_STATUS_OK
2369             SILC_STATUS_ERR_WILDCARDS
2370             SILC_STATUS_ERR_NOT_REGISTERED
2371             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2372             SILC_STATUS_ERR_TOO_MANY_PARAMS
2373             SILC_STATUS_ERR_BAD_PASSWORD
2374             SILC_STATUS_ERR_CHANNEL_IS_FULL
2375             SILC_STATUS_ERR_NOT_INVITED
2376             SILC_STATUS_ERR_BANNED_FROM_CHANNEL
2377             SILC_STATUS_ERR_BAD_CHANNEL
2378             SILC_STATUS_ERR_USER_ON_CHANNEL
2379
2380
2381    16   SILC_COMMAND_MOTD
2382
2383         Max Arguments:  1
2384             Arguments:  (1) <server>
2385
2386         This command is used to query the Message of the Day of a server.
2387
2388         Reply messages to the command:
2389
2390         Max Arguments:  2
2391             Arguments:  (1) <Status Payload>  (2) [<motd>]
2392
2393         This command replies with the motd message if it exists.
2394
2395         Status messages:
2396
2397             SILC_STATUS_OK
2398             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2399             SILC_STATUS_ERR_TOO_MANY_PARAMS
2400             SILC_STATUS_ERR_NOT_REGISTERED
2401             SILC_STATUS_ERR_NO_SUCH_SERVER
2402
2403
2404
2405
2406
2407
2408
2409
2410 Riikonen                                                       [Page 43]
2411 \f
2412 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2413
2414
2415    17   SILC_COMMAND_UMODE
2416
2417         Max Arguments:  2
2418             Arguments:  (1) <Client ID>  (2) <client mode mask>
2419
2420         This command is used by client to set/unset modes for itself.
2421         However, there are some modes that the client may not set itself,
2422         but they will be set by server.  However, client may unset any
2423         mode.  Modes may be masked together ORing them thus having
2424         several modes set.  Client must keep its client mode mask
2425         locally so that the mode setting/unsetting would work without
2426         problems.  Client may change only its own modes.
2427
2428         Following client modes are defined:
2429
2430            0x0000    SILC_UMODE_NONE
2431
2432               No specific mode for client.  This is the initial
2433               setting when new client is created.  The client is
2434               normal client now.
2435
2436
2437            0x0001    SILC_UMODE_SERVER_OPERATOR
2438
2439               Marks the user as server operator.  Client cannot
2440               set this mode itself.  Server sets this mode to the
2441               client when client attains the server operator
2442               privileges by SILC_COMMAND_OPER command.  Client
2443               may unset the mode itself.
2444
2445
2446            0x0002    SILC_UMODE_ROUTER_OPERATOR
2447
2448               Marks the user as router (SILC) operator.  Client
2449               cannot this mode itself.  Router sets this mode to
2450               the client when client attains the router operator
2451               privileges by SILC_COMMAND_SILCOPER command.  Client
2452               may unset the mode itself.
2453
2454         Reply messages to the command:
2455
2456         Max Arguments:  2
2457             Arguments:  (1) <Status Payload>  (2) <client mode mask>
2458
2459         This command replies with the changed client mode mask that
2460         the client is required to keep locally.
2461
2462
2463
2464
2465
2466 Riikonen                                                       [Page 44]
2467 \f
2468 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2469
2470
2471         Status messages:
2472
2473             SILC_STATUS_OK
2474             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2475             SILC_STATUS_ERR_TOO_MANY_PARAMS
2476             SILC_STATUS_ERR_NOT_REGISTERED
2477             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2478             SILC_STATUS_ERR_BAD_CLIENT_ID
2479             SILC_STATUS_ERR_NOT_YOU
2480             SILC_STATUS_ERR_UNKNOWN_MODE
2481             SILC_STATUS_ERR_NO_RECIPIENT
2482             SILC_STATUS_ERR_NO_CLIENT_ID
2483
2484
2485    18   SILC_COMMAND_CMODE
2486
2487         Max Arguments:  6
2488             Arguments:  (1) <Channel ID>    (2) <channel mode mask>
2489                         (3) [<user limit>]  (4) [<passphrase>]
2490                         (5) [<Client ID>]   (6) [<cipher>[:<key len>]]
2491
2492         This command is used by client to set or change channel flags on
2493         a channel.  Channel has several modes that set various properties
2494         of a channel.  Modes may be masked together by ORing them thus
2495         having several modes set.  The <Channel ID> is the ID of the
2496         target channel.  The client changing channel mode must be on
2497         the same channel and poses sufficient privileges to be able to
2498         change the mode.
2499
2500         Following channel modes are defined:
2501
2502            0x0000    SILC_CMODE_NONE
2503
2504               No specific mode on channel.  This is the default when
2505               channel is created.  This means that channel is just plain
2506               normal channel.
2507
2508
2509            0x0001    SILC_CMODE_PRIVATE
2510
2511               Channel is private channel.  Private channels are shown
2512               in the channel list listed with SILC_COMMAND_LIST command
2513               with indicatioin that the channel is private.  Also,
2514               client on private channel will no be detected to be on
2515               the channel as the channel is not shown in the client's
2516               currently joined channel list.  Channel founder and
2517               channel operator may set/unset this mode.
2518
2519
2520
2521
2522 Riikonen                                                       [Page 45]
2523 \f
2524 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2525
2526
2527               Typical implementation would use [+|-]p on user interface
2528               to set/unset this mode.
2529
2530
2531            0x0002    SILC_CMODE_SECRET
2532
2533               Channel is secret channel.  Secret channels are not shown
2534               in the list listed with SILC_COMMAND_LIST command.  Secret
2535               channels can be considered to be invisible channels.
2536               Channel founder and channel operator may set/unset this
2537               mode.
2538
2539               Typical implementation would use [+|-]s on user interface
2540               to set/unset this mode.
2541
2542
2543            0x0004    SILC_CMODE_PRIVKEY
2544
2545               Channel uses private channel key to protect the traffic
2546               on the channel.  When this mode is set the client will be
2547               responsible to set the key it wants to use to encrypt and
2548               decrypt the traffic on channel.  Server generated channel
2549               keys are not used at all.  This mode provides additional
2550               security as clients on channel may agree to use private
2551               channel key that even servers do not know.  Naturally,
2552               this requires that every client on the channel knows
2553               the key before hand (it is considered to be pre-shared-
2554               key).  This specification does not define how the private
2555               channel key is set as it is entirely local setting on
2556               client end.
2557
2558               As it is local setting it is possible to have several
2559               private channel keys on one channel.  In this case several
2560               clients can talk on same channel but only those clients
2561               that share the key with the message sender will be able
2562               to hear the talking.  Client should not display those
2563               message for the end user that it is not able to decrypt
2564               when this mode is set.
2565
2566               Only channel founder may set/unset this mode.  If this
2567               mode is unset the server will distribute new channel
2568               key to all clients on the channel which will be used
2569               thereafter.
2570
2571               Typical implementation would use [+|-]k on user interface
2572               to set/unset this mode.
2573
2574
2575
2576
2577
2578 Riikonen                                                       [Page 46]
2579 \f
2580 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2581
2582
2583            0x0008    SILC_CMODE_INVITE
2584
2585               Channel is invite only channel.  Client may join to this
2586               channel only if it is invited to the channel.  Channel
2587               founder and channel operator may set/unset this mode.
2588
2589               Typical implementation would use [+|-]i on user interface
2590               to set/unset this mode.
2591
2592
2593            0x0010    SILC_CMODE_TOPIC
2594
2595               The topic of the channel may only be set by client that
2596               is channel founder or channel operator.  Normal clients
2597               on channel will not be able to set topic when this mode
2598               is set.  Channel founder and channel operator may set/
2599               unset this mode.
2600
2601               Typical implementation would use [+|-]t on user interface
2602               to set/unset this mode.
2603
2604
2605            0x0020    SILC_CMODE_ULIMIT
2606
2607               User limit has been set to the channel.  New clients
2608               may not join to the channel when the limit set is
2609               reached.  Channel founder and channel operator may set/
2610               unset the limit.  The <user limit> argument is the
2611               number of limited users.
2612
2613               Typical implementation would use [+|-]l on user interface
2614               to set/unset this mode.
2615
2616
2617            0x0040    SILC_CMODE_PASSPHRASE
2618
2619               Passphrase has been set to the channel.  Client may
2620               join to the channel only if it is able to provide the
2621               correct passphrase.  Setting passphrases to channel
2622               is entirely safe as all commands are protected in the
2623               SILC network.  Only channel founder may set/unset
2624               the passphrase.  The <passphrase> argument is the
2625               set passphrase.
2626
2627               Typical implementation would use [+|-]a on user interface
2628               to set/unset this mode.
2629
2630
2631
2632
2633
2634 Riikonen                                                       [Page 47]
2635 \f
2636 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2637
2638
2639            0x0080    SILC_CMODE_BAN
2640
2641               Ban mask has been set to the channel.  The ban mask
2642               may be used to ban specific clients to join the channel.
2643               The <ban mask> argument is the set ban mask.  When
2644               unsetting a ban mask the mask must be provided as
2645               argument.  Channel founder and channel operator may
2646               set/unset this mode.  Channel founder may not be
2647               added to the ban list.
2648
2649               Typical implementation would use [+|-]b on user interface
2650               to set/unset this mode.
2651
2652
2653            0x0100    SILC_CMODE_OPERATOR
2654
2655               Sets channel operator privileges on the channel for a
2656               client on the channel.  The <Client ID> argument is the
2657               target client on the channel.  Channel founder and
2658               channel operator may set/unset (promote/demote) this
2659               mode.
2660
2661               Typical implementation would use [+|-]o on user interface
2662               to set/unset this mode.
2663
2664
2665            0x0200    SILC_CMODE_CIPHER
2666
2667               Sets specific cipher to be used to protect channel
2668               traffic.  The <cipher> argument is the requested cipher.
2669               When set or unset the server must re-generate new
2670               channel key.  If <key len> argument is specified with
2671               <cipher> argument the new key is generated of <key len>
2672               length.
2673
2674               Typical implementation would use [+|-]c on user interface
2675               to set/unset this mode.
2676
2677
2678         To make the mode system work, client must keep the channel mode
2679         mask locally so that the mode setting and unsetting would work
2680         without problems.  The client receives the initial channel mode
2681         mask when it joins to the channel.  When the mode changes on
2682         channel the server distributes the changed channel mode mask to
2683         all clients on the channel by sending SILC_COMMAND_CMODE command
2684         reply packet.
2685
2686
2687
2688
2689
2690 Riikonen                                                       [Page 48]
2691 \f
2692 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2693
2694
2695         Reply messages to the command:
2696
2697         Max Arguments:  2
2698             Arguments:  (1) <Status Payload>  (2) <channel mode mask>
2699
2700         This command replies with the changed channel mode mask that
2701         client is required to keep locally.  The same mask is also
2702         sent to all clients on channel by sending additional command
2703         reply to them.
2704
2705         Status messages:
2706
2707             SILC_STATUS_OK
2708             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2709             SILC_STATUS_ERR_TOO_MANY_PARAMS
2710             SILC_STATUS_ERR_NOT_REGISTERED
2711             SILC_STATUS_ERR_NOT_ON_CHANNEL
2712             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2713             SILC_STATUS_ERR_BAD_CHANNEL_ID
2714             SILC_STATUS_ERR_NO_CHANNEL_ID
2715             SILC_STATUS_ERR_NO_CHANNEL_PRIV
2716             SILC_STATUS_ERR_UNKNOWN_MODE
2717             SILC_STATUS_ERR_NO_CLIENT_ID
2718
2719
2720    19   SILC_COMMAND_KICK
2721
2722         Max Arguments:  3
2723             Arguments:  (1) <channel>  (2) <Client ID>
2724                         (3) [<comment>]
2725
2726         This command is used by channel operators to remove a client from
2727         channel.  The <channel> argument is the channel the client to be
2728         removed is on currently.  Note that the "kicker" must be on the same
2729         channel.  If <comment> is provided it will be sent to the removed
2730         client.
2731
2732         Reply messages to the command:
2733
2734         Max Arguments:  1
2735             Arguments:  (1) <Status Payload>
2736
2737         This command replies only with Status Payload.
2738
2739         Status messages:
2740
2741             SILC_STATUS_OK
2742             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2743
2744
2745
2746 Riikonen                                                       [Page 49]
2747 \f
2748 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2749
2750
2751             SILC_STATUS_ERR_TOO_MANY_PARAMS
2752             SILC_STATUS_ERR_NOT_REGISTERED
2753             SILC_STATUS_ERR_NO_SUCH_CHANNEL
2754             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
2755             SILC_STATUS_ERR_NO_CHANNEL_PRIV
2756             SILC_STATUS_ERR_NO_CLIENT_ID
2757
2758
2759    20   SILC_COMMAND_RESTART
2760
2761         Max Arguments:  0
2762             Arguments:  None
2763
2764         This command may only be used by server operator to force a
2765         server to restart itself.
2766
2767         Reply messages to the command:
2768
2769         Max Arguments:  1
2770             Arguments:  (1) <Status Payload>
2771
2772         This command replies only with Status Payload.
2773
2774         Status messages:
2775
2776             SILC_STATUS_OK
2777             SILC_STATUS_ERR_NOT_REGISTERED
2778             SILC_STATUS_ERR_NO_SERVER_PRIV
2779
2780
2781    21   SILC_COMMAND_CLOSE
2782
2783         Max Arguments:  1
2784             Arguments:  (1) <Server ID>
2785
2786         This command is used only by operator to close connection to a
2787         remote site.  The <Server ID> argument is the ID of the remote
2788         site and must be valid.
2789
2790         Reply messages to the command:
2791
2792         Max Arguments:  1
2793             Arguments:  (1) <Status Payload>
2794
2795         This command replies only with Status Payload.
2796
2797
2798
2799
2800
2801
2802 Riikonen                                                       [Page 50]
2803 \f
2804 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2805
2806
2807         Status messages:
2808
2809             SILC_STATUS_OK
2810             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2811             SILC_STATUS_ERR_TOO_MANY_PARAMS
2812             SILC_STATUS_ERR_NOT_REGISTERED
2813             SILC_STATUS_ERR_NO_SUCH_SERVER
2814             SILC_STATUS_ERR_NO_SERVER_PRIV
2815             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
2816
2817
2818    22   SILC_COMMAND_DIE
2819
2820         Max Arguments:  0
2821             Arguments:  None
2822
2823         This command is used only by operator to shutdown the server.
2824         All connections to the server will be closed and the server is
2825         shutdown.
2826
2827         Reply messages to the command:
2828
2829         Max Arguments:  1
2830             Arguments:  (1) <Status Payload>
2831
2832         This command replies only with Status Payload.
2833
2834         Status messages:
2835
2836             SILC_STATUS_OK
2837             SILC_STATUS_ERR_NOT_REGISTERED
2838             SILC_STATUS_ERR_NO_SERVER_PRIV
2839
2840
2841    23   SILC_COMMAND_SILCOPER
2842
2843         Max Arguments:  2
2844             Arguments:  (1) <username>  (2) <authentication data>
2845
2846         This command is used by normal client to obtain router operator
2847         privileges (also known as SILC operator) on some router.  Note
2848         that router operator has router privileges that supersedes the
2849         server operator privileges.
2850
2851         The <username> is the username set in the server configurations
2852         as operator.  The <authentication data> is the data that the
2853         client is authenticated against.  It may be passphrase prompted
2854         for user on client's screen or it may be public key
2855
2856
2857
2858 Riikonen                                                       [Page 51]
2859 \f
2860 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2861
2862
2863         authentication data (data signed with private key), or
2864         certificate.
2865
2866         Difference between router operator and server operator is that
2867         router operator is able to handle cell level properties while
2868         server operator (even on router server) is able to handle only
2869         local properties, such as, local connections and normal server
2870         administration.
2871
2872         Reply messages to the command:
2873
2874         Max Arguments:  1
2875             Arguments:  (1) <Status Payload>
2876
2877         This command replies only with Status Payload.
2878
2879         Status messages:
2880
2881             SILC_STATUS_OK
2882             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2883             SILC_STATUS_ERR_TOO_MANY_PARAMS
2884             SILC_STATUS_ERR_NOT_REGISTERED
2885             SILC_STATUS_ERR_BAD_PASSWORD
2886             SILC_STATUS_ERR_AUTH_FAILED
2887
2888
2889    24   SILC_COMMAND_LEAVE
2890
2891         Max Arguments:  1
2892             Arguments:  (1) <Channel ID>
2893
2894         This command is used by client to leave a channel the client is
2895         joined to.  After a client has leaved the channel the server
2896         must create new key for the channel and distribute to all clients
2897         still currently on the channel.
2898
2899         Reply messages to the command:
2900
2901         Max Arguments:  1
2902             Arguments:  (1) <Status Payload>
2903
2904         This command replies only with Status Payload.
2905
2906         Status messages:
2907
2908             SILC_STATUS_OK
2909             SILC_STATUS_ERR_NOT_REGISTERED
2910             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2911
2912
2913
2914 Riikonen                                                       [Page 52]
2915 \f
2916 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2917
2918
2919             SILC_STATUS_ERR_TOO_MANY_PARAMS
2920             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2921             SILC_STATUS_ERR_BAD_CHANNEL_ID
2922             SILC_STATUS_ERR_NO_CHANNEL_ID
2923
2924
2925    25   SILC_COMMAND_NAMES
2926
2927         Max Arguments:  1
2928             Arguments:  (1) <Channel ID>
2929
2930         This command is used to list user names currently on the requested
2931         channel; argument <Channel ID>.  The server must resolve the
2932         user names and send a comma (`,') separated list of user names
2933         on the channel.  Server or router may resolve the names by sending
2934         SILC_COMMAND_WHOIS commands.
2935
2936         If the requested channel is a private or secret channel, this
2937         command must not send the list of users, as private and secret
2938         channels cannot be seen by outside.  In this case the returned
2939         name list may include a indication that the server could not
2940         resolve the names of the users on the channel.
2941
2942         Reply messages to the command:
2943
2944         Max Arguments:  2
2945             Arguments:  (1) <Status Payload>  (2) <name list>
2946
2947         This command replies with the comma separated list of users on
2948         the channel.
2949
2950         Status messages:
2951
2952             SILC_STATUS_OK
2953             SILC_STATUS_ERR_NOT_REGISTERED
2954             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
2955             SILC_STATUS_ERR_TOO_MANY_PARAMS
2956             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
2957             SILC_STATUS_ERR_BAD_CHANNEL_ID
2958             SILC_STATUS_ERR_NO_CHANNEL_ID
2959             SILC_STATUS_ERR_NOT_ON_CHANNEL
2960
2961
2962    26 - 254
2963
2964         Currently undefined commands.
2965
2966
2967
2968
2969
2970 Riikonen                                                       [Page 53]
2971 \f
2972 Internet Draft      Secure Internet Live Conferencing       28 June 2000
2973
2974
2975    255  SILC_COMMAND_MAX
2976
2977         Reserved command.  This must not be sent.
2978
2979
2980 5.3 SILC Command Status Types
2981
2982 5.3.1 SILC Command Status Payload
2983
2984    Command Status Payload is sent in command reply messages to indicate
2985    the status of the command.  The payload is one of argument in the
2986    command thus this is the data area in Command Argument Payload described
2987    in [SILC2].  The payload is only 2 bytes of length.  Following diagram
2988    represents the Command Status Payload (field is always in MSB order).
2989
2990
2991                                           1
2992                       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2993                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2994                      |        Status Message         |
2995                      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2996
2997                   Figure 5:  SILC Command Status Payload
2998
2999
3000       o Status Message (2 bytes) - Indicates the status message.
3001         All Status messages are described in the next section.
3002
3003
3004 5.3.2 SILC Command Status List
3005
3006    Command Status messages are returned in the command reply messages
3007    to indicate whether the command were executed without errors.  If error
3008    has occured the status tells which error occured.  Status payload only
3009    sends numeric reply about the status.  Receiver of the payload must
3010    convert the numeric values into human readable error messages.  The
3011    list of status messages below has an example human readable error
3012    messages that client may display for the user.
3013
3014    List of all defined command status messages following.
3015
3016    Generic status messages:
3017
3018    0    SILC_STATUS_OK
3019
3020         Ok status.  Everything went Ok.  The status payload maybe
3021         safely ignored in this case.
3022
3023
3024
3025
3026 Riikonen                                                       [Page 54]
3027 \f
3028 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3029
3030
3031    1    SILC_STATUS_LIST_START
3032
3033         Start of the list.  There will be several command replies and
3034         this reply is the start of the list.
3035
3036    2    SILC_STATUS_LIST_END
3037
3038         End of the list.  There were several command replies and this
3039         reply is the last of the list.  There won't be other replies
3040         beloning to this list after this one.
3041
3042    3 - 9
3043
3044         Currently undefined and has been reserved for the future.
3045
3046
3047    Error status message:
3048
3049    10   SILC_STATUS_ERR_NO_SUCH_NICK
3050
3051         "No such nickname".  Requested nickname does not exist.
3052
3053    11   SILC_STATUS_ERR_NO_SUCH_CHANNEL
3054
3055         "No such channel".  Requested channel name does not exist.
3056
3057    12   SILC_STATUS_ERR_NO_SUCH_SERVER
3058
3059         "No such server".  Requested server name does not exist.
3060
3061    13   SILC_STATUS_ERR_TOO_MANY_TARGETS
3062
3063         "Duplicate recipients. No message delivered".  Message were
3064         tried to be sent to recipient which has several occurrences in
3065         the recipient list.
3066
3067    14   SILC_STATUS_ERR_NO_RECIPIENT
3068
3069         "No recipient given".  Command required recipient which was
3070         not provided.
3071
3072    15   SILC_STATUS_ERR_UNKNOWN_COMMAND
3073
3074         "Unknown command".  Command sent to server is unknown by the
3075         server.
3076
3077
3078
3079
3080
3081
3082 Riikonen                                                       [Page 55]
3083 \f
3084 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3085
3086
3087    16   SILC_STATUS_ERR_WILDCARDS
3088
3089         "Wildcards cannot be used".  Wildcards were provided but they
3090         weren't permitted.
3091
3092    17   SILC_STATUS_ERR_NO_CLIENT_ID
3093
3094         "No Client ID given".  Client ID were expected as command
3095         parameter but were not found.
3096
3097    18   SILC_STATUS_ERR_NO_CHANNEL_ID
3098
3099         "No Channel ID given".  Channel ID were expected as command
3100         parameter but were not found.
3101
3102    19   SILC_STATUS_ERR_BAD_CLIENT_ID
3103
3104         "Bad Client ID".  Client ID provided were erroneous.
3105
3106    20   SILC_STATUS_ERR_BAD_CHANNEL_ID
3107
3108         "Bad Channel ID".  Channel ID provided were erroneous.
3109
3110    21   SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
3111
3112         "No such Client ID".  Client ID provided does not exist.
3113
3114
3115    22   SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
3116
3117         "No such Channel ID".  Channel ID provided does not exist.
3118
3119    23   SILC_STATUS_ERR_NICKNAME_IN_USE
3120
3121         "Nickname already exists".  Nickname created could not be
3122         registered because number of same nicknames were already set to
3123         maximum.  This is not expected to happen in real life but is
3124         possible to occur.
3125
3126    24   SILC_STATUS_ERR_NOT_ON_CHANNEL
3127
3128         "You are not on that channel".  The command were specified for
3129         client user is not currently on.
3130
3131    25   SILC_STATUS_ERR_USER_ON_CHANNEL
3132
3133         "User already on channel".  User were invited on channel they
3134         already are on.
3135
3136
3137
3138 Riikonen                                                       [Page 56]
3139 \f
3140 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3141
3142
3143    26   SILC_STATUS_ERR_NOT_REGISTERED
3144
3145         "You have not registered".  User executed command that requires
3146         the client to be registered on the server before it may be
3147         executed.
3148
3149    27   SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
3150
3151         "Not enough parameters".  Command requires more parameters
3152         than provided.
3153
3154    28   SILC_STATUS_ERR_TOO_MANY_PARAMS
3155
3156         "Too many parameters".  Too many parameters were provided
3157         for the command.
3158
3159    29   SILC_STATUS_ERR_PERM_DENIED
3160
3161         "Your host is not among the privileged".  The client tried to
3162         register on server that does not allow this host to connect.
3163
3164    30   SILC_STATUS_ERR_BANNED_FROM_SERVER
3165
3166         "You are banned from this server".  The client tried to register
3167         on server that has explicitly denied this host to connect.
3168
3169    31   SILC_STATUS_ERR_BAD_PASSWORD
3170
3171         "Cannot join channel. Incorrect password".  Password provided for
3172         channel were not accepted.
3173
3174    32   SILC_STATUS_ERR_CHANNEL_IS_FULL
3175
3176         "Cannot join channel. Channel is full".  The channel is full
3177         and client cannot be joined to it.
3178
3179    33   SILC_STATUS_ERR_NOT_INVITED
3180
3181         "Cannot join channel. You have not been invited".  The channel
3182         is invite only channel and client has not been invited.
3183
3184    34   SILC_STATUS_ERR_BANNED_FROM_CHANNEL
3185
3186         "Cannot join channel. You have been banned".  The client has
3187         been banned from the channel.
3188
3189
3190
3191
3192
3193
3194 Riikonen                                                       [Page 57]
3195 \f
3196 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3197
3198
3199    35   SILC_STATUS_ERR_UNKNOWN_MODE
3200
3201         "Unknown mode".  Mode provided by the client were unknown to
3202         the server.
3203
3204    36   SILC_STATUS_ERR_NOT_YOU
3205
3206         "Cannot change mode for other users".  User tried to change
3207         someone else's mode.
3208
3209    37   SILC_STATUS_ERR_NO_CHANNEL_PRIV
3210
3211         "Permission denied. You are not channel operator".  Command may
3212         be executed only by channel operator.
3213
3214    38   SILC_STATUS_ERR_NO_SERVER_PRIV
3215
3216         "Permission denied. You are not server operator".  Command may
3217         be executed only by server operator.
3218
3219    39   SILC_STATUS_ERR_NO_ROUTER_PRIV
3220
3221         "Permission denied. You are not SILC operator".  Command may be
3222         executed only by router (SILC) operator.
3223
3224    40   SILC_STATUS_ERR_BAD_NICKNAME
3225
3226         "Bad nickname".  Nickname requested contained illegal characters
3227         or were malformed.
3228
3229    41   SILC_STATUS_ERR_BAD_CHANNEL
3230
3231         "Bad channel name".  Channel requested contained illegal characters
3232         or were malformed.
3233
3234    42   SILC_STATUS_ERR_AUTH_FAILED
3235
3236         "Authentication failed".  The authentication data sent as
3237         argument were wrong and thus authentication failed.
3238
3239
3240 6 Security Considerations
3241
3242    Security is central to the design of this protocol, and these security
3243    considerations permeate the specification.
3244
3245
3246
3247
3248
3249
3250 Riikonen                                                       [Page 58]
3251 \f
3252 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3253
3254
3255 7 References
3256
3257    [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
3258                 June 2000.
3259
3260    [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication
3261                 Protocols", Internet Draft, June 2000.
3262
3263    [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
3264                 RFC 1459, May 1993.
3265
3266    [SSH-TRANS]  Ylonen, T., et al, "SSH Transport Layer Protocol",
3267                 Internet Draft.
3268
3269    [PGP]        Callas, J., et al, "OpenPGP Message Format", RFC 2440,
3270                 November 1998.
3271
3272    [SPKI]       Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
3273                 September 1999.
3274
3275    [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key
3276                 Infrastructure, Certificate and CRL Profile", RFC 2459,
3277                 January 1999.
3278
3279    [Schneier]   Schneier, B., "Applied Cryptography Second Edition",
3280                 John Wiley & Sons, New York, NY, 1996.
3281
3282    [Menezes]    Menezes, A., et al, "Handbook of Applied Cryptography",
3283                 CRC Press 1997.
3284
3285    [OAKLEY]     Orman, H., "The OAKLEY Key Determination Protocol",
3286                 RFC 2412, November 1998.
3287
3288    [ISAKMP]     Maughan D., et al, "Internet Security Association and
3289                 Key Management Protocol (ISAKMP)", RFC 2408, November
3290                 1998.
3291
3292    [IKE]        Harkins D., and Carrel D., "The Internet Key Exhange
3293                 (IKE)", RFC 2409, November 1998.
3294
3295    [HMAC]       Krawczyk, H., "HMAC: Keyed-Hashing for Message
3296                 Authentication", RFC 2104, February 1997.
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306 Riikonen                                                       [Page 59]
3307 \f
3308 Internet Draft      Secure Internet Live Conferencing       28 June 2000
3309
3310
3311 8 Author's Address
3312
3313    Pekka Riikonen
3314    Kasarmikatu 11 A4
3315    70110 Kuopio
3316    Finland
3317
3318    EMail: priikone@poseidon.pspt.fi
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362 Riikonen                                                       [Page 60]
3363 \f