updates.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 16 Apr 2001 17:58:49 +0000 (17:58 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 16 Apr 2001 17:58:49 +0000 (17:58 +0000)
doc/draft-riikonen-silc-ke-auth-02.nroff
doc/draft-riikonen-silc-pp-02.nroff
doc/draft-riikonen-silc-spec-02.nroff
doc/example_silcd.conf
includes/version.h
lib/silcclient/client_prvmsg.c
lib/silcclient/protocol.c
lib/silccore/silcprivate.c
lib/silccore/silcprivate.h
lib/silccrypt/silcrng.c
lib/silccrypt/silcrng.h

index 8b47ea932ce421a650a2e6121d80d36f08590867..4751937ed0a858e05cf0b6fb1bd032a4ae98253a 100644 (file)
@@ -8,7 +8,7 @@
 .ds RF FORMFEED[Page %]
 .ds CF
 .ds LH Internet-Draft
-.ds RH 6 October 2000
+.ds RH XX April 2001
 .ds CH
 .na
 .hy 0
@@ -16,8 +16,8 @@
 .nf
 Network Working Group                                      P. Riikonen
 Internet-Draft
-draft-riikonen-silc-ke-auth-02.txt                      XXXXXXXXXXXXXX
-Expires: XXX
+draft-riikonen-silc-ke-auth-02.txt                       XX April 2001
+Expires: XX October 2001
 
 .in 3
 
@@ -52,11 +52,11 @@ The distribution of this memo is unlimited.
 Abstract
 
 This memo describes two protocols used in the Secure Internet Live
-Conferencing (SILC) protocol specified in the Secure Internet Live
+Conferencing (SILC) protocol, specified in the Secure Internet Live
 Conferencing, Protocol Specification internet-draft [SILC1].  The
 SILC Key Exchange (SKE) protocol provides secure key exchange between
 two parties resulting into shared secret key material.  The protocol
-is based on Diffie Hellman key exchange algorithm and its functionality
+is based on Diffie-Hellman key exchange algorithm and its functionality
 is derived from several key exchange protocols.  SKE uses best parts
 of the SSH2 Key Exchange protocol, Station-To-Station (STS) protocol
 and the OAKLEY Key Determination protocol [OAKLEY].
@@ -64,7 +64,7 @@ and the OAKLEY Key Determination protocol [OAKLEY].
 The SILC Connection Authentication protocol provides user level
 authentication used when creating connections in SILC network.  The
 protocol is transparent to the authentication data which means that it
-can be used to authenticate the user with, for example, passphrase
+can be used to authenticate the user with, for example, pass phrase
 (pre-shared- secret) or public key (and certificate).
 
 
@@ -74,25 +74,26 @@ Table of Contents
 
 .nf
 1 Introduction ..................................................  2
+  1.1 Requirements Terminology ..................................  3
 2 SILC Key Exchange Protocol ....................................  3
-  2.1 Key Exchange Payloads .....................................  3
+  2.1 Key Exchange Payloads .....................................  4
       2.1.1 Key Exchange Start Payload ..........................  4
-      2.1.2 Key Exchange Payload ................................  7
+      2.1.2 Key Exchange Payload ................................  8
   2.2 Key Exchange Procedure .................................... 10
   2.3 Processing the Key Material ............................... 12
   2.4 SILC Key Exchange Groups .................................. 13
-      2.4.1 diffie-hellman-group1 ............................... 13
+      2.4.1 diffie-hellman-group1 ............................... 14
       2.4.2 diffie-hellman-group2 ............................... 14
-  2.5 Key Exchange Status Types ................................. 14
+  2.5 Key Exchange Status Types ................................. 15
 3 SILC Connection Authentication Protocol ....................... 16
   3.1 Connection Auth Payload ................................... 17
   3.2 Connection Authentication Types ........................... 18
       3.2.1 Passphrase Authentication ........................... 18
-      3.2.2 Public Key Authentication ........................... 18
+      3.2.2 Public Key Authentication ........................... 19
   3.3 Connection Authentication Status Types .................... 19
-4 Security Considerations ....................................... 19
-5 References .................................................... 19
-6 Author's Address .............................................. 20
+4 Security Considerations ....................................... 20
+5 References .................................................... 20
+6 Author's Address .............................................. 21
 
 
 .ti 0
@@ -112,7 +113,7 @@ Conferencing (SILC) protocol specified in the Secure Internet Live
 Conferencing, Protocol Specification Internet-Draft [SILC1].  The
 SILC Key Exchange (SKE) protocol provides secure key exchange between
 two parties resulting into shared secret key material.  The protocol
-is based on Diffie Hellman key exchange algorithm and its functionality
+is based on Diffie-Hellman key exchange algorithm and its functionality
 is derived from several key exchange protocols.  SKE uses best parts
 of the SSH2 Key Exchange protocol, Station-To-Station (STS) protocol
 and the OAKLEY Key Determination protocol.
@@ -120,7 +121,7 @@ and the OAKLEY Key Determination protocol.
 The SILC Connection Authentication protocol provides user level
 authentication used when creating connections in SILC network.  The
 protocol is transparent to the authentication data which means that it
-can be used to authenticate the user with, for example, passphrase
+can be used to authenticate the user with, for example, pass phrase
 (pre-shared- secret) or public key (and certificate).
 
 The basis of secure SILC session requires strong and secure key exchange
@@ -141,6 +142,14 @@ does not define own framework that could be used.  The framework is
 provided by the SILC protocol.
 
 
+.ti 0
+1.1 Requirements Terminology
+
+The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, 
+MAY, and OPTIONAL, when they appear in this document, are to be
+interpreted as described in [RFC2119].
+
+
 .ti 0
 2 SILC Key Exchange Protocol
 
@@ -164,7 +173,7 @@ servers.  In client connections usually all the packets are protected
 with this key except channel messages; channels has their own keys and 
 they are not exchanged with this protocol.
 
-The Diffie-Hellman implementation used in the SILC should be compliant
+The Diffie-Hellman implementation used in the SILC SHOULD be compliant
 to the PKCS #3.
 
 
@@ -174,52 +183,47 @@ to the PKCS #3.
 During the key exchange procedure public data is sent between initiator
 and responder.  This data is later used in the key exchange procedure.
 There are several payloads used in the key exchange.  As for all SILC
-packets, SILC Packet Header, described in [SILC2], is at the start of all
-packets, the same is done with these payloads as well.  All fields in
-all payloads are always in MSB (most significant byte first) order.
-Following descriptions of these payloads.
+packets, SILC Packet Header, described in [SILC2], is at the start of
+all packets, the same is done with these payloads as well.  All the
+fields in the payloads are always in MSB (most significant byte first)
+order.  Following descriptions of these payloads.
 
 
 .ti 0
 2.1.1 Key Exchange Start Payload
 
-Key exchange between two entities always begins with the
+The key exchange between two entities MUST be started by sending the
 SILC_PACKET_KEY_EXCHANGE packet containing Key Exchange Start Payload.
-Initiator sends the Key Exchange Start Payload to the responder filled with
-all security properties it supports.  The responders then checks whether
-it supports the security properties.
+Initiator sends the Key Exchange Start Payload to the responder filled
+with all security properties it supports.  The responder then checks
+whether it supports the security properties.
 
 It then sends a Key Exchange Start Payload to the initiator filled with
-security properties it selected from the original payload.  The payload sent
-by responder must include only one chosen property per list.
+security properties it selected from the original payload.  The payload
+sent by responder MUST include only one chosen property per list.
 
 The Key Exchange Start Payload is used to tell connecting entities what
 security properties and algorithms should be used in the communication.
 The Key Exchange Start Payload is sent only once per session.  Even if
-the PFS (Perfect Forward Secrecy) flag is se the Key Exchange Start Payload
-is not re-sent.   When PFS is desired the Key Exchange Payloads are sent
-to negotiate new key material.  The procedure is equivalent to the very
-first negotiation except that the Key Exchange Start Payload is not sent.
+the PFS (Perfect Forward Secrecy) flag is set the Key Exchange Start
+Payload is not re-sent.  When PFS is desired the Key Exchange Payloads
+are sent to negotiate new key material.  The procedure is equivalent to
+the very first negotiation except that the Key Exchange Start Payload
+is not sent.
 
-As this payload is used only with the very first key exchnage the payload
+As this payload is used only with the very first key exchange the payload
 is never encrypted, as there are no keys to encrypt it with.
 
-A cookie is also sent in this payload.  A cookie is used to uniform the
+A cookie is also sent in this payload.  A cookie is used to randomize the
 payload so that none of the key exchange parties can determine this
-payload before hand.  The cookie must be returned to the original sender
-by the responder.
+payload before the key exchange procedure starts.  The cookie MUST be
+returned to the original sender by the responder.
 
 Following diagram represents the Key Exchange Start Payload.  The lists
-mentioned below are always comma (`,') separated and the list must
+mentioned below are always comma (`,') separated and the list MUST
 not include spaces (` ').
 
 
-
-
-
-
-
-
 .in 5
 .nf
                      1                   2                   3
@@ -290,7 +294,8 @@ o RESERVED (1 byte) - Reserved field.  Sender fills this with
 
 o Flags (1 byte) - Indicates flags to be used in the key
   exchange.  Several flags can be set at once by ORing the
-  flags together.  Following flags are reserved for this field.
+  flags together.  The following flags are reserved for this
+  field:
 
      No flags                 0x00
 
@@ -306,27 +311,28 @@ o Flags (1 byte) - Indicates flags to be used in the key
        Perfect Forward Secrecy (PFS) to be used in the
        key exchange protocol.  If not set, re-keying
        is performed using the old key.  See the [SILC1]
-       for more information on this issue.  When PFS is used, 
-       re-keying and creating new keys for any particular 
-       purpose will cause new key exchange.  In this key
-       exchange only the Key Exchange Payload is sent and
-       the Key Exchange Start Payload must not be sent.
-       When doing PFS the Key Exchange Payloads are 
-       encrypted with the old keys.  With the PFS, the
-       Mutual Authentication flag must be ignored.
+       for more information on this issue.  When PFS is
+       used, re-keying and creating new keys for any
+       particular purpose MUST cause new key exchange.
+       In this key exchange only the Key Exchange Payload
+       is sent and the Key Exchange Start Payload MUST
+       NOT be sent.  When doing PFS the Key Exchange
+       Payloads are encrypted with the old keys.  With
+       the PFS, the Mutual Authentication flag MUST be
+       ignored.
 
      Mutual Authentication    0x04
 
-       Both of the parties will perform authenetication
+       Both of the parties will perform authentication
        by providing signed data for the other party to
        verify.  By default, only responder will provide
        the signature data.  If this is set then the
-       inititator must also provide it.  Initiator may
-       set this but also responder may set this even if
+       initiator must also provide it.  Initiator MAY
+       set this but also responder MAY set this even if
        initiator did not set it.
 
      Rest of the flags are reserved for the future and
-     must not be set.
+     MUST NOT be set.
 
 o Payload Length (2 bytes) - Length of the entire Key Exchange
   Start payload, not including any other field.
@@ -391,24 +397,24 @@ o Compression Algorithms (variable length) - The list of
 Key Exchange payload is used to deliver the public key (or certificate),
 the computed Diffie-Hellman public value and possibly signature data
 from one party to the other.  When initiator is using this payload
-and the Mutual Authentication flag is not set then the initiator must
-not provide the signature data.  If the flag is set then the initiator
-must provide the signature data so that the responder may verify it.
+and the Mutual Authentication flag is not set then the initiator MUST
+NOT provide the signature data.  If the flag is set then the initiator
+MUST provide the signature data so that the responder can verify it.
 
 The Mutual Authentication flag is usually used only if a separate
 authentication protocol will not be executed for the initiator of the
-prtocool.  This is case for example when the SKE is performed between
+protocol.  This is case for example when the SKE is performed between
 two SILC clients.  In normal case, where client is connecting to the
-server or server is connecting to the router the Mutual Authentication
+server, or server is connecting to the router the Mutual Authentication
 flag is not necessary.
 
 When performing re-key with PFS selected this is the only payload that
-is sent in the SKE protocol.  The Key Exchange Start Payload is not sent
-at all.  However, this payload does not have all the fields present.
-In re-key with PFS the public key and a possible signature data should
-not be present.  If they are present they must be ignored.  The only
-field that is present is the public data that is used to create the
-new key material.  In the re-key the Mutual Authentication flag must
+is sent in the SKE protocol.  The Key Exchange Start Payload MUST NOT
+be sent at all.  However, this payload does not have all the fields
+present.  In the re-key with PFS the public key and a possible signature
+data SHOULD NOT be present.  If they are present they MUST be ignored.
+The only field that is present is the Public Data that is used to create
+the new key material.  In the re-key the Mutual Authentication flag MUST
 also be ignored.
 
 This payload is sent inside SILC_PACKET_KEY_EXCHANGE_1 and inside
@@ -467,11 +473,11 @@ o Public Key Type (2 bytes) - The public key (or certificate)
   certificate specification in [PKIX-Part1].  See OpenPGP
   certificate specification in [PGP].  See SPKI certificate
   specification in [SPKI].  If this field includes zero (0)
-  or unsupported type number the protocol must be aborted
-  sending SILC_PACKET_FAILURE message and the connection should
+  or unsupported type number the protocol MUST be aborted
+  sending SILC_PACKET_FAILURE message and the connection SHOULD
   be closed immediately.
 
-o Public Key (or certicicate) (variable length) - The
+o Public Key (or certificate) (variable length) - The
   public key or certificate.
 
 o Public Data Length (2 bytes) - The length of the Public Data
@@ -486,16 +492,15 @@ o Signature Length (2 bytes) - The length of the signature,
   not including any other field.
 
 o Signature Data (variable length) - The signature signed
-  by the sender.  The receiver of this signature must
-  verify it.  The verification is done using the public
-  key received in this same payload.  See section 2.2
-  Key Exchange Procedure for detailed description how
-  to produce the signature.  If the Mutual Authentication
-  flag is not set then initiator must not provide this
-  field and the Signature Length field must be set to zero (0)
-  value.  If the flag is set then also the initiator must
-  provide this field.  The responder always provides this
-  field.
+  by the sender.  The receiver of this signature MUST
+  verify it.  The verification is done using the sender's
+  public key.  See section 2.2 Key Exchange Procedure for
+  detailed description how to produce the signature.  If
+  the Mutual Authentication flag is not set then initiator
+  MUST NOT provide this field and the Signature Length field
+  MUST be set to zero (0) value.  If the flag is set then
+  also the initiator MUST provide this field.  The responder
+  MUST always provide this field.
 .in 3
 
 
@@ -521,8 +526,8 @@ Setup:  p is a large and public safe prime.  This is one of the
         responder.
 
         If the Mutual Authentication flag is set then initiator
-        must also produce signature data SIGN_i which the responder
-        will verify.  The initiator must compute a hash value
+        MUST also produce signature data SIGN_i which the responder
+        will verify.  The initiator MUST compute a hash value
         HASH_i = hash(Key Exchange Start Payload | public key
         (or certificate) | e).  It then signs the HASH_i value with
         its private key resulting a signature SIGN_i.
@@ -540,9 +545,9 @@ Setup:  p is a large and public safe prime.  This is one of the
         initiator.
 
         If the Mutual Authentication flag is set then the responder
-        should verify that the public key provided in the payload
+        SHOULD verify that the public key provided in the payload
         is authentic, or if certificates are used it verifies the
-        certificate.  The responder may accept the public key without
+        certificate.  The responder MAY accept the public key without
         verifying it, however, doing so may result to insecure key
         exchange (accepting the public key without verifying may be
         desirable for practical reasons on many environments.  For
@@ -555,7 +560,7 @@ Setup:  p is a large and public safe prime.  This is one of the
 
     3.  Initiator verifies that the public key provided in
         the payload is authentic, or if certificates are used
-        it verifies the certificate.  The initiator may accept
+        it verifies the certificate.  The initiator MAY accept
         the public key without verifying it, however, doing
         so may result to insecure key exchange (accepting the
         public key without verifying may be desirable for 
@@ -570,9 +575,9 @@ Setup:  p is a large and public safe prime.  This is one of the
         HASH using the received public key.
 
 
-If any of these phases is to fail SILC_PACKET_FAILURE is sent to
-indicate that the key exchange protocol has failed, and the connection
-should be closed immediately.  Any other packets must not be sent or
+If any of these phases is to fail the SILC_PACKET_FAILURE MUST be sent
+to indicate that the key exchange protocol has failed, and the connection
+SHOULD be closed immediately.  Any other packets MUST NOT be sent or
 accepted during the key exchange except the SILC_PACKET_KEY_EXCHANGE_*,
 SILC_PACKET_FAILURE and SILC_PACKET_SUCCESS packets.
 
@@ -591,8 +596,6 @@ SILC_PACKET_SUCCESS packet.  Both entities send this packet to
 each other.  After this both parties will start using the new keys.
 
 
-
-
 .ti 0
 2.3 Processing the Key Material
 
@@ -602,7 +605,7 @@ of the communication channel.  The key material is also used to derive
 other security parameters used in the communication.  Key Exchange
 protocol produces a hash value HASH as well.
 
-Keys are derived from the key material as follows:
+The keys MUST be derived from the key material as follows:
 
 .in 6
 Sending Initial Vector (IV)     = hash(0 | KEY | HASH)
@@ -622,8 +625,8 @@ IV.  Initiator uses IV's as they are (sending IV for sending and
 receiving IV for receiving).
 
 The Encryption Keys are derived as well from the hash().  If the hash()
-output is too short for the encryption algorithm more key material is
-produced in following manner:
+output is too short for the encryption algorithm more key material MUST
+be produced in the following manner:
 
 .in 6
 K1 = hash(2 | KEY | HASH)
@@ -655,17 +658,22 @@ channel.  As many bytes as needed are taken from the start of the hash
 output.
 
 These procedures are performed by all parties of the key exchange
-protocol.  This must be done before the protocol has been ended by
+protocol.  This MUST be done before the protocol has been ended by
 sending the SILC_PACKET_SUCCESS packet.
 
+This same procedure is used in the SILC is some other circumstances
+as well.  Any changes to this procedure is mentioned separately when
+this procedure is needed.  See the [SILC1] and the [SILC2] for these
+circumstances.
+
 
 .ti 0
 2.4 SILC Key Exchange Groups
 
 Following groups may be used in the SILC Key Exchange protocol.  The 
-first group diffie-hellman-group1 is mandatory, other groups maybe 
+first group diffie-hellman-group1 is REQUIRED, other groups MAY be 
 negotiated to be used in the connection with Key Exchange Start Payload
-and SILC_PACKET_KEY_EXCHANGE packet.  However, the first group must be
+and SILC_PACKET_KEY_EXCHANGE packet.  However, the first group MUST be
 proposed in the Key Exchange Start Payload regardless of any other
 requested group (however, it does not have to be the first in the list).
 
@@ -673,7 +681,7 @@ requested group (however, it does not have to be the first in the list).
 .ti 0
 2.4.1 diffie-hellman-group1
 
-The length of this group is 1024 bits.  This is mandatory group.
+The length of this group is 1024 bits.  This is REQUIRED group.
 The prime is 2^1024 - 2^960 - 1 + 2^64 * { [2^894 pi] + 129093 }.
 
 Its decimal value is
@@ -708,7 +716,7 @@ This group was taken from the OAKLEY specification.
 .ti 0
 2.4.2 diffie-hellman-group2
 
-The length of this group is 1536 bits.  This is optional group.
+The length of this group is 1536 bits.  This is OPTIONAL group.
 The prime is 2^1536 - 2^1472 - 1 + 2^64 * { [2^1406 pi] + 741804 }.
 
 Its decimal value is
@@ -746,13 +754,13 @@ This group was taken from the OAKLEY specification.
 .ti 0
 2.5 Key Exchange Status Types
 
-This section defines all key exchange protocol status types that may be
-returned in the SILC_PACKET_SUCCESS or SILC_PACKET_FAILURE packets to
-indicate the status of the protocol.  Implementations may map the
+This section defines all key exchange protocol status types that may
+be returned in the SILC_PACKET_SUCCESS or SILC_PACKET_FAILURE packets
+to indicate the status of the protocol.  Implementations may map the
 status types to human readable error message.  All types except the
-SILC_SKE_STATUS_OK type must be sent in SILC_PACKET_FAILURE packet.
-The length of status is 32 bits (4 bytes).  Following status types are 
-defined:
+SILC_SKE_STATUS_OK type MUST be sent in SILC_PACKET_FAILURE packet.
+The length of status is 32 bits (4 bytes).  The following status types
+are defined:
 
 .in 6
 0   SILC_SKE_STATUS_OK
@@ -762,7 +770,7 @@ defined:
 
 1   SILC_SKE_STATUS_ERROR
 
-    Unknown error occured.  No specific error type is defined.
+    Unknown error occurred.  No specific error type is defined.
 
 
 2   SILC_SKE_STATUS_BAD_PAYLOAD
@@ -811,39 +819,37 @@ defined:
 .in 3
 
 
-
-
-
 .ti 0
 3 SILC Connection Authentication Protocol
 
 Purpose of Connection Authentication protocol is to authenticate the
 connecting party with server.  Usually connecting party is client but
-server may connect to server as well.  Its other purpose is to provide
-information for the server about which type of connection this is.
-The type defines whether this is client, server or router connection.
-Server uses this information to create the ID for the connection.  After
-the authentication protocol has been successfully completed 
-SILC_PACKET_NEW_ID must be sent to the connecting party by the server.
-See section New ID Payload in [SILC2] for detailed description for this
-packet's payload.
-
-Server must verify the authentication data received and if it is to fail
-the authentication must be failed by sending SILC_PACKET_FAILURE packet.
+server may connect to router server as well.  Its other purpose is to
+provide information for the server about which type of connection this
+is.  The type defines whether this is client, server or router
+connection.  Server uses this information to create the ID for the
+connection.
+
+After the authentication protocol has been successfully completed
+SILC_PACKET_NEW_ID must be sent to the connecting client by the server.
+See the [SILC1] for the details of the connecting procedure.
+
+Server MUST verify the authentication data received and if it is to fail
+the authentication MUST be failed by sending SILC_PACKET_FAILURE packet.
 If everything checks out fine the protocol is ended by server by sending
 SILC_PACKET_SUCCESS packet.
 
-The protocol is executed after the SILC Key Exchange protocol.  It must
-not be executed in any other time.  As it is performed after key exchange
+The protocol is executed after the SILC Key Exchange protocol.  It MUST
+NOT be executed in any other time.  As it is performed after key exchange
 protocol all traffic in the connection authentication protocol is
 encrypted with the exchanged keys.
 
-The protocol is started by the connecting party by sending
+The protocol MUST be started by the connecting party by sending the
 SILC_PACKET_CONNECTION_AUTH packet with Connection Auth Payload,
-described in the next section.  This payload must include the
-authentication data.  Authentication data is set according
-authentication method that must be known by both parties.  If connecting
-party does not know what is the mandatory authentication method it may
+described in the next section.  This payload MUST include the
+authentication data.  The authentication data is set according
+authentication method that MUST be known by both parties.  If connecting
+party does not know what is the mandatory authentication method it MAY
 request it from the server by sending SILC_PACKET_CONNECTION_AUTH_REQUEST
 packet.  This packet is not part of this protocol and is described in
 section Connection Auth Request Payload in [SILC2].  However, if
@@ -852,8 +858,8 @@ sending the request is not necessary.
 
 See [SILC1] and section Connection Auth Request Payload in [SILC2] also
 for the list of different authentication methods.  Authentication method
-may also be NONE, in which case the server does not require
-authentication at all.  However, in this case the protocol still must be
+MAY also be NONE, in which case the server does not require
+authentication at all.  However, in this case the protocol still MUST be
 executed; the authentication data just is empty indicating no
 authentication is required.
 
@@ -862,20 +868,18 @@ plaintext passphrase.  As the payload is entirely encrypted it is safe
 to have plaintext passphrase.  3.2.1 Passphrase Authentication for
 more information.
 
-
 If authentication method is public key authentication the authentication
 data is signature of the hash value HASH plus Key Exchange Start Payload,
-established by the SILC Key Exchange protocol.  This signature must then
+established by the SILC Key Exchange protocol.  This signature MUST then
 be verified by the server.  See section 3.2.2 Public Key Authentication
 for more information.
 
-The connecting party of this protocol must wait after successful execution
+The connecting client of this protocol MUST wait after successful execution
 of this protocol for the SILC_PACKET_NEW_ID packet where it will receive
-the ID it will be using in the SILC network.  Connecting party cannot
+the ID it will be using in the SILC network.  The connecting client cannot
 start normal SILC session (sending messages or commands) until it has
 received its ID.  The ID's are always created by the server except
-for server to server connection where servers create their own ID's.
-
+for server to router connection where servers create their own ID's.
 
 
 .ti 0
@@ -883,11 +887,11 @@ for server to server connection where servers create their own ID's.
 
 Client sends this payload to authenticate itself to the server.  Server
 connecting to another server also sends this payload.  Server receiving
-this payload must verify all the data in it and if something is to fail
-the authentication must be failed by sending SILC_PACKET_FAILURE packet.
+this payload MUST verify all the data in it and if something is to fail
+the authentication MUST be failed by sending SILC_PACKET_FAILURE packet.
 
 The payload may only be sent with SILC_PACKET_CONNECTION_AUTH packet.
-It must not be sent in any other packet type.  Following diagram 
+It MUST NOT be sent in any other packet type.  Following diagram 
 represent the Connection Auth Payload.
 
 
@@ -914,9 +918,9 @@ o Payload Length (2 bytes) - Length of the entire Connection
 
 o Connection Type (2 bytes) - Indicates the type of the 
   connection.  See section Connection Auth Request Payload
-  in [SILC2] for the list of connection types.  This field must 
-  include valid connection type or the packet must be discarded 
-  and authentication must be failed. 
+  in [SILC2] for the list of connection types.  This field MUST
+  include valid connection type or the packet MUST be discarded
+  and authentication MUST be failed. 
 
 o Authentication Data (variable length) - The actual 
   authentication data.  Contents of this depends on the 
@@ -943,10 +947,10 @@ itself to the other end sends the passphrase that is required by
 the other end, for example server.
 
 If the passphrase matches with the one in the server's end the
-authentication is successful.  Otherwise SILC_PACKET_FAILURE must be
+authentication is successful.  Otherwise SILC_PACKET_FAILURE MUST be
 sent to the sender and the protocol execution fails.
 
-This is required authentication method to be supported by all SILC
+This is REQUIRED authentication method to be supported by all SILC
 implementations.
 
 
@@ -956,20 +960,20 @@ implementations.
 Public key authentication may be used if passphrase based authentication
 is not desired.  The public key authentication works by sending a
 signature as authentication data to the other end, say, server.  The
-server must then verify the signature by the public key of the sender,
+server MUST then verify the signature by the public key of the sender,
 which the server has received earlier in SKE protocol.
 
 The signature is computed using the private key of the sender by signing
 the HASH value provided by the SKE protocol previously, and the Key
 Exchange Start Payload from SKE protocol that was sent to the server.
-The server must verify the data, thus it must keep the HASH and the
+The server MUST verify the data, thus it must keep the HASH and the
 Key Exchange Start Payload saved during SKE and authentication protocols.
 
 If the verified signature matches the sent signature, the authentication
 were successful and SILC_PACKET_SUCCESS is sent.  If it failed the protocol
 execution is stopped and SILC_PACKET_FAILURE is sent.
 
-This is required authentication method to be supported by all SILC
+This is REQUIRED authentication method to be supported by all SILC
 implementations.
 
 
@@ -980,9 +984,9 @@ This section defines all connection authentication status types that
 may be returned in the SILC_PACKET_SUCCESS or SILC_PACKET_FAILURE packets
 to indicate the status of the protocol.  Implementations may map the
 status types to human readable error message.  All types except the
-SILC_AUTH_STATUS_OK type must be sent in SILC_PACKET_FAILURE packet.
-The length of status is 32 bits (4 bytes). Following status types are 
-defined:
+SILC_AUTH_STATUS_OK type MUST be sent in SILC_PACKET_FAILURE packet.
+The length of status is 32 bits (4 bytes).  The following status types
+are defined:
 
 0   SILC_AUTH_OK
 
@@ -1008,10 +1012,12 @@ security of this protocol.
 5 References
 
 [SILC1]      Riikonen, P., "Secure Internet Live Conferencing (SILC),
-             Protocol Specification", Internet Draft, June 2000.
+             Protocol Specification", Internet Draft, April 2001.
 
 [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
-             June 2000.
+             April 2001.
+
+[SILC4]      Riikonen, P., "SILC Commands", Internet Draft, April 2001.
 
 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
              RFC 1459, May 1993.
@@ -1063,6 +1069,9 @@ security of this protocol.
 [PKCS1]      Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
              Specifications, Version 2.0", RFC 2437, October 1998.
 
+[RFC2119]    Bradner, S., "Key Words for use in RFCs to Indicate
+             Requirement Levels", BCP 14, RFC 2119, March 1997.
+
 
 .ti 0
 6 Author's Address
@@ -1075,4 +1084,4 @@ Finland
 
 EMail: priikone@poseidon.pspt.fi
 
-This Internet-Draft expires 6 Jun 2001
\ No newline at end of file
+This Internet-Draft expires XX October 2001
\ No newline at end of file
index 6e3edaea226cddb1ca8e39ac3b62effb6d5baa7f..0a067476c4e4277fa8c6cb81bc1862211e2d9e15 100644 (file)
@@ -8,7 +8,7 @@
 .ds RF FORMFEED[Page %]
 .ds CF
 .ds LH Internet Draft
-.ds RH 6 October 2000
+.ds RH XX April 2001
 .ds CH
 .na
 .hy 0
@@ -16,8 +16,8 @@
 .nf
 Network Working Group                                      P. Riikonen
 Internet-Draft
-draft-riikonen-silc-pp-02.txt                           XXXXXXXXXXXXXX
-Expires: XXX
+draft-riikonen-silc-pp-02.txt                            XX April 2001
+Expires: XX October 2001
 
 .in 3
 
@@ -52,7 +52,7 @@ The distribution of this memo is unlimited.
 Abstract
 
 This memo describes a Packet Protocol used in the Secure Internet Live
-Conferencing (SILC) protocol specified in the Secure Internet Live
+Conferencing (SILC) protocol, specified in the Secure Internet Live
 Conferencing, Protocol Specification Internet Draft [SILC1].  This
 protocol describes the packet types and packet payloads which defines
 the contents of the packets.  The protocol provides secure binary packet
@@ -72,49 +72,51 @@ Table of Contents
 
 .nf
 1 Introduction ..................................................  3
+  1.1 Requirements Terminology ..................................  4
 2 SILC Packet Protocol ..........................................  4
   2.1 SILC Packet ...............................................  4
   2.2 SILC Packet Header ........................................  5
   2.3 SILC Packet Types .........................................  7
-      2.3.1 SILC Packet Payloads ................................ 15
+      2.3.1 SILC Packet Payloads ................................ 16
       2.3.2 Generic payloads .................................... 16
             2.3.2.1 ID Payload .................................. 16
-            2.3.2.2 Argument Payload ............................ 16
-            2.3.2.3 Channel Payload ............................. XXX
-            2.3.2.4 Public Key Payload .......................... XXX
-      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.2.2 Argument Payload ............................ 17
+            2.3.2.3 Channel Payload ............................. 18
+            2.3.2.4 Public Key Payload .......................... 19
+      2.3.3 Disconnect Payload .................................. 19
+      2.3.4 Success Payload ..................................... 19
+      2.3.5 Failure Payload ..................................... 20
+      2.3.6 Reject Payload ...................................... 21
+      2.3.7 Notify Payload ...................................... 22
       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 Client Payload ................................. 31
-      2.3.18 New Server Payload ................................. 32
-      2.3.19 New Channel Payload ................................ 33
-      2.3.20 Key Agreement 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 Broadcasting ...................................... 45
-3 Security Considerations ....................................... 46
-4 References .................................................... 46
-5 Author's Address .............................................. 47
+      2.3.9 Channel Message Payload ............................. 28
+      2.3.10 Channel Key Payload ................................ 31
+      2.3.11 Private Message Payload ............................ 33
+      2.3.12 Private Message Key Payload ........................ 34
+      2.3.13 Command Payload .................................... 36
+      2.3.14 Command Reply Payload .............................. 37
+      2.3.15 Connection Auth Request Payload .................... 37
+      2.3.16 New ID Payload ..................................... 38
+      2.3.17 New Client Payload ................................. 39
+      2.3.18 New Server Payload ................................. 40
+      2.3.19 New Channel Payload ................................ 41
+      2.3.20 Key Agreement Payload .............................. 42
+      2.3.21 Cell Routers Payload ............................... 43
+  2.4 SILC ID Types ............................................. 44
+  2.5 Packet Encryption And Decryption .......................... 44
+      2.5.1 Normal Packet Encryption And Decryption ............. 45
+      2.5.2 Channel Message Encryption And Decryption ........... 45
+      2.5.3 Private Message Encryption And Decryption ........... 46
+  2.6 Packet MAC Generation ..................................... 47
+  2.7 Packet Padding Generation ................................. 47
+  2.8 Packet Compression ........................................ 48
+  2.9 Packet Sending ............................................ 48
+  2.10 Packet Reception ......................................... 49
+  2.11 Packet Routing ........................................... 49
+  2.12 Packet Broadcasting ...................................... 50
+3 Security Considerations ....................................... 50
+4 References .................................................... 50
+5 Author's Address .............................................. 52
 
 .ti 0
 List of Figures
@@ -168,6 +170,14 @@ information about the origin of the packet and destination of the
 packet.
 
 
+.ti 0
+1.1 Requirements Terminology
+
+The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, 
+MAY, and OPTIONAL, when they appear in this document, are to be
+interpreted as described in [RFC2119].
+
+
 .ti 0
 2 SILC Packet Protocol
 
@@ -200,7 +210,7 @@ the packet type, origin of the packet and the destination of the packet.
 The header is variable in length and first two (2) bytes of the
 header (thus first two bytes of the packet) are not encrypted.  The
 first two (2) bytes are the length of the packet which is not encrypted.
-See The following section for description of SILC Packet header.  Packets
+See the following section for description of SILC Packet header.  Packets
 without SILC header or with malformed SILC header must be dropped.
 
 Padding follows the packet header.  The purpose of the padding is to
@@ -227,16 +237,14 @@ byte first) order.
 .ti 0
 2.2 SILC Packet Header
 
-The default SILC packet header is applied to all SILC packets and it is
+The SILC packet header is applied to all SILC packets and it is
 variable in length.  The purpose of SILC Packet header is to provide
-detailed information about the packet.  The receiver of the packet uses
-the packet header to parse the packet and gain other relevant parameters
-of the packet.
-
-The following diagram represents the default SILC header format.
-(*) indicates that this field is never encrypted.  Other fields are
-always encrypted.
+detailed information about the packet.  The receiver of the packet
+uses the packet header to parse the packet and gain other relevant
+parameters of the packet.
 
+The following diagram represents the SILC packet header.  (*) indicates
+that this field is never encrypted.  Other fields are always encrypted.
 
 .in 5
 .nf
@@ -310,7 +318,7 @@ o Flags (1 byte) - Indicates flags to be used in packet
        send broadcast packet and normal server cannot send
        broadcast packet.  Only router server may send broadcast
        packet.  The router receiving of packet with this flag 
-       set must send (broadcast) the packet to its primary
+       set MUST send (broadcast) the packet to its primary
        route.  If router has several router connections the
        packet may be sent only to the primary route.  See
        section 2.13 Packet Broadcasting for description of 
@@ -320,6 +328,7 @@ o Flags (1 byte) - Indicates flags to be used in packet
 
 
 
+
 o Packet Type (1 byte) - Is the type of the packet. Receiver 
   uses this field to parse the packet.  See section 2.3
   SILC Packets for list of defined packet types.
@@ -337,14 +346,14 @@ o Src ID Type (1 byte) - Indicates the type of ID in the
   defined ID types.
 
 o Source ID (variable length) - The actual source ID that
-  indicates who is the original sender of the packet.
+  indicates which is the original sender of the packet.
 
 o Dst ID Type (1 byte) - Indicates the type of ID in the
   Destination ID field.  See section 2.4 SILC ID Types for
   defined ID types.
 
 o Destination ID (variable length) - The actual source ID that
-  indicates who is the end receiver of the packet.
+  indicates which is the end receiver of the packet.
 
 
 .ti 0
@@ -354,8 +363,8 @@ SILC packet types defines the contents of the packet and it is used by
 the receiver to parse the packet.  The packet type is 8 bits, as a one
 byte, in length.  The range for the packet types are from 0 - 255,
 where 0 is never sent and 255 is currently reserved for future
-extensions and must not be defined to any other purpose.  Every SILC
-specification compliant implementation should support all of these packet
+extensions and MUST NOT be defined to any other purpose.  Every SILC
+specification compliant implementation SHOULD support all of these packet
 types.
 
 The below list of the SILC Packet types includes reference to the packet
@@ -373,7 +382,7 @@ message packets, command packets and some other packets that may be
 broadcasted in the SILC network.  If the packet is allowed to be sent to
 indirectly connected entity it is mentioned separately in the packet
 description (unless it is obvious as in private and channel message
-packets).  Other packets must not be sent or accepted, if sent, to
+packets).  Other packets MUST NOT be sent or accepted, if sent, to
 indirectly connected entities.
 
 List of SILC Packet types are defined as follows.
@@ -390,8 +399,8 @@ List of SILC Packet types are defined as follows.
           the disconnection is sent inside the packet payload.  Client
           usually does not send this packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.3 Disconnect Payload
 
@@ -401,8 +410,8 @@ List of SILC Packet types are defined as follows.
           This packet is sent upon successful execution of some protocol.
           The status of the success is sent in the packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.4 Success Payload
 
@@ -412,19 +421,19 @@ List of SILC Packet types are defined as follows.
           This packet is sent upon failure of some protocol.  The status
           of the failure is sent in the packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           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.
+          This packet MAY be sent upon rejection of some protocol.
           The status of the rejection is sent in the packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.6 Reject Payload
 
@@ -432,8 +441,8 @@ List of SILC Packet types are defined as follows.
      5    SILC_PACKET_NOTIFY
 
           This packet is used to send notify message, usually from
-          server to client, although it may be sent from server to another
-          server as well.  Client never sends this packet.  Server may
+          server to client, although it MAY be sent from server to another
+          server as well.  Client MUST NOT send this packet.  Server MAY
           send this packet to channel as well when the packet is 
           distributed to all clients on the channel.
 
@@ -442,14 +451,14 @@ List of SILC Packet types are defined as follows.
 
      6    SILC_PACKET_ERROR
 
-          This packet is sent when an error occurs.  Server may
-          send this packet.  Client never sends this packet.  The
-          client may entirely ignore the packet, however, server is
-          most likely to take action anyway.  This packet may be sent
+          This packet is sent when an error occurs.  Server MAY
+          send this packet.  Client MUST NOT send this packet.  The
+          client MAY entirely ignore the packet, however, server is
+          most likely to take action anyway.  This packet MAY be sent
           to entity that is indirectly connected to the sender.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.8 Error Payload.
 
@@ -462,8 +471,8 @@ List of SILC Packet types are defined as follows.
           by channel specific keys.  Channel Keys are distributed by
           SILC_PACKET_CHANNEL_KEY packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.9 Channel Message 
                                   Payload
@@ -474,11 +483,11 @@ List of SILC Packet types are defined as follows.
           This packet is used to distribute new key for particular
           channel.  Each channel has their own independent keys that
           is used to protect the traffic on the channel.  Only server
-          may send this packet.  This packet may be sent to entity
+          may send this packet.  This packet MAY be sent to entity
           that is indirectly connected to the sender.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.10 Channel Key Payload
 
@@ -490,12 +499,12 @@ List of SILC Packet types are defined as follows.
           by session keys established by normal key exchange protocol.
           However, it is possible to use specific key to protect private
           messages.  SILC_PACKET_PRIVATE_MESSAGE_KEY packet is used to 
-          agree the key with the remote client.  Pre-shared key may be 
+          agree the key with the remote client.  Pre-shared key MAY be 
           used as well if both of the client knows it, however, it needs 
           to be agreed outside SILC.  See more of this in [SILC1].
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.11 Private Message
                                   Payload
@@ -515,8 +524,8 @@ List of SILC Packet types are defined as follows.
           default or to use normal session keys by default, is 
           implementation specific issue.  See more of this in [SILC1].
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.12 Private Message
                                   Key Payload
@@ -525,14 +534,14 @@ List of SILC Packet types are defined as follows.
      11   SILC_PACKET_COMMAND
 
           This packet is used to send commands from client to server.
-          Server may send this packet to other servers as well.  All
+          Server MAY send this packet to other servers as well.  All
           commands are listed in their own section SILC Command Types
-          in [SILC1].  The contents of this packet is command specific.
-          This packet may be sent to entity that is indirectly connected
+          in [SILC4].  The contents of this packet is command specific.
+          This packet MAY be sent to entity that is indirectly connected
           to the sender.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.13 Command Payload
 
@@ -541,10 +550,11 @@ List of SILC Packet types are defined as follows.
 
           This packet is send as reply to the SILC_PACKET_COMMAND packet.
           The contents of this packet is command specific.  This packet
-          maybe sent to entity that is indirectly connected to the sender.
+          MAY be sent to entity that is indirectly connected to the
+          sender.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.14 Command Reply 
                                   Payload and section 2.3.13 Command
@@ -556,8 +566,8 @@ List of SILC Packet types are defined as follows.
           This packet is used to start SILC Key Exchange Protocol, 
           described in detail in [SILC3].
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  Payload of this packet is described
                                   in the section SILC Key Exchange
@@ -569,8 +579,8 @@ List of SILC Packet types are defined as follows.
 
           This packet is used as part of the SILC Key Exchange Protocol.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  Payload of this packet is described
                                   in the section SILC Key Exchange
@@ -582,8 +592,8 @@ List of SILC Packet types are defined as follows.
 
           This packet is used as part of the SILC Key Exchange Protocol.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  Payload of this packet is described
                                   in the section SILC Key Exchange
@@ -596,18 +606,20 @@ List of SILC Packet types are defined as follows.
           This packet is used to request the authentication method to
           be used in the SILC Connection Authentication Protocol.  If 
           initiator of the protocol does not know the mandatory 
-          authentication method this packet may be used to determine it.
+          authentication method this packet MAY be used to determine it.
 
-          The party receiving this payload must respond with the same
+          The party receiving this payload MUST respond with the same
           packet including the mandatory authentication method.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.15 Connection Auth
                                   Request Payload
 
 
+
+
      17   SILC_PACKET_CONNECTION_AUTH
 
           This packet is used to start and perform the SILC Connection
@@ -615,8 +627,8 @@ List of SILC Packet types are defined as follows.
           the connecting party.  The protocol is described in detail in
           [SILC3].
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  Payload of this packet is described
                                   in the section SILC Authentication
@@ -630,7 +642,7 @@ List of SILC Packet types are defined as follows.
           This is used when for example new client is registered to
           SILC network.  The newly created ID's of these operations are
           distributed by this packet.  Only server may send this packet,
-          however, client must be able to receive this packet.
+          however, client MUST be able to receive this packet.
 
           Payload of the packet:  See section 2.3.16 New ID Payload
 
@@ -642,8 +654,8 @@ List of SILC Packet types are defined as follows.
           authentication protocols has been completed.  Client sends
           various information about itself in this packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.17 New Client Payload
 
@@ -654,12 +666,12 @@ List of SILC Packet types are defined as follows.
           SILC network.  This is sent after key exchange and 
           authentication protocols has been completed.  Server sends
           this to the router it connected to, or, if router was
-          connecting, to the connected router.  Server sends
-          its Server ID and other information in this packet.
-          Client must not send or receive this packet.
+          connecting, to the connected router.  Server sends its
+          Server ID and other information in this packet.  The client
+          MUST NOT send or receive this packet.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
           Payload of the packet:  See section 2.3.18 New Server Payload
 
@@ -669,8 +681,8 @@ List of SILC Packet types are defined as follows.
           This packet is used to notify routers about newly created
           channel.  Channels are always created by the router and it must
           notify other routers about the created channel.  Router sends
-          this packet to its primary route.  Client must not send this
-          packet.  This packet maybe sent to entity that is indirectly
+          this packet to its primary route.  Client MUST NOT 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.19 New Channel Payload
@@ -683,20 +695,18 @@ List of SILC Packet types are defined as follows.
           [SILC1] for more information.  This packet does not have
           a payload.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
 
      23   SILC_PACKET_REKEY_DONE
 
           This packet is used to indicate that re-key is performed and
           new keys must be used hereafter.  This is sent only if re-key
-          was done without PFS option.  If PFS is set, this is not sent
-          as SILC Key Exchange protocol is executed.  This packet does
-          not have a payload.
+          was done without PFS option.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
      
      24   SILC_PACKET_HEARTBEAT
@@ -706,8 +716,8 @@ List of SILC Packet types are defined as follows.
           keepalive actions and perform it to both direction in a link.
           This packet does not have a payload.
 
-          This packet must not be sent as list and the List flag must
-         not be set.
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
 
 
      25   SILC_PACKET_KEY_AGREEMENT
@@ -716,9 +726,12 @@ List of SILC Packet types are defined as follows.
           between another client in the SILC network.  If the negotiation
           is started it is performed using the SKE protocol.  The result of
           the negotiation, the secret key material, can be used for
-          example as private message key.  The server and router must not
+          example as private message key.  The server and router MUST NOT
           send this packet.
 
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
+
           Payload of the packet:  See section 2.3.20 Key Agreement Payload
 
 
@@ -728,28 +741,33 @@ List of SILC Packet types are defined as follows.
           primary router what other routers (backup routers) exist in the
           cell.  In case of failure of the primary router in the cell the
           first router in the list will act as primary router of the cell.
-          This packet may be sent at anytime after connection has been
-          registered to the primary router.  The client must not send this
+          This packet MAY be sent at anytime after connection has been
+          registered to the primary router.  The client MUST NOT send this
           packet.
 
+          This packet MUST NOT be sent as list and the List flag MUST
+          NOT be set.
+
           Payload of the packet:  See section 2.3.21 Cell Routers Payload
 
 
      27 - 199
 
-         Currently undefined commands.
+          Currently undefined commands.
 
 
      200 - 254
 
-         These packet types are reserved for private use and they will not
-         be defined by this document.
+          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 
-         is not sent.
+
+     255  SILC_PACKET_MAX
+
+          This type is reserved for future extensions and currently it 
+          MUST NOT be sent.
 .in 3
 
 
@@ -757,12 +775,12 @@ List of SILC Packet types are defined as follows.
 2.3.1 SILC Packet Payloads
 
 All payloads resides in the main data area of the SILC packet.  However
-all payloads must be at the start of the data area after the default
-SILC packet header and padding.  All fields in the packet payload are
-always encrypted, as, they reside in the data area of the packet which
-is always encrypted.
+all payloads MUST be at the start of the data area after the SILC
+packet header and padding.  All fields in the packet payload are always
+encrypted, as, they reside in the data area of the packet which is
+always encrypted.
 
-Payloads described in this section are common payloads that must be
+Payloads described in this section are common payloads that MUST be
 accepted anytime during SILC session.  Most of the payloads may only
 be sent with specific packet type which is defined in the description
 of the payload.
@@ -771,7 +789,7 @@ There are a lot of other payloads in the SILC as well.  However, they
 are not common in the sense that they could be sent at any time. 
 These payloads are not described in this section.  These are payloads
 such as SILC Key Exchange payloads and so on.  These are described
-in [SILC1] and [SILC3].
+in [SILC1], [SILC3] and [SILC4].
 
 
 .ti 0
@@ -788,6 +806,17 @@ packet payloads.
 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.
 
+
+
+
+
+
+
+
+
+
+
+
 The following diagram represents the ID Payload.
 
 .in 5
@@ -823,11 +852,11 @@ o ID Data (variable length) - The actual ID data.
 
 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
+associated with a packet MUST be indicated by the packet payload which
+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.  The following diagram represents
-the Argument Payload.
+payloads MUST cause rejection of the packet.  The following diagram
+represents the Argument Payload.
 
 The following diagram represents the Argument Payload.
 
@@ -854,7 +883,7 @@ o Payload Length (2 bytes) - Length of the argument payload data
   payload.
 
 o Argument Type (1 byte) - Indicates the type of the argument.  
-  Every argument may have a specific type that must be defined
+  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 
@@ -868,8 +897,8 @@ o Argument Data (variable length) - Argument data.
 .ti 0
 2.3.2.3 Channel Payload
 
-Generic Channel Payload may be used information about channel, its name,
-the Channel ID and a mode.
+Generic Channel Payload may be used to send information about channel,
+its name, the Channel ID and a mode.
 
 The following diagram represents the Channel Payload Payload.
 
@@ -951,7 +980,7 @@ o Public Key Type (2 bytes) - The public key (or certificate)
   type.  This field indicates the type of the public key in 
   the packet.  See the [SILC3] for defined public key types.
 
-o Public Key (or certicicate) (variable length) - The
+o Public Key (or certificate) (variable length) - The
   public key or certificate.
 .in 3
 
@@ -963,13 +992,8 @@ Disconnect payload is sent upon disconnection.  The payload is simple;
 reason of disconnection is sent to the disconnected party.
 
 The payload may only be sent with SILC_PACKET_DISCONNECT packet.  It
-must not be sent in any other packet type.  The following diagram represents
-the Disconnect Payload.
-
-
-
-
-
+MUST NOT be sent in any other packet type.  The following diagram
+represents the Disconnect Payload.
 
 
 .in 5
@@ -1000,7 +1024,7 @@ o Disconnect Message (variable length) - Human readable
 
 Success payload is sent when some protocol execution is successfully
 completed.  The payload is simple; indication of the success is sent.
-This maybe any data, including binary or human readable data.
+This may be any data, including binary or human readable data.
 
 .in 5
 .nf
@@ -1019,7 +1043,7 @@ Figure 8:  Success Payload
 
 .in 6
 o Success Indication (variable length) - Indication of
-  the success.  This maybe for example some flag that
+  the success.  This may be for example some flag that
   indicates the protocol and the success status or human
   readable success message.  The true length of this
   payload is available by calculating it from the SILC
@@ -1027,6 +1051,7 @@ o Success Indication (variable length) - Indication of
 .in 3
 
 
+
 .ti 0
 2.3.5 Failure Payload
 
@@ -1051,7 +1076,7 @@ Figure 9:  Failure Payload
 
 .in 6
 o Failure Indication (variable length) - Indication of
-  the failure.  This maybe for example some flag that
+  the failure.  This may be for example some flag that
   indicates the protocol and the failure status or human
   readable failure message.  The true length of this
   payload is available by calculating it from the SILC
@@ -1063,7 +1088,7 @@ o Failure Indication (variable length) - Indication of
 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
+Other operations MAY send this as well that was rejected.  The
 indication of the rejection is sent in the payload.  The indication
 may be binary or human readable data.
 
@@ -1093,21 +1118,18 @@ o Reject Indication (variable length) - Indication of
 .in 3
 
 
-
-
-
 .ti 0
 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.  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.
+sent from server to client, however, server MAY send it to another
+server as well.  This payload MAY also be sent to a channel.  Client
+MUST NOT send this payload.  The receiver of this payload MAY 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.  The following diagram represents the
-Notify Payload.
+The payload may only be sent with SILC_PACKET_NOTIFY packet.  It MUST
+not be sent in any other packet type.  The following diagram represents
+the Notify Payload.
 
 .in 5
 .nf
@@ -1136,28 +1158,28 @@ o Argument Nums (2 bytes) - Indicates the number of Argument
   arguments to be send along the notify message.
 .in 3
 
-The 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.
+The following list of currently defined notify types.  The format for
+notify arguments is same as in SILC commands described in [SILC4]. 
+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.
+      MAY be used.
 
       Max Arguments:  1
           Arguments:  (1) <message>
 
-      The <message> is implementation specific free text string.  Receiver
-      may ignore this message.
+      The <message> is implementation specific free text string.
+      Receiver MAY ignore this message.
 
 
 1     SILC_NOTIFY_TYPE_INVITE
 
       Sent when an client is invited to a channel.  This is also sent
       when the invite list of the channel is changed.  This notify type
-      is sent between routers and if an client was invited to the 
+      is sent between routers and if an client was invited, to the 
       client as well.  In this case the packet is destined to the client.
 
       Max Arguments:  5
@@ -1169,23 +1191,23 @@ ID's sent in arguments are sent inside ID Payload.
       of the channel and is provided because the client which receives 
       this notify packet may not have a way to resolve the name of the
       channel from the <Channel ID>.  The <sender Client ID> is the
-      Client ID who invited the client to the channel.  The <adding client>
-      and the <removing client> indicates the added or removed client
-      from the channel's invite list.  The format of the <adding client
-      and the <removing client> is defined in the [SILC1] with
+      Client ID which invited the client to the channel.  The <adding
+      client> and the <removing client> indicates the added or removed
+      client from the channel's invite list.  The format of the <adding
+      client> and the <removing client> is defined in the [SILC4] with
       SILC_COMMAND_INVITE command.
 
-      The <adding client> and <removing client> is never sent when the
-      packet is destined to a client.
+      The <adding client> and <removing client> MUST NOT be sent when
+      the packet is destined to a client.
 
 
 2     SILC_NOTIFY_TYPE_JOIN
 
-      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
-      it to its primary router.  The router or server receiving the packet
-      distributes this type to the local clients on the channel and
-      broadcast it to the network.
+      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 it to its primary router.  The router or server
+      receiving the packet distributes this type to the local clients
+      on the channel and broadcast it to the network.
 
       Max Arguments:  2
           Arguments:  (1) [<Client ID>]       (2) <Channel ID>
@@ -1198,95 +1220,97 @@ ID's sent in arguments are sent inside ID Payload.
 
       Sent when client has left a channel.  The server must distribute
       this type only to the local clients on the channel and then send
-      it to its primary router.  The router or server receiving the packet
-      distributes this type to the local clients on the channel and
-      broadcast it to the network.
+      it to its primary router.  The router or server receiving the
+      packet distributes this type to the local clients on the channel
+      and broadcast it to the network.
 
       Max Arguments:  1
           Arguments:  (1) <Client ID>
 
-      The <Client ID> is the client who left the channel.
+      The <Client ID> is the client which left the channel.
 
 
 4     SILC_NOTIFY_TYPE_SIGNOFF
 
-      Sent when client signoffs from SILC network.  The server must
+      Sent when client signoff from SILC network.  The server MUST
       distribute this type only to the local clients on the channel and
       then send it to its primary router.  The router or server receiving
-      the packet distributes this type to the local clients on the channel
-      and broadcast it to the network.
+      the packet distributes this type to the local clients on the
+      channel and broadcast it to the network.
 
       Max Arguments:  2
           Arguments:  (1) <Client ID>  (2) <message>
 
-      The <Client ID> is the client who left SILC network.  The <message>
-      is free text string indicating the reason of signoff.
+      The <Client ID> is the client which left SILC network.  The
+      <message> is free text string indicating the reason of the signoff.
 
 
 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.
+      Sent when topic is set/changed on a channel.  This type must be
+      sent only to the clients which is joined on the channel which
+      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>.
+      The <Client ID> is the client which set or changed the <topic>.
 
 
 6     SILC_NOTIFY_TYPE_NICK_CHANGE
 
-      Sent when client changes nick on a channel.  The server must
-      distribute this type only to the local clients on the channel and
-      then send it to its primary router. The router or server receiving
-      the packet distributes this type to the local clients on the channel
-      and broadcast it to the network.
+      Sent when client changes nick on a channel.  The server MUST
+      distribute this type only to the local clients on the channel
+      and then send it to its primary router. The router or server
+      receiving the packet distributes this type to the local clients
+      on the channel and broadcast it to the network.
 
       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.
+      The <Old Client ID> is the old ID of the client which 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.
+      Sent when channel mode has changed.  This type MUST be sent only
+      to the clients which is joined on the channel which mode was
+      changed.
 
       Max Arguments:  4
           Arguments:  (1) <ID Payload>  (2) <mode mask>
                       (3) [<cipher>]   (4) <[hmac>]     
 
-      The <ID Payload> is the ID (usually Client ID but it can be Server ID
-      as well when the router is enforcing channel mode change) of the
-      entity which changed the mode.  The <mode mask> is the new mode mask
-      of the channel.  The client can safely ignore the <cipher> argument
-      since the SILC_PACKET_CHANNEL_KEY packet will force the new channel
-      key change anyway.  The <hmac> argument is important since the client
-      is responsible of setting the new HMAC and the hmac key into use.
+      The <ID Payload> is the ID (usually Client ID but it can be
+      Server ID as well when the router is enforcing channel mode
+      change) of the entity which changed the mode.  The <mode mask>
+      is the new mode mask of the channel.  The client can safely
+      ignore the <cipher> argument since the SILC_PACKET_CHANNEL_KEY
+      packet will force the new channel key change anyway.  The <hmac>
+      argument is important since the client is responsible of setting
+      the new HMAC and the hmac key into use.
 
 
 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.
+      Sent when user mode on channel has changed.  This type MUST be
+      sent only to the clients which 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.
+      The <Client ID> is the client which 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.
+      Sent when Message of the Day (motd) is sent to client.
 
       Max Arguments:  1
           Arguments:  (1) <motd>
@@ -1296,48 +1320,51 @@ ID's sent in arguments are sent inside ID Payload.
 
 10    SILC_NOTIFY_TYPE_CHANNEL_CHANGE
 
-      Sent when channel's ID has changed for a reason or another.  This 
-      is sent by normal server to the client.  This can also be sent by
-      router to other server to force the Channel ID change.  The Channel
-      ID must be changed to use the new one.  When sent to clients, this
-      type must be sent only to the clients who is joined on the channel.
+      Sent when channel's ID has changed for a reason or another.
+      This is sent by normal server to the client.  This can also be
+      sent by router to other server to force the Channel ID change.
+      The Channel ID MUST be changed to use the new one.  When sent
+      to clients, this type MUST be sent only to the clients which 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.
+      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.
 
 
 11    SILC_NOTIFY_TYPE_SERVER_SIGNOFF
 
-      Sent when server quits SILC network.  Those clients from this server
-      that are on channels must be removed from the channel.
+      Sent when server quits SILC network.  Those clients from this
+      server that are on channels must be removed from the channel.
 
       Max Arguments:  2000
           Arguments:  (1) <Server ID>   (n) [<Client ID>   [...]
 
-      The <Server ID> is the server's ID.  The rest of the arguments are
-      the Client ID's of the client's who are coming from this server and
-      are thus quitting the SILC network also.  If the maximum number of
-      arguments are reached another SILC_NOTIFY_TYPE_SERVER_SIGNOFF notify
-      packet must be sent.  When this notify packet is sent between routers
-      the Client ID's may be omitted.
+      The <Server ID> is the server's ID.  The rest of the arguments
+      are the Client ID's of the client's which are coming from this
+      server and are thus quitting the SILC network also.  If the
+      maximum number of arguments are reached another 
+      SILC_NOTIFY_TYPE_SERVER_SIGNOFF notify packet MUST be sent.
+      When this notify packet is sent between routers the Client ID's
+      MAY be omitted.
 
 
 12    SILC_NOTIFY_TYPE_KICKED
 
-      Sent when a client has been kicked from a channel.  This is sent 
-      also to the client who was kicked from the channel.  The client
-      who was kicked from the channel must be removed from the channel.
-      This notify type is always destined to the channel.  The router or
-      server receiving the packet distributes this type to the local
-      clients on the channel and broadcast it to the network.
+      Sent when a client has been kicked from a channel.  This is
+      sent also to the client which was kicked from the channel.
+      The client which was kicked from the channel MUST be removed
+      from the channel.  This notify type is always destined to the
+      channel.  The router or server receiving the packet distributes
+      this type to the local clients on the channel and broadcast it
+      to the network.
 
       Max Arguments:  2
           Arguments:  (1) <Client ID>  (2) [<comment>]
 
-      The <Client ID> is the client who was kicked from the channel.
+      The <Client ID> is the client which was kicked from the channel.
       The kicker may have set the <comment> to indicate the reason for
       the kicking.
 
@@ -1345,37 +1372,37 @@ ID's sent in arguments are sent inside ID Payload.
 13    SILC_NOTIFY_TYPE_KILLED
 
       Sent when a client has been killed from the network.  This is sent 
-      also to the client who was killed from the network.  The client
-      who was killed from the network must be removed from the network.
-      This notify type is destined directly to the client who was killed
-      and to channel if the client is on any channel.  The router or
-      server receiving the packet distributes this type to the local
+      also to the client which was killed from the network.  The client
+      which was killed from the network MUST be removed from the network.
+      This notify type is destined directly to the client which was
+      killed and to channel if the client is on any channel.  The router
+      or server receiving the packet distributes this type to the local
       clients on the channel and broadcast it to the network.
 
       Max Arguments:  2
           Arguments:  (1) <Client ID>  (2) [<comment>]
 
-      The <Client ID> is the client who was killed from the network.
+      The <Client ID> is the client which was killed from the network.
       The killer may have set the <comment> to indicate the reason for
       the killing.
 
 
 14    SILC_NOTIFY_TYPE_UMODE_CHANGE
 
-      Sent when user's mode in the SILC changes.  This type is sent only
-      between routers as broadcast packet.
+      Sent when user's mode in the SILC changes.  This type is sent
+      only between routers as broadcast packet.
 
       Max Arguments:  2
           Arguments:  (1) <Client ID>  (2) <mode mask>
 
-      The <Client ID> is the client which mode was changed.  The <mode mask>
-      is the new mode mask.
+      The <Client ID> is the client which mode was changed.  The
+      <mode mask> is the new mode mask.
 
 
 15    SILC_NOTIFY_TYPE_BAN
 
-      Sent when the ban list of the channel is changed.  This type is sent
-      only between routers as broadcast packet.
+      Sent when the ban list of the channel is changed.  This type is
+      sent only between routers as broadcast packet.
 
       Max Arguments:  3
           Arguments:  (1) <Channel ID>         (2) [<adding client>]
@@ -1385,7 +1412,7 @@ ID's sent in arguments are sent inside ID Payload.
       <adding client> is used to indicate the a ban was added and the
       <removing client> is used to indicate that a ban was removed from
       the ban list.  The format of the <adding client> and the 
-      <removing client> is defined in the [SILC1] with SILC_COMMAND_BAN
+      <removing client> is defined in the [SILC4] with SILC_COMMAND_BAN
       command.
 
 .in 3
@@ -1398,8 +1425,8 @@ message types.
 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
-payload but must be able to accept it.  However, client may
+conditions when server sends this packet.  Client MUST NOT send this
+payload but MUST be able to accept it.  However, client MAY
 totally ignore the contents of the packet as server is going to
 take action on the error anyway.  However, it is recommended
 that the client takes error packet seriously.
@@ -1436,10 +1463,10 @@ Even though this packet is the most common in SILC it is still
 special packet.  Some special handling on sending and reception
 of channel message is required.
 
-Padding must be applied into this payload since the payload is
+Padding MUST be applied into this payload since the payload is
 encrypted separately from other parts of the packet with the
 channel specific key.  Hence the requirement of the padding.  
-The padding should be random data.  The packet must be made
+The padding SHOULD be random data.  The packet MUST be made
 multiple by eight (8) or by the block size of the cipher, which
 ever is larger.
 
@@ -1454,11 +1481,11 @@ Receiver of the the channel message packet is able to determine
 the channel the message is destined to by checking the destination
 ID from the SILC Packet header which tells the destination channel.
 The original sender of the packet is also determined by checking
-the source ID from the header which tells the client who sent
+the source ID from the header which tells the client which sent
 the message.
 
 The payload may only be sent with SILC_PACKET_CHANNEL_MESSAGE packet.
-It  must not be sent in any other packet type.  The following diagram 
+It MUST NOT be sent in any other packet type.  The following diagram 
 represents the Channel Message Payload.
 
 (*) indicates that the field is not encrypted.
@@ -1498,7 +1525,7 @@ Figure 13:  Channel Message Payload
 .in 6
 o Flags (2 bytes) - Includes the flags of the channel
   messages.  The flags can indicate a reason or purpose
-  for the channel message.  Note, that the Private Message
+  for the channel message.  Note that the Private Message
   Payload use these same flags for the same purpose.  The
   following flags are defined:
 
@@ -1550,26 +1577,26 @@ o Padding Length (2 bytes) - Indicates the length of the
   Padding field in the payload, not including any other
   field.
 
-o Padding (variable length) - The padding that must be
+o Padding (variable length) - The padding that MUST be
   applied because this payload is encrypted separately from
   other parts of the packet.
 
-o MAC (variable legnth) - The MAC computed from the
+o MAC (variable length) - The MAC computed from the
   Message Length, Message Data, Padding Length and Padding
   fields.  This protects the integrity of the plaintext
   channel message.  The receiver can verify from the MAC
   whether the message decrypted correctly.  Also, if more than
   one private key has been set for the channel, the receiver
   can verify which of the keys decrypted the message 
-  correctly.  Note that, this field is encrypted and must
+  correctly.  Note that, this field is encrypted and MUST
   be added to the padding calculation.
 
 o Initial Vector (variable length) - The initial vector
   that has been used in packet encryption.  It needs to be
   used in the packet decryption as well.  What this field
   includes is implementation issue.  However, it is 
-  recommended that it would be random data or, perhaps,
-  a timestamp.  It is not recommended to use zero (0) as
+  RECOMMENDED that it would be random data or, perhaps,
+  a timestamp.  It is NOT RECOMMENDED to use zero (0) as
   initial vector.  This field is not encrypted.  This field
   is not included into the padding calculation.  Length
   of this field equals the cipher's block size.  This field
@@ -1590,11 +1617,12 @@ 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
+The client which 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.
+send this payload to the entity which sent the SILC_COMMAND_JOIN
+command.
 
-Channel keys are cell specific thus every router in cell have
+Channel keys are cell specific thus every router in the 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
@@ -1604,21 +1632,10 @@ 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.
-It must not be sent in any other packet type.  The following diagram 
+It MUST NOT be sent in any other packet type.  The following diagram 
 represents the Channel Key Payload.
 
 
-
-
-
-
-
-
-
-
-
-
-
 .in 5
 .nf
                      1                   2                   3
@@ -1664,7 +1681,7 @@ o Cipher Name Length (2 bytes) - Indicates the length of the
 o Cipher Name (variable length) - Name of the cipher used
   in the protection of channel traffic.  This name is
   initially decided by the creator of the channel but it
-  may change during the life time of the channel as well.
+  MAY change during the life time of the channel as well.
 
 o Channel Key Length (2 bytes) - Indicates the length of the
   Channel Key field in the payload, not including any other
@@ -1684,41 +1701,41 @@ two clients (or users for that matter).  The messages are sent only
 to the specified user and no other user inside SILC network is
 able to see the message.  The message is protected by the session 
 key established by the SILC Key Exchange Protocol.  However,
-it is also possible to agree to use specific keys to protect
+it is also possible to agree to use a private key to protect
 just the private messages.  See section 2.3.11 Private Message
 Key Payload for detailed description of how to agree to use
 specific key.
 
-If normal session key is used to protect the message, every
-server between the sender client and the receiving client needs
-to decrypt the packet and always re-encrypt it with the session
-key of the next receiver of the packet.  See section Client
-To Client in [SILC1].
+If normal session key is used to protect the message, every server
+between the sender client and the receiving client MUST decrypt the
+packet and always re-encrypt it with the session key of the next
+receiver of the packet.  See section Client To Client in [SILC1].
 
-When specific key is used to protect the message, servers between 
+When private key is used to protect the message, servers between 
 the sender and the receiver needs not to decrypt/re-encrypt the 
 packet.  Section 4.8.2 Client To Client in [SILC1] gives example of
 this scheme as well.
 
 The payload may only be sent with SILC_PACKET_PRIVATE_MESSAGE 
-packet.  It must not be sent in any other packet type.  The following 
+packet.  It MUST NOT be sent in any other packet type.  The following 
 diagram represents the Private Message 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|            Flags              |        Nickname Length        |
+|            Flags              |      Message Data Length      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
-~                            Nickname                           ~
-|                                                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|      Message Data Length      |                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
-|                                                               |
 ~                          Message Data                         ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -1736,21 +1753,10 @@ Figure 15:  Private Message Payload
 o Flags (2 bytes) - This field includes the flags of the
   private message.  They can indicate a different reason or
   purpose for the private message.  See the section 2.3.9
-  Channel Message Payload for defined flags.  Note, that
+  Channel Message Payload for defined flags.  Note that
   the Channel Message Payload use the same flags for the
   same purpose.
 
-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 
-  private message.  This should not be trusted as a definite 
-  sender of the private 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.
-
 o Message Data Length (2 bytes) - Indicates the length of the
   Message Data field, not includes any other field.
 
@@ -1763,7 +1769,7 @@ o Padding (variable length) - This field is present only
   message key.  In this case the padding is applied to make
   the packet multiple by eight (8), or by the block size of
   the cipher, which ever is larger.  When encrypted with
-  normal session keys, this field must not be included.
+  normal session keys, this field MUST NOT be included.
 .in 3
 
 
@@ -1777,12 +1783,12 @@ established by the SILC Key Exchange Protocol is used to protect
 the private messages.
 
 This payload may only be sent by client to another client.  Server
-must not send this payload at any time.  After sending this payload
+MUST NOT send this payload at any time.  After sending this payload
 the sender of private messages must set the Private Message Key
 flag into SILC Packet Header.
 
 The payload may only be sent with SILC_PACKET_PRIVATE_MESSAGE_KEY 
-packet.  It must not be sent in any other packet type.  The following 
+packet.  It MUST NOT be sent in any other packet type.  The following 
 diagram represents the Private Message Key Payload.
 
 
@@ -1835,7 +1841,7 @@ o Cipher Name (variable length) - Name of the cipher to use
 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.  The following diagram
+Also server MAY send commands to other servers.  The following diagram
 represents the Command Payload.
 
 
@@ -1859,67 +1865,69 @@ o Payload Length (2 bytes) - Length of the entire command
   payload including any command argument payloads associated 
   with this payload.
 
-o SILC Command (1 byte) - Indicates the SILC command.  This must 
+o SILC Command (1 byte) - Indicates the SILC command.  This MUST 
   be set to non-zero value.  If zero (0) value is found in this 
-  field the packet must be discarded.
+  field the packet MUST be discarded.
 
 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 
+  field is set to zero (0).  The arguments MUST follow the 
   command payload.  See section 2.3.2.2 for definition of the
   Argument Payload.
 
 o Command Identifier (2 bytes) - Identifies this command at the
-  sender's end.  The entity who replies to this command must
+  sender's end.  The entity which replies to this command MUST
   set the value found from this field into the Command Payload
   used to send the reply to the sender.  This way the sender
   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
+  issue but it is RECOMMENDED that wrapping counter value is
   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,
+See [SILC4] for detailed description of different SILC commands,
 their arguments and their reply messages.
 
 
+
+
 .ti 0
 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
-upper sections for Command Payload and for Command Argument Payload
-specifications.  Command Reply message uses the Command Argument Payload
-as well.
+Command Reply Payload is identical to the Command Payload thus see
+the upper sections for Command Payload and for Command Argument
+Payload specifications.  Command Reply message uses the Command
+Argument Payload as well.
 
-The entity who sends the reply packet must set the Command Unifier
+The entity which sends the reply packet MUST set the Command Identifier
 field in the reply packet's Command Payload to the value it received
 in the original command packet.
 
-See SILC Commands in [SILC1] for detailed description of different
+See SILC Commands in [SILC4] for detailed description of different
 SILC commands, their arguments and their reply messages.
 
 
 .ti 0
 2.3.15 Connection Auth Request Payload
 
-Client may send this payload to server to request the authentication
+Client MAY send this payload to server to request the authentication
 method that must be used in authentication protocol.  If client knows 
 this information beforehand this payload is not necessary to be sent.
-Server performing authentication with another server may also send
+Server performing authentication with another server MAY also send
 this payload to request the authentication method.  If the connecting
 server already knows this information this payload is not necessary
 to be sent.
 
-Server receiving this request must reply with same payload sending
+Server receiving this request MUST reply with same payload sending
 the mandatory authentication method.  Algorithms that may be required
 to be used by the authentication method are the ones already 
 established by the SILC Key Exchange protocol.  See section Key
 Exchange Start Payload in [SILC3] for detailed information.
 
 The payload may only be sent with SILC_PACKET_CONNECTION_AUTH_REQUEST
-packet.  It must not be sent in any other packet type.  The following 
+packet.  It MUST NOT be sent in any other packet type.  The following 
 diagram represents the Connection Auth Request Payload.
 
 
@@ -1951,21 +1959,19 @@ o Authentication Method (2 bytes) - Indicates the authentication
   method to be used in the authentication protocol.  The following
   authentication methods are defined:
 
-
-
      0    NONE        (mandatory)
      1    password    (mandatory)
      2    public key  (mandatory)
 
-  If any other type is found in this field the packet must be
-  discarded and the authentication must be failed.  If this
+  If any other type is found in this field the packet MUST be
+  discarded and the authentication MUST be failed.  If this
   payload is sent as request to receive the mandatory 
-  authentication method this field must be set to zero (0),
+  authentication method this field MUST be set to zero (0),
   indicating that receiver should send the mandatory 
   authentication method.  The receiver sending this payload
-  to the requesting party, may also set this field to zero (0) 
+  to the requesting party, MAY also set this field to zero (0) 
   to indicate that authentication is not required.  In this
-  case authentication protocol still must be started but
+  case authentication protocol still MUST be started but
   server is most likely to respond with SILC_PACKET_SUCCESS
   immediately.
 .in 3
@@ -1994,13 +2000,13 @@ create their own ID's.  Server registers itself to the network by sending
 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.
+However, this payload 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.
+Thus, this payload is very important and used every time when some
+new entity is registered to the SILC network.  Client MUST NOT send this
+payload.  Both client and server (and router) MAY receive this payload.
 
 The packet uses generic ID Payload as New ID Payload.  See section
 2.3.2.1 for generic ID Payload.
@@ -2010,7 +2016,7 @@ The packet uses generic ID Payload as New ID Payload.  See section
 2.3.17 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 
+connection has been authenticated client MUST register itself to the 
 server.  Clients first packet after key exchange and authentication 
 protocols must be SILC_PACKET_NEW_CLIENT.  This payload tells server all
 the relevant information about the connected user.  Server creates a new
@@ -2026,11 +2032,21 @@ set the real nickname of the user which is then used to create new
 client ID.
 
 The payload may only be sent with SILC_PACKET_NEW_CLIENT packet.  It
-must not be sent in any other packet type.  The following diagram
+MUST NOT be sent in any other packet type.  The following diagram
 represents the New Client Payload.
 
 
 
+
+
+
+
+
+
+
+
+
+
 .in 5
 .nf
                      1                   2                   3
@@ -2072,15 +2088,15 @@ o Real Name (variable length) - The real name of the user
 
 This payload is sent by server when it has completed successfully both
 key exchange and connection authentication protocols.  The server
-uses this payload to register itself to the SILC network.  The
-first packet after these key exchange and authentication protocols
+MUST register itself to the SILC Network by sending this payload.
+The first packet after these key exchange and authentication protocols
 is SILC_PACKET_NEW_SERVER packet.  The payload includes the Server ID
 of the server that it has created by itself.  It also includes a
 name of the server that is associated to the Server ID.
 
 The payload may only be sent with SILC_PACKET_NEW_SERVER packet.  It
-must not be sent in any other packet type.  The following diagram represents
-the New Server Payload.
+MUST NOT be sent in any other packet type.  The following diagram
+represents the New Server Payload.
 
 
 
@@ -2131,14 +2147,16 @@ created by router of the cell.  Server never creates channels unless
 it is a standalone server and it does not have router connection,
 in this case server acts as router.  Normal server send JOIN command
 to the router (after it has received JOIN command from client) which
-then processes the command and creates the channel.  Client never sends
-this packet.
+then processes the command and creates the channel.  Client MUST NOT
+send this packet.
 
 The packet uses generic Channel Payload as New Channel Payload.  See
 section 2.3.2.3 for generic Channel Payload.  The Mode Mask field in the
 Channel Payload is the mode of the channel.
 
 
+
+
 .ti 0
 2.3.20 Key Agreement Payload
 
@@ -2147,20 +2165,20 @@ another client in the SILC Network.  The key agreement protocol used
 is the SKE protocol.  The result of the protocol, the secret key
 material, can be used for example as private message key between the
 two clients.  This significantly adds security as the key agreement
-is performed outside the SILC network.  The server and router must not
+is performed outside the SILC network.  The server and router MUST NOT
 send this payload.
 
-The sender may tell the receiver of this payload the hostname and the
+The sender MAY tell the receiver of this payload the hostname and the
 port where the SKE protocol is running in the sender's end.  The 
-receiver may then initiate the SKE negotiation with the sender.  The
-sender may also optionally not to include the hostname and the port
-of its SKE protocol.  In this case the receiver may reply to the
+receiver MAY then initiate the SKE negotiation with the sender.  The
+sender MAY also optionally not to include the hostname and the port
+of its SKE protocol.  In this case the receiver MAY reply to the
 request by sending the same payload filled with the receiver's hostname
-and the port where the SKE protocol is running.  The sender may then
+and the port where the SKE protocol is running.  The sender MAY then
 initiate the SKE negotiation with the receiver.
 
 The payload may only be sent with SILC_PACKET_KEY_AGREEMENT packet.
-It must not be sent in any other packet type.  The following diagram
+It MUST NOT be sent in any other packet type.  The following diagram
 represents the Key Agreement Payload.
 
 
@@ -2184,18 +2202,18 @@ Figure 21:  Key Agreement Payload
 
 
 .in 6
-o Hostname Length (2 bytes) - Indicates the length of the Hostname
-  field.
+o Hostname Length (2 bytes) - Indicates the length of the
+  Hostname field.
 
 o Hostname (variable length) - The hostname or IP address where
-  the SKE protocol is running.  The sender may fill this field
+  the SKE protocol is running.  The sender MAY fill this field
   when sending the payload.  If the receiver sends this payload
   as reply to the request it must fill this field.
 
 o Port (4 bytes) - The port where the SKE protocol is bound.
-  The sender may fill this field when sending the payload.  If
+  The sender MAY fill this field when sending the payload.  If
   the receiver sends this payload as reply to the request it 
-  must fill this field.  This is a 32 bit MSB first order value.
+  MUST fill this field.  This is a 32 bit MSB first order value.
 .in 3
 
 
@@ -2214,13 +2232,13 @@ the key material is undefined.
 Cell Routers payload is used by router to notify its primary router what
 other routers exist in the cell.  The other routers are considered to be
 backup routers and one of them will come active only in the case of
-failure of the primary router.  Normal server can send this packet if it
-is acting as backup router.  Client must not send this packet.  To send
+failure of the primary router.  Normal server MAY send this packet if it
+is acting as backup router.  Client MUST NOT send this packet.  To send
 more than one backup router set the List flag and assemble the payloads
 as list.
 
 The payload may only be sent with SILC_PACKET_CELL_ROUTERS packet.  It
-must not be sent in any other packet type.  The Following diagram
+MUST NOT be sent in any other packet type.  The Following diagram
 represents the Cell Routers Payload.
 
          
@@ -2321,13 +2339,13 @@ packet is also encrypted always with the session key, also in special
 cases.  Computed MAC of the packet must not be encrypted.
 
 Decryption process in these cases are straightforward.  The receiver
-of the packet must first decrypt the SILC Packet header, or some parts
+of the packet MUST first decrypt the SILC Packet header, or some parts
 of it, usually first 16 bytes of it.  Then the receiver checks the
 packet type from the decrypted part of the header and can determine
 how the rest of the packet must be decrypted.  If the packet type is
-any of the special cases described in The following sections the packet
+any of the special cases described in the following sections the packet
 decryption is special.  If the packet type is not among those special
-packet types rest of the packet may be decrypted with the same key.
+packet types rest of the packet can be decrypted with the same key.
 
 Also, note that two bytes of the SILC Packet header are not encrypted
 thus it must be noticed in the decryption process by starting the
@@ -2347,9 +2365,9 @@ the channel specific key.  However, the SILC Packet header is not
 encrypted with that key.  As in normal case, the header is encrypted
 with the key of the next receiver of the packet, who ever that might
 be.  Note that in this case the encrypted data area is not touched
-at all; it must not be re-encrypted with the session key.
+at all; it MUST NOT be re-encrypted with the session key.
 
-Receiver of a channel message, who ever that is, is required to decrypt
+Receiver of a channel message, who ever that is, is REQUIRED to decrypt
 the SILC Packet header to be able to even recognize the packet to be as
 channel message.  This is same procedure as for normal SILC packets.
 As the receiver founds the packet to be channel message, rest of the
@@ -2360,17 +2378,17 @@ key and thus can be decrypted only if the receiver is the client on
 the channel.  See section 2.7 Packet Padding Generation for more
 information about padding on special packets.
 
-If the receiver of the channel message is router who is routing the
-message to another router then it must decrypt the Channel Message
+If the receiver of the channel message is router which is routing the
+message to another router then it MUST decrypt the Channel Message
 payload.  Between routers (that is, between cells) channel messages
 are protected with session keys shared between the routers.  This
 causes another special packet processing for channel messages.  If
 the channel message is received from another router then the entire
-packet, including Channel Message payload, is encrypted with the
+packet, including Channel Message payload, MUST be encrypted with the
 session key shared between the routers.  In this case the packet
 decryption process is as with normal SILC packets.  Hence, if the
 router is sending channel message to another router the Channel
-Message payload must have been decrypted and must be re-encrypted
+Message payload MUST have been decrypted and MUST be re-encrypted
 with the session key shared between the another router.  In this
 case the packet encryption is as with any normal SILC packet.
 
@@ -2380,14 +2398,14 @@ message encryption and decryption is as described above.  This
 different processing of channel messages with router to router
 connection is because channel keys are cell specific.  All cells has
 their own channel keys thus the channel message traveling from one
-cell to another must be protected as it would be any normal SILC
+cell to another MUST be protected as it would be any normal SILC
 packet.
 
 If the SILC_CMODE_PRIVKEY channel mode has been set for the channel
 then the router cannot decrypt the packet as it does not know the
-private key.  In this case the entire packet is encrypted with the
-session key and sent to the router.  The router receiving the packet
-must check the channel mode and decrypt the packet accordingly.
+private key.  In this case the entire packet MUST be encrypted with
+the session key and sent to the router.  The router receiving the
+packet MUST check the channel mode and decrypt the packet accordingly.
 
 
 .ti 0
@@ -2397,7 +2415,7 @@ By default, private message in SILC are protected by session keys.
 In this case the private message encryption and decryption process is
 equivalent to normal packet encryption and decryption.
 
-However, private messages can be protected with private message key
+However, private messages MAY be protected with private message key
 which causes the packet to be special packet.  The procedure in this
 case is very much alike to channel packets.  The actual private message
 is encrypted with the private message key and other parts of the
@@ -2443,7 +2461,7 @@ See [SILC1] for defined and allowed MAC algorithms.
 2.7 Packet Padding Generation
 
 Padding is needed in the packet because the packet is encrypted.  It
-must always be multiple by eight (8) or multiple by the size of the
+MUST always be multiple by eight (8) or multiple by the size of the
 cipher's block size, which ever is larger.  The padding is always
 encrypted.
 
@@ -2452,81 +2470,80 @@ and between the Data Payload area.  The padding for normal packets
 are calculated as follows:
 
 .in 6
-padding length = 16 - ((packet length - 2) % 16)
+padding length = 16 - ((packet length - 2) mod 16)
 .in 3
 
 The 16 is the maximum padding allowed in SILC packet.  Two (2) is 
 subtracted from the true length of the packet because two (2) bytes
 is not encrypted in SILC Packet Header, see section 2.2 SILC Packet
-Header.  Those two bytes that are not encrypted must not be calculated
+Header.  Those two bytes that are not encrypted MUST NOT be calculated
 to the padding length.
 
-For special packets the padding calculation may be different as special
+For special packets the padding calculation MAY be different as special
 packets may be encrypted differently.  In these cases the encrypted
-data area must already be multiple by the block size thus in this case
+data area MUST already be multiple by the block size thus in this case
 the padding is calculated only for SILC Packet Header, not for any
 other area of the packet.  The same algorithm works in this case as
 well, except that the `packet length' is now the SILC Packet Header
 length.  In this case, as well, two (2) is subtracted from the
 length.
 
-The padding must be random data, preferably, generated by 
+The padding MUST be random data, preferably, generated by 
 cryptographically strong random number generator.
 
 
 .ti 0
 2.8 Packet Compression
 
-SILC Packets may be compressed.  In this case the data payload area
-is compressed and all other areas of the packet must remain as they
+SILC Packets MAY be compressed.  In this case the data payload area
+is compressed and all other areas of the packet MUST remain as they
 are.  After compression is performed for the data area, the length
-field of Packet Header must be set to the compressed length of the
+field of Packet Header MUST be set to the compressed length of the
 data.
 
-The compression must always be applied before encryption.  When
-the packet is received and decrypted the data area must be decompressed.
-Note that the true sender of the packet must apply the compression and
-the true receiver of the packet must apply the decompression.  Any
-server or router en route must not decompress the packet.
-
+The compression MUST always be applied before encryption.  When
+the packet is received and decrypted the data area MUST be decompressed.
+Note that the true sender of the packet MUST apply the compression and
+the true receiver of the packet MUST apply the decompression.  Any
+server or router en route MUST NOT decompress the packet.
 
 
 .ti 0
 2.9 Packet Sending
 
-The sender of the packet must assemble the SILC Packet Header with
-correct values.  It must set the Source ID of the header as its own
-ID, unless it is forwarding the packet.  It must also set the Destination
+The sender of the packet MUST assemble the SILC Packet Header with
+correct values.  It MUST set the Source ID of the header as its own
+ID, unless it is forwarding the packet.  It MUST also set the Destination
 ID of the header to the true destination.  If the destination is client
 it will be Client ID, if it is server it will be Server ID and if it is
 channel it will be Channel ID.
 
-If the sender wants to compress the packet it must apply the
-compression now.  Sender must also compute the padding as described
-in above sections.  Then sender must compute the MAC of the packet.
+If the sender wants to compress the packet it MUST apply the
+compression now.  Sender MUST also compute the padding as described
+in above sections.  Then sender MUST compute the MAC of the packet.
 
-Then sender encrypts the packet as has been described in above
+Then sender MUST encrypt the packet as has been described in above
 sections according whether the packet is normal packet or special
-packet.  The computed MAC must not be encrypted.
+packet.  The computed MAC MUST NOT be encrypted.
 
 
 .ti 0
 2.10 Packet Reception
 
-On packet reception the receiver must check that all fields in 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
+On packet reception the receiver MUST check that all fields in 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
 discarded.
 
 See above sections on the decryption process of the received packet.
  
-The receiver must also check that the ID's in the header are valid
-ID's.  Unsupported ID types or malformed ID's must cause packet
+The receiver MUST also check that the ID's in the header are valid
+ID's.  Unsupported ID types or malformed ID's MUST cause packet
 rejection.  The padding on the reception is always ignored.
 
-The receiver must also check the packet type and start parsing the
+The receiver MUST also check the packet type and start parsing the
 packet according to the type.  However, note the above sections on
 special packet types and their parsing.
 
@@ -2540,7 +2557,7 @@ example, when they are routing channel message to the local clients.
 Routing is quite simple as every packet tells the true origin and the
 true destination of the packet.
 
-It is still recommended for routers that has several routing connections
+It is still RECOMMENDED for routers that has several routing connections
 to create route cache for those destinations that has faster route than
 the router's primary route.  This information is available for the router
 when other router connects to the router.  The connecting party then
@@ -2549,11 +2566,11 @@ informations helps to create the route cache.  Also, when new channels
 are created to a cell its information is broadcasted to all routers
 in the network.  Channel ID's are based on router's ID thus it is easy
 to create route cache based on these informations.  If faster route for
-destination does not exist in router's route cache the packet must be
+destination does not exist in router's route cache the packet MUST be
 routed to the primary route (default route).
 
-For server who receives a packet to be routed to its locally connected
-client the server must check whether the particular packet type is
+For server which receives a packet to be routed to its locally connected
+client the server MUST check whether the particular packet type is
 allowed to be routed to the client.  Not all packets may be sent by
 some odd entity to client that is indirectly connected to the sender.
 See section 2.3 SILC Packet Types and paragraph about indirectly connected
@@ -2566,22 +2583,22 @@ directly connected to the server.
 .ti 0
 2.12 Packet Broadcasting
 
-SILC packets may be broadcasted in SILC network.  However, only router
+SILC packets MAY be broadcasted in SILC network.  However, only router
 server may send or receive broadcast packets.  Client and normal server
-must not send broadcast packets and they must ignore broadcast packets
+MUST NOT send broadcast packets and they MUST ignore broadcast packets
 if they receive them.  Broadcast packets are sent by setting Broadcast
 flag to the SILC packet header.
 
 Broadcasting packets means that the packet is sent to all routers in
 the SILC network, except to the router that sent the packet.  The router
-receiving broadcast packet must send the packet to its primary route.
-The fact that SILC routers may have several router connections may
+receiving broadcast packet MUST send the packet to its primary route.
+The fact that SILC routers may have several router connections can
 cause problems, such as race conditions inside the SILC network, if
-care is not taken when broadcasting packets.  Router must not send
+care is not taken when broadcasting packets.  Router MUST NOT send
 the broadcast packet to any other route except to its primary route.
 
 If the primary route of the router is the original sender of the packet
-the packet must not be sent to the primary route.  This may happen
+the packet MUST NOT be sent to the primary route.  This may happen
 if router has several router connections and some other router uses
 the router as its primary route.
 
@@ -2604,10 +2621,12 @@ security of this protocol.
 4 References
 
 [SILC1]      Riikonen, P., "Secure Internet Live Conferencing (SILC),
-             Protocol Specification", Internet Draft, June 2000.
+             Protocol Specification", Internet Draft, April 2001.
 
 [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication 
-             Protocols", Internet Draft, June 2000.
+             Protocols", Internet Draft, April 2001.
+
+[SILC4]      Riikonen, P., "SILC Commands", Internet Draft, April 2001.
 
 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
              RFC 1459, May 1993.
@@ -2659,6 +2678,9 @@ security of this protocol.
 [PKCS1]      Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
              Specifications, Version 2.0", RFC 2437, October 1998.
 
+[RFC2119]    Bradner, S., "Key Words for use in RFCs to Indicate
+             Requirement Levels", BCP 14, RFC 2119, March 1997.
+
 
 .ti 0
 5 Author's Address
@@ -2671,4 +2693,4 @@ Finland
 
 EMail: priikone@poseidon.pspt.fi
 
-This Internet-Draft expires 6 Jun 2001
+This Internet-Draft expires XX October 2001
\ No newline at end of file
index 8ea2cbfa4669218a1272fd24991d916a24baae70..94848fcb67379ec2c47019338961fc668df6df03 100644 (file)
@@ -122,9 +122,10 @@ Table of Contents
   4.8 Session Key Regeneration .................................. 36
   4.9 Command Sending and Reception ............................. 37
   4.10 Closing Connection ....................................... 37
-5 Security Considerations ....................................... XXX
-6 References .................................................... XXX
-7 Author's Address .............................................. XXX
+5 Security Considerations ....................................... 38
+6 References .................................................... 38
+7 Author's Address .............................................. 40
+
 
 
 .ti 0
@@ -211,9 +212,14 @@ keep global information up to date at all time.
 This, on the other hand, leads to cellular like network, where routers 
 are in the center of the cell and servers are connected to the router.
 
-The following diagram represents SILC network topology.
 
 
+
+
+
+
+The following diagram represents SILC network topology.
+
 .in 8
 .nf
   ---- ---- ----         ---- ---- ----
@@ -2012,6 +2018,11 @@ should have a forum to discuss the cell management issues.
              Requirement Levels", BCP 14, RFC 2119, March 1997.
 
 
+
+
+
+
+
 .ti 0
 7 Author's Address
 
index c149bc00598ad6daad71891d0354534aa4e06049..7d6c537e089947d82133d07d71272ef42cd36a53 100644 (file)
@@ -132,7 +132,7 @@ infologfile:/usr/local/silc/logs/silcd.log:10000
 # file.
 #
 [ClientConnection]
-:::1333:1
+:::706:1
 
 #
 # Configured server administrator connections
index a878e25df893552ac9e8997d8462d4090924a22b..f5c4ca21e0936666c99494e8c238ae5c1b624b42 100644 (file)
 /* Version type definition */
 typedef unsigned char SilcVersion;
 
-/* SILC Versions. XXX not used currently */
-#define SILC_VERSION_MAJ 1
-#define SILC_VERSION_MIN 0
-#define SILC_VERSION_BUILD 0
-
 /* SILC Protocol version number used in SILC packets */
 #define SILC_VERSION_1 '\1'
 
index 455505163c62b6deb05ed0de31e642602cc191ca..cc0155b225c833c65a068204096b06b806fbf731 100644 (file)
@@ -49,8 +49,7 @@ void silc_client_send_private_message(SilcClient client,
   SILC_LOG_DEBUG(("Sending private message"));
 
   /* Encode private message payload */
-  buffer = silc_private_message_payload_encode(flags, strlen(conn->nickname),
-                                              conn->nickname,
+  buffer = silc_private_message_payload_encode(flags,
                                               data_len, data,
                                               client_entry->send_key);
 
index cedf57679c39f794dc8f356ab24386e3032097d0..3d18378e088f9cfdd97f86b21b291f4518181054 100644 (file)
@@ -144,6 +144,8 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
   SilcClientConnection conn = (SilcClientConnection)ske->sock->user_data;
   SilcClient client = (SilcClient)ske->user_data;
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
+  char *cp;
+  int maj = 0, min = 0, build = 0, maj2, min2, build2;
 
   /* Check for initial version string */
   if (!strstr(version, "SILC-1.0-"))
@@ -154,8 +156,34 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
   if (len < strlen(silc_version_string))
     status = SILC_SKE_STATUS_BAD_VERSION;
 
-  /* XXX for now there is no other tests due to the abnormal version
-     string that is used */
+  cp = version + 9;
+  maj = atoi(cp);
+  cp = strchr(cp, '.');
+  if (cp) {
+    min = atoi(cp + 1);
+    cp++;
+  }
+  cp = strchr(cp, '.');
+  if (cp)
+    build = atoi(cp + 1);
+
+  cp = silc_version_string + 9;
+  maj2 = atoi(cp);
+  cp = strchr(cp, '.');
+  if (cp) {
+    min2 = atoi(cp + 1);
+    cp++;
+  }
+  cp = strchr(cp, '.');
+  if (cp)
+    build2 = atoi(cp + 1);
+
+  if (maj != maj2)
+    status = SILC_SKE_STATUS_BAD_VERSION;
+#if 0
+  if (min < min2)
+    status = SILC_SKE_STATUS_BAD_VERSION;
+#endif
 
   if (status != SILC_SKE_STATUS_OK)
     client->ops->say(client, conn, 
index 789bde0e4ec39917f9d86537c562e351eeae9833..25e749f2d34ed90f93104962b71d1199967fbd45 100644 (file)
@@ -33,8 +33,6 @@
    from SILC packets. */
 struct SilcPrivateMessagePayloadStruct {
   uint16 flags;
-  uint16 nickname_len;
-  unsigned char *nickname;
   uint16 message_len;
   unsigned char *message;
 };
@@ -60,16 +58,13 @@ silc_private_message_payload_parse(SilcBuffer buffer, SilcCipher cipher)
   /* Parse the Private Message Payload. Ignore the padding. */
   ret = silc_buffer_unformat(buffer,
                             SILC_STR_UI_SHORT(&new->flags),
-                            SILC_STR_UI16_NSTRING_ALLOC(&new->nickname, 
-                                                        &new->nickname_len),
                             SILC_STR_UI16_NSTRING_ALLOC(&new->message, 
                                                         &new->message_len),
                             SILC_STR_END);
   if (ret == -1)
     goto err;
 
-  if ((new->message_len < 1 || new->message_len > buffer->len) ||
-      (new->nickname_len < 1 || new->nickname_len > buffer->len)) {
+  if ((new->message_len < 1 || new->message_len > buffer->len)) {
     SILC_LOG_ERROR(("Incorrect private message payload in packet, "
                    "packet dropped"));
     goto err;
@@ -87,8 +82,6 @@ silc_private_message_payload_parse(SilcBuffer buffer, SilcCipher cipher)
    if the private message private keys are used. */
 
 SilcBuffer silc_private_message_payload_encode(uint16 flags,
-                                              uint32 nickname_len,
-                                              unsigned char *nickname,
                                               uint16 data_len,
                                               unsigned char *data,
                                               SilcCipher cipher)
@@ -100,7 +93,7 @@ SilcBuffer silc_private_message_payload_encode(uint16 flags,
 
   SILC_LOG_DEBUG(("Encoding private message payload"));
 
-  len = 4 + nickname_len + 2 + data_len;
+  len = 4 + data_len;
 
   if (cipher) {
     /* Calculate length of padding. */
@@ -118,8 +111,6 @@ SilcBuffer silc_private_message_payload_encode(uint16 flags,
   silc_buffer_pull_tail(buffer, SILC_BUFFER_END(buffer));
   silc_buffer_format(buffer, 
                     SILC_STR_UI_SHORT(flags),
-                    SILC_STR_UI_SHORT(nickname_len),
-                    SILC_STR_UI_XNSTRING(nickname, nickname_len),
                     SILC_STR_UI_SHORT(data_len),
                     SILC_STR_UI_XNSTRING(data, data_len),
                     SILC_STR_UI_XNSTRING(pad, pad_len),
@@ -139,7 +130,6 @@ SilcBuffer silc_private_message_payload_encode(uint16 flags,
 
 void silc_private_message_payload_free(SilcPrivateMessagePayload payload)
 {
-  silc_free(payload->nickname);
   if (payload->message) {
     memset(payload->message, 0, payload->message_len);
     silc_free(payload->message);
@@ -155,18 +145,6 @@ silc_private_message_get_flags(SilcPrivateMessagePayload payload)
   return payload->flags;
 }
 
-/* Return nickname */
-
-unsigned char *
-silc_private_message_get_nickname(SilcPrivateMessagePayload payload,
-                                 uint32 *nickname_len)
-{
-  if (nickname_len)
-    *nickname_len = payload->nickname_len;
-
-  return payload->nickname;
-}
-
 /* Return message */
 
 unsigned char *
index 8a174f849700bbbb92eaa9432691c68c4fa74b5e..79e00b89f64cd4a7c684771fd97239a37952659e 100644 (file)
@@ -29,8 +29,6 @@ typedef struct SilcPrivateMessagePayloadStruct *SilcPrivateMessagePayload;
 SilcPrivateMessagePayload 
 silc_private_message_payload_parse(SilcBuffer buffer, SilcCipher cipher);
 SilcBuffer silc_private_message_payload_encode(uint16 flags,
-                                              uint32 nickname_len,
-                                              unsigned char *nickname,
                                               uint16 data_len,
                                               unsigned char *data,
                                               SilcCipher cipher);
index e58e5e2d8cce1d1113df4c9c93791882739565be..f671952c2dd1e9293e73455fce38a72a61046418 100644 (file)
@@ -27,8 +27,8 @@
 
 #include "silcincludes.h"
 
-//#undef SILC_RNG_DEBUG
-#define SILC_RNG_DEBUG
+#undef SILC_RNG_DEBUG
+/*#define SILC_RNG_DEBUG*/
 
 static uint32 silc_rng_get_position(SilcRng rng);
 static void silc_rng_stir_pool(SilcRng rng);
index e47018f78f36ff9ee261725281c6e497b49fdcd9..0b3fdb253b9d023a2587f1b7284056ab440f92f3 100644 (file)
@@ -39,6 +39,7 @@ uint16 silc_rng_get_rn16(SilcRng rng);
 uint32 silc_rng_get_rn32(SilcRng rng);
 unsigned char *silc_rng_get_rn_string(SilcRng rng, uint32 len);
 unsigned char *silc_rng_get_rn_data(SilcRng rng, uint32 len);
+void silc_rng_add_noise(SilcRng rng, unsigned char *buffer, uint32 len);
 
 int silc_rng_global_init(SilcRng rng);
 int silc_rng_global_uninit();
@@ -47,5 +48,6 @@ uint16 silc_rng_global_get_rn16();
 uint32 silc_rng_global_get_rn32();
 unsigned char *silc_rng_global_get_rn_string(uint32 len);
 unsigned char *silc_rng_global_get_rn_data(uint32 len);
+void silc_rng_global_add_noise(unsigned char *buffer, uint32 len);
 
 #endif