.ds RF FORMFEED[Page %]
.ds CF
.ds LH Internet Draft
-.ds RH 13 September 2000
+.ds RH 6 October 2000
.ds CH
.na
.hy 0
.nf
Network Working Group P. Riikonen
Internet-Draft
-draft-riikonen-silc-pp-01.txt 13 September 2000
-Expires: 13 May 2001
+draft-riikonen-silc-pp-01.txt 6 October 2000
+Expires: 6 Jun 2001
.in 3
2.2 SILC Packet Header ........................................ 5
2.3 SILC Packet Types ......................................... 7
2.3.1 SILC Packet Payloads ................................ 15
- 2.3.2 Disconnect Payload .................................. 15
- 2.3.3 Success Payload ..................................... 16
- 2.3.4 Failure Payload ..................................... 16
- 2.3.5 Reject Payload ...................................... 17
- 2.3.6 Notify Payload ...................................... 17
- 2.3.7 Error Payload ....................................... 18
- 2.3.8 Channel Message Payload ............................. 19
- 2.3.9 Channel Key Payload ................................. 20
- 2.3.10 Private Message Payload ............................ 23
- 2.3.11 Private Message Key Payload ........................ 24
- 2.3.12 Command Payload .................................... 25
- 2.3.12.1 Command Argument Payload .................. 25
- 2.3.13 Command Reply Payload .............................. 26
- 2.3.14 Connection Auth Request Payload .................... 27
- 2.3.15 New ID Payload ..................................... 28
- 2.3.16 New ID List Payload ................................ 29
- 2.3.17 New Client Payload ................................. 29
- 2.3.18 New Server Payload ................................. 31
- 2.3.19 New Channel Payload ................................ 31
- 2.3.20 New Channel User Payload ........................... 32
- 2.3.21 New Channel List Payload ........................... 33
- 2.3.22 New Channel User List Payload ...................... 34
- 2.3.23 Replace ID Payload ................................. 34
- 2.3.24 Remove ID Payload .................................. 35
- 2.4 SILC ID Types ............................................. 36
- 2.5 Packet Encryption And Decryption .......................... 37
- 2.5.1 Normal Packet Encryption And Decryption ............. 37
- 2.5.2 Channel Message Encryption And Decryption ........... 37
- 2.5.3 Private Message Encryption And Decryption ........... 38
- 2.6 Packet MAC Generation ..................................... 39
- 2.7 Packet Padding Generation ................................. 39
- 2.8 Packet Compression ........................................ 40
- 2.9 Packet Sending ............................................ 40
- 2.10 Packet Reception ......................................... 41
- 2.11 Packet Routing ........................................... 42
- 2.12 Packet Forwarding ........................................
- 2.13 Packet Broadcasting ...................................... 41
- 2.14 Packet Tunneling ......................................... 42
-3 Security Considerations ....................................... 43
-4 References .................................................... 43
-5 Author's Address .............................................. 44
+ 2.3.2 Generic payloads .................................... 16
+ 2.3.2.1 ID Payload .................................. 16
+ 2.3.2.2 Argument Payload ............................ 16
+ 2.3.3 Disconnect Payload .................................. 17
+ 2.3.4 Success Payload ..................................... 18
+ 2.3.5 Failure Payload ..................................... 18
+ 2.3.6 Reject Payload ...................................... 19
+ 2.3.7 Notify Payload ...................................... 20
+ 2.3.8 Error Payload ....................................... 21
+ 2.3.9 Channel Message Payload ............................. 22
+ 2.3.10 Channel Key Payload ................................ 24
+ 2.3.11 Private Message Payload ............................ 26
+ 2.3.12 Private Message Key Payload ........................ 27
+ 2.3.13 Command Payload .................................... 28
+ 2.3.14 Command Reply Payload .............................. 29
+ 2.3.15 Connection Auth Request Payload .................... 29
+ 2.3.16 New ID Payload ..................................... 30
+ 2.3.17 New ID List Payload ................................ 31
+ 2.3.18 New Client Payload ................................. 31
+ 2.3.19 New Server Payload ................................. 32
+ 2.3.20 New Channel Payload ................................ 33
+ 2.3.21 New Channel User Payload ........................... 34
+ 2.3.22 New Channel List Payload ........................... 35
+ 2.3.23 New Channel User List Payload ...................... 36
+ 2.3.24 Replace ID Payload ................................. 36
+ 2.3.25 Remove ID Payload .................................. 37
+ 2.3.26 Remove Channel User Payload ........................ 38
+ 2.3.27 Set Mode Payload ................................... XXX
+ 2.3.28 Set Mode List Payload .............................. XXX
+ 2.4 SILC ID Types ............................................. 39
+ 2.5 Packet Encryption And Decryption .......................... 39
+ 2.5.1 Normal Packet Encryption And Decryption ............. 39
+ 2.5.2 Channel Message Encryption And Decryption ........... 40
+ 2.5.3 Private Message Encryption And Decryption ........... 41
+ 2.6 Packet MAC Generation ..................................... 41
+ 2.7 Packet Padding Generation ................................. 42
+ 2.8 Packet Compression ........................................ 42
+ 2.9 Packet Sending ............................................ 43
+ 2.10 Packet Reception ......................................... 43
+ 2.11 Packet Routing ........................................... 44
+ 2.12 Packet Forwarding ........................................ 44
+ 2.13 Packet Broadcasting ...................................... 45
+ 2.14 Packet Tunneling ......................................... 45
+3 Security Considerations ....................................... 46
+4 References .................................................... 46
+5 Author's Address .............................................. 47
.ti 0
List of Figures
.nf
Figure 1: Typical SILC Packet
Figure 2: SILC Packet Header
-Figure 3: Disconnect Payload
-Figure 4: Success Payload
-Figure 5: Failure Payload
-Figure 6: Reject Payload
-Figure 7: Notify Payload
-Figure 8: Error Payload
-Figure 9: Channel Message Payload
-Figure 10: Channel Key Payload
-Figure 11: Private Message Payload
-Figure 12: Private Message Key Payload
-Figure 13: Command Payload
-Figure 14: Command Argument Payload
-Figure 15: Connection Auth Request Payload
-Figure 16: New ID Payload
+Figure 3: ID Payload
+Figure 4: Argument Payload
+Figure 5: Disconnect Payload
+Figure 6: Success Payload
+Figure 7: Failure Payload
+Figure 8: Reject Payload
+Figure 9: Notify Payload
+Figure 10: Error Payload
+Figure 11: Channel Message Payload
+Figure 12: Channel Key Payload
+Figure 13: Private Message Payload
+Figure 14: Private Message Key Payload
+Figure 15: Command Payload
+Figure 16: Connection Auth Request Payload
Figure 17: New Client Payload
Figure 18: New Server Payload
Figure 19: New Channel Payload
Figure 20: New Channel User Payload
Figure 21: Replace ID Payload
-Figure 22: Remove ID Payload
-Figure 23: Remove Channel User Payload
+Figure 22: Remove Channel User Payload
+Figure 23: Set Mode Payload
.ti 0
.in 5
.nf
- 1 2 3
+ 1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length * | Flags | Packet Type |
Following flags are reserved for this field:
-
-
No flags 0x00
In this case the field is ignored.
packet types may be forwarded. Receiver of packet
with this flag set must not forward the packet any
further. See section 2.12 Packet Forwarding for
- desribtion of packet forwarding.
+ description of packet forwarding.
Broadcast 0x04
Source ID field in the header, not including this or any
other fields.
-
-
o Destination ID Length (2 bytes) - Indicates the length of the
Destination ID field in the header, not including this or
any other fields.
the disconnection is sent inside the packet payload. Client
usually does not send this packet.
- Payload of the packet: See section 2.3.2 Disconnect Payload
+ Payload of the packet: See section 2.3.3 Disconnect Payload
2 SILC_PACKET_SUCCESS
This packet is sent upon successful execution of some protocol.
The status of the success is sent in the packet.
- Payload of the packet: See section 2.3.3 Success Payload
+ Payload of the packet: See section 2.3.4 Success Payload
3 SILC_PACKET_FAILURE
This packet is sent upon failure of some protocol. The status
of the failure is sent in the packet.
- Payload of the packet: See section 2.3.4 Failure Payload
+ Payload of the packet: See section 2.3.5 Failure Payload
4 SILC_PACKET_REJECT
This packet may be sent upon rejection of some protocol.
The status of the rejection is sent in the packet.
- Payload of the packet: See section 2.3.5 Reject Payload
+ Payload of the packet: See section 2.3.6 Reject Payload
5 SILC_PACKET_NOTIFY
server to client, although it may be sent from server to another
server as well. Client never sends this packet. Server may
send this packet to channel as well when the packet is
- distributed to all clients on the channel. Receiver of this
- packet may ignore the packet if it chooses so. However, it
- should not be ignored.
+ distributed to all clients on the channel.
- Payload of the packet: See section 2.3.6 Notify Payload.
+ Payload of the packet: See section 2.3.7 Notify Payload.
6 SILC_PACKET_ERROR
most likely to take action anyway. This packet may be sent
to entity that is indirectly connected to the sender.
- Payload of the packet: See section 2.3.7 Error Payload.
+ Payload of the packet: See section 2.3.8 Error Payload.
7 SILC_PACKET_CHANNEL_MESSAGE
by channel specific keys. Channel Keys are distributed by
SILC_PACKET_CHANNEL_KEY packet.
- When client sends this packet the destination ID in the SILC
- header must be the Channel ID of the channel the message is
- destined to. If server sends this packet to a client the
- destination ID in the SILC header must be the Client ID of
- the client receiving the packet.
-
- If server sends this packet to router or if router sends this
- packet to server or another router the destination ID in the
- SILC header must be the Channel ID of the channel. Server
- (including router) distributes this packet only to its local
- clients who are joined to the channel. Servers and routers
- also determines who are on the channel and when this packet
- needs to be sent, as described in section Client To Client
- in [SILC1].
-
- Payload of the packet: See section 2.3.8 Channel Message
+ Payload of the packet: See section 2.3.9 Channel Message
Payload
may send this packet. This packet may be sent to entity
that is indirectly connected to the sender.
- Payload of the packet: See section 2.3.9 Channel Key Payload
+ Payload of the packet: See section 2.3.10 Channel Key Payload
9 SILC_PACKET_PRIVATE_MESSAGE
used as well if both of the client knows it, however, it needs
to be agreed outside SILC. See more of this in [SILC1].
- Payload of the packet: See section 2.3.10 Private Message
+ Payload of the packet: See section 2.3.11 Private Message
Payload
default or to use normal session keys by default, is
implementation specific issue. See more of this in [SILC1].
- Payload of the packet: See section 2.3.11 Private Message
+ Payload of the packet: See section 2.3.12 Private Message
Key Payload
This packet may be sent to entity that is indirectly connected
to the sender.
- Payload of the packet: See section 2.3.12 Command Payload
+ Payload of the packet: See section 2.3.13 Command Payload
12 SILC_PACKET_COMMAND_REPLY
The contents of this packet is command specific. This packet
maybe sent to entity that is indirectly connected to the sender.
- Payload of the packet: See section 2.3.13 Command Reply
- Payload and section 2.3.12 Command
+ Payload of the packet: See section 2.3.14 Command Reply
+ Payload and section 2.3.13 Command
Payload
The party receiving this payload must respond with the same
packet including the mandatory authentication method.
- Payload of the packet: See section 2.3.14 Connection Auth
+ Payload of the packet: See section 2.3.15 Connection Auth
Request Payload
distributed by this packet. Only server may send this packet,
however, client must be able to receive this packet.
- Payload of the packet: See section 2.3.15 New ID Payload
+ Payload of the packet: See section 2.3.16 New ID Payload
19 SILC_PACKET_NEW_ID_LIST
type except that it may include several ID's. Client must
not send this packet.
- Payload of the packet: See section 2.3.16 New ID List
+ Payload of the packet: See section 2.3.17 New ID List
Payload
authentication protocols has been completed. Client sends
various information about itself in this packet.
- Payload of the packet: See section 2.3.17 New Client Payload
+ Payload of the packet: See section 2.3.18 New Client Payload
21 SILC_PACKET_NEW_SERVER
its Server ID and other information in this packet.
Client must not send or receive this packet.
- Payload of the packet: See section 2.3.18 New Server Payload
+ Payload of the packet: See section 2.3.19 New Server Payload
22 SILC_PACKET_NEW_CHANNEL
packet. This packet maybe sent to entity that is indirectly
connected to the sender.
- Payload of the packet: See section 2.3.19 New Channel Payload
+ Payload of the packet: See section 2.3.20 New Channel Payload
23 SILC_PACKET_NEW_CHANNEL_USER
The packet is sent after user has joined to the channel. Server
may send this packet to its router and router may send this to
its primary router. Client must not send this packet. This
- packet maybe sent to entity that is indirectly connected to the
- sender.
+ packet maybe sent to entity that is indirectly connected to
+ the sender.
+
+ When received, the server or router must distribute
+ SILC_NOTIFY_TYPE_JOIN to local clients on the channel.
- Payload of the packet: See section 2.3.20 New Channel User
+ Payload of the packet: See section 2.3.21 New Channel User
Payload
SILC_PACKET_NEW_CHANNEL except that it may include several
payloads. Client must not send this packet.
- Payload of the packet: See section 2.3.21 New Channel List
+ Payload of the packet: See section 2.3.22 New Channel List
Payload
packet SILC_PACKET_NEW_CHANNEL_USER except that it may
include several payloads. Client must not send this packet.
- Payload of the packet: See section 2.3.22 New Channel User
+ When received, the server or router must distribute
+ SILC_NOTIFY_TYPE_JOIN to local clients on the channel.
+
+ Payload of the packet: See section 2.3.23 New Channel User
List Payload
packet. This packet maybe sent to entity that is indirectly
connected to the sender.
- Payload of the packet: See section 2.3.23 Replace ID Payload
+ When received and the replaced ID is Client ID the server or
+ router must distribute SILC_NOTIFY_TYPE_NICK_CHANGE to the
+ local clients on the channels (if any) of the client whose
+ ID was changed. However, the notify type must be sent only
+ once per client.
+
+ Payload of the packet: See section 2.3.24 Replace ID Payload
27 SILC_PACKET_REMOVE_ID
this packet. This packet maybe sent to entity that is
indirectly connected to the sender.
- Payload of the packet: See section 2.3.24 Remove ID Payload
+ When received and the removed ID is Client ID the server or
+ router must distribute SILC_NOTIFY_TYPE_SIGNOFF to the
+ local clients on the channels (if any) of the client whose
+ ID was removed. However, the notify type must be sent only
+ once per client.
+
+ Payload of the packet: See section 2.3.25 Remove ID Payload
28 SILC_PACKET_REMOVE_CHANNEL_USER
This packet is used to remove user from a channel. This is
used by router to notify other routers in the network that a
- client has leaved a channel. This packet maybe sent to entity
+ client has left a channel. This packet maybe sent to entity
that is indirectly connected to the sender.
- Payload of the packet: See section 2.3.25 Remove Channel User
+ When received, the server or router must distribute
+ SILC_NOTIFY_TYPE_LEAVE to local clients on the channel.
+
+ Payload of the packet: See section 2.3.26 Remove Channel User
Payload
as SILC Key Exchange protocol is executed. This packet does
not have a payload.
+
+ 31 SILC_PACKET_SET_MODE
+
+ This packet is used by servers and routers to inform each
+ other about changed modes. When channel's and client'c channel
+ mode is changed this packet is used to distribute the information
+ to all routers in the network. Server can send this packet but
+ must not receive it. Router can send and receive this packet.
+ Client must not send or receive this packet.
+
+ Payload of the packet: See section 2.3.27 Set Mode Payload
+
+
+ 32 SILC_PACKET_SET_MODE_LIST
+
+ This packet is used to distribute list of Set Mode payloads
+ from server to routers. This is equivalent to the packet
+ SILC_PACKET_SET_MODE except that it may include several
+ payloads. Client must not send this packet.
+
+ Payload of the packet: See section 2.3.28 Set Mode List
+ Payload
+
+ 33 SILC_PACKET_HEARTBEAT
- 31 - 254
+ This packet is used by clients, servers and routers to keep the
+ connection alive. It is recommended that all servers implement
+ keepalive actions and perform it to both direction in a link.
+ This packet does not have a payload.
+
+
+ 34 - 199
Currently undefined commands.
+ 200 - 254
+
+ These packet types are reserved for private use and they will not
+ be defined by this document.
+
+
255 SILC_PACKET_MAX
This type is reserved for future extensions and currently it
.ti 0
-2.3.2 Disconnect Payload
+2.3.2 Generic payloads
+
+This section describes generic payloads that are not associated to any
+specific packet type. They can be used for example inside some other
+packet payloads.
+
+
+.ti 0
+2.3.2.1 ID Payload
+
+This payload can be used to send an ID. ID's are variable length thus
+this payload provides a way to send variable length ID's.
+
+Following diagram represents the ID Payload.
+
+.in 5
+.nf
+ 1 2 3
+ 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
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| ID Type | ID Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| |
+~ ID Data ~
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.in 3
+
+.ce
+Figure 3: ID Payload
+
+
+.in 6
+o ID Type (2 bytes) - Indicates the type of the ID. See
+ section 2.4 SILC ID Types for list of defined ID types.
+
+o ID Length (2 bytes) - Length of the ID Data area not
+ including the length of any other fields in the payload.
+
+o ID Data (variable length) - The actual ID data.
+.in 3
+
+
+.ti 0
+2.3.2.2 Argument Payload
+
+Argument Payload is used to set arguments for any packet payload that
+needs and supports arguments, such as commands. Number of arguments
+associated with a packet must be indicated by the packet payload who
+needs the arguments. Argument Payloads must always reside right after
+the packet payload needing the arguments. Incorrect amount of argument
+payloads must cause rejection of the packet. Following diagram represents
+the Argument Payload.
+
+
+.in 5
+.nf
+ 1 2 3
+ 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
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Payload Length | Argument Type | |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
+| |
+~ Argument Data ~
+| |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+.in 3
+
+.ce
+Figure 4: Argument Payload
+
+
+.in 6
+o Payload Length (2 bytes) - Length of the argument payload data
+ area not including the length of any other fields in the
+ payload.
+
+o Argument Type (1 byte) - Indicates the type of the argument.
+ Every argument may have a specific type that must be defined
+ by the packet payload needing the argument. For example
+ every command specify a number for each argument that maybe
+ associated with the command. By using this number the receiver
+ of the packet knows what type of argument this is. If there is
+ no specific argument type this field is set to zero (0).
+
+o Argument Data (variable length) - Argument data.
+.in 3
+
+
+.ti 0
+2.3.3 Disconnect Payload
Disconnect payload is sent upon disconnection. The payload is simple;
reason of disconnection is sent to the disconnected party.
the Disconnect Payload.
+
+
+
+
+
.in 5
.nf
1 2 3
.in 3
.ce
-Figure 3: Disconnect Payload
+Figure 5: Disconnect Payload
.ti 0
-2.3.3 Success Payload
+2.3.4 Success Payload
Success payload is sent when some protocol execution is successfully
completed. The payload is simple; indication of the success is sent.
.in 3
.ce
-Figure 4: Success Payload
+Figure 6: Success Payload
.in 6
.ti 0
-2.3.4 Failure Payload
+2.3.5 Failure Payload
This is opposite of Success Payload. Indication of failure of
some protocol is sent in the payload.
.in 3
.ce
-Figure 5: Failure Payload
+Figure 7: Failure Payload
.in 6
.ti 0
-2.3.5 Reject Payload
+2.3.6 Reject Payload
This payload is sent when some protocol is rejected to be executed.
Other operations may send this as well that was rejected. The
.in 3
.ce
-Figure 6: Reject Payload
+Figure 8: Reject Payload
.in 6
.ti 0
-2.3.6 Notify Payload
+2.3.7 Notify Payload
Notify payload is used to send notify messages. The payload is usually
sent from server to client, however, server may send it to another
-server as well. Client must not send this payload. The receiver of
-this payload may totally ignore the contents of the payload, however,
-notify message should be noted and possibly logged.
+server as well. This payload may also be sent to a channel. Client must
+not send this payload. The receiver of this payload may totally ignore the
+contents of the payload, however, notify message should be audited.
The payload may only be sent with SILC_PACKET_NOTIFY packet. It must
not be sent in any other packet type. Following diagram represents the
1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Notify Type | |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
-| |
-~ Notify Message ~
-| |
+| Notify Type | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Argument Nums |
++-+-+-+-+-+-+-+-+
.in 3
.ce
-Figure 7: Notify Payload
+Figure 9: Notify Payload
.in 6
o Notify Type (2 bytes) - Indicates the type of the notify
message.
-o Notify Message (variable length) - Human readable notify
- message.
+o Payload Length (2 bytes) - Length of the entire Notify Payload
+ including any associated Argument Payloads.
+
+o Argument Nums (2 bytes) - Indicates the number of Argument
+ Payloads associated to this payload. Notify types may define
+ arguments to be send along the notify message.
.in 3
-Following notify types has been defined:
+Following list of currently defined notify types. The format for notify
+arguments is same as in SILC commands described in [SILC1]. Also, all
+ID's sent in arguments are sent inside ID Payload.
.in 6
0 SILC_NOTIFY_TYPE_NONE
- If no specific notify type apply for the notify
- message this type may be used.
+ If no specific notify type apply for the notify message this type
+ may be used.
+
+ Max Arguments: 1
+ Arguments: (1) <message>
+
+ The <message> is implementation specific free text string. Receiver
+ may ignore this message.
+
1 SILC_NOTIFY_TYPE_INVITE
- Sent when receiver has been invited to a channel.
+ Sent when receiver has been invited to a channel. This type must be
+ sent directly to the invited client.
+
+ Max Arguments: 2
+ Arguments: (1) <Client ID> (2) <Channel ID>
+
+ The <Client ID> is the client who invites the receiver of this type
+ to channel indicated by <Channel ID>.
+
2 SILC_NOTIFY_TYPE_JOIN
- Sent when client has joined to a channel.
+ Sent when client has joined to a channel. The server must distribute
+ this type only to the local clients on the channel and then send
+ SILC_PACKET_NEW_CHANNEL_USER packet to its primary route. The router
+ or server receiving the packet distributes this type to the local
+ clients on the channel. See description of SILC_PACKET_NEW_CHANNEL_USER
+ packet for more information.
+
+ Max Arguments: 1
+ Arguments: (1) <Client ID>
+
+ The <Client ID> is the client that joined to the channel.
+
3 SILC_NOTIFY_TYPE_LEAVE
- Sent when client has left a channel.
+ Sent when client has left a channel. The server must distribute
+ this type only to the local clients on the channel and then send
+ SILC_PACKET_REMOVE_CHANNEL_USER packet to its primary route. The
+ router or server receiving the packet distributes this type to the
+ local clients on the channel. See description of
+ SILC_PACKET_REMOVE_CHANNEL_USER packet for more information.
+
+ Max Arguments: 1
+ Arguments: (1) <Client ID>
+
+ The <Client ID> is the client who left the channel.
+
4 SILC_NOTIFY_TYPE_SIGNOFF
- Sent when client signoffs from SILC network.
+ Sent when client signoffs from SILC network. This type is sent only
+ if the client was joined to any channel. This type is sent by server
+ or router when SILC_PACKET_REMOVE_ID packet has been received. See
+ detailed information from description of SILC_PACKET_REMOVE_ID packet.
+
+ Max Arguments: 1
+ Arguments: (1) <Client ID>
+
+ The <Client ID> is the client who left SILC network.
+
+
+5 SILC_NOTIFY_TYPE_TOPIC_SET
+
+ Sent when topic is set/changed on a channel. This type must be sent
+ only to the clients who is joined on the channel whose topic was
+ set or changed.
+
+ Max Arguments: 2
+ Arguments: (1) <Client ID> (2) <topic>
+
+ The <Client ID> is the client who set or changed the <topic>.
+
+
+6 SILC_NOTIFY_TYPE_NICK_CHANGE
+
+ Sent when client changes nick on a channel. This type is sent only if
+ the client has joined to any channel. This type is sent by server or
+ router when SILC_PACKET_REPLACE_ID packet has been received. See
+ detailed information from description of SILC_PACKET_REPLACE_ID packet.
+
+ Max Arguments: 2
+ Arguments: (1) <Old Client ID> (2) <New Client ID>
+
+ The <Old Client ID> is the old ID of the client who changed the
+ nickname. The <New Client ID> is the new ID generated by the change
+ of the nickname.
+
+
+7 SILC_NOTIFY_TYPE_CMODE_CHANGE
+
+ Sent when channel mode has changed. This type must be sent only to
+ the clients who is joined on the channel whose mode was changed.
+
+ Max Arguments: 2
+ Arguments: (1) <Client ID> (2) <mode mask>
+
+ The <Client ID> is the client who changed the mode. The <mode mask>
+ is the new mode mask of the channel.
+
+
+8 SILC_NOTIFY_TYPE_CUMODE_CHANGE
+
+ Sent when user mode on channel has changed. This type must be sent
+ only to the clients who is joined on the channel where the target
+ client is on.
+
+ Max Arguments: 3
+ Arguments: (1) <Client ID> (2) <mode mask>
+ (3) <Target Client ID>
+
+ The <Client ID> is the client who changed the mode. The <mode mask>
+ is the new mode mask of the channel. The <Target Client ID> is the
+ client which mode was changed.
+
+
+9 SILC_NOTIFY_TYPE_MOTD
+
+ Sent when Message of the Day (motd) is sent to client.
+
+ Max Arguments: 1
+ Arguments: (1) <motd>
+
+ The <motd> is the Message of the Day.
+
+
+10 SILC_NOTIFY_TYPE_CHANNEL_CHANGE
+
+ Sent when channel's ID has changed for a reason or another. This
+ is sent by noral server to the client. Client must change the
+ old Channel ID to the new one. This type must be sent only to the
+ clients who is joined on the channel.
+
+ Max Arguments: 2
+ Arguments: (1) <Old Channel ID> (2) <New Channel ID>
+
+ The <Old Channel ID> is the channel's old ID and the <New Channel ID>
+ is the new one that must replace the old one.
+
.in 3
Notify types starting from 16384 are reserved for private notify
.ti 0
-2.3.7 Error Payload
+2.3.8 Error Payload
Error payload is sent upon error. Error may occur in various
conditions when server sends this packet. Client may not send this
.in 3
.ce
-Figure 8: Error Payload
+Figure 10: Error Payload
.in 6
.ti 0
-2.3.8 Channel Message Payload
+2.3.9 Channel Message Payload
Channel messages are the most common messages sent in the SILC.
Channel Message Payload is used to send message to channels. These
(*) indicates that the field is not encrypted.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.in 5
.nf
1 2 3
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Nickname Length | |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
-| |
-~ Nickname ~
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Length | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
| |
.in 3
.ce
-Figure 9: Channel Message Payload
+Figure 11: Channel Message Payload
.in 6
-o Nickname Length (2 bytes) - Indicates the length of the
- Nickname field, not including any other field.
-
-o Nickname (variable length) - Nickname of the sender of the
- channel message. This should not be trusted as a definite
- sender of the channel message. The SILC Packet Header in
- the packet indicates the true sender of the packet and
- client should verify that the nickname sent here belongs
- to the Client ID in the SILC Packet Header. This nickname
- is merely provided to be displayed by the client.
-
- If server is sending this packet this field is not included
- and zero (0) length must be set to the Nickname Length field.
-
o Message Length (2 bytes) - Indicates the length of the
the Message Data field in the payload, not including any
other field.
-
o Message Data (variable length) - The actual message to
the channel.
.ti 0
-2.3.9 Channel Key Payload
+2.3.10 Channel Key Payload
All traffic in channels are protected by channel specific keys.
Channel Key Payload is used to distribute channel keys to all
clients on the particular channel. Channel keys are sent when
the channel is created, when new user joins to the channel and
-whenever a user leaves a channel. Server creates the new
+whenever a user has left a channel. Server creates the new
channel key and distributes it to the clients by encrypting this
payload with the session key shared between the server and
the client. After that, client starts using the key received
in this payload to protect the traffic on the channel.
+The client who is joining to the channel receives its key in the
+SILC_COMMAND_JOIN command reply message thus it is not necessary to
+send this payload to the entity who sent the SILC_COMMAND_JOIN command.
+
Channel keys are cell specific thus every router in cell have
to create a channel key and distribute it if any client in the
cell has joined to a channel. Channel traffic between cell's
are not encrypted using channel keys, they are encrypted using
normal session keys between two routers. Inside a cell, all
channel traffic is encrypted with the specified channel key.
-Channel key should expire peridiocally, say, in one hour, in
+Channel key should expire periodically, say, in one hour, in
which case new channel key is created and distributed.
The payload may only be sent with SILC_PACKET_CHANNEL_KEY packet.
represents the Channel Key Payload.
+
+
+
+
+
+
+
+
+
+
+
.in 5
.nf
1 2 3
.in 3
.ce
-Figure 10: Channel Key Payload
+Figure 12: Channel Key Payload
.ti 0
-2.3.10 Private Message Payload
+2.3.11 Private Message Payload
Private Message Payload is used to send private message between
two clients (or users for that matter). The messages are sent only
.in 3
.ce
-Figure 11: Private Message Payload
+Figure 13: Private Message Payload
.in 6
.ti 0
-2.3.11 Private Message Key Payload
+2.3.12 Private Message Key Payload
This payload is used to send key from client to another client that
is going to be used to protect the private messages between these
.in 3
.ce
-Figure 12: Private Message Key Payload
+Figure 14: Private Message Key Payload
.ti 0
-2.3.12 Command Payload
+2.3.13 Command Payload
Command Payload is used to send SILC commands from client to server.
Also server may send commands to other servers. Following diagram
.in 3
.ce
-Figure 13: Command Payload
+Figure 15: Command Payload
.in 6
o Arguments Num (1 byte) - Indicates the number of arguments
associated with the command. If there are no arguments this
field is set to zero (0). The arguments must follow the
- command payload.
+ command payload. See section 2.3.2.2 for definition of the
+ Argument Payload.
o Command Unifier (2 bytes) - Unifies this command at the
sender's end. The entity who replies to this command must
can identify which command reply belongs to which originally
sent command. What this field includes is implementation
issue but it is recommended that wrapping counter value is
- used in the field.
+ used in the field. Value zero (0) in this field means that
+ no specific value is set.
.in 3
See [SILC1] for detailed description of different SILC commands,
.ti 0
-2.3.12.1 Command Argument Payload
-
-Command Argument Payload is used to set arguments for SILC commands.
-Number of arguments associated with a command are indicated by the
-Command Payload in the Arguments Num field. Command argument
-payloads may only be used with a command payload and they must
-always reside right after the command payload. Incorrect amount of
-argument payloads must cause rejection of the packet. Following
-diagram represents the Command Argument Payload.
-
-
-.in 5
-.nf
- 1 2 3
- 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Argument Num | Argument Type | Payload Length |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| |
-~ Argument Data ~
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.in 3
-
-.ce
-Figure 14: Command Argument Payload
-
-
-.in 6
-o Argument Num (1 byte) - Indicates the number of this argument.
- For first argument this is set to 1, for second argument this
- is set to 2, and so forth. If incorrect value is found
- in this field the packet must be discarded. Value is
- incorrect if it is zero (0) or, for example, a third argument
- does not include value 3.
-
-o Argument Type (1 byte) - Indicates the type of the argument.
- Every command specify a number for each argument that maybe
- associated with the command. By using this number the receiver
- of the packet knows what type of argument this is. The numbers
- are command specific and has been defined in section SILC
- Commands in [SILC1]. This field makes it possible to send
- arguments in free order as this field is used to identify
- the specific type of the argument.
-
-o Payload Length (2 bytes) - Length of the argument payload data
- area not including the length of any other fields in the
- payload.
-
-o Argument Data (variable length) - Argument data.
-.in 3
-
-
-.ti 0
-2.3.13 Command Reply Payload
+2.3.14 Command Reply Payload
Command Reply Payload is used to send replies to the commands. The
Command Reply Payload is identical to the Command Payload thus see the
.ti 0
-2.3.14 Connection Auth Request Payload
+2.3.15 Connection Auth Request Payload
Client may send this payload to server to request the authentication
method that must be used in authentication protocol. If client knows
.in 3
.ce
-Figure 15: Connection Auth Request Payload
+Figure 16: Connection Auth Request Payload
.in 6
.ti 0
-2.3.15 New ID Payload
+2.3.16 New ID Payload
New ID Payload is a multipurpose payload. It is used to send newly
created ID's from clients and servers. When client connects to server
This payload is also used when server tells its router that new client
has registered to the SILC network. In this case the server sends
-the Client ID of the client to the router. Similiary when router
+the Client ID of the client to the router. Similary when router
distributes information to other routers about the client in the SILC
network this payload is used.
SILC_PACKET_NEW_SERVER to the router it connected to. The case is same
when router connects to another router.
+However, this payload is not and must not be used to send information
+about new channels. New channels are always distributed by sending the
+dedicated SILC_PACKET_NEW_CHANNEL packet.
+
Hence, this payload is very important and used every time when some
new entity is registered to the SILC network. Client never sends this
payload. Both client and server (and router) may receive this payload.
-The payload may only be sent with SILC_PACKET_NEW_ID packet. It must
-not be sent in any other packet type. Following diagram represents the
-New ID Payload.
-
-
-.in 5
-.nf
- 1 2 3
- 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| ID Type | ID Length |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| |
-~ ID Data ~
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.in 3
-
-.ce
-Figure 16: New ID Payload
-
-
-.in 6
-o ID Type (2 bytes) - Indicates the type of the ID. See
- section 2.4 SILC ID Types for list of defined ID types.
-
-o ID Length (2 bytes) - Length of the ID Data area not
- including the length of any other fields in the payload.
-
-o ID Data (variable length) - The actual ID data.
-.in 3
-
+The packet uses generic ID Payload as New ID Payload. See section
+2.3.2.1 for generic ID Payload.
.ti 0
-2.3.16 New ID List Payload
+2.3.17 New ID List Payload
New ID List Payload is used to distribute list of ID's usually from
server to router but also from router to other routers in the network.
.ti 0
-2.3.17 New Client Payload
+2.3.18 New Client Payload
When client is connected to the server, keys has been exchanged and
connection has been authenticated client must register itself to the
the New Client Payload.
+
.in 5
.nf
1 2 3
.ti 0
-2.3.18 New Server Payload
+2.3.19 New Server Payload
This payload is sent by server when it has completed successfully both
key exchange and connection authentication protocols. The server
the New Server Payload.
+
+
+
.in 5
.nf
1 2 3
.ti 0
-2.3.19 New Channel Payload
+2.3.20 New Channel Payload
Information about newly created channel is broadcasted to all routers
in the SILC network by sending this packet payload. Channels are
represents the New Channel Payload.
+
+
.in 5
.nf
1 2 3
.ti 0
-2.3.20 New Channel User Payload
+2.3.21 New Channel User Payload
When client (user) joins to a channel, server must notify routers
about the new user on the channel. Normal server sends this packet
diagram represents the New Channel User Payload.
+
+
+
+
.in 5
.nf
1 2 3
.ti 0
-2.3.21 New Channel List Payload
+2.3.22 New Channel List Payload
This payload is used to distribute list of new channels from server
-to routers. It might convenient to send list of new channels when
+to routers. It might be convenient to send list of new channels when
existing server connects to router, instead of sending them one
by one.
.ti 0
-2.3.22 New Channel User List Payload
+2.3.23 New Channel User List Payload
-This payload is used to distribute list of channel users on specific
-channel from server to routers. It might convenient to send list of
-channel users when existing server connects to router, instead of
-sending them one by one.
+This payload is used to distribute list of channel users on a channel
+from server to routers. It might convenient to send list of channel
+users when existing server connects to router, instead of sending them
+one by one. One list may include users for several different channels.
There is no specific payload for this packet type. The packet type
uses same payload as described in 2.3.20 New Channel User Payload.
-To form a list several payloads is put in the packet each after each.
+To form a list several payloads is put in the packet one after another.
The payload is variable in length but can be calculated by calculating
the length of the fields together. This forms one New Channel User
Payload in the list.
.ti 0
-2.3.23 Replace ID Payload
+2.3.24 Replace ID Payload
This payload is used to replace old ID with new ID sent in the payload.
When ID changes for some entity and the new ID is wanted to replace the
-
-
-
-
-
-
.in 5
.nf
1 2 3
.ti 0
-2.3.24 Remove ID Payload
+2.3.25 Remove ID Payload
Remove ID payload is used to remove ID from SILC network. This is used
-for example when client exits SILC network. The server must in this
-case send this payload to notify that this ID is not valid anymore.
-After this has been send the old ID must not be used anymore. Client
-must not send this payload.
-
-The payload may only be sent with SILC_PACKET_REMOVE_ID packet. It must
-not be sent in any other packet type. Following diagram represents the
-Remove Payload Payload.
-
-
-.in 5
-.nf
- 1 2 3
- 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
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| ID Type | ID Length |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| |
-~ ID Data ~
-| |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-.in 3
-
-.ce
-Figure 22: Remove ID Payload
+when client, server, router or channel is removed from the SILC network.
+After this payload has been send the old ID must not be used anymore.
+Client must not send or receive this payload.
-
-.in 6
-o ID Type (2 bytes) - Indicates the type of the ID to be
- removed. See section 2.4 SILC ID Types for list of defined
- ID types.
-
-o ID Length (2 bytes) - Length of the ID Data area not including
- the length of any other fields in the payload.
-
-o ID Data (variable length) - The actual ID data to be removed.
-.in 3
+The packet uses generic ID Payload as New ID Payload. See section
+2.3.2.1 for generic ID Payload.
.ti 0
-2.3.25 Remove Channel User Payload
+2.3.26 Remove Channel User Payload
Remove Channel User payload is used to remove a user from a channel network
wide. This is used by routers to notify other routers that a user has
-leaved a channel. As routers keep information about users on channels a
+left a channel. As routers keep information about users on channels a
user leaving channel must be removed from all routers. Normal server may
send this payload as well. Client must not send this payload.
represents the Remove Payload Payload.
+
+
+
.in 5
.nf
1 2 3
.in 3
.ce
-Figure 23: Remove Channel User Payload
+Figure 22: Remove Channel User Payload
.in 6
.in 3
+.ti 0
+2.3.27 Set Mode Payload
+
+Set Mode Payload is used by servers and routers to distribute to each
+other the information about changed modes in the SILC network. The
+payload is sent when channel's or client's channel mode is changed.
+Server can send this to router which will broadcast it further to other
+routers. However, normal server must not reiceve this payload. Client
+must not send or receive this payload.
+
+The payload may only be sent with SILC_PACKET_SET_MODE packet.
+It must not be sent in any other packet type. Following diagram
+represents the Set Mode Payload.
+
+
+
+.in 5
+.nf
+.in 5
+.nf
+ 1 2 3
+ 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
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Mode Type | Payload Length |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Mode Mask |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Argument Nums |
++-+-+-+-+-+-+-+-+
+.in 3
+
+.ce
+Figure 23: Set Mode Payload
+
+
+.in 6
+o Mode type (2 bytes) - Indicates the type of the mode that was
+ changed. Every type has arguments associated to the type which
+ are defined below. The following types are defined:
+
+ 0 SILC_MODE_TYPE_CHANNEL
+
+ Max Arguments: 2
+ Arguments: (1) <Channel ID> (2) <Client ID>
+
+ The <Channel ID> is the channel which mode was set and the
+ <Client ID> is the client who set it.
+
+
+ 1 SILC_MODE_TYPE_UCHANNEL
+
+ Max Arguments: 3
+ Arguments: (1) <Channel ID> (2) <Client ID>
+ (3) <Target Client ID>
+
+ The <Channel ID> is the channel where the <Client ID> and
+ the <Target Client ID> is on. The <Client ID> is the client
+ who set the <Target Client ID> mode.
+
+
+ 2 - RESERVED
+
+ Reserved types.
+
+
+ 32768 - Private range
+
+ Rest of the types are reserved for private use.
+
+o Payload Length (2 bytes) - Length of the entire Set Mode Payload
+ including any associated Argument Payloads.
+
+o Mode Mask (4 bytes) - Indicates the set mode mask. This is
+ specified by the mode type. See definitions of SILC_COMMAND_UMODE
+ for client modes, SILC_COMMAND_CMODE for channel modes and
+ SILC_COMMAND_CUMODE for client's channel modes in [SILC1].
+
+o Argument Nums (2 bytes) - Indicates the number of Argument
+ Payloads associated to this payload. Mode types may define
+ arguments to be send along this payload.
+.in 3
+
+
+.ti 0
+2.3.28 Set Mode List Payload
+
+This paylaod is used to distribute list of Set Mode payloads inside
+one packet. When server announces channels and client's on those
+channels to its primary router when it connects to it, it is convenient
+to send list of Set Mode payloads to set the modes for the channel
+and clients on those channel. One list may include several mode
+types.
+
+There is no specific payload for this packet type. The packet type
+uses same payload as described in 2.3.27 Set Mode Payload. To form a
+list several payloads are put in the packet one after another. The
+payload is variable in length but can be calculated by calculating the
+length of the fields together. This forms one Set Mode payload in the
+list.
+
+The list of payloads may only be sent with packet SILC_PACKET_SET_MODE_LIST.
+They must not be sent in any other packet type.
+
+
.ti 0
2.4 SILC ID Types
server or router en route must not decompress the packet.
+
.ti 0
2.9 Packet Sending
2.10 Packet Reception
On packet reception the receiver must check that all fields in the
-SILC Packet Header are valid sain. It must check the flags of the
+SILC Packet Header are valid. It must check the flags of the
header and act accordingly. It must also check the MAC of the packet
and if it is to be failed the packet must be discarded. Also if the
header of the packet includes any bad fields the packet must be
3 Security Considerations
Security is central to the design of this protocol, and these security
-considerations permeate the specification.
+considerations permeate the specification. Common security considerations
+such as keeping private keys truly private and using adequate lengths for
+symmetric and asymmetric keys must be followed in order to maintain the
+security of this protocol.
.ti 0
Key Management Protocol (ISAKMP)", RFC 2408, November
1998.
-[IKE] Harkins D., and Carrel D., "The Internet Key Exhange
+[IKE] Harkins D., and Carrel D., "The Internet Key Exchange
(IKE)", RFC 2409, November 1998.
[HMAC] Krawczyk, H., "HMAC: Keyed-Hashing for Message
Authentication", RFC 2104, February 1997.
+
+
+
+
.ti 0
5 Author's Address
EMail: priikone@poseidon.pspt.fi
-This Internet-Draft expires 13 May 2001
+This Internet-Draft expires 6 Jun 2001