8 .ds RF FORMFEED[Page %]
11 .ds RH 15 January 2007
17 Network Working Group P. Riikonen
19 draft-riikonen-silc-pp-09.txt 15 January 2007
26 <draft-riikonen-silc-pp-09.txt>
31 By submitting this Internet-Draft, each author represents that any
32 applicable patent or other IPR claims of which he or she is aware
33 have been or will be disclosed, and any of which he or she becomes
34 aware will be disclosed, in accordance with Section 6 of BCP 79.
36 Internet-Drafts are working documents of the Internet Engineering
37 Task Force (IETF), its areas, and its working groups. Note that
38 other groups may also distribute working documents as Internet-
39 Drafts. Internet-Drafts are draft documents valid for a maximum of
40 six months and may be updated, replaced, or obsoleted by other
41 documents at any time. It is inappropriate to use Internet-Drafts as
42 reference material or to cite them other than as "work in progress".
44 The list of current Internet-Drafts can be accessed at
45 http://www.ietf.org/1id-abstracts.html
46 The list of Internet-Draft Shadow Directories can be accessed at
47 http://www.ietf.org/shadow.html.
54 This memo describes a Packet Protocol used in the Secure Internet Live
55 Conferencing (SILC) protocol, specified in the Secure Internet Live
56 Conferencing, Protocol Specification [SILC1]. This protocol describes
57 the packet types and packet payloads which defines the contents of the
58 packets. The protocol provides secure binary packet protocol that
59 assures that the contents of the packets are secured and authenticated.
73 1 Introduction .................................................. 3
74 1.1 Requirements Terminology .................................. 4
75 2 SILC Packet Protocol .......................................... 4
76 2.1 SILC Packet ............................................... 4
77 2.2 SILC Packet Header ........................................ 5
78 2.3 SILC Packet Types ......................................... 8
79 2.3.1 SILC Packet Payloads ................................ 15
80 2.3.2 Generic payloads .................................... 16
81 2.3.2.1 ID Payload .................................. 16
82 2.3.2.2 Argument Payload ............................ 17
83 2.3.2.3 Argument List Payload ....................... 17
84 2.3.2.4 Channel Payload ............................. 18
85 2.3.2.5 Public Key Payload .......................... 19
86 2.3.2.6 Message Payload ............................. 20
87 2.3.3 Disconnect Payload .................................. 23
88 2.3.4 Success Payload ..................................... 24
89 2.3.5 Failure Payload ..................................... 25
90 2.3.6 Reject Payload ...................................... 25
91 2.3.7 Notify Payload ...................................... 26
92 2.3.8 Error Payload ....................................... 35
93 2.3.9 Channel Message Payload ............................. 35
94 2.3.10 Channel Key Payload ................................ 36
95 2.3.11 Private Message Payload ............................ 38
96 2.3.12 Private Message Key Payload ........................ 38
97 2.3.13 Command Payload .................................... 40
98 2.3.14 Command Reply Payload .............................. 41
99 2.3.15 Connection Auth Request Payload .................... 41
100 2.3.16 New ID Payload ..................................... 42
101 2.3.17 New Client Payload ................................. 43
102 2.3.18 New Server Payload ................................. 44
103 2.3.19 New Channel Payload ................................ 45
104 2.3.20 Key Agreement Payload .............................. 45
105 2.3.21 Resume Router Payload .............................. 47
106 2.3.22 File Transfer Payload .............................. 47
107 2.3.23 Resume Client Payload .............................. 48
108 2.3.24 Acknowledgement Payload ............................ 50
109 2.4 SILC ID Types ............................................. 50
110 2.5 Packet Encryption And Decryption .......................... 51
111 2.5.1 Normal Packet Encryption And Decryption ............. 51
112 2.5.2 Channel Message Encryption And Decryption ........... 52
113 2.5.3 Private Message Encryption And Decryption ........... 53
114 2.6 Packet MAC Generation ..................................... 53
115 2.7 Packet Padding Generation ................................. 54
116 2.8 Packet Compression ........................................ 54
117 2.9 Packet Sending ............................................ 55
118 2.10 Packet Reception ......................................... 55
119 2.11 Packet Routing ........................................... 55
120 2.12 Packet Broadcasting ...................................... 57
121 3 Security Considerations ....................................... 57
122 4 References .................................................... 57
123 5 Author's Address .............................................. 59
124 6 Full Copyright Statement ...................................... 59
130 Figure 1: Typical SILC Packet
131 Figure 2: SILC Packet Header
133 Figure 4: Argument Payload
134 Figure 5: Argument List Payload
135 Figure 6: Channel Payload
136 Figure 7: Public Key Payload
137 Figure 8: Message Payload
138 Figure 9: Disconnect Payload
139 Figure 10: Success Payload
140 Figure 11: Failure Payload
141 Figure 12: Reject Payload
142 Figure 13: Notify Payload
143 Figure 14: Error Payload
144 Figure 15: Channel Key Payload
145 Figure 16: Private Message Key Payload
146 Figure 17: Command Payload
147 Figure 18: Connection Auth Request Payload
148 Figure 19: New Client Payload
149 Figure 20: New Server Payload
150 Figure 21: Key Agreement Payload
151 Figure 22: Resume Router Payload
152 Figure 23: File Transfer Payload
153 Figure 24: Resume Client Payload
159 This document describes a Packet Protocol used in the Secure Internet
160 Live Conferencing (SILC) protocol specified in the Secure Internet Live
161 Conferencing, Protocol Specification [SILC1]. This protocol describes
162 the packet types and packet payloads which defines the contents of the
163 packets. The protocol provides secure binary packet protocol that
164 assures that the contents of the packets are secured and authenticated.
165 The packet protocol is designed to be compact to avoid unnecessary
166 overhead as much as possible. This makes the SILC suitable also in
167 environment of low bandwidth requirements such as mobile networks. All
168 packet payloads can also be compressed to further reduce the size of
171 All packets in SILC network are always encrypted and their integrity
172 is assured by computed MACs. The protocol defines several packet types
173 and packet payloads. Each packet type usually has a specific packet
174 payload that actually defines the contents of the packet. Each packet
175 also includes a default SILC Packet Header that provides sufficient
176 information about the origin and the destination of the packet.
180 1.1 Requirements Terminology
182 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED,
183 MAY, and OPTIONAL, when they appear in this document, are to be
184 interpreted as described in [RFC2119].
188 2 SILC Packet Protocol
193 SILC packets deliver messages from sender to receiver securely by
194 encrypting important fields of the packet. The packet consists of
195 default SILC Packet Header, Padding, Packet Payload data, and, packet
198 The following diagram illustrates typical SILC packet.
202 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
203 | n bytes | 1 - n bytes | n bytes | n bytes
204 | SILC Header | Padding | Data Payload | MAC
205 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
209 Figure 1: Typical SILC Packet
212 SILC Header is always the first part of the packet and its purpose
213 is to provide information about the packet. It provides for example
214 the packet type, origin of the packet and the destination of the packet.
215 The header is variable in length. See the following section for
216 description of SILC Packet header. Packets without SILC header or
217 with malformed SILC header MUST be dropped.
219 Padding follows the packet header. The purpose of the padding is to
220 make the packet multiple by eight (8) or by the block size of the
221 cipher used in the encryption, which ever is larger. The maximum
222 length of padding is currently 128 bytes. The padding is always
223 encrypted. The padding is applied always, even if the packet is
224 not encrypted. See the section 2.7 Padding Generation for more
225 detailed information.
227 Data payload area follows padding and it is the actual data of the
228 packet. The packet data is the packet payloads defined in this
229 protocol. The data payload area is always encrypted.
231 The last part of SILC packet is the packet MAC that assures the
232 integrity of the packet. See the section 2.6 Packet MAC Generation
233 for more information. If compression is used the compression is
234 always applied before encryption.
236 All fields in all packet payloads are always in MSB (most significant
241 2.2 SILC Packet Header
243 The SILC packet header is applied to all SILC packets and it is
244 variable in length. The purpose of SILC Packet header is to provide
245 detailed information about the packet. The receiver of the packet
246 uses the packet header to parse the packet and gain other relevant
247 parameters of the packet.
249 The following diagram represents the SILC packet header.
254 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
255 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
256 | Payload Length | Flags | Packet Type |
257 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
258 | Pad Length | RESERVED | Source ID Len | Dest ID Len |
259 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
265 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
271 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
275 Figure 2: SILC Packet Header
278 o Payload Length (2 bytes) - Indicates the length of the
279 packet not including the padding of the packet.
281 o Flags (1 byte) - Indicates flags to be used in packet
282 processing. Several flags may be set by ORing the flags
285 The following flags are reserved for this field:
290 In this case the field is ignored.
293 Private Message Key 0x01
295 Indicates that the packet data MUST include private
296 message that is encrypted using private key set by
297 client. Servers does not know this key and cannot
298 decrypt the payload, but simply passes it along. See
299 section 2.5.3 Private Message Encryption And Decryption
300 for more information.
305 Indicates that the packet consists of list of
306 packet payloads indicated by the Packet Type field.
307 The payloads are added one after the other. Note that
308 there are packet types that must not be used as
309 list. Parsing of list packet is done by calculating
310 the length of each payload and parsing them one by
316 Marks the packet to be broadcasted. Client and normal
317 server cannot send broadcast packets. Only router server
318 may send broadcast packet. The router receiving of packet
319 with this flag set MUST send (broadcast) the packet to
320 its primary route. If router has several router connections
321 the packet may be sent only to the primary route. See
322 section 2.12 Packet Broadcasting for description of
328 Marks that the payload of the packet is compressed.
329 The sender of the packet marks this flag when it
330 compresses the payload, and any server or router
331 en route to the recipient MUST NOT unset this flag.
332 See section 2.8 Packet Compression for description of
338 Marks that the packet needs to be acknowledged by the
339 recipient. The ACK packet MUST NOT have this flag set.
340 The acknowledgement packet is SILC_PACKET_ACK packet.
341 If the packet is not acknowledged the packet may be
342 retransmitted. This flag is especially useful when
343 using UDP/IP and SHOULD NOT be used with TCP/IP. The
344 flag MUST NOT be used with message packets. The
345 SILC_MESSAGE_FLAG_ACK can be used instead. Broadcast
346 packets MUST NOT set this flag. Retransmission
347 may use for example exponential backoff algorithm.
351 o Packet Type (1 byte) - Indicates the type of the packet.
352 Receiver uses this field to parse the packet. See section
353 2.3 SILC Packets for list of defined packet types.
355 o Pad Length (1 byte) - Indicates the length of the padding
356 applied after the SILC Packet header. Maximum length for
357 padding is 128 bytes.
359 o RESERVED (1 byte) - Reserved field and must include a
362 o Source ID Length (1 byte) - Indicates the length of the
363 Source ID field in the header, not including this or any
366 o Destination ID Length (1 byte) - Indicates the length of the
367 Destination ID field in the header, not including this or
370 o Src ID Type (1 byte) - Indicates the type of ID in the
371 Source ID field. See section 2.4 SILC ID Types for
374 o Source ID (variable length) - The actual source ID that
375 indicates which is the original sender of the packet.
377 o Dst ID Type (1 byte) - Indicates the type of ID in the
378 Destination ID field. See section 2.4 SILC ID Types for
381 o Destination ID (variable length) - The actual destination
382 ID that indicates which is the end receiver of the packet.
387 2.3 SILC Packet Types
389 SILC packet types defines the contents of the packet and it is used by
390 the receiver to parse the packet. The packet type is 8 bits in length.
391 The range for the packet types are from 0 - 255, where 0 is never sent and
392 255 is currently reserved for future extensions and MUST NOT be defined to
393 any other purpose. Every SILC specification compliant implementation
394 SHOULD support all the following packet types.
396 The below list of the SILC Packet types includes reference to the packet
397 payload as well. Packet payloads are the actual packet data area. Each
398 packet type defines packet payload which usually may only be sent with
399 the specific packet type.
401 Most of the packets are packets that must be destined directly to entity
402 that is connected to the sender. It is not allowed, for example, for a
403 router to send SILC_PACKET_DISCONNECT packet to client that is not
404 directly connected to the router. However, there are some special packet
405 types that may be destined to some entity that the sender does not have
406 direct connection with. These packets are for example private message
407 packets, channel message packets, command packets and some other packets
408 that may be broadcasted in the SILC network. The following packet
409 desription list will define it separately if a packet is allowed to be
410 sent to indirectly connected entity. Other packets MUST NOT be sent or
411 accepted, if sent, to indirectly connected entities.
413 Some packets MAY be sent as lists by adding the List flag to the Packet
414 Header and constructing multiple packet payloads one after the other.
415 When this is allowed it is separately defined in the following list.
416 Other packets MUST NOT be sent as list and the List flag MUST NOT be set.
419 List of SILC Packet types are defined as follows.
424 This type is reserved and it is never sent.
427 1 SILC_PACKET_DISCONNECT
429 This packet is sent to disconnect the remote end. Reason of
430 the disconnection is sent inside the packet payload.
432 Payload of the packet: See section 2.3.3 Disconnect Payload
435 2 SILC_PACKET_SUCCESS
437 This packet is sent upon successful execution of a protocol.
438 The status of the success is sent in the packet payload.
440 Payload of the packet: See section 2.3.4 Success Payload
443 3 SILC_PACKET_FAILURE
445 This packet is sent upon failure of a protocol. The status
446 of the failure is sent in the packet payload.
448 Payload of the packet: See section 2.3.5 Failure Payload
453 This packet MAY be sent upon rejection of a protocol. The
454 status of the rejection is sent in the packet payload.
456 Payload of the packet: See section 2.3.6 Reject Payload
461 This packet is used to send notify message. The packet is
462 usually sent between server and client, but also between
463 server and router. Client MUST NOT send this packet. Server
464 MAY destine this packet to channel as well when the packet is
465 distributed to all clients on the channel. This packet MAY
468 Payload of the packet: See section 2.3.7 Notify Payload.
473 This packet is sent when an error occurs. Server MAY
474 send this packet. Client MUST NOT send this packet. The
475 client MAY entirely ignore the packet, however, server is
476 most likely to take action anyway. This packet MAY be sent
477 to entity that is indirectly connected to the sender.
479 Payload of the packet: See section 2.3.8 Error Payload.
482 7 SILC_PACKET_CHANNEL_MESSAGE
484 This packet is used to send messages to channels. The packet
485 includes Channel ID of the channel and the actual message to
486 the channel. Messages sent to the channel are always protected
487 by channel specific keys. This packet MAY be sent to entity
488 that is indirectly connected to the sender.
490 Payload of the packet: See section 2.3.9 Channel Message
494 8 SILC_PACKET_CHANNEL_KEY
496 This packet is used to distribute new key for particular
497 channel when server generates it. Each channel has their own
498 independent keys that is used to protect the traffic on the
499 channel. It is also possible to use channel private keys that
500 are not server generated. In this case this packet is not used.
501 Client MUST NOT send this packet. This packet MAY be sent to
502 entity that is indirectly connected to the sender.
504 Payload of the packet: See section 2.3.10 Channel Key Payload
507 9 SILC_PACKET_PRIVATE_MESSAGE
509 This packet is used to send private messages from client
510 to another client. By default, private messages are protected
511 by session keys established by normal key exchange protocol.
512 However, it is possible to use specific key to protect private
513 messages. See [SILC1] for private message key generation.
514 This packet MAY be sent to entity that is indirectly connected
517 Payload of the packet: See section 2.3.11 Private Message
521 10 SILC_PACKET_PRIVATE_MESSAGE_KEY
523 This packet is OPTIONAL and sender of the packet can indicate
524 that a private message key should be used in private message
525 communication. The actual key material is not sent in this
526 packet but must be either static or pre-shared key. The
527 receiver of the packet is considered to be the responder
528 when processing the static or pre-shared key material as
529 defined in [SILC1] and [SILC3] for private message keys.
530 This packet MAY be sent to entity that is indirectly connected
533 Payload of the packet: See section 2.3.12 Private Message
537 11 SILC_PACKET_COMMAND
539 This packet is used to send commands from client to server.
540 Server MAY send this packet to other servers as well. All
541 commands are listed in their own section SILC Command Types
542 in [SILC4]. The contents of this packet is command specific.
543 This packet MAY be sent to entity that is indirectly connected
546 Payload of the packet: See section 2.3.13 Command Payload
549 12 SILC_PACKET_COMMAND_REPLY
551 This packet is sent as reply to the SILC_PACKET_COMMAND packet.
552 The contents of this packet is command specific. This packet
553 MAY be sent to entity that is indirectly connected to the
554 sender. This packet MAY be sent as list.
556 Payload of the packet: See section 2.3.14 Command Reply
557 Payload and section 2.3.13 Command
561 13 SILC_PACKET_KEY_EXCHANGE
563 This packet is used to start SILC Key Exchange Protocol,
564 described in detail in [SILC3].
566 Payload of the packet: Payload of this packet is described
567 in the section SILC Key Exchange
568 Protocol and its sub sections in
572 14 SILC_PACKET_KEY_EXCHANGE_1
574 This packet is used as part of the SILC Key Exchange Protocol.
576 Payload of the packet: Payload of this packet is described
577 in the section SILC Key Exchange
578 Protocol and its sub sections in
582 15 SILC_PACKET_KEY_EXCHANGE_2
584 This packet is used as part of the SILC Key Exchange Protocol.
586 Payload of the packet: Payload of this packet is described
587 in the section SILC Key Exchange
588 Protocol and its sub sections in
592 16 SILC_PACKET_CONNECTION_AUTH_REQUEST
594 This packet is used to request an authentication method to
595 be used in the SILC Connection Authentication Protocol. If
596 initiator of the protocol does not know the mandatory
597 authentication method this packet MAY be used to determine it.
598 The party receiving this payload SHOULD respond with the same
599 packet including the mandatory authentication method.
601 Payload of the packet: See section 2.3.15 Connection Auth
605 17 SILC_PACKET_CONNECTION_AUTH
607 This packet is used to start and perform the SILC Connection
608 Authentication Protocol. This protocol is used to authenticate
609 the connecting party. The protocol is described in detail in
612 Payload of the packet: Payload of this packet is described
613 in the section SILC Authentication
614 Protocol and it sub sections in [SILC].
617 18 SILC_PACKET_NEW_ID
619 This packet is used to distribute new IDs from server to
620 router and from router to all other routers in SILC network.
621 This is used when for example new client is registered to
622 SILC network. The newly created IDs of these operations are
623 distributed by this packet. Only server may send this packet,
624 however, client MUST be able to receive this packet. This
625 packet MAY be sent to entity that is indirectly connected
626 to the sender. This packet MAY be sent as list.
628 Payload of the packet: See section 2.3.16 New ID Payload
631 19 SILC_PACKET_NEW_CLIENT
633 This packet is used by client to register itself to the
634 SILC network. This is sent after key exchange and
635 authentication protocols has been completed. Client sends
636 various information about itself in this packet to the server.
638 Payload of the packet: See section 2.3.17 New Client Payload
641 20 SILC_PACKET_NEW_SERVER
643 This packet is used by server to register itself to the
644 SILC network. This is sent after key exchange and
645 authentication protocols has been completed. Server sends
646 this to the router it connected to, or, if router was
647 connecting, to the connected router. Server sends its
648 Server ID and other information in this packet. The client
649 MUST NOT send or receive this packet.
651 Payload of the packet: See section 2.3.18 New Server Payload
654 21 SILC_PACKET_NEW_CHANNEL
656 This packet is used to notify routers about newly created
657 channel. Channels are always created by the router and it MUST
658 notify other routers about the created channel. Router sends
659 this packet to its primary route. Client MUST NOT send this
660 packet. This packet MAY be sent to entity that is indirectly
661 connected to the sender. This packet MAY be sent as list.
663 Payload of the packet: See section 2.3.19 New Channel Payload
668 This packet is used to indicate that re-key must be performed
669 for session keys. See section Session Key Regeneration in
670 [SILC1] for more information. This packet does not have
674 23 SILC_PACKET_REKEY_DONE
676 This packet is used to indicate that re-key is performed and
677 new keys must be used hereafter. This packet does not have a
681 24 SILC_PACKET_HEARTBEAT
683 This packet is used by clients, servers and routers to keep the
684 connection alive. It is RECOMMENDED that all servers implement
685 keepalive actions and perform it to both direction in a link.
686 This packet does not have a payload.
689 25 SILC_PACKET_KEY_AGREEMENT
691 This packet is used by clients to request key negotiation
692 between another client in the SILC network. If the negotiation
693 is started it is performed using the SKE protocol. The result of
694 the negotiation, the secret key material, can be used for
695 example as private message key. The server and router MUST NOT
698 Payload of the packet: See section 2.3.20 Key Agreement Payload
701 26 SILC_PACKET_RESUME_ROUTER
703 This packet is used during backup router protocol when the
704 original primary router of the cell comes back online and wishes
705 to resume the position as being the primary router of the cell.
707 Payload of the packet: See section 2.3.21 Resume Router Payload
712 This packet is used to perform an file transfer protocol in the
713 SILC session with some entity in the network. The packet is
714 multi purpose. The packet is used to tell other entity in the
715 network that the sender wishes to perform an file transfer
716 protocol. The packet is also used to actually tunnel the
717 file transfer protocol stream. The file transfer protocol
718 stream is always protected with the SILC binary packet protocol.
720 Payload of the packet: See section 2.3.22 File Transfer Payload
723 28 SILC_PACKET_RESUME_CLIENT
725 This packet is used to resume a client back to the network
726 after it has been detached. A client is able to detach from
727 the network but the client is still valid client in the network.
728 The client may then later resume its session back by sending
729 this packet to a server. Routers also use this packet to notify
730 other routers in the network that the detached client has resumed.
732 Payload of the packet: See section 2.3.23 Resume Client Payload
737 This packet is used to acknowledge a packet that had the
738 Acknowledgement packet flag set.
740 Payload of the packet: See section 2.3.24 Acknowledgement
746 Currently undefined commands.
751 These packet types are reserved for private use and they will
752 not be defined by this document.
757 This type is reserved for future extensions and currently it
763 2.3.1 SILC Packet Payloads
765 All payloads resides in the main data area of the SILC packet. However
766 all payloads MUST be at the start of the data area after the SILC
767 packet header and padding. All fields in the packet payload are always
768 encrypted, as they reside in the data area of the packet which is
769 always encrypted. Most of the payloads may only be sent with specific
770 packet type which is defined in the description of the payload.
772 There are some other payloads in SILC as well. However, they are not
773 common in the sense that they could be sent at any time. These payloads
774 are not described in this section. These are payloads such as SILC
775 Key Exchange payloads and so on. These are described in [SILC1],
780 2.3.2 Generic payloads
782 This section describes generic payloads that are not associated to any
783 specific packet type. They can be used for example inside some other
790 This payload can be used to send an ID. ID's are variable in length
791 thus this payload provides a way to send variable length ID.
793 The following diagram represents the ID Payload.
798 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
799 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
800 | ID Type | ID Length |
801 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
805 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
813 o ID Type (2 bytes) - Indicates the type of the ID. See
814 section 2.4 SILC ID Types for list of defined ID types.
816 o ID Length (2 bytes) - Length of the ID Data area not
817 including the length of any other fields in the payload.
819 o ID Data (variable length) - The actual ID data. The encoding
820 of the ID data is defined in section 2.4 SILC ID Types.
825 2.3.2.2 Argument Payload
827 Argument Payload is used to set arguments for any packet payload that
828 need and support arguments, such as commands. Number of arguments
829 associated with a packet MUST be indicated by the packet payload which
830 need the arguments. Argument Payloads MUST always reside right after
831 the packet payload needing the arguments. Incorrect amount of argument
832 payloads MUST cause rejection of the packet.
834 The following diagram represents the Argument Payload.
839 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
840 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
841 | Data Length | Argument Type | |
842 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
846 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
850 Figure 4: Argument Payload
854 o Data Length (2 bytes) - Length of the Argument Data field
855 not including the length of any other field in the payload.
857 o Argument Type (1 byte) - Indicates the type of the argument.
858 Every argument can have a specific type that are defined
859 by the packet payload needing the argument. For example
860 every command specify a number for each argument that may be
861 associated with the command. By using this number the receiver
862 of the packet knows what type of argument this is. If there is
863 no specific argument type this field is set to zero (0) value.
865 o Argument Data (variable length) - Argument data.
870 2.3.2.3 Argument List Payload
872 Argument List Payload is a list of Argument Payloads appended one
873 after the other. The number of arguments is indicated in the
876 The following diagram represents the Argument List Payload.
881 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
882 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
884 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
886 ~ Argument Payloads ~
888 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
892 Figure 5: Argument List Payload
896 o Argument Nums (2 bytes) - Indicates the number of Argument
897 Payloads. If zero (0) value is found in this field no
898 arguments are present.
900 o Argument Payloads (variable length) - The Argument Payloads
901 appended one after the other. The payloads can be decoded
902 since the length of the payload is indicated in each of
903 the Argument Payload.
911 2.3.2.4 Channel Payload
913 Generic Channel Payload may be used to send information about a channel,
914 its name, the Channel ID and a mode.
916 The following diagram represents the Channel Payload.
922 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
923 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
924 | Channel Name Length | |
925 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
929 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
930 | Channel ID Length | |
931 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
935 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
937 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
941 Figure 6: New Channel Payload
945 o Channel Name Length (2 bytes) - Length of the Channel Name
948 o Channel Name (variable length) - The name of the channel.
950 o Channel ID Length (2 bytes) - Length of the Channel ID field.
952 o Channel ID (variable length) - The encoded Channel ID.
954 o Mode Mask (4 bytes) - A mode. This can be the mode of the
955 channel but it can also be the mode of a client on the
956 channel. The contents of this field is dependent of the
957 usage of this payload. The usage is defined separately
958 when this payload is used. This is a 32 bit MSB first value.
967 2.3.2.5 Public Key Payload
969 Generic Public Key Payload may be used to send different type of
970 public keys and certificates.
972 The following diagram represents the Public Key Payload.
977 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
978 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
979 | Public Key Length | Public Key Type |
980 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
982 ~ Public Key (or certificate) ~
984 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
988 Figure 7: Public Key Payload
992 o Public Key Length (2 bytes) - The length of the Public Key
993 (or certificate) field, not including any other field.
995 o Public Key Type (2 bytes) - The public key (or certificate)
996 type. This field indicates the type of the public key in
997 the packet. See the [SILC3] for defined public key types.
999 o Public Key (or certificate) (variable length) - The
1000 encoded public key or certificate data.
1005 2.3.2.6 Message Payload
1007 Generic Message Payload can be used to send messages in SILC. It
1008 is used to send channel messages and private messages.
1010 The following diagram represents the Message Payload.
1012 (*) indicates that the field is not encrypted.
1025 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
1026 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1027 | Message Flags | Message Length |
1028 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1032 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1033 | Padding Length | |
1034 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1038 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1040 ~ Initialization Vector * ~
1042 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1046 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1050 Figure 8: Message Payload
1054 o Message Flags (2 bytes) - Includes the Message Flags of the
1055 message. The flags can indicate a reason or a purpose for
1056 the message. The following Message Flags are defined:
1058 0x0000 SILC_MESSAGE_FLAG_NONE
1060 No specific flags set.
1062 0x0001 SILC_MESSAGE_FLAG_AUTOREPLY
1064 This message is an automatic reply to an earlier
1067 0x0002 SILC_MESSAGE_FLAG_NOREPLY
1069 There should not be reply messages to this
1072 0x0004 SILC_MESSAGE_FLAG_ACTION
1074 The sender is performing an action and the message
1075 is the indication of the action.
1077 0x0008 SILC_MESSAGE_FLAG_NOTICE
1079 The message is for example an informational notice
1082 0x0010 SILC_MESSAGE_FLAG_REQUEST
1084 This is a generic request flag to send request
1085 messages. A separate document should define any
1086 payloads associated to this flag.
1088 0x0020 SILC_MESSAGE_FLAG_SIGNED
1090 This flag indicates that the message is signed
1091 with sender's private key and thus can be verified
1092 by the receiver using the sender's public key. A
1093 separate document should define the detailed procedure
1094 of the signing process and any associated payloads
1097 0x0040 SILC_MESSAGE_FLAG_REPLY
1099 This is a generic reply flag to send a reply to
1100 previously received request. A separate document
1101 should define any payloads associated to this flag.
1103 0x0080 SILC_MESSAGE_FLAG_DATA
1105 This is a generic data flag, indicating that the
1106 message includes some data which can be interpreted
1107 in a specific way. Using this flag any kind of data
1108 can be delivered inside message payload. A separate
1109 document should define how this flag is interpreted
1110 and define any associated payloads.
1112 0x0100 SILC_MESSAGE_FLAG_UTF8
1114 This flag indicates that the message is UTF-8 encoded
1115 textual message. When sending text messages in SILC
1116 this flag SHOULD be used. When this flag is used the
1117 text sent as message MUST be UTF-8 encoded.
1119 0x0200 SILC_MESSAGE_FLAG_ACK
1121 This flag indicates the sender requires the recpipient
1122 to acknowledge the received message. This same flag
1123 is used in the acknowledgement. A separate document
1124 should define how the acknowledgement is performed.
1126 0x0400 - 0x1000 RESERVED
1128 Reserved for future flags.
1130 0x2000 - 0x8000 PRIVATE RANGE
1132 Private range for free use.
1134 o Message Length (2 bytes) - Indicates the length of the
1135 Message Data field in the payload, not including any
1138 o Message Data (variable length) - The actual message data.
1140 o Padding Length (2 bytes) - Indicates the length of the
1141 Padding field in the payload, not including any other
1144 o Padding (variable length) - If this payload is used as
1145 channel messages, the padding MUST be applied because
1146 this payload is encrypted separately from other parts
1147 of the packet. If this payload is used as private
1148 messages, the padding is present only when the payload
1149 is encrypted with private message key. If encrypted
1150 with session keys this field MUST NOT be present and the
1151 Padding Length field includes a zero (0) value. The
1152 padding SHOULD be random data.
1154 o Initialization Vector (variable length) - This field MUST
1155 be present when this payload is used as channel messages.
1156 The IV SHOULD be random data for each channel message.
1158 When encrypting private messages with session keys this
1159 field MUST NOT be present. For private messages this field
1160 is present only when encrypting with a static private
1161 message key (pre-shared key). If randomly generated key
1162 material is used this field MUST NOT be present. Also,
1163 If Key Agreement (SKE) was used to negotiate fresh key
1164 material for private message key this field MUST NOT be
1165 present. See the section 4.6 in [SILC1] for more
1166 information about IVs when encrypting private messages.
1168 This field includes the initialization vector used in message
1169 encryption. It need to be used in the packet decryption
1170 as well. Contents of this field depends on the encryption
1171 algorithm and encryption mode. This field is not encrypted,
1172 is not included in padding calculation and its length
1173 equals to cipher's block size. This field is authenticated
1176 o MAC (variable length) - The MAC computed from the
1177 Message Flags, Message Length, Message Data, Padding Length,
1178 Padding and Initialization Vector fields in that order.
1179 The MAC is computed after the payload is encrypted. This
1180 is so called Encrypt-Then-MAC order; first encrypt, then
1181 compute MAC from ciphertext. The MAC protects the integrity
1182 of the Message Payload. Also, when used as channel messages
1183 it is possible to have multiple private channel keys set,
1184 and receiver can use the MAC to verify which of the keys
1185 must be used in decryption. This field is not present
1186 when encrypting private messages with session key. This
1187 field is not encrypted. This field is authenticated by
1188 the SILC packet MAC.
1193 2.3.3 Disconnect Payload
1195 Disconnect payload is sent upon disconnection. Reason of the
1196 disconnection is sent to the disconnected party in the payload.
1198 The payload may only be sent with SILC_PACKET_DISCONNECT packet. It
1199 MUST NOT be sent in any other packet type. The following diagram
1200 represents the Disconnect Payload.
1206 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
1207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1211 ~ Disconnect Message ~
1213 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1217 Figure 9: Disconnect Payload
1220 o Status (1 byte) - Indicates the Status Type, defined in [SILC3]
1221 for the reason of disconnection.
1223 o Disconnect Message (variable length) - Human readable UTF-8
1224 encoded string indicating reason of the disconnection. This
1225 field MAY be omitted.
1230 2.3.4 Success Payload
1232 Success payload is sent when some protocol execution is successfully
1233 completed. The payload is simple; indication of the success is sent.
1234 This may be any data, including binary or human readable data, and
1235 it is protocol dependent.
1240 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
1241 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1243 ~ Success Indication ~
1245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1249 Figure 10: Success Payload
1253 o Success Indication (variable length) - Indication of
1254 the success. This may be for example some flag that
1255 indicates the protocol and the success status or human
1256 readable success message. The true length of this
1257 payload is available by calculating it from the SILC
1263 2.3.5 Failure Payload
1265 This is opposite of Success Payload. Indication of failure of
1266 some protocol is sent in the payload.
1271 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
1272 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1274 ~ Failure Indication ~
1276 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1280 Figure 11: Failure Payload
1284 o Failure Indication (variable length) - Indication of
1285 the failure. This may be for example some flag that
1286 indicates the protocol and the failure status or human
1287 readable failure message. The true length of this
1288 payload is available by calculating it from the SILC
1294 2.3.6 Reject Payload
1296 This payload is sent when some protocol is rejected to be executed.
1297 Other operations MAY send this as well that was rejected. The
1298 indication of the rejection is sent in the payload. The indication
1299 may be binary or human readable data and is protocol dependent.
1305 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
1306 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1308 ~ Reject Indication ~
1310 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1314 Figure 12: Reject Payload
1318 o Reject Indication (variable length) - Indication of
1319 the rejection. This maybe for example some flag that
1320 indicates the protocol and the rejection status or human
1321 readable rejection message. The true length of this
1322 payload is available by calculating it from the SILC
1329 2.3.7 Notify Payload
1331 Notify payload is used to send notify messages. The payload is usually
1332 sent from server to client and from server to router. It is also used
1333 by routers to notify other routers in the network. This payload MAY also
1334 be sent to a channel. Client MUST NOT send this payload. When this
1335 packet is received by client it SHOULD process it. Servers and routers
1336 MUST process notify packets.
1338 The payload may only be sent with SILC_PACKET_NOTIFY packet. It MUST
1339 NOT be sent in any other packet type. The following diagram represents
1347 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
1348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1349 | Notify Type | Payload Length |
1350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1356 Figure 13: Notify Payload
1360 o Notify Type (2 bytes) - Indicates the type of the notify
1363 o Payload Length (2 bytes) - Length of the entire Notify Payload
1364 including any associated Argument Payloads.
1366 o Argument Nums (1 byte) - Indicates the number of Argument
1367 Payloads associated to this payload. Notify types may define
1368 arguments to be sent along the notify message.
1371 Following the list of currently defined notify types. The format for
1372 notify arguments is same as in SILC commands described in [SILC4].
1373 Note that all IDs sent in arguments are sent inside ID Payload. Also
1374 note that all strings sent as arguments MUST be UTF-8 [RFC3629] encoded,
1375 unless otherwise defined. Also note that all public keys or
1376 certificates sent inside arguments are actually Public Key Payloads.
1380 0 SILC_NOTIFY_TYPE_NONE
1382 If no specific notify type apply for the notify message this type
1386 Arguments: (1) <message>
1388 The <message> is implementation specific free text string.
1389 Receiver MAY ignore this message.
1392 1 SILC_NOTIFY_TYPE_INVITE
1394 Sent when an client is invited to a channel. This is also sent
1395 when the invite list of the channel is changed. This notify type
1396 is sent to local servers on the channel, but MUST NOT be sent
1397 to clients on the channel. Router MUST broadcast this to its
1398 primary router and to local servers on the channel. When a client
1399 was directly invited to the channel this is also sent to that
1400 client. In this case the packet is destined to the client.
1403 Arguments: (1) <Channel ID> (2) <channel name>
1404 (3) [<sender Client ID>] (4) [<add | del>]
1407 The <Channel ID> is the channel. The <channel name> is the name
1408 of the channel and is provided because the client which receives
1409 this notify packet may not have a way to resolve the name of the
1410 channel from the <Channel ID>. The <sender Client ID> is the
1411 Client ID which invited the client to the channel. The
1412 <add | del> is an argument of size of 1 byte where 0x00 means
1413 adding a client to invite list, and 0x01 means deleting a client
1414 from invite list. The <invite list>, if present, indicates the
1415 information to be added to or removed from the invite list.
1416 The <invite list> format is defined in [SILC4] with
1417 SILC_COMMAND_INVITE command. When this notify is destined to
1418 a client the <add | del> and <invite list> MUST NOT be sent.
1419 When <add | del> is used to announce information during server
1420 connecting phase the argument type MUST be 0x03. See section
1421 4.2.1 in [SILC1] for more information.
1424 2 SILC_NOTIFY_TYPE_JOIN
1426 Sent when client has joined to a channel. The server MUST
1427 distribute this type to the local clients on the channel and then
1428 send it to its primary router. Note that, when router is joining
1429 the client on behalf of normal server then router MUST send this
1430 notify type locally and globally. The router or server receiving
1431 the packet distributes this type to the local clients on the
1432 channel and broadcast it to the network. This notify is sent
1433 also to the client that joined the channel.
1436 Arguments: (1) [<Client ID>] (2) <Channel ID>
1438 The <Client ID> is the client that joined to the channel
1439 indicated by the <Channel ID>.
1442 3 SILC_NOTIFY_TYPE_LEAVE
1444 Sent when client has left a channel. The server must distribute
1445 this type to the local clients on the channel and then send it
1446 to its primary router. The router or server receiving the
1447 packet distributes this type to the local clients on the channel
1448 and broadcast it to the network. This notify MUST NOT be sent to
1452 Arguments: (1) <Client ID>
1454 The <Client ID> is the client which left the channel.
1457 4 SILC_NOTIFY_TYPE_SIGNOFF
1459 Sent when client signoff from SILC network. The server MUST
1460 distribute this type to the local clients on the channel and
1461 then send it to its primary router. The router or server
1462 receiving the packet distributes this type to the local clients
1463 on the channel and broadcast it to the network. This notify
1464 MUST NOT be sent to the quitting client. The Destination ID
1465 in the packet may be any ID depending to who it is destined.
1468 Arguments: (1) <Client ID> (2) <message>
1470 The <Client ID> is the client which left SILC network. The
1471 <message> is free text string indicating the reason of the
1475 5 SILC_NOTIFY_TYPE_TOPIC_SET
1477 Sent when topic is set/changed on a channel. This type may be
1478 sent only to the clients which are joined on the channel which
1479 topic was just set or changed. The packet is destined to the
1483 Arguments: (1) <ID Payload> (2) <topic>
1485 The <ID Payload> is the ID of the entity who set the topic.
1486 It usually is Client ID but it can be Server ID and Channel ID
1490 6 SILC_NOTIFY_TYPE_NICK_CHANGE
1492 Sent when client changes nick on a channel. The server MUST
1493 distribute this type only to the local clients on the channel
1494 and then send it to its primary router. The router or server
1495 receiving the packet distributes this type to the local clients
1496 on the channel and broadcast it to the network. This packet is
1497 destined directly to the sent entity. This MUST be sent to those
1498 clients that are joined on same channels as the client that
1499 changed the nickname. This notify MUST NOT be sent multiple
1500 times to the same recipient. This notify MUST be sent also to
1501 the client that changed the nickname.
1504 Arguments: (1) <Old Client ID> (2) <New Client ID>
1507 The <Old Client ID> is the old ID of the client which changed
1508 the nickname. The <New Client ID> is the new ID generated by
1509 the change of the nickname. The <nickname> is the new nickname.
1510 Note that it is possible to send this notify even if the
1511 nickname has not changed, but client ID was changed.
1514 7 SILC_NOTIFY_TYPE_CMODE_CHANGE
1516 Sent when channel mode has changed. This type MUST be sent only
1517 to the clients which are joined on the channel which mode was
1518 changed. This packet is destined to the channel.
1521 Arguments: (1) <ID Payload> (2) <mode mask>
1522 (3) [<cipher>] (4) <[hmac>]
1523 (5) [<passphrase>] (6) [<founder public key>]
1524 (7) [<channel pubkey>] (8) [<user limit>]
1526 The <ID Payload> is the ID (usually Client ID but it can be
1527 Server ID as well when the router is enforcing channel mode
1528 change) of the entity which changed the mode. The <mode mask>
1529 is the new mode mask of the channel. The client can safely
1530 ignore the <cipher> argument since the SILC_PACKET_CHANNEL_KEY
1531 packet will force the new channel key change anyway. The <hmac>
1532 argument is important since the client is responsible of setting
1533 the new HMAC and the hmac key into use. The <passphrase> is
1534 the passphrase of the channel, if it was now set. The <founder
1535 public key> argument is sent when the founder mode on the
1536 channel was set. All routers and servers that receive the packet
1537 MUST save the founder's public key so that the founder can
1538 reclaim the channel founder rights back for the channel on any
1539 server in the network. The <user limit> argument is present when
1540 the user limit was set or changed on the channel.
1542 The <channel pubkey> is an Argument List Payload and it is used
1543 to add and/or remove channel public keys from the channel. Also,
1544 when announcing channel information between servers and routers
1545 during connecting phase this argument includes the list of channel
1546 public keys. To add a public key to channel public key list the
1547 SILC_CMODE_CHANNEL_AUTH mode is set and the argument type is 0x00,
1548 and the argument is the public key. To remove a public key from
1549 the channel public key list the argument type is 0x01, and the
1550 argument is the public key to be removed. If the mode
1551 SILC_CMODE_CHANNEL_AUTH is unset (and was set earlier) all public
1552 keys are removed at once. Implementation MAY add and remove
1553 multiple public keys at the same time by including multiple
1554 arguments to the <channel pubkey> Argument List Payload where each
1555 argument is one Public Key Payload. When <channel pubkey> is used
1556 to announce information during server connecting phase the
1557 argument type MUST be 0x03. See section 4.2.1 in [SILC1] for
1561 8 SILC_NOTIFY_TYPE_CUMODE_CHANGE
1563 Sent when user mode on channel has changed. This type MUST be
1564 sent only to the clients which are joined on the channel where
1565 the target client is on. This packet is destined to the channel.
1568 Arguments: (1) <ID Payload> (2) <mode mask>
1569 (3) <Target Client ID> (4) [<founder pubkey>]
1571 The <ID Payload> is the ID (usually Client ID but it can be
1572 Server ID as well when the router is enforcing user's mode
1573 change) of the entity which changed the mode. The <mode mask>
1574 is the new mode mask of the channel. The <Target Client ID>
1575 is the client which mode was changed. The <founder pubkey>
1576 is the public key of the channel founder and may be sent only
1577 when first time setting the channel founder mode using the
1578 SILC_COMMAND_CUMODE command, and when sending this notify.
1581 9 SILC_NOTIFY_TYPE_MOTD
1583 Sent when Message of the Day (motd) is sent to a client.
1586 Arguments: (1) <motd>
1588 The <motd> is the Message of the Day. This notify MAY be
1589 ignored and is OPTIONAL.
1592 10 SILC_NOTIFY_TYPE_CHANNEL_CHANGE
1594 Sent when channel's ID has changed for a reason or another.
1595 This is sent by normal server to the client. This can also be
1596 sent by router to other server to force the Channel ID change.
1597 The Channel ID MUST be changed to use the new one. When sent
1598 to clients, this type MUST be sent only to the clients which are
1599 joined on the channel. This packet is destined to the sent
1603 Arguments: (1) <Old Channel ID> (2) <New Channel ID>
1605 The <Old Channel ID> is the channel's old ID and the <New
1606 Channel ID> is the new one that MUST replace the old one.
1607 Server which receives this from router MUST re-announce the
1608 channel to the router by sending SILC_PACKET_NEW_CHANNEL packet
1609 with the new Channel ID.
1612 11 SILC_NOTIFY_TYPE_SERVER_SIGNOFF
1614 Sent when server quits SILC network. Those clients from this
1615 server that are on channels must be removed from the channel.
1616 This packet is destined to the sent entity.
1619 Arguments: (1) <Server ID> (n) [<Client ID>] [...]
1621 The <Server ID> is the server's ID. The rest of the arguments
1622 are the Client IDs of the clients which are coming from this
1623 server and are thus quitting the SILC network also. If the
1624 maximum number of arguments are reached another
1625 SILC_NOTIFY_TYPE_SERVER_SIGNOFF notify packet MUST be sent.
1626 When this notify packet is sent between routers the Client ID's
1627 MAY be omitted. Server receiving the Client ID's in the payload
1628 may use them directly to remove the client.
1631 12 SILC_NOTIFY_TYPE_KICKED
1633 Sent when a client has been kicked from a channel. This MUST
1634 also be sent to the client which was kicked from the channel.
1635 The client which was kicked from the channel MUST be removed
1636 from the channel. The client MUST also be removed from channel's
1637 invite list if it is explicitly added in the list. This packet
1638 is destined to the channel. The router or server receiving the
1639 packet distributes this type to the local clients on the channel
1640 and broadcast it to the network.
1643 Arguments: (1) <Client ID> (2) [<comment>]
1644 (3) <Kicker's Client ID>
1646 The <Client ID> is the client which was kicked from the channel.
1647 The kicker may have set the <comment> string to indicate the
1648 reason for the kicking. The <Kicker's Client ID> is the kicker.
1651 13 SILC_NOTIFY_TYPE_KILLED
1653 Sent when a client has been killed from the network. This MUST
1654 also be sent to the client which was killed from the network.
1655 This notify MUST be sent to those clients which are joined on
1656 same channels as the killed client. The client which was killed
1657 MUST be removed from the network. This packet is destined
1658 directly to the sent entity. The router or server receiving
1659 the packet distributes this type to the local clients on the
1660 channel and broadcast it to the network. The client MUST also
1661 be removed from joined channels invite list if it is explicitly
1662 added in the lists. This notify MUST NOT be sent multiple
1663 times to same recipient.
1666 Arguments: (1) <Client ID> (2) [<comment>]
1669 The <Client ID> is the client which was killed from the network.
1670 The killer may have set the <comment> string to indicate the
1671 reason for the killing. The <Killer's ID> is the killer, which
1672 may be client but also router server.
1675 14 SILC_NOTIFY_TYPE_UMODE_CHANGE
1677 Sent when user's mode in the SILC changes. This type is sent
1678 only between routers as broadcast packet.
1681 Arguments: (1) <Client ID> (2) <mode mask>
1683 The <Client ID> is the client which mode was changed. The
1684 <mode mask> is the new mode mask.
1687 15 SILC_NOTIFY_TYPE_BAN
1689 Sent when the ban list of the channel is changed. This notify
1690 type is sent to local servers on the channel, but MUST NOT be
1691 sent to clients on the channel. Router MUST broadcast this to
1692 its primary router and to local servers on the channel.
1695 Arguments: (1) <Channel ID> (2) [<add | del>]
1698 The <Channel ID> is the channel which ban list was changed.
1699 The <add | del> is an argument of size of 1 byte where 0x00 means
1700 adding a client to ban list, and 0x01 means deleting a client
1701 from ban list. The <ban list> indicates the information to be
1702 added to or removed from the ban list. The <ban list> format
1703 format is defined in [SILC4] with SILC_COMMAND_BAN command.
1704 When <add | del> is used to announce information during server
1705 connecting phase the argument type MUST be 0x03. See section
1706 4.2.1 in [SILC1] for more information.
1709 16 SILC_NOTIFY_TYPE_ERROR
1711 Sent when an error occurs during processing some SILC procedure.
1712 This is not used when error occurs during command processing, see
1713 [SILC4] for more information about commands and command replies.
1714 This type is sent directly to the sender of the packet whose
1715 packet caused the error. See [SILC1] for definition when this
1719 Arguments: (1) <Status Type> (n) [...]
1721 The <Status Type> is the error type defined in [SILC4]. Note
1722 that same types are also used with command replies to indicate
1723 the status of a command. Both commands and this notify type
1724 share same status types. Rest of the arguments are status type
1725 dependent and are specified with those status types that can be
1726 sent currently inside this notify type in [SILC4]. The <Status
1727 Type> is size of 1 byte.
1730 17 SILC_NOTIFY_TYPE_WATCH
1732 Sent to indicate change in a watched user. Client can set
1733 nicknames to be watched with SILC_COMMAND_WATCH command, and
1734 receive notifications when they login to network, signoff from
1735 the network or their user mode is changed. This notify type
1736 is used to deliver these notifications. The notify type is
1737 sent directly to the watching client.
1740 Arguments: (1) <Client ID> (2) [<nickname>]
1741 (3) <user mode> (4) [<Notify Type>]
1744 The <Client ID> is the user's Client ID which is being watched,
1745 and the <nickname> is its nickname. If the client just
1746 changed the nickname, then <nickname> is the new nickname, but
1747 the <Client ID> is the old client ID. The <user mode> is the
1748 user's current user mode. The <Notify Type> can be same as the
1749 Notify Payload's Notify Type, and is 16 bit MSB first order
1750 value. If provided it may indicate the notify that occurred
1751 for the client. If client logged in to the network the
1752 <Notify Type> MUST NOT be present. The <public key> MAY be
1753 present, and it is the public key of the client being watched.
1756 Notify types starting from 16384 are reserved for private notify
1759 Router server which receives SILC_NOTIFY_TYPE_SIGNOFF,
1760 SILC_NOTIFY_TYPE_SERVER_SIGNOFF, SILC_NOTIFY_TYPE_KILLED,
1761 SILC_NOTIFY_TYPE_NICK_CHANGE and SILC_NOTIFY_TYPE_UMODE_CHANGE
1762 MUST check whether someone in the local cell is watching the nickname
1763 the client has, and send the SILC_NOTIFY_TYPE_WATCH notify to the
1764 watcher, unless the watched client in case has the user mode
1765 SILC_UMODE_REJECT_WATCHING set. If the watcher client and the client
1766 that was watched is same the notify SHOULD NOT be sent.
1772 Error payload is sent upon error in protocol. Error may occur in
1773 various conditions when server sends this packet. Client MUST NOT
1774 send this payload but MUST be able to accept it. However, client
1775 MAY ignore the contents of the packet as server is going to take
1776 action on the error anyway. However, it is recommended that the
1777 client takes error packet seriously.
1783 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
1784 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1788 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1792 Figure 14: Error Payload
1796 o Error Message (variable length) - Human readable error
1802 2.3.9 Channel Message Payload
1804 Channel Message Payload is used to send message to channels, a group
1805 of users. These messages can only be sent if client has joined to
1806 some channel. Even though this packet is very common in SILC it
1807 is still special packet. Some special handling on sending and
1808 reception of channel message is required.
1810 Padding MUST be applied into this payload since the payload is
1811 encrypted separately from other parts of the packet with the
1812 channel specific key. Hence the requirement of the padding.
1813 The packet MUST be made multiple by eight (8) or by the block
1814 size of the cipher, which ever is larger.
1816 The SILC header in this packet is encrypted with the session key
1817 of the next receiver of the packet. Nothing else is encrypted
1818 with that key. Thus, the actual packet and padding to be
1819 encrypted with the session key is SILC Header plus padding to it.
1821 Receiver of the the channel message packet is able to determine
1822 the channel the message is destined to by checking the Destination
1823 ID from the SILC Packet header which tells the destination channel.
1824 The original sender of the packet is also determined by checking
1825 the source ID from the header which tells the client which sent
1826 the message. The Destination ID MUST be Channel ID in the SILC
1829 This packet use generic Message Payload as Channel Message Payload.
1830 See section 2.3.2.6 for generic Message Payload.
1834 2.3.10 Channel Key Payload
1836 All traffic in channels are protected by channel specific keys.
1837 Channel Key Payload is used to distribute channel keys to all
1838 clients on the particular channel. Channel keys are sent when
1839 the channel is created, when new user joins to the channel and
1840 whenever a user has left a channel. Server creates the new
1841 channel key and distributes it to the clients by encrypting this
1842 payload with the session key shared between the server and
1843 the client. After that, client MUST start using the key received
1844 in this payload to protect the traffic on the channel.
1846 The client which is joining to the channel receives its key in the
1847 SILC_COMMAND_JOIN command reply message thus it is not necessary to
1848 send this payload to the entity which sent the SILC_COMMAND_JOIN
1851 Channel keys are cell specific thus every router in the cell have
1852 to create a channel key and distribute it if any client in the
1853 cell has joined to a channel. Channel traffic between cell's
1854 are not encrypted using channel keys, they are encrypted using
1855 normal session keys between two routers. Inside a cell, all
1856 channel traffic is encrypted with the specified channel key.
1857 Channel key SHOULD expire periodically, say, in one hour, in
1858 which case new channel key is created and distributed.
1860 Note that, this packet is not used if SILC_CMODE_PRIVKEY mode is set
1861 on channel. This means that channel uses channel private keys which
1862 are not server generated. For this reason server cannot send this
1863 packet as it does not know the key.
1865 The destination ID in the packet SHOULD be the entity to whom the
1866 packet is sent. Using Channel ID as destination ID is not
1867 necessary as the Channel ID is included in the Channel Key Payload.
1869 The payload may only be sent with SILC_PACKET_CHANNEL_KEY packet.
1870 It MUST NOT be sent in any other packet type. The following diagram
1871 represents the Channel Key Payload.
1878 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
1879 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1880 | Channel ID Length | |
1881 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1885 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1886 | Cipher Name Length | |
1887 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1891 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1892 | Channel Key Length | |
1893 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1897 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1901 Figure 15: Channel Key Payload
1906 o Channel ID Length (2 bytes) - Indicates the length of the
1907 Channel ID field in the payload, not including any other
1910 o Channel ID (variable length) - The Channel ID of the
1913 o Cipher Name Length (2 bytes) - Indicates the length of the
1914 Cipher name field in the payload, not including any other
1917 o Cipher Name (variable length) - Name of the cipher used
1918 in the protection of channel traffic. This name is
1919 initially decided by the creator of the channel but it
1920 may change during the life time of the channel as well.
1922 o Channel Key Length (2 bytes) - Indicates the length of the
1923 Channel Key field in the payload, not including any other
1926 o Channel Key (variable length) - The actual channel key
1927 material. See [SILC1] on how to start using the key.
1932 2.3.11 Private Message Payload
1934 Private Message Payload is used to send private message between
1935 two clients. The messages are sent only to the specified user
1936 and no other user inside SILC network is able to see the message.
1938 The message can be protected by the session key established by the
1939 SILC Key Exchange Protocol. However, it is also possible to agree
1940 to use a private message key to protect just the private messages.
1941 It is for example possible to perform Key Agreement between two
1942 clients. See section 2.3.20 Key Agreement Payload how to perform
1943 key agreement. It is also possible to use static or pre-shared keys
1944 to protect private messages. See the 2.3.12 Private Message Key
1945 Payload and [SILC1] section 4.6 for detailed description for private
1946 message key generation.
1948 If normal session key is used to protect the message, every server
1949 between the sender client and the receiving client MUST decrypt the
1950 packet and always re-encrypt it with the session key of the next
1951 receiver of the packet. See section Client To Client in [SILC1].
1953 When the private message key is used, and the Private Message Key
1954 flag was set in the SILC Packet header no server or router en route
1955 is able to decrypt or re-encrypt the packet. In this case only the
1956 SILC Packet header is processed by the servers and routers en route.
1957 Section Client To Client in [SILC1] gives example of this scheme.
1959 This packet use generic Message Payload as Private Message Payload.
1960 See section 2.3.2.6 for generic Message Payload.
1964 2.3.12 Private Message Key Payload
1966 This payload is OPTIONAL and can be used to indicate that a static
1967 or pre-shared key should be used in the private message communication
1968 to protect the messages. The actual key material has to be sent
1969 outside the SILC network, or it has to be a static or pre-shared key.
1970 The sender of this packet is considered to be the initiator and the
1971 receiver the responder when processing the raw key material as
1972 described in the section 4.6 in [SILC1] and in the section 2.3 in
1975 Note that it is also possible to use static or pre-shared keys in
1976 client implementations without sending this packet. Clients may
1977 naturally agree to use a key without sending any kind of indication
1978 to each other. The key may be for example a long-living static key
1979 that the clients has agreed to use at all times. Note that it is
1980 also possible to agree to use private message key by performing
1981 a Key Agreement. See the section 2.3.20 Key Agreement Payload.
1983 This payload may only be sent by client to another client. Server
1984 MUST NOT send this payload. After sending this payload and setting the
1985 key into use this payload the sender of private messages MUST set the
1986 Private Message Key flag into the SILC Packet Header.
1988 The payload may only be sent with SILC_PACKET_PRIVATE_MESSAGE_KEY
1989 packet. It MUST NOT be sent in any other packet type. The following
1990 diagram represents the Private Message Key Payload.
1996 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
1997 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1998 | Cipher Name Length | |
1999 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2003 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2004 | HMAC Name Length | |
2005 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2009 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2013 Figure 16: Private Message Key Payload
2018 o Cipher Name Length (2 bytes) - Indicates the length of the
2019 Cipher Name field in the payload, not including any other
2022 o Cipher Name (variable length) - Name of the cipher to use
2023 in the private message encryption. If this field does not
2024 exist then the default cipher of the SILC protocol is used.
2025 See the [SILC1] for defined ciphers.
2027 o HMAC Name Length (2 bytes) - Indicates the length of the
2028 HMAC Name field in the payload, not including any other
2031 o HMAC Name (variable length) - Name of the HMAC to use
2032 in the private message MAC computation. If this field does
2033 not exist then the default HMAC of the SILC protocol is used.
2034 See the [SILC1] for defined HMACs.
2039 2.3.13 Command Payload
2041 Command Payload is used to send SILC commands from client to server.
2042 Also server MAY send commands to other servers. The following diagram
2043 represents the Command Payload.
2049 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
2050 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2051 | Payload Length | SILC Command | Arguments Num |
2052 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2053 | Command Identifier |
2054 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2058 Figure 17: Command Payload
2062 o Payload Length (2 bytes) - Length of the entire command
2063 payload including any command argument payloads associated
2066 o SILC Command (1 byte) - Indicates the SILC command. This MUST
2067 be set to non-zero value. If zero (0) value is found in this
2068 field the packet MUST be discarded.
2070 o Arguments Num (1 byte) - Indicates the number of arguments
2071 associated with the command. If there are no arguments this
2072 field is set to zero (0). The arguments MUST follow the
2073 Command Payload. See section 2.3.2.2 for definition of the
2076 o Command Identifier (2 bytes) - Identifies this command at the
2077 sender's end. The entity which replies to this command MUST
2078 set the value found from this field into the Command Payload
2079 used to send the reply to the sender. This way the sender
2080 can identify which command reply belongs to which originally
2081 sent command. What this field includes is implementation
2082 issue but it is RECOMMENDED that wrapping counter value is
2086 See [SILC4] for detailed description of different SILC commands,
2087 their arguments and their reply messages.
2091 2.3.14 Command Reply Payload
2093 Command Reply Payload is used to send replies to the commands. The
2094 Command Reply Payload is identical to the Command Payload thus see
2095 the 2.3.13 section for the payload specification.
2097 The entity which sends the reply packet MUST set the Command Identifier
2098 field in the reply packet's Command Payload to the value it received
2099 in the original command packet.
2101 See SILC Commands in [SILC4] for detailed description of different
2102 SILC commands, their arguments and their reply messages.
2106 2.3.15 Connection Auth Request Payload
2108 Client MAY send this payload to server to request the authentication
2109 method that must be used in authentication protocol. If client knows
2110 this information beforehand this payload is not necessary to be sent.
2111 Server performing authentication with another server MAY also send
2112 this payload to request the authentication method. If the connecting
2113 server already knows this information this payload is not necessary
2116 Server receiving this request SHOULD reply with same payload sending
2117 the mandatory authentication method. Algorithms that may be required
2118 to be used by the authentication method are the ones already
2119 established by the SILC Key Exchange protocol. See section Key
2120 Exchange Start Payload in [SILC3] for detailed information.
2122 The payload may only be sent with SILC_PACKET_CONNECTION_AUTH_REQUEST
2123 packet. It MUST NOT be sent in any other packet type. The following
2124 diagram represents the Connection Auth Request Payload.
2130 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
2131 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2132 | Connection Type | Authentication Method |
2133 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2137 Figure 18: Connection Auth Request Payload
2141 o Connection Type (2 bytes) - Indicates the type of the
2142 connection. The following connection types are defined:
2149 If any other type is found in this field the packet MUST be
2150 discarded and the authentication MUST be failed.
2152 o Authentication Method (2 bytes) - Indicates the authentication
2153 method to be used in the authentication protocol. The following
2154 authentication methods are defined:
2157 1 password (mandatory)
2158 2 public key (mandatory)
2160 If any other type is found in this field the packet MUST be
2161 discarded and the authentication MUST be failed. If this
2162 payload is sent as request to receive the mandatory
2163 authentication method this field MUST be set to zero (0),
2164 indicating that receiver should send the mandatory
2165 authentication method. The receiver sending this payload
2166 to the requesting party, MAY also set this field to zero (0)
2167 to indicate that authentication is not required. In this
2168 case authentication protocol still MUST be started but
2169 server is most likely to respond with SILC_PACKET_SUCCESS
2175 2.3.16 New ID Payload
2177 New ID Payload is a multipurpose payload. It is used to send newly
2178 created ID's from clients and servers. When client connects to server
2179 and registers itself to the server by sending SILC_PACKET_NEW_CLIENT
2180 packet, server replies with this packet by sending the created ID for
2181 the client. Server always creates the ID for the client.
2183 This payload is also used when server tells its router that new client
2184 has registered to the SILC network. In this case the server sends
2185 the Client ID of the client to the router. Similarly when router
2186 distributes information to other routers about the client in the SILC
2187 network this payload is used.
2189 Also, when server connects to router, router use this payload to inform
2190 other routers about new server in the SILC network. However, every
2191 server (or router) creates their own ID's thus the ID distributed by
2192 this payload is not created by the distributor in this case. Servers
2193 create their own ID's. Server registers itself to the network by
2194 sending SILC_PACKET_NEW_SERVER to the router it connected to. The case
2195 is same when router connects to another router.
2197 This payload MUST NOT be used to send information about new channels.
2198 New channels are always distributed by sending the dedicated
2199 SILC_PACKET_NEW_CHANNEL packet. Client MUST NOT send this payload.
2200 Both client and server (and router) MAY receive this payload.
2202 The packet use generic ID Payload as New ID Payload. See section
2203 2.3.2.1 for generic ID Payload.
2207 2.3.17 New Client Payload
2209 When client is connected to the server, keys has been exchanged and
2210 connection has been authenticated, client MUST register itself to the
2211 server. Client's first packet after key exchange and authentication
2212 protocols MUST be SILC_PACKET_NEW_CLIENT. This payload tells server all
2213 the relevant information about the connected user. Server creates a new
2214 client ID for the client when received this payload and sends it to the
2215 client in New ID Payload.
2217 This payload sends username and real name of the user on the remote host
2218 which is connected to the SILC server with SILC client. The server
2219 creates the client ID according the information sent in this payload.
2220 The nickname of the user becomes the nickname sent in this payload.
2222 The payload may only be sent with SILC_PACKET_NEW_CLIENT packet. It
2223 MUST NOT be sent in any other packet type. The following diagram
2224 represents the New Client Payload.
2231 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
2232 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2233 | Username Length | |
2234 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2238 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2239 | Real Name Length | |
2240 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2244 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2248 Figure 19: New Client Payload
2252 o Username Length (2 bytes) - Length of the Username field.
2254 o Username (variable length) - The username of the user on
2255 the host where connecting to the SILC server.
2257 o Real Name Length (2 bytes) - Length of the Real Name field.
2259 o Real Name (variable length) - The real name of the user
2260 on the host where connecting to the SILC server.
2265 2.3.18 New Server Payload
2267 This payload is sent by server when it has completed successfully both
2268 key exchange and connection authentication protocols. The server
2269 MUST register itself to the SILC Network by sending this payload.
2270 The first packet after these key exchange and authentication protocols
2271 is SILC_PACKET_NEW_SERVER packet. The payload includes the Server ID
2272 of the server that it has created by itself. It also includes a
2273 name of the server that is associated to the Server ID.
2275 The payload may only be sent with SILC_PACKET_NEW_SERVER packet. It
2276 MUST NOT be sent in any other packet type. The following diagram
2277 represents the New Server Payload.
2286 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
2287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2288 | Server ID Length | |
2289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2293 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2294 | Server Name Length | |
2295 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2299 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2303 Figure 20: New Server Payload
2307 o Server ID Length (2 bytes) - Length of the Server ID Data
2310 o Server ID Data (variable length) - The encoded Server ID
2313 o Server Name Length (2 bytes) - Length of the server name
2316 o Server Name (variable length) - The server name string.
2321 2.3.19 New Channel Payload
2323 Information about newly created channel is broadcasted to all routers
2324 in the SILC network by sending this packet payload. Channels are
2325 created by router of the cell. Server never creates channels unless
2326 it is a standalone server and it does not have router connection,
2327 in this case server acts as router. Normal server send JOIN command
2328 to the router (after it has received JOIN command from client) which
2329 then processes the command and creates the channel. Client MUST NOT
2330 send this packet. Server MAY send this packet to a router when it is
2331 announcing its existing channels to the router after it has connected
2334 The packet use generic Channel Payload as New Channel Payload. See
2335 section 2.3.2.3 for generic Channel Payload. The Mode Mask field in the
2336 Channel Payload is the mode of the channel.
2340 2.3.20 Key Agreement Payload
2342 This payload is used by clients to request key negotiation between
2343 another client in the SILC Network. The key agreement protocol used
2344 is the SKE protocol. The result of the protocol, the secret key
2345 material, can be used for example as private message key between the
2346 two clients. This significantly adds security as the clients agree
2347 about the key without any server interaction. The protocol is executed
2348 peer to peer. The server and router MUST NOT send this payload.
2350 The sender MAY tell the receiver of this payload the hostname and the
2351 port where the SKE protocol is running in the sender's end. The
2352 receiver MAY then initiate the SKE negotiation with the sender. The
2353 sender MAY also optionally not to include the hostname and the port
2354 of its SKE protocol. In this case the receiver MAY reply to the
2355 request by sending the same payload filled with the receiver's hostname
2356 and the port where the SKE protocol is running. The sender MAY then
2357 initiate the SKE negotiation with the receiver.
2359 This payload may be sent with SILC_PACKET_KEY_AGREEMENT and
2360 SILC_PACKET_FTP packet types. It MUST NOT be sent in any other packet
2361 types. The following diagram represents the Key Agreement Payload.
2367 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
2368 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2369 | Hostname Length | |
2370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2374 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2376 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2380 Figure 21: Key Agreement Payload
2384 o Hostname Length (2 bytes) - Indicates the length of the
2387 o Hostname (variable length) - The hostname or IP address where
2388 the SKE protocol is running, as UTF-8 encoded string. The sender
2389 MAY fill this field when sending the payload. If the receiver
2390 sends this payload as reply to the request it MUST fill this field.
2392 o Protocol (2 bytes) - The internet protocol used for the key
2393 agreement connection. Possible values are 0 for TCP and 1 for
2394 UDP. Other values are unsupported. This is a 16 bit MSB first
2395 order value. If Hostname field is not present, the value in
2396 this field is ignored.
2398 o Port (2 bytes) - The port where the SKE protocol is bound.
2399 The sender MAY fill this field when sending the payload. If
2400 the receiver sends this payload as reply to the request it
2401 MUST fill this field. This is a 16 bit MSB first order value.
2405 After the key material has been received from the SKE protocol it is
2406 processed as the [SILC3] describes. If the key material is used as
2407 channel private key then the Sending Encryption Key, as defined in
2408 [SILC3] is used as the channel private key. Other key material must
2409 be discarded. The [SILC1] in section 4.6 defines the way to use the
2410 key material if it is intended to be used as private message keys.
2411 Any other use for the key material is undefined.
2415 2.3.21 Resume Router Payload
2417 See the [SILC1] for Resume Router protocol where this payload is
2418 used. The payload may only be sent with SILC_PACKET_RESUME_ROUTER
2419 packet. It MUST NOT be sent in any other packet type. The following
2420 diagram represents the Resume Router Payload.
2426 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2428 | Type | Session ID |
2429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2433 Figure 22: Resume Router Payload
2437 o Type (1 byte) - Indicates the type of the backup resume
2438 protocol packet. The type values are defined in [SILC1].
2440 o Session ID (1 bytes) - Indicates the session ID for the
2441 backup resume protocol. The sender of the packet sets this
2442 value and the receiver MUST set the same value in subsequent
2450 2.3.22 File Transfer Payload
2452 File Transfer Payload is used to perform file transfer protocol between
2453 two entities in the network. The actual file transfer protocol is always
2454 encapsulated inside the SILC Packet. The actual data stream is also sent
2455 peer to peer outside SILC network.
2457 When an entity, usually a client wishes to perform file transfer protocol
2458 with another client in the network, they perform Key Agreement protocol
2459 as described in the section 2.3.20 Key Agreement Payload and in [SILC3],
2460 inside File Transfer Payload. After the Key Agreement protocol has been
2461 performed the subsequent packets in the data stream will be protected
2462 using the new key material. The actual file transfer protocol is also
2463 initialized in this stage. All file transfer protocol packets are always
2464 encapsulated in the File Transfer Payload and protected with the
2465 negotiated key material.
2467 The payload may only be sent with SILC_PACKET_FTP packet. It MUST NOT
2468 be sent in any other packet type. The following diagram represents the
2469 File Transfer Payload.
2475 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
2476 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2482 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2486 Figure 23: File Transfer Payload
2490 o Type (1 byte) - Indicates the type of the file transfer
2491 protocol. The following file transfer protocols has been
2494 1 Secure File Transfer Protocol (SFTP) (mandatory)
2496 If zero (0) value or any unsupported file transfer protocol
2497 type is found in this field the packet MUST be discarded.
2498 The currently mandatory file transfer protocol is SFTP.
2499 The SFTP protocol is defined in [SFTP].
2501 o Data (variable length) - Arbitrary file transfer data. The
2502 contents and encoding of this field is dependent of the usage
2503 of this payload and the type of the file transfer protocol.
2504 When this payload is used to perform the Key Agreement
2505 protocol, this field include the Key Agreement Payload,
2506 as defined in the section 2.3.20 Key Agreement Payload.
2507 When this payload is used to send the actual file transfer
2508 protocol data, the encoding is defined in the corresponding
2509 file transfer protocol.
2514 2.3.23 Resume Client Payload
2516 This payload is used by client to resume its detached session in the
2517 SILC Network. A client is able to detach itself from the network by
2518 sending SILC_COMMAND_DETACH command to its server. The network
2519 connection to the client is lost but the client remains as valid
2520 client in the network. The client is able to resume the session back
2521 by sending this packet and including the old Client ID, and an
2522 Authentication Payload [SILC1] which the server use to verify with
2523 the detached client's public key. This also implies that the
2524 mandatory authentication method is public key authentication.
2526 Server or router that receives this from the client also sends this,
2527 without the Authentication Payload, to routers in the network so that
2528 they know the detached client has resumed. Refer to the [SILC1] for
2529 detailed description how the detaching and resuming procedure is
2532 The payload may only be sent with SILC_PACKET_RESUME_CLIENT packet. It
2533 MUST NOT be sent in any other packet type. The following diagram
2534 represents the Resume Client Payload.
2539 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
2540 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2541 | Client ID Length | |
2542 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2546 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2548 ~ Authentication Payload ~
2550 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2554 Figure 24: Resume Client Payload
2558 o Client ID Length (1 byte) - The length of the Client ID
2559 field not including any other field.
2561 o Client ID (variable length) - The detached client's Client
2562 ID. The client that sends this payload must know the Client
2565 o Authentication Payload (variable length) - The authentication
2566 payload that the server will verify with the detached client's
2567 public key. If the server doesn't know the public key, it must
2568 retrieve it for example with SILC_COMMAND_GETKEY command.
2573 2.3.24 Acknowledgement Payload
2575 This payload is used to acknowledge a packet that had the Acknowledgement
2576 packet flag set. The payload includes the sequence number of the packet
2577 that had the flag set, which the recipient can use to identify that the
2578 packet was acknowledged.
2580 The payload may only be sent with SILC_PACKET_ACK packet. It
2581 MUST NOT be sent in any other packet type. The following diagram
2582 represents the Acknowledgement Payload.
2587 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
2588 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2589 | Packet Sequence Number |
2590 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2594 Figure 24: Resume Client Payload
2598 o Packet Sequence Number (4 bytes) - The packet sequence number
2599 of the packet that had the Acknowledgement flag set.
2606 ID's are used in the SILC network to associate different entities.
2607 The following ID's has been defined to be used in the SILC network.
2612 This is used when other ID type is available at the time.
2616 Server ID to associate servers. See the format of
2621 Client ID to associate clients. See the format of
2626 Channel ID to associate channels. See the format of
2630 When encoding different IDs into the ID Payload, all fields are always
2631 in MSB first order. The IP address, port, and/or the random number
2632 are encoded in the MSB first order.
2636 2.5 Packet Encryption And Decryption
2638 SILC packets are encrypted almost entirely. Only the MAC at the end
2639 of the packet is never encrypted. The SILC Packet header is the first
2640 part of a packet to be encrypted and it is always encrypted with the
2641 key of the next receiver of the packet. The data payload area of the
2642 packet is always entirely encrypted and it is usually encrypted with
2643 the next receiver's key. However, there are some special packet types
2644 and packet payloads that require special encryption process. These
2645 special cases are described in the next sections. First is described
2646 the normal packet encryption process.
2651 2.5.1 Normal Packet Encryption And Decryption
2653 Normal SILC packets are encrypted with the session key of the next
2654 receiver of the packet. The entire SILC Packet header and the packet
2655 data payload is is encrypted with the same key. Padding of the packet
2656 is also encrypted always with the session key, also in special cases.
2657 Computed MAC of the packet MUST NOT be encrypted.
2659 Decryption process in these cases are straightforward. The receiver
2660 of the packet MUST first decrypt the SILC Packet header, or some parts
2661 of it, usually first 16 bytes of it. Then the receiver checks the
2662 packet type from the decrypted part of the header and can determine
2663 how the rest of the packet must be decrypted. If the packet type is
2664 any of the special cases described in the following sections the packet
2665 decryption is special. If the packet type is not among those special
2666 packet types rest of the packet can be decrypted with the same key.
2667 At this point the receiver is also able to determine the length of the
2670 With out a doubt, this sort of decryption processing causes some
2671 overhead to packet decryption, but never the less, is required.
2673 The MAC of the packet is also verified at this point. The MAC is
2674 computed from the ciphertext of the packet so it can be verified
2675 at this stage. The length of the packet need to be known to be able
2676 to verify the MAC from the ciphertext so the first 16 bytes need to
2677 be decrypted to determine the packet length. However, the MAC MUST
2678 be verified from the entire ciphertext.
2682 2.5.2 Channel Message Encryption And Decryption
2684 Channel Messages (Channel Message Payload) are always encrypted with
2685 the channel specific key. However, the SILC Packet header is not
2686 encrypted with that key. As in normal case, the header is encrypted
2687 with the key of the next receiver of the packet. Note that, in this
2688 case the encrypted data area is not touched at all; it MUST NOT be
2689 re-encrypted with the session key.
2691 Receiver of a channel message, who ever that is, is REQUIRED to decrypt
2692 the SILC Packet header to be able to recognize the packet to be as
2693 channel message. This is same procedure as for normal SILC packets.
2694 As the receiver founds the packet to be channel message, rest of the
2695 packet processing is special. Rest of the SILC Packet header is
2696 decrypted with the same session key along with the padding of the
2697 packet. After that the packet is protected with the channel specific
2698 key and thus can be decrypted only if the receiver is the client on
2699 the channel. See section 2.7 Packet Padding Generation for more
2700 information about padding on special packets.
2702 If the receiver of the channel message is router which is routing the
2703 message to another router then it MUST decrypt the Channel Message
2704 payload too. Between routers (that is, between cells) channel messages
2705 are protected with session keys shared between the routers. This
2706 causes another special packet processing for channel messages. If
2707 the channel message is received from another router then the entire
2708 packet, including Channel Message payload, MUST be encrypted with the
2709 session key shared between the routers. In this case the packet
2710 decryption process is as with normal SILC packets. Hence, if the
2711 router is sending channel message to another router the Channel
2712 Message payload MUST have been decrypted and MUST be re-encrypted
2713 with the session key shared between the another router. In this
2714 case the packet encryption is as with any normal SILC packet.
2716 It must be noted that this is only when the channel messages are sent
2717 from router to another router. In all other cases the channel
2718 message encryption and decryption is as described before. This
2719 different processing of channel messages with router to router
2720 connection is because channel keys are cell specific. All cells have
2721 their own channel keys thus the channel message traveling from one
2722 cell to another MUST be protected as it would be any normal SILC
2725 If the SILC_CMODE_PRIVKEY channel mode has been set for the channel
2726 then the router cannot decrypt the packet as it does not know the
2727 private key. In this case the entire packet MUST be encrypted with
2728 the session key and sent to the router. The router receiving the
2729 packet MUST check the channel mode and decrypt the packet accordingly.
2733 2.5.3 Private Message Encryption And Decryption
2735 By default, private message in SILC are protected by session keys.
2736 In this case the private message encryption and decryption process is
2737 equivalent to normal packet encryption and decryption.
2739 However, private messages MAY be protected with private message key
2740 which causes the packet to be special packet. The procedure in this
2741 case is very much alike to channel packets. The actual private message
2742 is encrypted with the private message key and other parts of the
2743 packet is encrypted with the session key. See 2.7 Packet Padding
2744 Generation for more information about padding on special packets.
2746 The difference from channel message processing is that server or router
2747 en route never decrypts the actual private message, as it does not
2748 have the key to do that. Thus, when sending packets between router
2749 the processing is same as in any other case as well; the packet's header
2750 and padding is protected by the session key and the data area is not
2751 touched and is not re-encrypted.
2753 The true receiver of the private message is able to decrypt the private
2754 message as it shares the key with the sender of the message.
2758 2.6 Packet MAC Generation
2760 Data integrity of a packet is protected by including a message
2761 authentication code (MAC) at the end of the packet. The MAC is computed
2762 from shared secret MAC key, that is established by the SILC Key Exchange
2763 protocol, from packet sequence number, and from the encrypted packet
2764 data. The MAC is always computed after packet is encrypted. This is
2765 so called Encrypt-Then-MAC order; packet is first encrypted, then MAC
2766 is computed from the encrypted data.
2768 The MAC is computed from entire packet. Every bit of data in the packet,
2769 including SILC Packet Header is used in the MAC computing. This way
2770 the entire packet becomes authenticated.
2772 Hence, packet's MAC generation is as follows:
2774 mac = MAC(key, sequence number | Encrypted SILC packet)
2776 The MAC key is negotiated during the SKE protocol. The sequence number
2777 is a 32 bit MSB first value starting from zero for first packet and
2778 increasing for subsequent packets, finally wrapping after 2^32 packets.
2779 The value is never reset, not even after rekey has been performed.
2780 However, rekey MUST be performed before the sequence number wraps
2781 and repeats from zero. Note that the sequence number is incremented only
2782 when MAC is computed for a packet. If packet is not encrypted and MAC is
2783 not computed then the sequence number is not incremented. Hence, the
2784 sequence number is zero for the very first encrypted packet.
2786 See [SILC1] for defined and allowed MAC algorithms.
2790 2.7 Packet Padding Generation
2792 Padding is needed in the packet because the packet is encrypted. It
2793 always MUST be multiple by eight (8) or multiple by the block size
2794 of the cipher, which ever is larger. The padding is always encrypted.
2796 For normal packets the padding is added after the SILC Packet Header
2797 and between the Data Payload area. The padding for normal packets
2798 may be calculated as follows:
2801 padding_length = 16 - (packet_length mod block_size)
2802 if (padding_length < 8)
2803 padding_length += block_size
2806 The `block_size' is the block size of the cipher. The maximum padding
2807 length is 128 bytes, and minimum is 8 bytes. For example, packets that
2808 include a passphrase or a password for authentication purposes SHOULD
2809 pad the packet up to the maximum padding length. The maximum padding
2810 is calculated as follows:
2813 padding_length = 128 - (packet_length mod block_size)
2816 For special packets the padding calculation is different as special
2817 packets may be encrypted differently. In these cases the encrypted
2818 data area MUST already be multiple by the block size thus in this case
2819 the padding is calculated only for SILC Packet Header, not for any
2820 other area of the packet. The same algorithm works in this case as
2821 well, except that the `packet length' is now the SILC Packet Header
2824 The padding MUST be random data, preferably, generated by
2825 cryptographically strong random number generator for each packet
2830 2.8 Packet Compression
2832 SILC Packets MAY be compressed. In this case the data payload area
2833 is compressed and all other areas of the packet MUST remain as they
2834 are. After compression is performed for the data area, the length
2835 field of Packet Header MUST be set to the compressed length of the
2838 The compression MUST always be applied before encryption. When
2839 the packet is received and decrypted the data area MUST be decompressed.
2840 Note that the true sender of the packet MUST apply the compression and
2841 the true receiver of the packet MUST apply the decompression. Any
2842 server or router en route SHOULD NOT decompress the packet.
2848 The sender of the packet MUST assemble the SILC Packet Header with
2849 correct values. It MUST set the Source ID of the header as its own
2850 ID, unless it is forwarding the packet. It MUST also set the Destination
2851 ID of the header to the true destination. If the destination is client
2852 it will be Client ID, if it is server it will be Server ID and if it is
2853 channel it will be Channel ID.
2855 If the sender wants to compress the packet it MUST apply the
2856 compression now. Sender MUST also compute the padding as described
2857 in above sections. Then sender MUST encrypt the packet as has been
2858 described in above sections according whether the packet is normal
2859 packet or special packet. Then sender MUST compute the MAC of the
2860 packet. The computed MAC MUST NOT be encrypted.
2864 2.10 Packet Reception
2866 On packet reception the receiver MUST check that all fields in the
2867 SILC Packet Header are valid. It MUST check the flags of the
2868 header and act accordingly. It MUST also check the MAC of the packet
2869 and if it is to be failed the packet MUST be discarded. Also if the
2870 header of the packet includes any bad fields the packet MUST be
2873 See above sections on the decryption process of the received packet.
2875 The receiver MUST also check that the ID's in the header are valid
2876 ID's. Unsupported ID types or malformed ID's MUST cause packet
2877 rejection. The padding on the reception is always ignored.
2879 The receiver MUST also check the packet type and start parsing the
2880 packet according to the type. However, note the above sections on
2881 special packet types and their parsing.
2887 Routers are the primary entities in the SILC network that takes care
2888 of packet routing. Normal servers performs packet forwarding, for
2889 example, when they are forwarding channel message to the local clients.
2890 Routing is quite simple as every packet tells the true origin and the
2891 true destination of the packet.
2893 It is still RECOMMENDED for routers that has several routing connections
2894 to create route cache for those destinations that has faster route than
2895 the router's primary route. This information is available for the router
2896 when other router connects to the router. The connecting party then
2897 sends all of its locally connected clients, servers and channels. These
2898 informations helps to create the route cache. Also, when new channels
2899 are created to a cell its information is broadcasted to all routers
2900 in the network. Channel ID's are based on router's ID thus it is easy
2901 to create route cache based on these informations. If faster route for
2902 destination does not exist in router's route cache the packet MUST be
2903 routed to the primary route (default route).
2905 However, there are some issues when routing channel messages to group
2906 of users. Routers are responsible of routing the channel message to
2907 other routers, local servers and local clients as well. Routers MUST
2908 send the channel message to only one router in the network, preferably
2909 to the shortest route to reach the channel users. The message can be
2910 routed into either upstream or downstream. After the message is sent
2911 to a router in the network it MUST NOT be sent to any other router in
2912 either same route or other route. The message MUST NOT be routed to
2913 the router it came from.
2915 When routing for example private messages they should be routed to the
2916 shortest route always to reach the destination client as fast as possible.
2918 For server which receives a packet to be forwarded to an entity that is
2919 indirectly connected to the sender, the server MUST check whether that
2920 particular packet type is allowed to be sent to that destination. Not
2921 all packets may be sent by some odd entity to for example a local client,
2922 or to some remote server or router, that is indirectly connected to the
2923 sender. See section 2.3 SILC Packet Types and paragraph about indirectly
2924 connected entities and sending packets to them. That section defines the
2925 packets that may be sent to indirectly connected entities. When a server
2926 or a router receives a packet that may be sent to indirectly connected
2927 entity and it is destined to other entity except that server, it MUST
2928 route it further either to shortest route or to the primary route to reach
2931 Routers form a ring in the SILC network. However, routers may have other
2932 direct connections to other routers in the network too. This can cause
2933 interesting routing problems in the network. Since the network is a ring,
2934 the packets usually should be routed into clock-wise direction, or if it
2935 cannot be used then always counter clock-wise (primary route) direction.
2936 Problems may arise when a faster direct route exists and router is routing
2937 a channel message. Currently channel messages must be routed either
2938 in upstream or downstream, they cannot be routed to other direct routes.
2939 The SILC protocol should have a shortest path discovery protocol, and some
2940 existing routing protocol, that can handle a ring network with other
2941 direct routes inside the ring (so called hybrid ring-mesh topology),
2942 MAY be defined to be used with the SILC protocol. Additional
2943 specifications MAY be written on the subject to permeate this
2948 2.12 Packet Broadcasting
2950 SILC packets MAY be broadcasted in SILC network. However, only router
2951 server may send or receive broadcast packets. Client and normal server
2952 MUST NOT send broadcast packets and they MUST ignore broadcast packets
2953 if they receive them. Broadcast packets are sent by setting Broadcast
2954 flag to the SILC packet header.
2956 Broadcasting packets means that the packet is sent to all routers in
2957 the SILC network, except to the router that sent the packet. The router
2958 receiving broadcast packet MUST send the packet to its primary route.
2959 The fact that SILC routers may have several router connections can
2960 cause problems, such as race conditions inside the SILC network, if
2961 care is not taken when broadcasting packets. Router MUST NOT send
2962 the broadcast packet to any other route except to its primary route.
2964 If the primary route of the router is the original sender of the packet
2965 the packet MUST NOT be sent to the primary route. This may happen
2966 if router has several router connections and some other router uses
2967 the router as its primary route.
2969 Routers use broadcast packets to broadcast for example information
2970 about newly registered clients, servers, channels etc. so that all the
2971 routers may keep these informations up to date.
2975 3 Security Considerations
2977 Security is central to the design of this protocol, and these security
2978 considerations permeate the specification. Common security considerations
2979 such as keeping private keys truly private and using adequate lengths for
2980 symmetric and asymmetric keys must be followed in order to maintain the
2981 security of this protocol.
2987 [SILC1] Riikonen, P., "Secure Internet Live Conferencing (SILC),
2988 Protocol Specification", Internet Draft, January 2007.
2990 [SILC3] Riikonen, P., "SILC Key Exchange and Authentication
2991 Protocols", Internet Draft, January 2007.
2993 [SILC4] Riikonen, P., "SILC Commands", Internet Draft, January 2007.
2995 [IRC] Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
2998 [IRC-ARCH] Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
3001 [IRC-CHAN] Kalt, C., "Internet Relay Chat: Channel Management", RFC
3004 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
3007 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
3010 [SSH-TRANS] Ylonen, T., et al, "SSH Transport Layer Protocol",
3013 [PGP] Callas, J., et al, "OpenPGP Message Format", RFC 2440,
3016 [SPKI] Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
3019 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key
3020 Infrastructure, Certificate and CRL Profile", RFC 2459,
3023 [Schneier] Schneier, B., "Applied Cryptography Second Edition",
3024 John Wiley & Sons, New York, NY, 1996.
3026 [Menezes] Menezes, A., et al, "Handbook of Applied Cryptography",
3029 [OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol",
3030 RFC 2412, November 1998.
3032 [ISAKMP] Maughan D., et al, "Internet Security Association and
3033 Key Management Protocol (ISAKMP)", RFC 2408, November
3036 [IKE] Harkins D., and Carrel D., "The Internet Key Exchange
3037 (IKE)", RFC 2409, November 1998.
3039 [HMAC] Krawczyk, H., "HMAC: Keyed-Hashing for Message
3040 Authentication", RFC 2104, February 1997.
3042 [PKCS1] Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
3043 Specifications, Version 2.0", RFC 2437, October 1998.
3045 [RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate
3046 Requirement Levels", BCP 14, RFC 2119, March 1997.
3048 [SFTP] Ylonen T., and Lehtinen S., "Secure Shell File Transfer
3049 Protocol", Internet Draft, March 2001.
3051 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
3052 10646", RFC 3629, November 2003.
3063 EMail: priikone@iki.fi
3067 6 Full Copyright Statement
3069 Copyright (C) The Internet Society (2007).
3071 This document is subject to the rights, licenses and restrictions
3072 contained in BCP 78, and except as set forth therein, the authors
3073 retain all their rights.
3075 This document and the information contained herein are provided on an
3076 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
3077 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
3078 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
3079 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
3080 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
3081 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.