7 Network Working Group P. Riikonen
9 draft-riikonen-silc-pp-09.txt 15 January 2007
14 <draft-riikonen-silc-pp-09.txt>
18 By submitting this Internet-Draft, each author represents that any
19 applicable patent or other IPR claims of which he or she is aware
20 have been or will be disclosed, and any of which he or she becomes
21 aware will be disclosed, in accordance with Section 6 of BCP 79.
23 Internet-Drafts are working documents of the Internet Engineering
24 Task Force (IETF), its areas, and its working groups. Note that
25 other groups may also distribute working documents as Internet-
26 Drafts. Internet-Drafts are draft documents valid for a maximum of
27 six months and may be updated, replaced, or obsoleted by other
28 documents at any time. It is inappropriate to use Internet-Drafts as
29 reference material or to cite them other than as "work in progress".
31 The list of current Internet-Drafts can be accessed at
32 http://www.ietf.org/1id-abstracts.html
33 The list of Internet-Draft Shadow Directories can be accessed at
34 http://www.ietf.org/shadow.html.
40 This memo describes a Packet Protocol used in the Secure Internet Live
41 Conferencing (SILC) protocol, specified in the Secure Internet Live
42 Conferencing, Protocol Specification [SILC1]. This protocol describes
43 the packet types and packet payloads which defines the contents of the
44 packets. The protocol provides secure binary packet protocol that
45 assures that the contents of the packets are secured and authenticated.
60 Internet Draft 15 January 2007
65 1 Introduction .................................................. 3
66 1.1 Requirements Terminology .................................. 4
67 2 SILC Packet Protocol .......................................... 4
68 2.1 SILC Packet ............................................... 4
69 2.2 SILC Packet Header ........................................ 5
70 2.3 SILC Packet Types ......................................... 8
71 2.3.1 SILC Packet Payloads ................................ 15
72 2.3.2 Generic payloads .................................... 16
73 2.3.2.1 ID Payload .................................. 16
74 2.3.2.2 Argument Payload ............................ 17
75 2.3.2.3 Argument List Payload ....................... 17
76 2.3.2.4 Channel Payload ............................. 18
77 2.3.2.5 Public Key Payload .......................... 19
78 2.3.2.6 Message Payload ............................. 20
79 2.3.3 Disconnect Payload .................................. 23
80 2.3.4 Success Payload ..................................... 24
81 2.3.5 Failure Payload ..................................... 25
82 2.3.6 Reject Payload ...................................... 25
83 2.3.7 Notify Payload ...................................... 26
84 2.3.8 Error Payload ....................................... 35
85 2.3.9 Channel Message Payload ............................. 35
86 2.3.10 Channel Key Payload ................................ 36
87 2.3.11 Private Message Payload ............................ 38
88 2.3.12 Private Message Key Payload ........................ 38
89 2.3.13 Command Payload .................................... 40
90 2.3.14 Command Reply Payload .............................. 41
91 2.3.15 Connection Auth Request Payload .................... 41
92 2.3.16 New ID Payload ..................................... 42
93 2.3.17 New Client Payload ................................. 43
94 2.3.18 New Server Payload ................................. 44
95 2.3.19 New Channel Payload ................................ 45
96 2.3.20 Key Agreement Payload .............................. 45
97 2.3.21 Resume Router Payload .............................. 47
98 2.3.22 File Transfer Payload .............................. 47
99 2.3.23 Resume Client Payload .............................. 48
100 2.3.24 Acknowledgement Payload ............................ 50
101 2.4 SILC ID Types ............................................. 50
102 2.5 Packet Encryption And Decryption .......................... 51
103 2.5.1 Normal Packet Encryption And Decryption ............. 51
104 2.5.2 Channel Message Encryption And Decryption ........... 52
105 2.5.3 Private Message Encryption And Decryption ........... 53
106 2.6 Packet MAC Generation ..................................... 53
107 2.7 Packet Padding Generation ................................. 54
108 2.8 Packet Compression ........................................ 54
109 2.9 Packet Sending ............................................ 55
110 2.10 Packet Reception ......................................... 55
116 Internet Draft 15 January 2007
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
128 Figure 1: Typical SILC Packet
129 Figure 2: SILC Packet Header
131 Figure 4: Argument Payload
132 Figure 5: Argument List Payload
133 Figure 6: Channel Payload
134 Figure 7: Public Key Payload
135 Figure 8: Message Payload
136 Figure 9: Disconnect Payload
137 Figure 10: Success Payload
138 Figure 11: Failure Payload
139 Figure 12: Reject Payload
140 Figure 13: Notify Payload
141 Figure 14: Error Payload
142 Figure 15: Channel Key Payload
143 Figure 16: Private Message Key Payload
144 Figure 17: Command Payload
145 Figure 18: Connection Auth Request Payload
146 Figure 19: New Client Payload
147 Figure 20: New Server Payload
148 Figure 21: Key Agreement Payload
149 Figure 22: Resume Router Payload
150 Figure 23: File Transfer Payload
151 Figure 24: Resume Client Payload
156 This document describes a Packet Protocol used in the Secure Internet
157 Live Conferencing (SILC) protocol specified in the Secure Internet Live
158 Conferencing, Protocol Specification [SILC1]. This protocol describes
159 the packet types and packet payloads which defines the contents of the
160 packets. The protocol provides secure binary packet protocol that
161 assures that the contents of the packets are secured and authenticated.
162 The packet protocol is designed to be compact to avoid unnecessary
163 overhead as much as possible. This makes the SILC suitable also in
164 environment of low bandwidth requirements such as mobile networks. All
165 packet payloads can also be compressed to further reduce the size of
172 Internet Draft 15 January 2007
175 All packets in SILC network are always encrypted and their integrity
176 is assured by computed MACs. The protocol defines several packet types
177 and packet payloads. Each packet type usually has a specific packet
178 payload that actually defines the contents of the packet. Each packet
179 also includes a default SILC Packet Header that provides sufficient
180 information about the origin and the destination of the packet.
183 1.1 Requirements Terminology
185 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED,
186 MAY, and OPTIONAL, when they appear in this document, are to be
187 interpreted as described in [RFC2119].
190 2 SILC Packet Protocol
194 SILC packets deliver messages from sender to receiver securely by
195 encrypting important fields of the packet. The packet consists of
196 default SILC Packet Header, Padding, Packet Payload data, and, packet
199 The following diagram illustrates typical SILC packet.
201 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
202 | n bytes | 1 - n bytes | n bytes | n bytes
203 | SILC Header | Padding | Data Payload | MAC
204 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
206 Figure 1: Typical SILC Packet
209 SILC Header is always the first part of the packet and its purpose
210 is to provide information about the packet. It provides for example
211 the packet type, origin of the packet and the destination of the packet.
212 The header is variable in length. See the following section for
213 description of SILC Packet header. Packets without SILC header or
214 with malformed SILC header MUST be dropped.
216 Padding follows the packet header. The purpose of the padding is to
217 make the packet multiple by eight (8) or by the block size of the
218 cipher used in the encryption, which ever is larger. The maximum
219 length of padding is currently 128 bytes. The padding is always
220 encrypted. The padding is applied always, even if the packet is
221 not encrypted. See the section 2.7 Padding Generation for more
222 detailed information.
228 Internet Draft 15 January 2007
231 Data payload area follows padding and it is the actual data of the
232 packet. The packet data is the packet payloads defined in this
233 protocol. The data payload area is always encrypted.
235 The last part of SILC packet is the packet MAC that assures the
236 integrity of the packet. See the section 2.6 Packet MAC Generation
237 for more information. If compression is used the compression is
238 always applied before encryption.
240 All fields in all packet payloads are always in MSB (most significant
244 2.2 SILC Packet Header
246 The SILC packet header is applied to all SILC packets and it is
247 variable in length. The purpose of SILC Packet header is to provide
248 detailed information about the packet. The receiver of the packet
249 uses the packet header to parse the packet and gain other relevant
250 parameters of the packet.
252 The following diagram represents the SILC packet header.
255 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
256 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
257 | Payload Length | Flags | Packet Type |
258 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
259 | Pad Length | RESERVED | Source ID Len | Dest ID Len |
260 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
266 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
272 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
274 Figure 2: SILC Packet Header
276 o Payload Length (2 bytes) - Indicates the length of the
277 packet not including the padding of the packet.
284 Internet Draft 15 January 2007
287 o Flags (1 byte) - Indicates flags to be used in packet
288 processing. Several flags may be set by ORing the flags
291 The following flags are reserved for this field:
296 In this case the field is ignored.
299 Private Message Key 0x01
301 Indicates that the packet data MUST include private
302 message that is encrypted using private key set by
303 client. Servers does not know this key and cannot
304 decrypt the payload, but simply passes it along. See
305 section 2.5.3 Private Message Encryption And Decryption
306 for more information.
311 Indicates that the packet consists of list of
312 packet payloads indicated by the Packet Type field.
313 The payloads are added one after the other. Note that
314 there are packet types that must not be used as
315 list. Parsing of list packet is done by calculating
316 the length of each payload and parsing them one by
322 Marks the packet to be broadcasted. Client and normal
323 server cannot send broadcast packets. Only router server
324 may send broadcast packet. The router receiving of packet
325 with this flag set MUST send (broadcast) the packet to
326 its primary route. If router has several router connections
327 the packet may be sent only to the primary route. See
328 section 2.12 Packet Broadcasting for description of
334 Marks that the payload of the packet is compressed.
340 Internet Draft 15 January 2007
343 The sender of the packet marks this flag when it
344 compresses the payload, and any server or router
345 en route to the recipient MUST NOT unset this flag.
346 See section 2.8 Packet Compression for description of
352 Marks that the packet needs to be acknowledged by the
353 recipient. The ACK packet MUST NOT have this flag set.
354 The acknowledgement packet is SILC_PACKET_ACK packet.
355 If the packet is not acknowledged the packet may be
356 retransmitted. This flag is especially useful when
357 using UDP/IP and SHOULD NOT be used with TCP/IP. The
358 flag MUST NOT be used with message packets. The
359 SILC_MESSAGE_FLAG_ACK can be used instead. Broadcast
360 packets MUST NOT set this flag. Retransmission
361 may use for example exponential backoff algorithm.
364 o Packet Type (1 byte) - Indicates the type of the packet.
365 Receiver uses this field to parse the packet. See section
366 2.3 SILC Packets for list of defined packet types.
368 o Pad Length (1 byte) - Indicates the length of the padding
369 applied after the SILC Packet header. Maximum length for
370 padding is 128 bytes.
372 o RESERVED (1 byte) - Reserved field and must include a
375 o Source ID Length (1 byte) - Indicates the length of the
376 Source ID field in the header, not including this or any
379 o Destination ID Length (1 byte) - Indicates the length of the
380 Destination ID field in the header, not including this or
383 o Src ID Type (1 byte) - Indicates the type of ID in the
384 Source ID field. See section 2.4 SILC ID Types for
387 o Source ID (variable length) - The actual source ID that
388 indicates which is the original sender of the packet.
390 o Dst ID Type (1 byte) - Indicates the type of ID in the
396 Internet Draft 15 January 2007
399 Destination ID field. See section 2.4 SILC ID Types for
402 o Destination ID (variable length) - The actual destination
403 ID that indicates which is the end receiver of the packet.
407 2.3 SILC Packet Types
409 SILC packet types defines the contents of the packet and it is used by
410 the receiver to parse the packet. The packet type is 8 bits in length.
411 The range for the packet types are from 0 - 255, where 0 is never sent and
412 255 is currently reserved for future extensions and MUST NOT be defined to
413 any other purpose. Every SILC specification compliant implementation
414 SHOULD support all the following packet types.
416 The below list of the SILC Packet types includes reference to the packet
417 payload as well. Packet payloads are the actual packet data area. Each
418 packet type defines packet payload which usually may only be sent with
419 the specific packet type.
421 Most of the packets are packets that must be destined directly to entity
422 that is connected to the sender. It is not allowed, for example, for a
423 router to send SILC_PACKET_DISCONNECT packet to client that is not
424 directly connected to the router. However, there are some special packet
425 types that may be destined to some entity that the sender does not have
426 direct connection with. These packets are for example private message
427 packets, channel message packets, command packets and some other packets
428 that may be broadcasted in the SILC network. The following packet
429 desription list will define it separately if a packet is allowed to be
430 sent to indirectly connected entity. Other packets MUST NOT be sent or
431 accepted, if sent, to indirectly connected entities.
433 Some packets MAY be sent as lists by adding the List flag to the Packet
434 Header and constructing multiple packet payloads one after the other.
435 When this is allowed it is separately defined in the following list.
436 Other packets MUST NOT be sent as list and the List flag MUST NOT be set.
439 List of SILC Packet types are defined as follows.
443 This type is reserved and it is never sent.
446 1 SILC_PACKET_DISCONNECT
452 Internet Draft 15 January 2007
455 This packet is sent to disconnect the remote end. Reason of
456 the disconnection is sent inside the packet payload.
458 Payload of the packet: See section 2.3.3 Disconnect Payload
461 2 SILC_PACKET_SUCCESS
463 This packet is sent upon successful execution of a protocol.
464 The status of the success is sent in the packet payload.
466 Payload of the packet: See section 2.3.4 Success Payload
469 3 SILC_PACKET_FAILURE
471 This packet is sent upon failure of a protocol. The status
472 of the failure is sent in the packet payload.
474 Payload of the packet: See section 2.3.5 Failure Payload
479 This packet MAY be sent upon rejection of a protocol. The
480 status of the rejection is sent in the packet payload.
482 Payload of the packet: See section 2.3.6 Reject Payload
487 This packet is used to send notify message. The packet is
488 usually sent between server and client, but also between
489 server and router. Client MUST NOT send this packet. Server
490 MAY destine this packet to channel as well when the packet is
491 distributed to all clients on the channel. This packet MAY
494 Payload of the packet: See section 2.3.7 Notify Payload.
499 This packet is sent when an error occurs. Server MAY
500 send this packet. Client MUST NOT send this packet. The
501 client MAY entirely ignore the packet, however, server is
502 most likely to take action anyway. This packet MAY be sent
508 Internet Draft 15 January 2007
511 to entity that is indirectly connected to the sender.
513 Payload of the packet: See section 2.3.8 Error Payload.
516 7 SILC_PACKET_CHANNEL_MESSAGE
518 This packet is used to send messages to channels. The packet
519 includes Channel ID of the channel and the actual message to
520 the channel. Messages sent to the channel are always protected
521 by channel specific keys. This packet MAY be sent to entity
522 that is indirectly connected to the sender.
524 Payload of the packet: See section 2.3.9 Channel Message
528 8 SILC_PACKET_CHANNEL_KEY
530 This packet is used to distribute new key for particular
531 channel when server generates it. Each channel has their own
532 independent keys that is used to protect the traffic on the
533 channel. It is also possible to use channel private keys that
534 are not server generated. In this case this packet is not used.
535 Client MUST NOT send this packet. This packet MAY be sent to
536 entity that is indirectly connected to the sender.
538 Payload of the packet: See section 2.3.10 Channel Key Payload
541 9 SILC_PACKET_PRIVATE_MESSAGE
543 This packet is used to send private messages from client
544 to another client. By default, private messages are protected
545 by session keys established by normal key exchange protocol.
546 However, it is possible to use specific key to protect private
547 messages. See [SILC1] for private message key generation.
548 This packet MAY be sent to entity that is indirectly connected
551 Payload of the packet: See section 2.3.11 Private Message
555 10 SILC_PACKET_PRIVATE_MESSAGE_KEY
557 This packet is OPTIONAL and sender of the packet can indicate
558 that a private message key should be used in private message
564 Internet Draft 15 January 2007
567 communication. The actual key material is not sent in this
568 packet but must be either static or pre-shared key. The
569 receiver of the packet is considered to be the responder
570 when processing the static or pre-shared key material as
571 defined in [SILC1] and [SILC3] for private message keys.
572 This packet MAY be sent to entity that is indirectly connected
575 Payload of the packet: See section 2.3.12 Private Message
579 11 SILC_PACKET_COMMAND
581 This packet is used to send commands from client to server.
582 Server MAY send this packet to other servers as well. All
583 commands are listed in their own section SILC Command Types
584 in [SILC4]. The contents of this packet is command specific.
585 This packet MAY be sent to entity that is indirectly connected
588 Payload of the packet: See section 2.3.13 Command Payload
591 12 SILC_PACKET_COMMAND_REPLY
593 This packet is sent as reply to the SILC_PACKET_COMMAND packet.
594 The contents of this packet is command specific. This packet
595 MAY be sent to entity that is indirectly connected to the
596 sender. This packet MAY be sent as list.
598 Payload of the packet: See section 2.3.14 Command Reply
599 Payload and section 2.3.13 Command
603 13 SILC_PACKET_KEY_EXCHANGE
605 This packet is used to start SILC Key Exchange Protocol,
606 described in detail in [SILC3].
608 Payload of the packet: Payload of this packet is described
609 in the section SILC Key Exchange
610 Protocol and its sub sections in
614 14 SILC_PACKET_KEY_EXCHANGE_1
620 Internet Draft 15 January 2007
623 This packet is used as part of the SILC Key Exchange Protocol.
625 Payload of the packet: Payload of this packet is described
626 in the section SILC Key Exchange
627 Protocol and its sub sections in
631 15 SILC_PACKET_KEY_EXCHANGE_2
633 This packet is used as part of the SILC Key Exchange Protocol.
635 Payload of the packet: Payload of this packet is described
636 in the section SILC Key Exchange
637 Protocol and its sub sections in
641 16 SILC_PACKET_CONNECTION_AUTH_REQUEST
643 This packet is used to request an authentication method to
644 be used in the SILC Connection Authentication Protocol. If
645 initiator of the protocol does not know the mandatory
646 authentication method this packet MAY be used to determine it.
647 The party receiving this payload SHOULD respond with the same
648 packet including the mandatory authentication method.
650 Payload of the packet: See section 2.3.15 Connection Auth
654 17 SILC_PACKET_CONNECTION_AUTH
656 This packet is used to start and perform the SILC Connection
657 Authentication Protocol. This protocol is used to authenticate
658 the connecting party. The protocol is described in detail in
661 Payload of the packet: Payload of this packet is described
662 in the section SILC Authentication
663 Protocol and it sub sections in [SILC].
666 18 SILC_PACKET_NEW_ID
668 This packet is used to distribute new IDs from server to
669 router and from router to all other routers in SILC network.
670 This is used when for example new client is registered to
676 Internet Draft 15 January 2007
679 SILC network. The newly created IDs of these operations are
680 distributed by this packet. Only server may send this packet,
681 however, client MUST be able to receive this packet. This
682 packet MAY be sent to entity that is indirectly connected
683 to the sender. This packet MAY be sent as list.
685 Payload of the packet: See section 2.3.16 New ID Payload
688 19 SILC_PACKET_NEW_CLIENT
690 This packet is used by client to register itself to the
691 SILC network. This is sent after key exchange and
692 authentication protocols has been completed. Client sends
693 various information about itself in this packet to the server.
695 Payload of the packet: See section 2.3.17 New Client Payload
698 20 SILC_PACKET_NEW_SERVER
700 This packet is used by server to register itself to the
701 SILC network. This is sent after key exchange and
702 authentication protocols has been completed. Server sends
703 this to the router it connected to, or, if router was
704 connecting, to the connected router. Server sends its
705 Server ID and other information in this packet. The client
706 MUST NOT send or receive this packet.
708 Payload of the packet: See section 2.3.18 New Server Payload
711 21 SILC_PACKET_NEW_CHANNEL
713 This packet is used to notify routers about newly created
714 channel. Channels are always created by the router and it MUST
715 notify other routers about the created channel. Router sends
716 this packet to its primary route. Client MUST NOT send this
717 packet. This packet MAY be sent to entity that is indirectly
718 connected to the sender. This packet MAY be sent as list.
720 Payload of the packet: See section 2.3.19 New Channel Payload
725 This packet is used to indicate that re-key must be performed
726 for session keys. See section Session Key Regeneration in
732 Internet Draft 15 January 2007
735 [SILC1] for more information. This packet does not have
739 23 SILC_PACKET_REKEY_DONE
741 This packet is used to indicate that re-key is performed and
742 new keys must be used hereafter. This packet does not have a
746 24 SILC_PACKET_HEARTBEAT
748 This packet is used by clients, servers and routers to keep the
749 connection alive. It is RECOMMENDED that all servers implement
750 keepalive actions and perform it to both direction in a link.
751 This packet does not have a payload.
754 25 SILC_PACKET_KEY_AGREEMENT
756 This packet is used by clients to request key negotiation
757 between another client in the SILC network. If the negotiation
758 is started it is performed using the SKE protocol. The result of
759 the negotiation, the secret key material, can be used for
760 example as private message key. The server and router MUST NOT
763 Payload of the packet: See section 2.3.20 Key Agreement Payload
766 26 SILC_PACKET_RESUME_ROUTER
768 This packet is used during backup router protocol when the
769 original primary router of the cell comes back online and wishes
770 to resume the position as being the primary router of the cell.
772 Payload of the packet: See section 2.3.21 Resume Router Payload
777 This packet is used to perform an file transfer protocol in the
778 SILC session with some entity in the network. The packet is
779 multi purpose. The packet is used to tell other entity in the
780 network that the sender wishes to perform an file transfer
781 protocol. The packet is also used to actually tunnel the
782 file transfer protocol stream. The file transfer protocol
788 Internet Draft 15 January 2007
791 stream is always protected with the SILC binary packet protocol.
793 Payload of the packet: See section 2.3.22 File Transfer Payload
796 28 SILC_PACKET_RESUME_CLIENT
798 This packet is used to resume a client back to the network
799 after it has been detached. A client is able to detach from
800 the network but the client is still valid client in the network.
801 The client may then later resume its session back by sending
802 this packet to a server. Routers also use this packet to notify
803 other routers in the network that the detached client has resumed.
805 Payload of the packet: See section 2.3.23 Resume Client Payload
810 This packet is used to acknowledge a packet that had the
811 Acknowledgement packet flag set.
813 Payload of the packet: See section 2.3.24 Acknowledgement
819 Currently undefined commands.
824 These packet types are reserved for private use and they will
825 not be defined by this document.
830 This type is reserved for future extensions and currently it
834 2.3.1 SILC Packet Payloads
836 All payloads resides in the main data area of the SILC packet. However
837 all payloads MUST be at the start of the data area after the SILC
838 packet header and padding. All fields in the packet payload are always
844 Internet Draft 15 January 2007
847 encrypted, as they reside in the data area of the packet which is
848 always encrypted. Most of the payloads may only be sent with specific
849 packet type which is defined in the description of the payload.
851 There are some other payloads in SILC as well. However, they are not
852 common in the sense that they could be sent at any time. These payloads
853 are not described in this section. These are payloads such as SILC
854 Key Exchange payloads and so on. These are described in [SILC1],
858 2.3.2 Generic payloads
860 This section describes generic payloads that are not associated to any
861 specific packet type. They can be used for example inside some other
867 This payload can be used to send an ID. ID's are variable in length
868 thus this payload provides a way to send variable length ID.
870 The following diagram represents the ID Payload.
873 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
874 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
875 | ID Type | ID Length |
876 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
880 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
885 o ID Type (2 bytes) - Indicates the type of the ID. See
886 section 2.4 SILC ID Types for list of defined ID types.
888 o ID Length (2 bytes) - Length of the ID Data area not
889 including the length of any other fields in the payload.
891 o ID Data (variable length) - The actual ID data. The encoding
892 of the ID data is defined in section 2.4 SILC ID Types.
900 Internet Draft 15 January 2007
903 2.3.2.2 Argument Payload
905 Argument Payload is used to set arguments for any packet payload that
906 need and support arguments, such as commands. Number of arguments
907 associated with a packet MUST be indicated by the packet payload which
908 need the arguments. Argument Payloads MUST always reside right after
909 the packet payload needing the arguments. Incorrect amount of argument
910 payloads MUST cause rejection of the packet.
912 The following diagram represents the Argument Payload.
915 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
916 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
917 | Data Length | Argument Type | |
918 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
922 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
924 Figure 4: Argument Payload
927 o Data Length (2 bytes) - Length of the Argument Data field
928 not including the length of any other field in the payload.
930 o Argument Type (1 byte) - Indicates the type of the argument.
931 Every argument can have a specific type that are defined
932 by the packet payload needing the argument. For example
933 every command specify a number for each argument that may be
934 associated with the command. By using this number the receiver
935 of the packet knows what type of argument this is. If there is
936 no specific argument type this field is set to zero (0) value.
938 o Argument Data (variable length) - Argument data.
941 2.3.2.3 Argument List Payload
943 Argument List Payload is a list of Argument Payloads appended one
944 after the other. The number of arguments is indicated in the
947 The following diagram represents the Argument List Payload.
950 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
956 Internet Draft 15 January 2007
959 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
961 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
963 ~ Argument Payloads ~
965 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
967 Figure 5: Argument List Payload
970 o Argument Nums (2 bytes) - Indicates the number of Argument
971 Payloads. If zero (0) value is found in this field no
972 arguments are present.
974 o Argument Payloads (variable length) - The Argument Payloads
975 appended one after the other. The payloads can be decoded
976 since the length of the payload is indicated in each of
977 the Argument Payload.
983 2.3.2.4 Channel Payload
985 Generic Channel Payload may be used to send information about a channel,
986 its name, the Channel ID and a mode.
988 The following diagram represents the Channel Payload.
992 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
993 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
994 | Channel Name Length | |
995 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
999 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1000 | Channel ID Length | |
1001 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1005 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1012 Internet Draft 15 January 2007
1015 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1017 Figure 6: New Channel Payload
1020 o Channel Name Length (2 bytes) - Length of the Channel Name
1023 o Channel Name (variable length) - The name of the channel.
1025 o Channel ID Length (2 bytes) - Length of the Channel ID field.
1027 o Channel ID (variable length) - The encoded Channel ID.
1029 o Mode Mask (4 bytes) - A mode. This can be the mode of the
1030 channel but it can also be the mode of a client on the
1031 channel. The contents of this field is dependent of the
1032 usage of this payload. The usage is defined separately
1033 when this payload is used. This is a 32 bit MSB first value.
1040 2.3.2.5 Public Key Payload
1042 Generic Public Key Payload may be used to send different type of
1043 public keys and certificates.
1045 The following diagram represents the Public Key Payload.
1048 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
1049 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1050 | Public Key Length | Public Key Type |
1051 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1053 ~ Public Key (or certificate) ~
1055 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1057 Figure 7: Public Key Payload
1060 o Public Key Length (2 bytes) - The length of the Public Key
1061 (or certificate) field, not including any other field.
1068 Internet Draft 15 January 2007
1071 o Public Key Type (2 bytes) - The public key (or certificate)
1072 type. This field indicates the type of the public key in
1073 the packet. See the [SILC3] for defined public key types.
1075 o Public Key (or certificate) (variable length) - The
1076 encoded public key or certificate data.
1079 2.3.2.6 Message Payload
1081 Generic Message Payload can be used to send messages in SILC. It
1082 is used to send channel messages and private messages.
1084 The following diagram represents the Message Payload.
1086 (*) indicates that the field is not encrypted.
1097 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
1098 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1099 | Message Flags | Message Length |
1100 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1104 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1105 | Padding Length | |
1106 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
1110 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1112 ~ Initialization Vector * ~
1114 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1118 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1124 Internet Draft 15 January 2007
1127 Figure 8: Message Payload
1130 o Message Flags (2 bytes) - Includes the Message Flags of the
1131 message. The flags can indicate a reason or a purpose for
1132 the message. The following Message Flags are defined:
1134 0x0000 SILC_MESSAGE_FLAG_NONE
1136 No specific flags set.
1138 0x0001 SILC_MESSAGE_FLAG_AUTOREPLY
1140 This message is an automatic reply to an earlier
1143 0x0002 SILC_MESSAGE_FLAG_NOREPLY
1145 There should not be reply messages to this
1148 0x0004 SILC_MESSAGE_FLAG_ACTION
1150 The sender is performing an action and the message
1151 is the indication of the action.
1153 0x0008 SILC_MESSAGE_FLAG_NOTICE
1155 The message is for example an informational notice
1158 0x0010 SILC_MESSAGE_FLAG_REQUEST
1160 This is a generic request flag to send request
1161 messages. A separate document should define any
1162 payloads associated to this flag.
1164 0x0020 SILC_MESSAGE_FLAG_SIGNED
1166 This flag indicates that the message is signed
1167 with sender's private key and thus can be verified
1168 by the receiver using the sender's public key. A
1169 separate document should define the detailed procedure
1170 of the signing process and any associated payloads
1173 0x0040 SILC_MESSAGE_FLAG_REPLY
1180 Internet Draft 15 January 2007
1183 This is a generic reply flag to send a reply to
1184 previously received request. A separate document
1185 should define any payloads associated to this flag.
1187 0x0080 SILC_MESSAGE_FLAG_DATA
1189 This is a generic data flag, indicating that the
1190 message includes some data which can be interpreted
1191 in a specific way. Using this flag any kind of data
1192 can be delivered inside message payload. A separate
1193 document should define how this flag is interpreted
1194 and define any associated payloads.
1196 0x0100 SILC_MESSAGE_FLAG_UTF8
1198 This flag indicates that the message is UTF-8 encoded
1199 textual message. When sending text messages in SILC
1200 this flag SHOULD be used. When this flag is used the
1201 text sent as message MUST be UTF-8 encoded.
1203 0x0200 SILC_MESSAGE_FLAG_ACK
1205 This flag indicates the sender requires the recpipient
1206 to acknowledge the received message. This same flag
1207 is used in the acknowledgement. A separate document
1208 should define how the acknowledgement is performed.
1210 0x0400 - 0x1000 RESERVED
1212 Reserved for future flags.
1214 0x2000 - 0x8000 PRIVATE RANGE
1216 Private range for free use.
1218 o Message Length (2 bytes) - Indicates the length of the
1219 Message Data field in the payload, not including any
1222 o Message Data (variable length) - The actual message data.
1224 o Padding Length (2 bytes) - Indicates the length of the
1225 Padding field in the payload, not including any other
1228 o Padding (variable length) - If this payload is used as
1229 channel messages, the padding MUST be applied because
1230 this payload is encrypted separately from other parts
1236 Internet Draft 15 January 2007
1239 of the packet. If this payload is used as private
1240 messages, the padding is present only when the payload
1241 is encrypted with private message key. If encrypted
1242 with session keys this field MUST NOT be present and the
1243 Padding Length field includes a zero (0) value. The
1244 padding SHOULD be random data.
1246 o Initialization Vector (variable length) - This field MUST
1247 be present when this payload is used as channel messages.
1248 The IV SHOULD be random data for each channel message.
1250 When encrypting private messages with session keys this
1251 field MUST NOT be present. For private messages this field
1252 is present only when encrypting with a static private
1253 message key (pre-shared key). If randomly generated key
1254 material is used this field MUST NOT be present. Also,
1255 If Key Agreement (SKE) was used to negotiate fresh key
1256 material for private message key this field MUST NOT be
1257 present. See the section 4.6 in [SILC1] for more
1258 information about IVs when encrypting private messages.
1260 This field includes the initialization vector used in message
1261 encryption. It need to be used in the packet decryption
1262 as well. Contents of this field depends on the encryption
1263 algorithm and encryption mode. This field is not encrypted,
1264 is not included in padding calculation and its length
1265 equals to cipher's block size. This field is authenticated
1268 o MAC (variable length) - The MAC computed from the
1269 Message Flags, Message Length, Message Data, Padding Length,
1270 Padding and Initialization Vector fields in that order.
1271 The MAC is computed after the payload is encrypted. This
1272 is so called Encrypt-Then-MAC order; first encrypt, then
1273 compute MAC from ciphertext. The MAC protects the integrity
1274 of the Message Payload. Also, when used as channel messages
1275 it is possible to have multiple private channel keys set,
1276 and receiver can use the MAC to verify which of the keys
1277 must be used in decryption. This field is not present
1278 when encrypting private messages with session key. This
1279 field is not encrypted. This field is authenticated by
1280 the SILC packet MAC.
1283 2.3.3 Disconnect Payload
1285 Disconnect payload is sent upon disconnection. Reason of the
1286 disconnection is sent to the disconnected party in the payload.
1292 Internet Draft 15 January 2007
1295 The payload may only be sent with SILC_PACKET_DISCONNECT packet. It
1296 MUST NOT be sent in any other packet type. The following diagram
1297 represents the Disconnect Payload.
1301 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
1302 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1306 ~ Disconnect Message ~
1308 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1310 Figure 9: Disconnect Payload
1312 o Status (1 byte) - Indicates the Status Type, defined in [SILC3]
1313 for the reason of disconnection.
1315 o Disconnect Message (variable length) - Human readable UTF-8
1316 encoded string indicating reason of the disconnection. This
1317 field MAY be omitted.
1320 2.3.4 Success Payload
1322 Success payload is sent when some protocol execution is successfully
1323 completed. The payload is simple; indication of the success is sent.
1324 This may be any data, including binary or human readable data, and
1325 it is protocol dependent.
1328 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
1329 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1331 ~ Success Indication ~
1333 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1335 Figure 10: Success Payload
1338 o Success Indication (variable length) - Indication of
1339 the success. This may be for example some flag that
1340 indicates the protocol and the success status or human
1341 readable success message. The true length of this
1342 payload is available by calculating it from the SILC
1348 Internet Draft 15 January 2007
1354 2.3.5 Failure Payload
1356 This is opposite of Success Payload. Indication of failure of
1357 some protocol is sent in the payload.
1360 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
1361 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1363 ~ Failure Indication ~
1365 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1367 Figure 11: Failure Payload
1370 o Failure Indication (variable length) - Indication of
1371 the failure. This may be for example some flag that
1372 indicates the protocol and the failure status or human
1373 readable failure message. The true length of this
1374 payload is available by calculating it from the SILC
1378 2.3.6 Reject Payload
1380 This payload is sent when some protocol is rejected to be executed.
1381 Other operations MAY send this as well that was rejected. The
1382 indication of the rejection is sent in the payload. The indication
1383 may be binary or human readable data and is protocol dependent.
1387 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
1388 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1390 ~ Reject Indication ~
1392 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1394 Figure 12: Reject Payload
1397 o Reject Indication (variable length) - Indication of
1398 the rejection. This maybe for example some flag that
1404 Internet Draft 15 January 2007
1407 indicates the protocol and the rejection status or human
1408 readable rejection message. The true length of this
1409 payload is available by calculating it from the SILC
1414 2.3.7 Notify Payload
1416 Notify payload is used to send notify messages. The payload is usually
1417 sent from server to client and from server to router. It is also used
1418 by routers to notify other routers in the network. This payload MAY also
1419 be sent to a channel. Client MUST NOT send this payload. When this
1420 packet is received by client it SHOULD process it. Servers and routers
1421 MUST process notify packets.
1423 The payload may only be sent with SILC_PACKET_NOTIFY packet. It MUST
1424 NOT be sent in any other packet type. The following diagram represents
1430 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
1431 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1432 | Notify Type | Payload Length |
1433 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1437 Figure 13: Notify Payload
1440 o Notify Type (2 bytes) - Indicates the type of the notify
1443 o Payload Length (2 bytes) - Length of the entire Notify Payload
1444 including any associated Argument Payloads.
1446 o Argument Nums (1 byte) - Indicates the number of Argument
1447 Payloads associated to this payload. Notify types may define
1448 arguments to be sent along the notify message.
1450 Following the list of currently defined notify types. The format for
1451 notify arguments is same as in SILC commands described in [SILC4].
1452 Note that all IDs sent in arguments are sent inside ID Payload. Also
1453 note that all strings sent as arguments MUST be UTF-8 [RFC3629] encoded,
1454 unless otherwise defined. Also note that all public keys or
1460 Internet Draft 15 January 2007
1463 certificates sent inside arguments are actually Public Key Payloads.
1466 0 SILC_NOTIFY_TYPE_NONE
1468 If no specific notify type apply for the notify message this type
1472 Arguments: (1) <message>
1474 The <message> is implementation specific free text string.
1475 Receiver MAY ignore this message.
1478 1 SILC_NOTIFY_TYPE_INVITE
1480 Sent when an client is invited to a channel. This is also sent
1481 when the invite list of the channel is changed. This notify type
1482 is sent to local servers on the channel, but MUST NOT be sent
1483 to clients on the channel. Router MUST broadcast this to its
1484 primary router and to local servers on the channel. When a client
1485 was directly invited to the channel this is also sent to that
1486 client. In this case the packet is destined to the client.
1489 Arguments: (1) <Channel ID> (2) <channel name>
1490 (3) [<sender Client ID>] (4) [<add | del>]
1493 The <Channel ID> is the channel. The <channel name> is the name
1494 of the channel and is provided because the client which receives
1495 this notify packet may not have a way to resolve the name of the
1496 channel from the <Channel ID>. The <sender Client ID> is the
1497 Client ID which invited the client to the channel. The
1498 <add | del> is an argument of size of 1 byte where 0x00 means
1499 adding a client to invite list, and 0x01 means deleting a client
1500 from invite list. The <invite list>, if present, indicates the
1501 information to be added to or removed from the invite list.
1502 The <invite list> format is defined in [SILC4] with
1503 SILC_COMMAND_INVITE command. When this notify is destined to
1504 a client the <add | del> and <invite list> MUST NOT be sent.
1505 When <add | del> is used to announce information during server
1506 connecting phase the argument type MUST be 0x03. See section
1507 4.2.1 in [SILC1] for more information.
1510 2 SILC_NOTIFY_TYPE_JOIN
1516 Internet Draft 15 January 2007
1519 Sent when client has joined to a channel. The server MUST
1520 distribute this type to the local clients on the channel and then
1521 send it to its primary router. Note that, when router is joining
1522 the client on behalf of normal server then router MUST send this
1523 notify type locally and globally. The router or server receiving
1524 the packet distributes this type to the local clients on the
1525 channel and broadcast it to the network. This notify is sent
1526 also to the client that joined the channel.
1529 Arguments: (1) [<Client ID>] (2) <Channel ID>
1531 The <Client ID> is the client that joined to the channel
1532 indicated by the <Channel ID>.
1535 3 SILC_NOTIFY_TYPE_LEAVE
1537 Sent when client has left a channel. The server must distribute
1538 this type to the local clients on the channel and then send it
1539 to its primary router. The router or server receiving the
1540 packet distributes this type to the local clients on the channel
1541 and broadcast it to the network. This notify MUST NOT be sent to
1545 Arguments: (1) <Client ID>
1547 The <Client ID> is the client which left the channel.
1550 4 SILC_NOTIFY_TYPE_SIGNOFF
1552 Sent when client signoff from SILC network. The server MUST
1553 distribute this type to the local clients on the channel and
1554 then send it to its primary router. The router or server
1555 receiving the packet distributes this type to the local clients
1556 on the channel and broadcast it to the network. This notify
1557 MUST NOT be sent to the quitting client. The Destination ID
1558 in the packet may be any ID depending to who it is destined.
1561 Arguments: (1) <Client ID> (2) <message>
1563 The <Client ID> is the client which left SILC network. The
1564 <message> is free text string indicating the reason of the
1572 Internet Draft 15 January 2007
1575 5 SILC_NOTIFY_TYPE_TOPIC_SET
1577 Sent when topic is set/changed on a channel. This type may be
1578 sent only to the clients which are joined on the channel which
1579 topic was just set or changed. The packet is destined to the
1583 Arguments: (1) <ID Payload> (2) <topic>
1585 The <ID Payload> is the ID of the entity who set the topic.
1586 It usually is Client ID but it can be Server ID and Channel ID
1590 6 SILC_NOTIFY_TYPE_NICK_CHANGE
1592 Sent when client changes nick on a channel. The server MUST
1593 distribute this type only to the local clients on the channel
1594 and then send it to its primary router. The router or server
1595 receiving the packet distributes this type to the local clients
1596 on the channel and broadcast it to the network. This packet is
1597 destined directly to the sent entity. This MUST be sent to those
1598 clients that are joined on same channels as the client that
1599 changed the nickname. This notify MUST NOT be sent multiple
1600 times to the same recipient. This notify MUST be sent also to
1601 the client that changed the nickname.
1604 Arguments: (1) <Old Client ID> (2) <New Client ID>
1607 The <Old Client ID> is the old ID of the client which changed
1608 the nickname. The <New Client ID> is the new ID generated by
1609 the change of the nickname. The <nickname> is the new nickname.
1610 Note that it is possible to send this notify even if the
1611 nickname has not changed, but client ID was changed.
1614 7 SILC_NOTIFY_TYPE_CMODE_CHANGE
1616 Sent when channel mode has changed. This type MUST be sent only
1617 to the clients which are joined on the channel which mode was
1618 changed. This packet is destined to the channel.
1621 Arguments: (1) <ID Payload> (2) <mode mask>
1622 (3) [<cipher>] (4) <[hmac>]
1628 Internet Draft 15 January 2007
1631 (5) [<passphrase>] (6) [<founder public key>]
1632 (7) [<channel pubkey>] (8) [<user limit>]
1634 The <ID Payload> is the ID (usually Client ID but it can be
1635 Server ID as well when the router is enforcing channel mode
1636 change) of the entity which changed the mode. The <mode mask>
1637 is the new mode mask of the channel. The client can safely
1638 ignore the <cipher> argument since the SILC_PACKET_CHANNEL_KEY
1639 packet will force the new channel key change anyway. The <hmac>
1640 argument is important since the client is responsible of setting
1641 the new HMAC and the hmac key into use. The <passphrase> is
1642 the passphrase of the channel, if it was now set. The <founder
1643 public key> argument is sent when the founder mode on the
1644 channel was set. All routers and servers that receive the packet
1645 MUST save the founder's public key so that the founder can
1646 reclaim the channel founder rights back for the channel on any
1647 server in the network. The <user limit> argument is present when
1648 the user limit was set or changed on the channel.
1650 The <channel pubkey> is an Argument List Payload and it is used
1651 to add and/or remove channel public keys from the channel. Also,
1652 when announcing channel information between servers and routers
1653 during connecting phase this argument includes the list of channel
1654 public keys. To add a public key to channel public key list the
1655 SILC_CMODE_CHANNEL_AUTH mode is set and the argument type is 0x00,
1656 and the argument is the public key. To remove a public key from
1657 the channel public key list the argument type is 0x01, and the
1658 argument is the public key to be removed. If the mode
1659 SILC_CMODE_CHANNEL_AUTH is unset (and was set earlier) all public
1660 keys are removed at once. Implementation MAY add and remove
1661 multiple public keys at the same time by including multiple
1662 arguments to the <channel pubkey> Argument List Payload where each
1663 argument is one Public Key Payload. When <channel pubkey> is used
1664 to announce information during server connecting phase the
1665 argument type MUST be 0x03. See section 4.2.1 in [SILC1] for
1669 8 SILC_NOTIFY_TYPE_CUMODE_CHANGE
1671 Sent when user mode on channel has changed. This type MUST be
1672 sent only to the clients which are joined on the channel where
1673 the target client is on. This packet is destined to the channel.
1676 Arguments: (1) <ID Payload> (2) <mode mask>
1677 (3) <Target Client ID> (4) [<founder pubkey>]
1684 Internet Draft 15 January 2007
1687 The <ID Payload> is the ID (usually Client ID but it can be
1688 Server ID as well when the router is enforcing user's mode
1689 change) of the entity which changed the mode. The <mode mask>
1690 is the new mode mask of the channel. The <Target Client ID>
1691 is the client which mode was changed. The <founder pubkey>
1692 is the public key of the channel founder and may be sent only
1693 when first time setting the channel founder mode using the
1694 SILC_COMMAND_CUMODE command, and when sending this notify.
1697 9 SILC_NOTIFY_TYPE_MOTD
1699 Sent when Message of the Day (motd) is sent to a client.
1702 Arguments: (1) <motd>
1704 The <motd> is the Message of the Day. This notify MAY be
1705 ignored and is OPTIONAL.
1708 10 SILC_NOTIFY_TYPE_CHANNEL_CHANGE
1710 Sent when channel's ID has changed for a reason or another.
1711 This is sent by normal server to the client. This can also be
1712 sent by router to other server to force the Channel ID change.
1713 The Channel ID MUST be changed to use the new one. When sent
1714 to clients, this type MUST be sent only to the clients which are
1715 joined on the channel. This packet is destined to the sent
1719 Arguments: (1) <Old Channel ID> (2) <New Channel ID>
1721 The <Old Channel ID> is the channel's old ID and the <New
1722 Channel ID> is the new one that MUST replace the old one.
1723 Server which receives this from router MUST re-announce the
1724 channel to the router by sending SILC_PACKET_NEW_CHANNEL packet
1725 with the new Channel ID.
1728 11 SILC_NOTIFY_TYPE_SERVER_SIGNOFF
1730 Sent when server quits SILC network. Those clients from this
1731 server that are on channels must be removed from the channel.
1732 This packet is destined to the sent entity.
1740 Internet Draft 15 January 2007
1743 Arguments: (1) <Server ID> (n) [<Client ID>] [...]
1745 The <Server ID> is the server's ID. The rest of the arguments
1746 are the Client IDs of the clients which are coming from this
1747 server and are thus quitting the SILC network also. If the
1748 maximum number of arguments are reached another
1749 SILC_NOTIFY_TYPE_SERVER_SIGNOFF notify packet MUST be sent.
1750 When this notify packet is sent between routers the Client ID's
1751 MAY be omitted. Server receiving the Client ID's in the payload
1752 may use them directly to remove the client.
1755 12 SILC_NOTIFY_TYPE_KICKED
1757 Sent when a client has been kicked from a channel. This MUST
1758 also be sent to the client which was kicked from the channel.
1759 The client which was kicked from the channel MUST be removed
1760 from the channel. The client MUST also be removed from channel's
1761 invite list if it is explicitly added in the list. This packet
1762 is destined to the channel. The router or server receiving the
1763 packet distributes this type to the local clients on the channel
1764 and broadcast it to the network.
1767 Arguments: (1) <Client ID> (2) [<comment>]
1768 (3) <Kicker's Client ID>
1770 The <Client ID> is the client which was kicked from the channel.
1771 The kicker may have set the <comment> string to indicate the
1772 reason for the kicking. The <Kicker's Client ID> is the kicker.
1775 13 SILC_NOTIFY_TYPE_KILLED
1777 Sent when a client has been killed from the network. This MUST
1778 also be sent to the client which was killed from the network.
1779 This notify MUST be sent to those clients which are joined on
1780 same channels as the killed client. The client which was killed
1781 MUST be removed from the network. This packet is destined
1782 directly to the sent entity. The router or server receiving
1783 the packet distributes this type to the local clients on the
1784 channel and broadcast it to the network. The client MUST also
1785 be removed from joined channels invite list if it is explicitly
1786 added in the lists. This notify MUST NOT be sent multiple
1787 times to same recipient.
1790 Arguments: (1) <Client ID> (2) [<comment>]
1796 Internet Draft 15 January 2007
1801 The <Client ID> is the client which was killed from the network.
1802 The killer may have set the <comment> string to indicate the
1803 reason for the killing. The <Killer's ID> is the killer, which
1804 may be client but also router server.
1807 14 SILC_NOTIFY_TYPE_UMODE_CHANGE
1809 Sent when user's mode in the SILC changes. This type is sent
1810 only between routers as broadcast packet.
1813 Arguments: (1) <Client ID> (2) <mode mask>
1815 The <Client ID> is the client which mode was changed. The
1816 <mode mask> is the new mode mask.
1819 15 SILC_NOTIFY_TYPE_BAN
1821 Sent when the ban list of the channel is changed. This notify
1822 type is sent to local servers on the channel, but MUST NOT be
1823 sent to clients on the channel. Router MUST broadcast this to
1824 its primary router and to local servers on the channel.
1827 Arguments: (1) <Channel ID> (2) [<add | del>]
1830 The <Channel ID> is the channel which ban list was changed.
1831 The <add | del> is an argument of size of 1 byte where 0x00 means
1832 adding a client to ban list, and 0x01 means deleting a client
1833 from ban list. The <ban list> indicates the information to be
1834 added to or removed from the ban list. The <ban list> format
1835 format is defined in [SILC4] with SILC_COMMAND_BAN command.
1836 When <add | del> is used to announce information during server
1837 connecting phase the argument type MUST be 0x03. See section
1838 4.2.1 in [SILC1] for more information.
1841 16 SILC_NOTIFY_TYPE_ERROR
1843 Sent when an error occurs during processing some SILC procedure.
1844 This is not used when error occurs during command processing, see
1845 [SILC4] for more information about commands and command replies.
1846 This type is sent directly to the sender of the packet whose
1852 Internet Draft 15 January 2007
1855 packet caused the error. See [SILC1] for definition when this
1859 Arguments: (1) <Status Type> (n) [...]
1861 The <Status Type> is the error type defined in [SILC4]. Note
1862 that same types are also used with command replies to indicate
1863 the status of a command. Both commands and this notify type
1864 share same status types. Rest of the arguments are status type
1865 dependent and are specified with those status types that can be
1866 sent currently inside this notify type in [SILC4]. The <Status
1867 Type> is size of 1 byte.
1870 17 SILC_NOTIFY_TYPE_WATCH
1872 Sent to indicate change in a watched user. Client can set
1873 nicknames to be watched with SILC_COMMAND_WATCH command, and
1874 receive notifications when they login to network, signoff from
1875 the network or their user mode is changed. This notify type
1876 is used to deliver these notifications. The notify type is
1877 sent directly to the watching client.
1880 Arguments: (1) <Client ID> (2) [<nickname>]
1881 (3) <user mode> (4) [<Notify Type>]
1884 The <Client ID> is the user's Client ID which is being watched,
1885 and the <nickname> is its nickname. If the client just
1886 changed the nickname, then <nickname> is the new nickname, but
1887 the <Client ID> is the old client ID. The <user mode> is the
1888 user's current user mode. The <Notify Type> can be same as the
1889 Notify Payload's Notify Type, and is 16 bit MSB first order
1890 value. If provided it may indicate the notify that occurred
1891 for the client. If client logged in to the network the
1892 <Notify Type> MUST NOT be present. The <public key> MAY be
1893 present, and it is the public key of the client being watched.
1895 Notify types starting from 16384 are reserved for private notify
1898 Router server which receives SILC_NOTIFY_TYPE_SIGNOFF,
1899 SILC_NOTIFY_TYPE_SERVER_SIGNOFF, SILC_NOTIFY_TYPE_KILLED,
1900 SILC_NOTIFY_TYPE_NICK_CHANGE and SILC_NOTIFY_TYPE_UMODE_CHANGE
1901 MUST check whether someone in the local cell is watching the nickname
1902 the client has, and send the SILC_NOTIFY_TYPE_WATCH notify to the
1908 Internet Draft 15 January 2007
1911 watcher, unless the watched client in case has the user mode
1912 SILC_UMODE_REJECT_WATCHING set. If the watcher client and the client
1913 that was watched is same the notify SHOULD NOT be sent.
1918 Error payload is sent upon error in protocol. Error may occur in
1919 various conditions when server sends this packet. Client MUST NOT
1920 send this payload but MUST be able to accept it. However, client
1921 MAY ignore the contents of the packet as server is going to take
1922 action on the error anyway. However, it is recommended that the
1923 client takes error packet seriously.
1927 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
1928 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1932 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1934 Figure 14: Error Payload
1937 o Error Message (variable length) - Human readable error
1941 2.3.9 Channel Message Payload
1943 Channel Message Payload is used to send message to channels, a group
1944 of users. These messages can only be sent if client has joined to
1945 some channel. Even though this packet is very common in SILC it
1946 is still special packet. Some special handling on sending and
1947 reception of channel message is required.
1949 Padding MUST be applied into this payload since the payload is
1950 encrypted separately from other parts of the packet with the
1951 channel specific key. Hence the requirement of the padding.
1952 The packet MUST be made multiple by eight (8) or by the block
1953 size of the cipher, which ever is larger.
1955 The SILC header in this packet is encrypted with the session key
1956 of the next receiver of the packet. Nothing else is encrypted
1957 with that key. Thus, the actual packet and padding to be
1958 encrypted with the session key is SILC Header plus padding to it.
1964 Internet Draft 15 January 2007
1967 Receiver of the the channel message packet is able to determine
1968 the channel the message is destined to by checking the Destination
1969 ID from the SILC Packet header which tells the destination channel.
1970 The original sender of the packet is also determined by checking
1971 the source ID from the header which tells the client which sent
1972 the message. The Destination ID MUST be Channel ID in the SILC
1975 This packet use generic Message Payload as Channel Message Payload.
1976 See section 2.3.2.6 for generic Message Payload.
1979 2.3.10 Channel Key Payload
1981 All traffic in channels are protected by channel specific keys.
1982 Channel Key Payload is used to distribute channel keys to all
1983 clients on the particular channel. Channel keys are sent when
1984 the channel is created, when new user joins to the channel and
1985 whenever a user has left a channel. Server creates the new
1986 channel key and distributes it to the clients by encrypting this
1987 payload with the session key shared between the server and
1988 the client. After that, client MUST start using the key received
1989 in this payload to protect the traffic on the channel.
1991 The client which is joining to the channel receives its key in the
1992 SILC_COMMAND_JOIN command reply message thus it is not necessary to
1993 send this payload to the entity which sent the SILC_COMMAND_JOIN
1996 Channel keys are cell specific thus every router in the cell have
1997 to create a channel key and distribute it if any client in the
1998 cell has joined to a channel. Channel traffic between cell's
1999 are not encrypted using channel keys, they are encrypted using
2000 normal session keys between two routers. Inside a cell, all
2001 channel traffic is encrypted with the specified channel key.
2002 Channel key SHOULD expire periodically, say, in one hour, in
2003 which case new channel key is created and distributed.
2005 Note that, this packet is not used if SILC_CMODE_PRIVKEY mode is set
2006 on channel. This means that channel uses channel private keys which
2007 are not server generated. For this reason server cannot send this
2008 packet as it does not know the key.
2010 The destination ID in the packet SHOULD be the entity to whom the
2011 packet is sent. Using Channel ID as destination ID is not
2012 necessary as the Channel ID is included in the Channel Key Payload.
2014 The payload may only be sent with SILC_PACKET_CHANNEL_KEY packet.
2020 Internet Draft 15 January 2007
2023 It MUST NOT be sent in any other packet type. The following diagram
2024 represents the Channel Key Payload.
2029 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
2030 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2031 | Channel ID Length | |
2032 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2036 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2037 | Cipher Name Length | |
2038 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2042 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2043 | Channel Key Length | |
2044 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2048 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2050 Figure 15: Channel Key Payload
2054 o Channel ID Length (2 bytes) - Indicates the length of the
2055 Channel ID field in the payload, not including any other
2058 o Channel ID (variable length) - The Channel ID of the
2061 o Cipher Name Length (2 bytes) - Indicates the length of the
2062 Cipher name field in the payload, not including any other
2065 o Cipher Name (variable length) - Name of the cipher used
2066 in the protection of channel traffic. This name is
2067 initially decided by the creator of the channel but it
2068 may change during the life time of the channel as well.
2070 o Channel Key Length (2 bytes) - Indicates the length of the
2076 Internet Draft 15 January 2007
2079 Channel Key field in the payload, not including any other
2082 o Channel Key (variable length) - The actual channel key
2083 material. See [SILC1] on how to start using the key.
2086 2.3.11 Private Message Payload
2088 Private Message Payload is used to send private message between
2089 two clients. The messages are sent only to the specified user
2090 and no other user inside SILC network is able to see the message.
2092 The message can be protected by the session key established by the
2093 SILC Key Exchange Protocol. However, it is also possible to agree
2094 to use a private message key to protect just the private messages.
2095 It is for example possible to perform Key Agreement between two
2096 clients. See section 2.3.20 Key Agreement Payload how to perform
2097 key agreement. It is also possible to use static or pre-shared keys
2098 to protect private messages. See the 2.3.12 Private Message Key
2099 Payload and [SILC1] section 4.6 for detailed description for private
2100 message key generation.
2102 If normal session key is used to protect the message, every server
2103 between the sender client and the receiving client MUST decrypt the
2104 packet and always re-encrypt it with the session key of the next
2105 receiver of the packet. See section Client To Client in [SILC1].
2107 When the private message key is used, and the Private Message Key
2108 flag was set in the SILC Packet header no server or router en route
2109 is able to decrypt or re-encrypt the packet. In this case only the
2110 SILC Packet header is processed by the servers and routers en route.
2111 Section Client To Client in [SILC1] gives example of this scheme.
2113 This packet use generic Message Payload as Private Message Payload.
2114 See section 2.3.2.6 for generic Message Payload.
2117 2.3.12 Private Message Key Payload
2119 This payload is OPTIONAL and can be used to indicate that a static
2120 or pre-shared key should be used in the private message communication
2121 to protect the messages. The actual key material has to be sent
2122 outside the SILC network, or it has to be a static or pre-shared key.
2123 The sender of this packet is considered to be the initiator and the
2124 receiver the responder when processing the raw key material as
2125 described in the section 4.6 in [SILC1] and in the section 2.3 in
2132 Internet Draft 15 January 2007
2135 Note that it is also possible to use static or pre-shared keys in
2136 client implementations without sending this packet. Clients may
2137 naturally agree to use a key without sending any kind of indication
2138 to each other. The key may be for example a long-living static key
2139 that the clients has agreed to use at all times. Note that it is
2140 also possible to agree to use private message key by performing
2141 a Key Agreement. See the section 2.3.20 Key Agreement Payload.
2143 This payload may only be sent by client to another client. Server
2144 MUST NOT send this payload. After sending this payload and setting the
2145 key into use this payload the sender of private messages MUST set the
2146 Private Message Key flag into the SILC Packet Header.
2148 The payload may only be sent with SILC_PACKET_PRIVATE_MESSAGE_KEY
2149 packet. It MUST NOT be sent in any other packet type. The following
2150 diagram represents the Private Message Key Payload.
2154 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
2155 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2156 | Cipher Name Length | |
2157 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2161 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2162 | HMAC Name Length | |
2163 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2167 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2169 Figure 16: Private Message Key Payload
2173 o Cipher Name Length (2 bytes) - Indicates the length of the
2174 Cipher Name field in the payload, not including any other
2177 o Cipher Name (variable length) - Name of the cipher to use
2178 in the private message encryption. If this field does not
2179 exist then the default cipher of the SILC protocol is used.
2180 See the [SILC1] for defined ciphers.
2182 o HMAC Name Length (2 bytes) - Indicates the length of the
2188 Internet Draft 15 January 2007
2191 HMAC Name field in the payload, not including any other
2194 o HMAC Name (variable length) - Name of the HMAC to use
2195 in the private message MAC computation. If this field does
2196 not exist then the default HMAC of the SILC protocol is used.
2197 See the [SILC1] for defined HMACs.
2200 2.3.13 Command Payload
2202 Command Payload is used to send SILC commands from client to server.
2203 Also server MAY send commands to other servers. The following diagram
2204 represents the Command Payload.
2208 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
2209 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2210 | Payload Length | SILC Command | Arguments Num |
2211 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2212 | Command Identifier |
2213 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2215 Figure 17: Command Payload
2218 o Payload Length (2 bytes) - Length of the entire command
2219 payload including any command argument payloads associated
2222 o SILC Command (1 byte) - Indicates the SILC command. This MUST
2223 be set to non-zero value. If zero (0) value is found in this
2224 field the packet MUST be discarded.
2226 o Arguments Num (1 byte) - Indicates the number of arguments
2227 associated with the command. If there are no arguments this
2228 field is set to zero (0). The arguments MUST follow the
2229 Command Payload. See section 2.3.2.2 for definition of the
2232 o Command Identifier (2 bytes) - Identifies this command at the
2233 sender's end. The entity which replies to this command MUST
2234 set the value found from this field into the Command Payload
2235 used to send the reply to the sender. This way the sender
2236 can identify which command reply belongs to which originally
2237 sent command. What this field includes is implementation
2238 issue but it is RECOMMENDED that wrapping counter value is
2244 Internet Draft 15 January 2007
2249 See [SILC4] for detailed description of different SILC commands,
2250 their arguments and their reply messages.
2253 2.3.14 Command Reply Payload
2255 Command Reply Payload is used to send replies to the commands. The
2256 Command Reply Payload is identical to the Command Payload thus see
2257 the 2.3.13 section for the payload specification.
2259 The entity which sends the reply packet MUST set the Command Identifier
2260 field in the reply packet's Command Payload to the value it received
2261 in the original command packet.
2263 See SILC Commands in [SILC4] for detailed description of different
2264 SILC commands, their arguments and their reply messages.
2267 2.3.15 Connection Auth Request Payload
2269 Client MAY send this payload to server to request the authentication
2270 method that must be used in authentication protocol. If client knows
2271 this information beforehand this payload is not necessary to be sent.
2272 Server performing authentication with another server MAY also send
2273 this payload to request the authentication method. If the connecting
2274 server already knows this information this payload is not necessary
2277 Server receiving this request SHOULD reply with same payload sending
2278 the mandatory authentication method. Algorithms that may be required
2279 to be used by the authentication method are the ones already
2280 established by the SILC Key Exchange protocol. See section Key
2281 Exchange Start Payload in [SILC3] for detailed information.
2283 The payload may only be sent with SILC_PACKET_CONNECTION_AUTH_REQUEST
2284 packet. It MUST NOT be sent in any other packet type. The following
2285 diagram represents the Connection Auth Request Payload.
2289 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
2290 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2291 | Connection Type | Authentication Method |
2292 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2294 Figure 18: Connection Auth Request Payload
2300 Internet Draft 15 January 2007
2303 o Connection Type (2 bytes) - Indicates the type of the
2304 connection. The following connection types are defined:
2311 If any other type is found in this field the packet MUST be
2312 discarded and the authentication MUST be failed.
2314 o Authentication Method (2 bytes) - Indicates the authentication
2315 method to be used in the authentication protocol. The following
2316 authentication methods are defined:
2319 1 password (mandatory)
2320 2 public key (mandatory)
2322 If any other type is found in this field the packet MUST be
2323 discarded and the authentication MUST be failed. If this
2324 payload is sent as request to receive the mandatory
2325 authentication method this field MUST be set to zero (0),
2326 indicating that receiver should send the mandatory
2327 authentication method. The receiver sending this payload
2328 to the requesting party, MAY also set this field to zero (0)
2329 to indicate that authentication is not required. In this
2330 case authentication protocol still MUST be started but
2331 server is most likely to respond with SILC_PACKET_SUCCESS
2335 2.3.16 New ID Payload
2337 New ID Payload is a multipurpose payload. It is used to send newly
2338 created ID's from clients and servers. When client connects to server
2339 and registers itself to the server by sending SILC_PACKET_NEW_CLIENT
2340 packet, server replies with this packet by sending the created ID for
2341 the client. Server always creates the ID for the client.
2343 This payload is also used when server tells its router that new client
2344 has registered to the SILC network. In this case the server sends
2345 the Client ID of the client to the router. Similarly when router
2346 distributes information to other routers about the client in the SILC
2347 network this payload is used.
2349 Also, when server connects to router, router use this payload to inform
2350 other routers about new server in the SILC network. However, every
2356 Internet Draft 15 January 2007
2359 server (or router) creates their own ID's thus the ID distributed by
2360 this payload is not created by the distributor in this case. Servers
2361 create their own ID's. Server registers itself to the network by
2362 sending SILC_PACKET_NEW_SERVER to the router it connected to. The case
2363 is same when router connects to another router.
2365 This payload MUST NOT be used to send information about new channels.
2366 New channels are always distributed by sending the dedicated
2367 SILC_PACKET_NEW_CHANNEL packet. Client MUST NOT send this payload.
2368 Both client and server (and router) MAY receive this payload.
2370 The packet use generic ID Payload as New ID Payload. See section
2371 2.3.2.1 for generic ID Payload.
2374 2.3.17 New Client Payload
2376 When client is connected to the server, keys has been exchanged and
2377 connection has been authenticated, client MUST register itself to the
2378 server. Client's first packet after key exchange and authentication
2379 protocols MUST be SILC_PACKET_NEW_CLIENT. This payload tells server all
2380 the relevant information about the connected user. Server creates a new
2381 client ID for the client when received this payload and sends it to the
2382 client in New ID Payload.
2384 This payload sends username and real name of the user on the remote host
2385 which is connected to the SILC server with SILC client. The server
2386 creates the client ID according the information sent in this payload.
2387 The nickname of the user becomes the nickname sent in this payload.
2389 The payload may only be sent with SILC_PACKET_NEW_CLIENT packet. It
2390 MUST NOT be sent in any other packet type. The following diagram
2391 represents the New Client Payload.
2396 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
2397 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2398 | Username Length | |
2399 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2403 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2404 | Real Name Length | |
2405 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2412 Internet Draft 15 January 2007
2417 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2419 Figure 19: New Client Payload
2422 o Username Length (2 bytes) - Length of the Username field.
2424 o Username (variable length) - The username of the user on
2425 the host where connecting to the SILC server.
2427 o Real Name Length (2 bytes) - Length of the Real Name field.
2429 o Real Name (variable length) - The real name of the user
2430 on the host where connecting to the SILC server.
2433 2.3.18 New Server Payload
2435 This payload is sent by server when it has completed successfully both
2436 key exchange and connection authentication protocols. The server
2437 MUST register itself to the SILC Network by sending this payload.
2438 The first packet after these key exchange and authentication protocols
2439 is SILC_PACKET_NEW_SERVER packet. The payload includes the Server ID
2440 of the server that it has created by itself. It also includes a
2441 name of the server that is associated to the Server ID.
2443 The payload may only be sent with SILC_PACKET_NEW_SERVER packet. It
2444 MUST NOT be sent in any other packet type. The following diagram
2445 represents the New Server Payload.
2452 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
2453 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2454 | Server ID Length | |
2455 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2459 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2460 | Server Name Length | |
2461 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2468 Internet Draft 15 January 2007
2473 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2475 Figure 20: New Server Payload
2478 o Server ID Length (2 bytes) - Length of the Server ID Data
2481 o Server ID Data (variable length) - The encoded Server ID
2484 o Server Name Length (2 bytes) - Length of the server name
2487 o Server Name (variable length) - The server name string.
2490 2.3.19 New Channel Payload
2492 Information about newly created channel is broadcasted to all routers
2493 in the SILC network by sending this packet payload. Channels are
2494 created by router of the cell. Server never creates channels unless
2495 it is a standalone server and it does not have router connection,
2496 in this case server acts as router. Normal server send JOIN command
2497 to the router (after it has received JOIN command from client) which
2498 then processes the command and creates the channel. Client MUST NOT
2499 send this packet. Server MAY send this packet to a router when it is
2500 announcing its existing channels to the router after it has connected
2503 The packet use generic Channel Payload as New Channel Payload. See
2504 section 2.3.2.3 for generic Channel Payload. The Mode Mask field in the
2505 Channel Payload is the mode of the channel.
2508 2.3.20 Key Agreement Payload
2510 This payload is used by clients to request key negotiation between
2511 another client in the SILC Network. The key agreement protocol used
2512 is the SKE protocol. The result of the protocol, the secret key
2513 material, can be used for example as private message key between the
2514 two clients. This significantly adds security as the clients agree
2515 about the key without any server interaction. The protocol is executed
2516 peer to peer. The server and router MUST NOT send this payload.
2518 The sender MAY tell the receiver of this payload the hostname and the
2524 Internet Draft 15 January 2007
2527 port where the SKE protocol is running in the sender's end. The
2528 receiver MAY then initiate the SKE negotiation with the sender. The
2529 sender MAY also optionally not to include the hostname and the port
2530 of its SKE protocol. In this case the receiver MAY reply to the
2531 request by sending the same payload filled with the receiver's hostname
2532 and the port where the SKE protocol is running. The sender MAY then
2533 initiate the SKE negotiation with the receiver.
2535 This payload may be sent with SILC_PACKET_KEY_AGREEMENT and
2536 SILC_PACKET_FTP packet types. It MUST NOT be sent in any other packet
2537 types. The following diagram represents the Key Agreement Payload.
2541 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
2542 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2543 | Hostname Length | |
2544 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2548 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2550 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2552 Figure 21: Key Agreement Payload
2555 o Hostname Length (2 bytes) - Indicates the length of the
2558 o Hostname (variable length) - The hostname or IP address where
2559 the SKE protocol is running, as UTF-8 encoded string. The sender
2560 MAY fill this field when sending the payload. If the receiver
2561 sends this payload as reply to the request it MUST fill this field.
2563 o Protocol (2 bytes) - The internet protocol used for the key
2564 agreement connection. Possible values are 0 for TCP and 1 for
2565 UDP. Other values are unsupported. This is a 16 bit MSB first
2566 order value. If Hostname field is not present, the value in
2567 this field is ignored.
2569 o Port (2 bytes) - The port where the SKE protocol is bound.
2570 The sender MAY fill this field when sending the payload. If
2571 the receiver sends this payload as reply to the request it
2572 MUST fill this field. This is a 16 bit MSB first order value.
2580 Internet Draft 15 January 2007
2583 After the key material has been received from the SKE protocol it is
2584 processed as the [SILC3] describes. If the key material is used as
2585 channel private key then the Sending Encryption Key, as defined in
2586 [SILC3] is used as the channel private key. Other key material must
2587 be discarded. The [SILC1] in section 4.6 defines the way to use the
2588 key material if it is intended to be used as private message keys.
2589 Any other use for the key material is undefined.
2592 2.3.21 Resume Router Payload
2594 See the [SILC1] for Resume Router protocol where this payload is
2595 used. The payload may only be sent with SILC_PACKET_RESUME_ROUTER
2596 packet. It MUST NOT be sent in any other packet type. The following
2597 diagram represents the Resume Router Payload.
2601 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
2602 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2603 | Type | Session ID |
2604 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2606 Figure 22: Resume Router Payload
2609 o Type (1 byte) - Indicates the type of the backup resume
2610 protocol packet. The type values are defined in [SILC1].
2612 o Session ID (1 bytes) - Indicates the session ID for the
2613 backup resume protocol. The sender of the packet sets this
2614 value and the receiver MUST set the same value in subsequent
2620 2.3.22 File Transfer Payload
2622 File Transfer Payload is used to perform file transfer protocol between
2623 two entities in the network. The actual file transfer protocol is always
2624 encapsulated inside the SILC Packet. The actual data stream is also sent
2625 peer to peer outside SILC network.
2627 When an entity, usually a client wishes to perform file transfer protocol
2628 with another client in the network, they perform Key Agreement protocol
2629 as described in the section 2.3.20 Key Agreement Payload and in [SILC3],
2630 inside File Transfer Payload. After the Key Agreement protocol has been
2636 Internet Draft 15 January 2007
2639 performed the subsequent packets in the data stream will be protected
2640 using the new key material. The actual file transfer protocol is also
2641 initialized in this stage. All file transfer protocol packets are always
2642 encapsulated in the File Transfer Payload and protected with the
2643 negotiated key material.
2645 The payload may only be sent with SILC_PACKET_FTP packet. It MUST NOT
2646 be sent in any other packet type. The following diagram represents the
2647 File Transfer Payload.
2651 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
2652 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2658 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2660 Figure 23: File Transfer Payload
2663 o Type (1 byte) - Indicates the type of the file transfer
2664 protocol. The following file transfer protocols has been
2667 1 Secure File Transfer Protocol (SFTP) (mandatory)
2669 If zero (0) value or any unsupported file transfer protocol
2670 type is found in this field the packet MUST be discarded.
2671 The currently mandatory file transfer protocol is SFTP.
2672 The SFTP protocol is defined in [SFTP].
2674 o Data (variable length) - Arbitrary file transfer data. The
2675 contents and encoding of this field is dependent of the usage
2676 of this payload and the type of the file transfer protocol.
2677 When this payload is used to perform the Key Agreement
2678 protocol, this field include the Key Agreement Payload,
2679 as defined in the section 2.3.20 Key Agreement Payload.
2680 When this payload is used to send the actual file transfer
2681 protocol data, the encoding is defined in the corresponding
2682 file transfer protocol.
2685 2.3.23 Resume Client Payload
2692 Internet Draft 15 January 2007
2695 This payload is used by client to resume its detached session in the
2696 SILC Network. A client is able to detach itself from the network by
2697 sending SILC_COMMAND_DETACH command to its server. The network
2698 connection to the client is lost but the client remains as valid
2699 client in the network. The client is able to resume the session back
2700 by sending this packet and including the old Client ID, and an
2701 Authentication Payload [SILC1] which the server use to verify with
2702 the detached client's public key. This also implies that the
2703 mandatory authentication method is public key authentication.
2705 Server or router that receives this from the client also sends this,
2706 without the Authentication Payload, to routers in the network so that
2707 they know the detached client has resumed. Refer to the [SILC1] for
2708 detailed description how the detaching and resuming procedure is
2711 The payload may only be sent with SILC_PACKET_RESUME_CLIENT packet. It
2712 MUST NOT be sent in any other packet type. The following diagram
2713 represents the Resume Client Payload.
2716 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
2717 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2718 | Client ID Length | |
2719 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
2723 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2725 ~ Authentication Payload ~
2727 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2729 Figure 24: Resume Client Payload
2732 o Client ID Length (1 byte) - The length of the Client ID
2733 field not including any other field.
2735 o Client ID (variable length) - The detached client's Client
2736 ID. The client that sends this payload must know the Client
2739 o Authentication Payload (variable length) - The authentication
2740 payload that the server will verify with the detached client's
2741 public key. If the server doesn't know the public key, it must
2742 retrieve it for example with SILC_COMMAND_GETKEY command.
2748 Internet Draft 15 January 2007
2751 2.3.24 Acknowledgement Payload
2753 This payload is used to acknowledge a packet that had the Acknowledgement
2754 packet flag set. The payload includes the sequence number of the packet
2755 that had the flag set, which the recipient can use to identify that the
2756 packet was acknowledged.
2758 The payload may only be sent with SILC_PACKET_ACK packet. It
2759 MUST NOT be sent in any other packet type. The following diagram
2760 represents the Acknowledgement Payload.
2763 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
2764 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2765 | Packet Sequence Number |
2766 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2768 Figure 24: Resume Client Payload
2771 o Packet Sequence Number (4 bytes) - The packet sequence number
2772 of the packet that had the Acknowledgement flag set.
2777 ID's are used in the SILC network to associate different entities.
2778 The following ID's has been defined to be used in the SILC network.
2782 This is used when other ID type is available at the time.
2786 Server ID to associate servers. See the format of
2791 Client ID to associate clients. See the format of
2796 Channel ID to associate channels. See the format of
2804 Internet Draft 15 January 2007
2807 When encoding different IDs into the ID Payload, all fields are always
2808 in MSB first order. The IP address, port, and/or the random number
2809 are encoded in the MSB first order.
2812 2.5 Packet Encryption And Decryption
2814 SILC packets are encrypted almost entirely. Only the MAC at the end
2815 of the packet is never encrypted. The SILC Packet header is the first
2816 part of a packet to be encrypted and it is always encrypted with the
2817 key of the next receiver of the packet. The data payload area of the
2818 packet is always entirely encrypted and it is usually encrypted with
2819 the next receiver's key. However, there are some special packet types
2820 and packet payloads that require special encryption process. These
2821 special cases are described in the next sections. First is described
2822 the normal packet encryption process.
2826 2.5.1 Normal Packet Encryption And Decryption
2828 Normal SILC packets are encrypted with the session key of the next
2829 receiver of the packet. The entire SILC Packet header and the packet
2830 data payload is is encrypted with the same key. Padding of the packet
2831 is also encrypted always with the session key, also in special cases.
2832 Computed MAC of the packet MUST NOT be encrypted.
2834 Decryption process in these cases are straightforward. The receiver
2835 of the packet MUST first decrypt the SILC Packet header, or some parts
2836 of it, usually first 16 bytes of it. Then the receiver checks the
2837 packet type from the decrypted part of the header and can determine
2838 how the rest of the packet must be decrypted. If the packet type is
2839 any of the special cases described in the following sections the packet
2840 decryption is special. If the packet type is not among those special
2841 packet types rest of the packet can be decrypted with the same key.
2842 At this point the receiver is also able to determine the length of the
2845 With out a doubt, this sort of decryption processing causes some
2846 overhead to packet decryption, but never the less, is required.
2848 The MAC of the packet is also verified at this point. The MAC is
2849 computed from the ciphertext of the packet so it can be verified
2850 at this stage. The length of the packet need to be known to be able
2851 to verify the MAC from the ciphertext so the first 16 bytes need to
2852 be decrypted to determine the packet length. However, the MAC MUST
2853 be verified from the entire ciphertext.
2860 Internet Draft 15 January 2007
2863 2.5.2 Channel Message Encryption And Decryption
2865 Channel Messages (Channel Message Payload) are always encrypted with
2866 the channel specific key. However, the SILC Packet header is not
2867 encrypted with that key. As in normal case, the header is encrypted
2868 with the key of the next receiver of the packet. Note that, in this
2869 case the encrypted data area is not touched at all; it MUST NOT be
2870 re-encrypted with the session key.
2872 Receiver of a channel message, who ever that is, is REQUIRED to decrypt
2873 the SILC Packet header to be able to recognize the packet to be as
2874 channel message. This is same procedure as for normal SILC packets.
2875 As the receiver founds the packet to be channel message, rest of the
2876 packet processing is special. Rest of the SILC Packet header is
2877 decrypted with the same session key along with the padding of the
2878 packet. After that the packet is protected with the channel specific
2879 key and thus can be decrypted only if the receiver is the client on
2880 the channel. See section 2.7 Packet Padding Generation for more
2881 information about padding on special packets.
2883 If the receiver of the channel message is router which is routing the
2884 message to another router then it MUST decrypt the Channel Message
2885 payload too. Between routers (that is, between cells) channel messages
2886 are protected with session keys shared between the routers. This
2887 causes another special packet processing for channel messages. If
2888 the channel message is received from another router then the entire
2889 packet, including Channel Message payload, MUST be encrypted with the
2890 session key shared between the routers. In this case the packet
2891 decryption process is as with normal SILC packets. Hence, if the
2892 router is sending channel message to another router the Channel
2893 Message payload MUST have been decrypted and MUST be re-encrypted
2894 with the session key shared between the another router. In this
2895 case the packet encryption is as with any normal SILC packet.
2897 It must be noted that this is only when the channel messages are sent
2898 from router to another router. In all other cases the channel
2899 message encryption and decryption is as described before. This
2900 different processing of channel messages with router to router
2901 connection is because channel keys are cell specific. All cells have
2902 their own channel keys thus the channel message traveling from one
2903 cell to another MUST be protected as it would be any normal SILC
2906 If the SILC_CMODE_PRIVKEY channel mode has been set for the channel
2907 then the router cannot decrypt the packet as it does not know the
2908 private key. In this case the entire packet MUST be encrypted with
2909 the session key and sent to the router. The router receiving the
2910 packet MUST check the channel mode and decrypt the packet accordingly.
2916 Internet Draft 15 January 2007
2919 2.5.3 Private Message Encryption And Decryption
2921 By default, private message in SILC are protected by session keys.
2922 In this case the private message encryption and decryption process is
2923 equivalent to normal packet encryption and decryption.
2925 However, private messages MAY be protected with private message key
2926 which causes the packet to be special packet. The procedure in this
2927 case is very much alike to channel packets. The actual private message
2928 is encrypted with the private message key and other parts of the
2929 packet is encrypted with the session key. See 2.7 Packet Padding
2930 Generation for more information about padding on special packets.
2932 The difference from channel message processing is that server or router
2933 en route never decrypts the actual private message, as it does not
2934 have the key to do that. Thus, when sending packets between router
2935 the processing is same as in any other case as well; the packet's header
2936 and padding is protected by the session key and the data area is not
2937 touched and is not re-encrypted.
2939 The true receiver of the private message is able to decrypt the private
2940 message as it shares the key with the sender of the message.
2943 2.6 Packet MAC Generation
2945 Data integrity of a packet is protected by including a message
2946 authentication code (MAC) at the end of the packet. The MAC is computed
2947 from shared secret MAC key, that is established by the SILC Key Exchange
2948 protocol, from packet sequence number, and from the encrypted packet
2949 data. The MAC is always computed after packet is encrypted. This is
2950 so called Encrypt-Then-MAC order; packet is first encrypted, then MAC
2951 is computed from the encrypted data.
2953 The MAC is computed from entire packet. Every bit of data in the packet,
2954 including SILC Packet Header is used in the MAC computing. This way
2955 the entire packet becomes authenticated.
2957 Hence, packet's MAC generation is as follows:
2959 mac = MAC(key, sequence number | Encrypted SILC packet)
2961 The MAC key is negotiated during the SKE protocol. The sequence number
2962 is a 32 bit MSB first value starting from zero for first packet and
2963 increasing for subsequent packets, finally wrapping after 2^32 packets.
2964 The value is never reset, not even after rekey has been performed.
2965 However, rekey MUST be performed before the sequence number wraps
2966 and repeats from zero. Note that the sequence number is incremented only
2972 Internet Draft 15 January 2007
2975 when MAC is computed for a packet. If packet is not encrypted and MAC is
2976 not computed then the sequence number is not incremented. Hence, the
2977 sequence number is zero for the very first encrypted packet.
2979 See [SILC1] for defined and allowed MAC algorithms.
2982 2.7 Packet Padding Generation
2984 Padding is needed in the packet because the packet is encrypted. It
2985 always MUST be multiple by eight (8) or multiple by the block size
2986 of the cipher, which ever is larger. The padding is always encrypted.
2988 For normal packets the padding is added after the SILC Packet Header
2989 and between the Data Payload area. The padding for normal packets
2990 may be calculated as follows:
2992 padding_length = 16 - (packet_length mod block_size)
2993 if (padding_length < 8)
2994 padding_length += block_size
2996 The `block_size' is the block size of the cipher. The maximum padding
2997 length is 128 bytes, and minimum is 8 bytes. For example, packets that
2998 include a passphrase or a password for authentication purposes SHOULD
2999 pad the packet up to the maximum padding length. The maximum padding
3000 is calculated as follows:
3002 padding_length = 128 - (packet_length mod block_size)
3004 For special packets the padding calculation is different as special
3005 packets may be encrypted differently. In these cases the encrypted
3006 data area MUST already be multiple by the block size thus in this case
3007 the padding is calculated only for SILC Packet Header, not for any
3008 other area of the packet. The same algorithm works in this case as
3009 well, except that the `packet length' is now the SILC Packet Header
3012 The padding MUST be random data, preferably, generated by
3013 cryptographically strong random number generator for each packet
3017 2.8 Packet Compression
3019 SILC Packets MAY be compressed. In this case the data payload area
3020 is compressed and all other areas of the packet MUST remain as they
3021 are. After compression is performed for the data area, the length
3022 field of Packet Header MUST be set to the compressed length of the
3028 Internet Draft 15 January 2007
3033 The compression MUST always be applied before encryption. When
3034 the packet is received and decrypted the data area MUST be decompressed.
3035 Note that the true sender of the packet MUST apply the compression and
3036 the true receiver of the packet MUST apply the decompression. Any
3037 server or router en route SHOULD NOT decompress the packet.
3042 The sender of the packet MUST assemble the SILC Packet Header with
3043 correct values. It MUST set the Source ID of the header as its own
3044 ID, unless it is forwarding the packet. It MUST also set the Destination
3045 ID of the header to the true destination. If the destination is client
3046 it will be Client ID, if it is server it will be Server ID and if it is
3047 channel it will be Channel ID.
3049 If the sender wants to compress the packet it MUST apply the
3050 compression now. Sender MUST also compute the padding as described
3051 in above sections. Then sender MUST encrypt the packet as has been
3052 described in above sections according whether the packet is normal
3053 packet or special packet. Then sender MUST compute the MAC of the
3054 packet. The computed MAC MUST NOT be encrypted.
3057 2.10 Packet Reception
3059 On packet reception the receiver MUST check that all fields in the
3060 SILC Packet Header are valid. It MUST check the flags of the
3061 header and act accordingly. It MUST also check the MAC of the packet
3062 and if it is to be failed the packet MUST be discarded. Also if the
3063 header of the packet includes any bad fields the packet MUST be
3066 See above sections on the decryption process of the received packet.
3068 The receiver MUST also check that the ID's in the header are valid
3069 ID's. Unsupported ID types or malformed ID's MUST cause packet
3070 rejection. The padding on the reception is always ignored.
3072 The receiver MUST also check the packet type and start parsing the
3073 packet according to the type. However, note the above sections on
3074 special packet types and their parsing.
3084 Internet Draft 15 January 2007
3087 Routers are the primary entities in the SILC network that takes care
3088 of packet routing. Normal servers performs packet forwarding, for
3089 example, when they are forwarding channel message to the local clients.
3090 Routing is quite simple as every packet tells the true origin and the
3091 true destination of the packet.
3093 It is still RECOMMENDED for routers that has several routing connections
3094 to create route cache for those destinations that has faster route than
3095 the router's primary route. This information is available for the router
3096 when other router connects to the router. The connecting party then
3097 sends all of its locally connected clients, servers and channels. These
3098 informations helps to create the route cache. Also, when new channels
3099 are created to a cell its information is broadcasted to all routers
3100 in the network. Channel ID's are based on router's ID thus it is easy
3101 to create route cache based on these informations. If faster route for
3102 destination does not exist in router's route cache the packet MUST be
3103 routed to the primary route (default route).
3105 However, there are some issues when routing channel messages to group
3106 of users. Routers are responsible of routing the channel message to
3107 other routers, local servers and local clients as well. Routers MUST
3108 send the channel message to only one router in the network, preferably
3109 to the shortest route to reach the channel users. The message can be
3110 routed into either upstream or downstream. After the message is sent
3111 to a router in the network it MUST NOT be sent to any other router in
3112 either same route or other route. The message MUST NOT be routed to
3113 the router it came from.
3115 When routing for example private messages they should be routed to the
3116 shortest route always to reach the destination client as fast as possible.
3118 For server which receives a packet to be forwarded to an entity that is
3119 indirectly connected to the sender, the server MUST check whether that
3120 particular packet type is allowed to be sent to that destination. Not
3121 all packets may be sent by some odd entity to for example a local client,
3122 or to some remote server or router, that is indirectly connected to the
3123 sender. See section 2.3 SILC Packet Types and paragraph about indirectly
3124 connected entities and sending packets to them. That section defines the
3125 packets that may be sent to indirectly connected entities. When a server
3126 or a router receives a packet that may be sent to indirectly connected
3127 entity and it is destined to other entity except that server, it MUST
3128 route it further either to shortest route or to the primary route to reach
3131 Routers form a ring in the SILC network. However, routers may have other
3132 direct connections to other routers in the network too. This can cause
3133 interesting routing problems in the network. Since the network is a ring,
3134 the packets usually should be routed into clock-wise direction, or if it
3140 Internet Draft 15 January 2007
3143 cannot be used then always counter clock-wise (primary route) direction.
3144 Problems may arise when a faster direct route exists and router is routing
3145 a channel message. Currently channel messages must be routed either
3146 in upstream or downstream, they cannot be routed to other direct routes.
3147 The SILC protocol should have a shortest path discovery protocol, and some
3148 existing routing protocol, that can handle a ring network with other
3149 direct routes inside the ring (so called hybrid ring-mesh topology),
3150 MAY be defined to be used with the SILC protocol. Additional
3151 specifications MAY be written on the subject to permeate this
3155 2.12 Packet Broadcasting
3157 SILC packets MAY be broadcasted in SILC network. However, only router
3158 server may send or receive broadcast packets. Client and normal server
3159 MUST NOT send broadcast packets and they MUST ignore broadcast packets
3160 if they receive them. Broadcast packets are sent by setting Broadcast
3161 flag to the SILC packet header.
3163 Broadcasting packets means that the packet is sent to all routers in
3164 the SILC network, except to the router that sent the packet. The router
3165 receiving broadcast packet MUST send the packet to its primary route.
3166 The fact that SILC routers may have several router connections can
3167 cause problems, such as race conditions inside the SILC network, if
3168 care is not taken when broadcasting packets. Router MUST NOT send
3169 the broadcast packet to any other route except to its primary route.
3171 If the primary route of the router is the original sender of the packet
3172 the packet MUST NOT be sent to the primary route. This may happen
3173 if router has several router connections and some other router uses
3174 the router as its primary route.
3176 Routers use broadcast packets to broadcast for example information
3177 about newly registered clients, servers, channels etc. so that all the
3178 routers may keep these informations up to date.
3181 3 Security Considerations
3183 Security is central to the design of this protocol, and these security
3184 considerations permeate the specification. Common security considerations
3185 such as keeping private keys truly private and using adequate lengths for
3186 symmetric and asymmetric keys must be followed in order to maintain the
3187 security of this protocol.
3196 Internet Draft 15 January 2007
3199 [SILC1] Riikonen, P., "Secure Internet Live Conferencing (SILC),
3200 Protocol Specification", Internet Draft, January 2007.
3202 [SILC3] Riikonen, P., "SILC Key Exchange and Authentication
3203 Protocols", Internet Draft, January 2007.
3205 [SILC4] Riikonen, P., "SILC Commands", Internet Draft, January 2007.
3207 [IRC] Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
3210 [IRC-ARCH] Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
3213 [IRC-CHAN] Kalt, C., "Internet Relay Chat: Channel Management", RFC
3216 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
3219 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
3222 [SSH-TRANS] Ylonen, T., et al, "SSH Transport Layer Protocol",
3225 [PGP] Callas, J., et al, "OpenPGP Message Format", RFC 2440,
3228 [SPKI] Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
3231 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key
3232 Infrastructure, Certificate and CRL Profile", RFC 2459,
3235 [Schneier] Schneier, B., "Applied Cryptography Second Edition",
3236 John Wiley & Sons, New York, NY, 1996.
3238 [Menezes] Menezes, A., et al, "Handbook of Applied Cryptography",
3241 [OAKLEY] Orman, H., "The OAKLEY Key Determination Protocol",
3242 RFC 2412, November 1998.
3244 [ISAKMP] Maughan D., et al, "Internet Security Association and
3245 Key Management Protocol (ISAKMP)", RFC 2408, November
3252 Internet Draft 15 January 2007
3255 [IKE] Harkins D., and Carrel D., "The Internet Key Exchange
3256 (IKE)", RFC 2409, November 1998.
3258 [HMAC] Krawczyk, H., "HMAC: Keyed-Hashing for Message
3259 Authentication", RFC 2104, February 1997.
3261 [PKCS1] Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
3262 Specifications, Version 2.0", RFC 2437, October 1998.
3264 [RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate
3265 Requirement Levels", BCP 14, RFC 2119, March 1997.
3267 [SFTP] Ylonen T., and Lehtinen S., "Secure Shell File Transfer
3268 Protocol", Internet Draft, March 2001.
3270 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
3271 10646", RFC 3629, November 2003.
3280 EMail: priikone@iki.fi
3283 6 Full Copyright Statement
3285 Copyright (C) The Internet Society (2007).
3287 This document is subject to the rights, licenses and restrictions
3288 contained in BCP 78, and except as set forth therein, the authors
3289 retain all their rights.
3291 This document and the information contained herein are provided on an
3292 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
3293 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
3294 ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
3295 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
3296 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
3297 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.