Abstract:
The present invention discloses a method and system for secret communication between nodes in a wired Local Area Network (LAN). The method of secret communication between nodes in the wired LAN includes the following steps: 1) a sharing key is established; 2) the route probe is exchanged; 3) the data communication is classified; 4) the secret communication is processed among the nodes. According to the different communication situations among the nodes, the method of secret communication between nodes provided in the present invention can process the classification and select an appropriate secret communication strategy; compared with per-hop encryption, the calculation load of the exchange equipment is reduced, and the transmission delay of data packets is shortened; compared with the method that inter-station keys are established in pairs of nodes in order to protect the communication secret, the key number is reduced, and the key management is simplified.

Description:
[0001]    This application claims the benefit of Chinese Patent Application no. 200910219572.8, filed with the Chinese Patent Office on Dec. 18, 2009 and entitled “Method and system for SECURE communication between nodes”, which is hereby incorporated by reference in its entirety. 
       FIELD OF THE INVENTION 
       [0002]    The present invention relates to the field of network security and particularly to a method and system for secure communication between nodes. 
       BACKGROUND OF THE INVENTION 
       [0003]    A wired local area network is typically a broadcast network where data transmitted from a node can be received by all the other nodes. The respective nodes over the network share a channel, thus posing a tremendous hidden trouble of security to the network. An attacker can capture all data packets over the network simply by accessing and listening to the network. A Local Area Network (LAN) defined in the existing national standard GB/T 15629.3 (corresponding IEEE 802.3 or ISO/IEC 8802-3) has no data secure method available, so that the attacker may steal crucial information easily. 
         [0004]    In the wired local area network, the IEEE secures the link layer by enhancing the security of the IEEE 802.3. The IEEE 802.1AE provides a data encryption protocol to protect the Ethernet and takes a security measure with hop-by-hop encryption to secure a delivery of data between the nodes of the network. This security measure brings a considerable calculation load on a switching device in the local area network, thus easily resulting in an attack of the attacker to the switching device; and also a data packet will be transported from a transmission source node to a destination node with a larger delay, thus lowering the efficiency of transmission over the network. 
         [0005]    A topology of the wired local area network is relatively complex and also involves a large number of nodes (here a terminal and a switching device are referred collectively to as a node), so data communication in the network is relatively complex. If a shared key is created between every two nodes, then the nodes have to store a relatively large number of shared keys; and if a shared key between adjacent nodes is used with the security measure with hop-by-hop encryption, then the switching device of the network may suffer from a considerable calculation load. 
         [0006]    Therefore it is desired to study a method to address the issue of secure communication between nodes, thereby ensuring secure transmission of data between nodes on one hand and lowering the number of keys and the complexity of creating a key as much as possible on the other hand while taking a encryption and decryption capability of a node into account. 
       SUMMARY OF THE INVENTION 
       [0007]    In order to address the foregoing problem pre sent i n the prior art, the invention provides a method and system for secure communication between nodes by categorizing data communication based upon information on a switching route between nodes and selecting a different secure communication strategy. 
         [0008]    In a technical solution of the invention, the invention provides a method for secure communication between nodes, wherein the method for secure communication between nodes includes the following four processes: 
         [0009]    1) creating a shared key between nodes including between a terminal and a switching device, between every two switching devices and between two terminals directly connected to the same switching device; 
         [0010]    2) seeking a switching route between the nodes to obtain information on the switching route between the nodes; 
         [0011]    3) determining the type of data communication between the nodes according to the information on the switching route; and 
         [0012]    4) performing secure communication between the nodes by using a different secure communication strategy according to a different type of data communication between the nodes. 
         [0013]    Preferably the step 1) is performed by: 
         [0014]    1.1) creating a shared key referred to as a Unicast Session Key, USK, between adjacent nodes; 
         [0015]    1.2) creating a shared key referred to as a SWitch key, SWkey, between every two switching devices; and 
         [0016]    1.3) creating a shared key referred to as a station key, STAkey, between two terminals directly connected to the same switching device according to a selected local strategy. 
         [0017]    Preferably information on a switching route from a transmission source node N Source  to a destination node N Destination  is defined as a four-tuple of identifiers, wherein the packet generally includes the four-tuple of identifiers including ID Source , ID SW-first , ID SW-last  and ID Destination ; a switching device which receives a data packet from the transmission source node N Source  to the destination node N Destination  but is absent in the four-tuple of identifiers of the information on the switching route is referred to as an intermediate switching device, and data from the transmission source node N Source  to the destination node N Destination  may not pass through any intermediate switching device or may pass through a plurality of intermediate switching devices during transmission; and 
         [0018]    Preferably the step 2) is performed by: 
         [0019]    2.1) the transmission source node N Source  transmitting a switching route seeking packet to the destination node N Destination , wherein the packet generally includes the four-tuple of identifiers including ID Source , ID SW-first , ID SW-last  and ID Destination ; 
         [0020]    wherein: 
         [0021]    ID Source : represents the identifier of the transmission source node N Source ; 
         [0022]    ID SW-first : represents the identifier of the first switching device SW-first through which the data packet from the transmission source node N Source  to the destination node N Destination  passes, and if the transmission source node N Source  is a switching device, then ID SW-first  is ID Source ; and if the transmission source node N Source  is a terminal, then ID SW-first  is the identifier of a switching device directly connected to the transmission source node N Source ; 
         [0023]    ID SW-last : represents the identifier of a last switching device SW-last through which the data packet from the transmission source node N Source  to the destination node N Destination  passes, and this field is unknown in the switching route seeking packet; and 
         [0024]    ID Destination : represents the identifier of the destination node N Destination ; 
         [0025]    2.2) the destination node N Destination  transmitting a switching route response packet to the transmission source node N Source ; and 
         [0026]    2.3) the respective nodes receiving the switching route response packet. 
         [0027]    Preferably after the destination node N Destination  receives the switching route seeking packet transmitted from the transmission source node N Source , the step 2.2) is performed by: 
         [0028]    2.2.1) determining information on the last switching device SW-last through which the data packet transmitted from the transmission source node N Source  passes: if the destination node N Destination  is a switching device, then ID SW-last  is ID Destination ; and if the destination node N Destination  is a terminal, then ID SW-last  is the identifier of a switching device directly connected to the terminal; 
         [0029]    2.2.2) recording the four-tuple of identifiers, wherein ID Source , ID SW-first  and ID Destination  are of the same values of respective fields in the received switching route seeking packet, and at this time the values of all the fields of the four-tuple have been definite, wherein the four-tuple of identifiers includes ID Source , ID SW-first , ID SW-last  and ID Destination ; and 
         [0030]    2.2.3) constructing and transmitting a switching route response packet to the transmission source node N Source , wherein the packet includes the four-tuple of identifiers with the definite values of all the fields, wherein the four-tuple o f identifiers includes ID Source , ID SW-first , ID SW-last  and ID Destination . 
         [0031]    Preferably after the respective nodes receive the switching route response packet transmitted from the destination node N Destination , the step 2.3) is performed by: 
         [0032]    2.3.1) the switching device receiving the switching route response packet, and recording the four-tuple of identifiers and then forwarding the packet if its own identifier is present in the four-tuple of identifiers in the packet or directly forwarding the packet if its own identifier is absent in the four-tuple of identifiers in the packet, wherein the four-tuple of identifiers includes ID Source , ID SW-first , ID SW-last  and ID Destination ; and 
         [0033]    2.3.2) the transmission source node N Source  recording the four-tuple of identifiers upon reception of the switching route response packet to thereby finish the current switching route seeking process, wherein the four-tuple of identifiers includes ID Source , ID SW-first , ID SW-last  and ID Destination . 
         [0034]    Preferably the step 3) is performed by: 
         [0035]    determining the type of data communication from the transmission source node N Source  to the destination node N Destination  according to the obtained information on the four-tuple, including ID Source , ID SW-first , ID SW-last  and ID Destination , of the switching route, by: 
         [0036]    3.1) determining whether ID SW-first =ID Source  holds, and if so, then the transmission source node N Source  being a switching device, and performing the step 3.2); otherwise, then the transmission source node N Source  being a terminal, and performing the step 3.4); 
         [0037]    3.2) determining whether ID SW-last =ID Destination  holds, and if so, then the destination node N Destination  being a switching device, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a switching device to a switching device and belonging to the type of communication from a switching device to a switching device; otherwise, the destination node N Destination  being a terminal, and performing the step 3.3); 
         [0038]    3.3) determining whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passing through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a switching device to a terminal directly connected to the switching device and belonging to the type of communication from a switching device to a terminal directly connected to the switching device; otherwise, data from the transmission source node N Source  to the destination node N Destination  passing through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a switching device to a terminal indirectly connected to the switching device and belonging to the type of communication from a switching device to a terminal indirectly connected to the switching device; 
         [0039]    3.4) determining whether ID SW-last =ID Destination  holds, and if so, then the destination node N Destination  being a switching device, and performing the step 3.5); otherwise, the destination node N Destination  being a terminal, and performing the step 3.6); 
         [0040]    3.5) determining whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passing through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a terminal to a switching device directly connected to the terminal and belonging to the type of communication from a terminal to a switching device directly connected to the terminal; otherwise, data from the transmission source node N Source  to the destination node N Destination  passing through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a terminal to a switching device indirectly connected to the terminal and belonging to the type of communication from a terminal to a switching device indirectly connected to the terminal; and 
         [0041]    3.6) determining whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passing through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  being communication from a terminal to another terminal directly connected to the same switching device and belonging to the type of communication from a terminal to another terminal directly connected to the same switching device; otherwise, data from the transmission source node N Source  to the destination node N Destination  passing through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  b eing communication from a terminal t o another terminal directly connected to a different switching device and belonging to the type of communication from a terminal to another terminal directly connected to a different switching device. 
         [0042]    Preferably the process 4) is performed by adopting a different secure communication strategy during communication for data communication between the transmission source node N Source  and the destination node N Destination  according to a different type of data communication. 
         [0043]    Preferably the typ e of data communication is the type of communication from a switching device to a switching device, the strategy of secure communication between nodes is performed by: 
         [0044]    4.1.1) the transmitting source node N Source  encrypting the data packet using the switch key shared between the transmitting source node N Source  and the destination node N Destination , wherein the transmitting source node N Source  is a switching device which is both the transmitting source node N Source  and the first switching device SW-first, and the destination node N Destination  is a switching device which is both the destination node N Destination  and the last switching device SW-last; 
         [0045]    4.1.2) if there is intermediate switching device, then the intermediate switching device receiving and directly forwarding the communication data packet of the type of communication from a switching device to a switching device; and 
         [0046]    4.1.3) the destination node N Destination  decrypting the data packet using the switch key shared between the transmitting source node N Source  and the destination node N Destination . 
         [0047]    Preferably when the type of data communication is the type of communication from a switching device to a terminal directly connected to the terminal, the strategy of secure communication between nodes is performed by: 
         [0048]    4.2.1) the transmitting source node N Source  encrypting the data packet using the unicast session key shared between the transmitting source node N Source  and the destination node N Destination , wherein the transmitting source node N Source  is a switching device which is both the transmitting source node N Source  and the first switching device SW-first and also the last switching device SW-last, and the destination node N Destination  is a terminal; and 
         [0049]    4.2.2) the destination node N Destination  decrypting the data packet using the unicast session key shared between the transmitting source node N Source  and the destination node N Destination . 
         [0050]    Preferably when the type of data communication is the type of communication from a switching device to a terminal indirectly connected to the switching device, the strategy of secure communication between nodes is performed by: 
         [0051]    4.3.1) the transmitting source node N Source  encrypting the data packet using the switch key shared between the transmitting source node N Source  and the last switching device SW-last, wherein here the transmitting source node N Source  is a switching device which is both the transmitting source node N Source  and the first switching device SW-first; 
         [0052]    4.3.2) if there is intermediate switching device, then the intermediate switching device directly forwarding the data packet of the type of communication from a switching device to a terminal indirected connected to the switching device; 
         [0053]    4.3.3) the last switching device SW-last decrypting the data packet using the switch key shared between the transmission source node N Source  and the last switching device SW-last, then encrypting the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination  and then forwarding the data packet, wherein the destination node N Destination  is a terminal; and 
         [0054]    4.3.4) the destination node N Destination  decrypting the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination . 
         [0055]    Preferably when the type of data communication is the type of communication from a terminal to a switching device directly connected to the terminal, the strategy of secure communication between nodes is performed by: 
         [0056]    4.4.1) the transmission source node N Source  e ncrypting the data packet using the unicast session key shared between the transmission source node N Source  and the destination node N Destination , wherein the transmission source node N Source  is a terminal, and the destination node N Destination  is a switching device which is both the destination node N Destination  and the first switching device SW-first and also the last switching device SW-last; and 
         [0057]    4.4.2) the destination node N Destination  decrypting the data packet using the unicast session key shared between the transmission source node N Source  and the destination node N Destination . 
         [0058]    Preferably when the type of data communication is the type of communication from a terminal to a switching device indirectly connected to the terminal, the strategy of secure communication between nodes is performed by: 
         [0059]    4.5.1) the transmitting source node N Source  encrypting the data packet using the unicast session key shared between the transmitting source node N Source  and the first switching device SW-first, wherein the transmitting source node N Source  is a terminal; 
         [0060]    4.5.2) the first switching device SW-first decrypting the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypting the data packet using the switch key shared between the first switching device SW-first and the destination node N Destination  and then forwarding the data packet, wherein the destination node N Destination  is a switching device which is both the destination node N Destination  and the last switching device SW-last; 
         [0061]    4.5.3) if there is intermediate switching device, then the intermediate switching device directly forwards the data packet of the type of communication from a terminal to a switching device indirectly connected to the terminal; and 
         [0062]    4.5.4) the destination node N Destination  decrypting the data packet using the switch key shared between the destination node N Destination  and the first switching device SW-first. 
         [0063]    Preferably when the type of data communication is the type of communication from a terminal to another terminal directly connected to the same switching device, the strategy of secure communication between nodes is performed by: 
         [0064]    4.6.1) adopting a secure communication strategy as follows for the type of communication from a terminal to another terminal directly connected to the same switching device with a created station key: 
         [0065]    4.6.1.1) the transmission source node N Source  encrypts the data packet using the station key shared between the transmission source node N Source  and the destination node N Destination , wherein the destination node N Destination  is a terminal; 
         [0066]    4.6.1.2) the first switching device SW-first directly forwards the data packet of the type of communication from a terminal to another terminal directly connected to the same switching device, wherein the first switching device SW-first is also the last switching device SW-last; and 
         [0067]    4.6.1.3) the destination node N Destination  decrypts the data packet using the station key shared between the transmission source node N Source  and the destination node N Destination ; and 
         [0068]    4.6.2) adopting a secure communication strategy as follows for the type of communication from a terminal to another terminal directly connected to the same switching device without any created station key: 
         [0069]    4.6.2.1) the transmission source node N Source  encrypts the data packet using the unicast session key shared between the transmission source node N Source  and a switching device directly connected to the transmission source node N Source ; 
         [0070]    4.6.2.2) the first switching device SW-first decrypts the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypts the data packet using the unicast session key shared between the first switching device SW-first and the destination node N Destination  and then forwards data packet, wherein the first switching device SW-first is also the last switching device SW-last; and 
         [0071]    4.6.2.3) the destination node N Destination  decrypts the data packet using the unicast session key shared between the destination node N Destination  and the switching device directly connected to the destination node N Destination . 
         [0072]    Preferably wherein when the type of data communication is the type of communication from a terminal to another terminal directly connected to a different switching device, the strategy of secure communication between nodes is performed by: 
         [0073]    4.7.1) the transmission source node N Source  e ncrypting the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, wherein the transmission source node N Source  is a terminal; 
         [0074]    4.7.2) the first switching device SW-first decrypting the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypting the data packet using the switch key shared between the first switching device SW-first and the last switching device SW-last and then forwarding the data packet; 
         [0075]    4.7.3) if there is intermediate switching device, then the intermediate switching device directly forwarding the data packet of the type of communication from a terminal to another terminal directly connected to a different switching device; 
         [0076]    4.7.4) the last switching device SW-last decrypting the data packet using the switch key shared between the first switching device SW-first and the last switching device SW-last, then encrypting the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination  and then forwarding the data packet, wherein the destination node N Destination  a terminal; and 
         [0077]    4.7.5) the destination node N Destination  decrypting the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination . 
         [0078]    The invention further provides a system for secure communication between nodes, the system includes a transmission source node N Source , a first switching device SW-first, a second switching device SW-last and a destination node N Destination , wherein: 
         [0079]    the transmission source node N Source  is configured to transmit a switching route seeking packet and an encrypted data packet to the destination node N Destination , to receive a switch route response packet transmitted from the destination node N Destination , and to record information on a switching route from the transmission source node N Source  to the destination node N Destination ; 
         [0080]    the first switching device SW-first is configured to forward the data packet from the transmission source node N Source  to the destination node N Destination  and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination ; 
         [0081]    the second switching device SW-last is configured to forward the data packet from the transmission source node N Source  to the destination node N Destination  and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination ; and 
         [0082]    the destination node N Destination  is configured to receive the switching route seeking packet and the encrypted data packet transmitted from the transmission source node N Source , to transmit the switching route response packet to the transmission source node N Source , and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination , 
         [0083]    wherein the information on the switching route from the transmission source node N Source  to the destination node N Destination  includes ID Source , ID SW-first , ID SW-last  and ID Destination . 
         [0084]    The system further includes an intermediate switching device configured to transmit transparently all data packets from the transmission source node N Source  to the destination node N Destination . 
         [0085]    The invention has such advantages that the method and system for secure communication between nodes in a wired local network according to the invention can create a shared key between adjacent nodes, a shared key between every two switching devices and a shared key between every two terminals directly connected to the same switching device, obtain information on a switching route between nodes in a process of seeking the switching route, determine the type of data communication between two nodes and thereby select a corresponding secure communication strategy. The method and system according to the invention can categorize data communication based upon information on a switching route and adopt a different secure communication strategy for a different type of data communication. A calculation load of a switching device can be reduced and a delay of transmitting a data packet can be shortened as compared with hop-by-hop encryption; and the number of keys can be reduced and key management can be simplified as compared with the method for securing communication confidentiality by creating station keys between every two nodes. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0086]      FIG. 1  is a schematic diagram of a general architecture of a local area network according to the invention; 
           [0087]      FIG. 2  is a schematic diagram of a network structure of a switching route between nodes according to the invention; 
           [0088]      FIG. 3  is a schematic diagram of a switching route seeking protocol according to the invention; 
           [0089]      FIG. 4  is a schematic diagram of a process of seeking a switching route between nodes according to the invention; 
           [0090]      FIG. 5  is a schematic diagram of a flow chart of determining the type of data communication between nodes according to the invention; 
           [0091]    FIG.  6 - a  is a schematic diagram of communication (adjacent) of a switching device to a switching device (adjacent) according to the invention; 
           [0092]    FIG.  6 - b  is a schematic diagram of communication (nonadjacent) of a switching device to a switching device according to the invention; 
           [0093]      FIG. 7  is a schematic diagram of communication of a switching device to a terminal directly connected to the switching device according to the invention; 
           [0094]      FIG. 8  is a schematic diagram of communication of a switching device to a terminal indirectly connected to the switching device according to the invention; 
           [0095]      FIG. 9  is a schematic diagram of communication of a terminal to a switching device directly connected to the switching device according to the invention; 
           [0096]      FIG. 10  is a schematic diagram of communication of a terminal to a switching device indirectly connected to the terminal according to the invention; 
           [0097]    FIG.  11 - a  is a schematic diagram of communication (with a created station key) of a terminal to another terminal directly connected to the same switching device according to the invention; 
           [0098]    FIG.  11 - b  is a schematic diagram of communication (without any created station key) of a terminal to another terminal directly connected to the same switching device according to the invention; and 
           [0099]      FIG. 12  is a schematic diagram of communication of a terminal to another terminal directly connected to different switching device according to the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0100]    A node N in the invention refers to a terminal STA (STAtion) and a switching device SW (Switch) in a network. A hub or another physical layer device performs no node process. 
         [0101]    “Directly connect” defined in the invention refers to such a connection relationship that switching devices or a switching device and a terminal are directly connected through physical layer device such as a network line, a hub, etc. The connection between nodes through other devices isn&#39;t a direct connection relationship. 
         [0102]    Referring to  FIG. 1  to  FIG. 12 , a method for secure communication between nodes in a wired local area network according to the invention generally includes four processes of creating a shared key, seeking a switching route, categorizing data communication and secure communication between nodes. A particular implementation thereof is as follows: 
         [0103]    1) A shared key is created, that is, a shared key is created between nodes including between a terminal and a switching device, between every two switching devices and between two terminals directly connected to the same switching device, and particularly: 
         [0104]    1.1) A shared key referred to as a Unicast Session Key (USK) is created between adjacent nodes; 
         [0105]    1.2) A shared key referred to as a SWkey (S Witch key) is created between every two switching devices, where a unicast session key between adjacent switching devices is a switch key between them; and 
         [0106]    1.3) A shared key referred to as a station key ST Akey (STAtion key) is created between two terminals directly connected to the same switching device according to a selected local strategy. 
         [0107]    A general architecture of a local area network is as illustrated in  FIG. 1 . There is a unicast session key USK between all the adjacent nodes, for example, between adjacent switching devices SW-A and SW-B and between a switching device SW-E and a terminal STA 2  which are adjacent; there is a switch key SWkey between every two switching devices, for example, between adjacent switching devices SW-B and SW-E and between nonadjacent switching devices SW-E and SW-G; and a station key STAkey can be created between terminals STAs directly connected to the same switching device, for example, between terminals STA 1  and STA 2  and between terminals STAT and STA 9 . Particularly a unicast session key and a switch key are created upon successful access of a node to the network, and whether to create a station key is decided by a transmission source node N Source  according to a local strategy upon occurrence of communication. Typically if the terminal STA 1  transmits a relatively large amount of data to the other terminal STA 2  directly connected to the same switching device, then a station key is required to be created; and if there is just simple data packet information to be transmitted, then no station key is required to be created. A unicast session key, a switch key and a station key can be created in a pre-distribution or certain security mechanism, and a particular creation method thereof will not be limited or defined in the invention. 
         [0108]    2) A switching route is sought, that is, a switching route is sought between the nodes to obtain information on the switching route between the nodes, and particularly: 
         [0109]    Information on an inter-node switching route from a transmission source node N Source  to a destination node N Destination  is defined as a four-tuple of identifiers: 
         [0000]      [ID Source , ID SW-first , ID SW-last , ID Destination ] 
         [0110]    Where: 
         [0111]    ID Source : represents the identifier of the transmission source node N Source  which can be a terminal or a switching device; 
         [0112]    ID SW-first : represents the identifier of a first switching device SW-first through which a data packet from the transmission source node N Source  to the destination node N Destination  passes; 
         [0113]    ID SW-last : represents the identifier of a last switching device SW-last through which the data packet from the transmission source node N Source  to the destination node N Destination  passes; and 
         [0114]    ID Destination : represents the identifier of the destination node N Destination  which can be a terminal or a switching device. 
         [0115]    A network structure corresponding to the information on the switching route from the transmission source node N Source  t o the destination node N Destination , i.e., [ID Source , ID SW-first , ID SW-last , ID Destination ], is as illustrated in  FIG. 2 . Particularly a switching device which receives the data packet from the transmission source node N Source  to the destination node N Destination  but is absent in the four-tuple of identifiers of the information on the switching route is referred to as an intermediate switching device. Data from the transmission source node N Source  to the destination node N Destination  may not pass through any intermediate switching device or may pass a plurality of intermediate switching devices during transmission. 
         [0116]    In the network, a process of seeking a switching route is required to be initiated to know the information on the switching route from the node N Source  to the node N Destination . As illustrated in  FIG. 3 , seeking of a switching route includes a switching route seeking packet and a switching route response packet. A specific description of the process of seeking a switching route is as illustrated in  FIG. 4 . 
         [0117]    2.1) The transmission source node N Source  transmits a switching route seeking packet to the destination node N Destination ; 
         [0118]    The transmission source node N Source  constructs and transmits a switching route seeking packet to the destination node N Destination , and the packet generally includes the four-tuple of identifiers: 
         [0000]      [ID Source , ID SW-first , ID SW-last , ID Destination ] 
         [0119]    Where: 
         [0120]    ID Source : represents the identifier of the transmission source node N Source ; 
         [0121]    ID SW-first : represents the identifier of a first switching device SW-first through which a data packet from the transmission source node N Source  to the destination node N Destination  passes, and if the transmission source node N Source  is a switching device, then ID SW-first  is ID Source ; and if the transmission source node N Source  is a terminal, then ID SW-first  is the identifier of a switching device directly connected to the transmission source node N Source ; 
         [0122]    ID SW-last ; represents the identifier of a last switching device SW-last through which the data packet from the transmission source node N Source  to the destination node N Destination  passes, and this field is unknown (represented as a question mark (“?’) in  FIG. 4 ) in the switching route seeking packet; and 
         [0123]    ID Destination : represents the identifier of the destination node N Destination ; 
         [0124]    2.2) The destination node N Destination  transmits a switching route response packet to the transmission source node N Source ; 
         [0125]    The destination node N Destination  performs the following processes upon reception of the switching route seeking packet transmitted from the transmission source node N Source : 
         [0126]    2.2.1) It determines information on the last switching device SW-last through which the data packet transmitted from the transmission source node N Source  passes: if the destination node N Destination  is a switching device, then ID SW-last  is ID Destination ; and if the destination node N Destination  is a terminal, then ID SW-last  is the identifier of a switching device directly connected to the terminal; 
         [0127]    2.2.2) It records the four-tuple of identifiers [ID Source , ID SW-first , ID SW-last , ID Destination ], where ID Source , ID SW-first  and ID Destination  are of the same values of respective fields in the received switching route seeking packet, and at this time the values of all the fields of the four-tuple have been definite; and 
         [0128]    2.2.3) It constructs and transmits a switching route response packet to the transmission source node N Source , and the packet generally includes the four-tuple of identifiers [ID Source , ID SW-first , ID SW-last , ID Destination ] with the definite values of all the fields; 
         [0129]    2.3) The respective nodes receive the switching route response packet; 
         [0130]    2.3.1) Upon reception of the switching route response packet, the switching device records the four-tuple of identifiers [ID Source , ID SW-first , ID SW-last , ID Destination ] and then forwards the packet if its own identifier is present in the four-tuple of identifiers in the packet or directly forwards the packet if its own identifier is absent in the four-tuple of identifiers in the packet; and 
         [0131]    2.3.2) The transmission source node N Source  records the four-tuple of identifiers [ID Source , ID SW-first , ID SW-last , ID Destination ] upon reception of the switching route response packet to thereby finish the current switching route seeking process; 
         [0132]    The information on the switching route from the transmission source node N Source  to the destination node N Destination  is recorded only by the transmission source node N Source , the first switching device SW-first, the last switching device SW-last and the destination node N Destination  throughout the network. If the transmission source node N Source  is a switching device, then the transmission source node itself is the first switching device SW-first through which the data packet from the transmission source node N Source  to the destination node N Destination  passes, that is, SW-first is N Source ; and if the destination node N Destination  is a switching device, then the N Destination  is the last switching device SW-last through which the data packet from the transmission source node N Source  to the destination node N Destination  passes, that is, SW-last is N Destination ; 
         [0133]    3) The type of data communication is categorized, that is, the type of data communication between the nodes are determined between the nodes according to the information on the switching route, and particularly: 
         [0134]    Secure communication of data from the transmission source node N Source  to the destination node N Destination  can be categorized into the following seven types according to a physical connection relationship between the nodes N Source  and N Destination  and their node types: 
         [0135]    Type 1: communication from a switching device to a switching device; 
         [0136]    For example, data communication from SW-A to SW-E and SW-D to SW-B in  FIG. 1 ; 
         [0137]    Type 2: communication from a switching device to a terminal directly connected to the switching device; 
         [0138]    For example, data communication from SW-E to STA 1  and SW-G to STA 9  in  FIG. 1 ; 
         [0139]    Type 3: communication from a switching device to a terminal indirectly connected to the switching device; 
         [0140]    For example, data communication from SW-A to STA 1  and SW-D to STA 6  in  FIG. 1 ; 
         [0141]    Type 4: commutation from a terminal to a switching device directly connected to the terminal; 
         [0142]    For example, data communication from STA 2  to SW-E and STA 5  to SW-F in  FIG. 1 ; 
         [0143]    Type 5: communication from a terminal to a switching device indirectly connected to the terminal; 
         [0144]    For example, data communication from STA 2  to SW-F and STA 5  to SW-B in  FIG. 1 ; 
         [0145]    Type 6: communication from a terminal to another terminal directly connected to the same switching device; 
         [0146]    For example, data communication from STA 2  to STA 3  and STA 5  to STA 6  in  FIG. 1 ; and 
         [0147]    Type 7: communication from a terminal to another terminal directly connected to a different switching device; 
         [0148]    For example, data communication from STA 2  to STA 6  and STA 5  to STA 9  in  FIG. 1 . 
         [0149]    The type of data communication from the transmission source node N Source  to the destination node N Destination  is determined according to the obtained information on the four-tuple [ID Source , ID SW-first , ID SW-last , ID Destination ] of the switching route, and a particular determination flow is as illustrated in  FIG. 5 . The flow is described as follows: 
         [0150]    3.1) It is determined whether ID SW-first =ID Source  holds, and if so, then the transmission source node N Source  is a switching device, and the step 3.2) is performed; otherwise, then the transmission source node N Source  is a terminal, and the step 3.4) is performed; 
         [0151]    3.2) It is determined whether ID SW-last =ID Destination  holds, and if so, then the destination node N Destination  is a switching device, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a switching device to a switching device and belongs to the type of Type 1; otherwise, the destination node N Destination  is a terminal, and the step 3.3) is performed; 
         [0152]    3.3) It is determined whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passes through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a switching device to a terminal directly connected to the switching device and belongs to the type of Type 2; otherwise, data from the transmission source node N Source  to the destination node N Destination  passes through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a switching device to a terminal indirectly connected to the switching device and belongs to the type of Type 3; 
         [0153]    3.4) It is determined whether ID SW-last =ID Destination  holds, and if so, then the destination node N Destination  is a switching device, and the step 3.5) is performed; otherwise, the destination node N Destination  is a terminal, and the step 3.6) is performed; 
         [0154]    3.5) It is determined whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passes through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a terminal to a switching device directly connected to the terminal and belongs to the type of Type 4; otherwise, data from the transmission source node N Source  to the destination node N Destination  passes through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a terminal to a switching device indirectly connected to the terminal and belongs to the type of Type 5; and 
         [0155]    3.6) It is determined whether ID SW-last =ID SW-first  holds, and if so, then data from the transmission source node N Source  to the destination node N Destination  passes through only one switching device, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a terminal to another terminal directly connected to the same switching device and belongs to the type of Type 6; otherwise, data from the transmission source node N Source  to the destination node N Destination  passes through more than two switching devices, and data communication from the transmission source node N Source  to the destination node N Destination  is communication from a terminal to another terminal directly connected to a different switching device and belongs to the type of Type 7; and 
         [0156]    4) Secure communication between the nodes, that is, secure communication between the nodes is performed using a different secure communication strategy according to a different type of data communication between the nodes, and particularly: 
         [0157]    For inter-node data communication between the transmission source node N Source  and the destination node N Destination , a secure communication strategy adopted during communication will vary with a varying type of data communication, and a secure communication strategy particularly adopted for each type of communication is described particularly as follows: 
         [0158]    4.1) Type 1: communication from a switching device to a switching device 
         [0159]    There is a switch key between every two switching devices in the network (a process of creating a switch key will not be defined or limited in the invention), and a secure communication strategy adopted for data communication of the type of Type 1 is as follows: 
         [0160]    4.1.1) The transmitting source node N Source  (here the transmitting source node N Source  is a switching device and also the first switching device SW-first) encrypts the data packet using the switch key shared between the transmitting source node N Source  and the destination node N Destination  (here the destination node N Destination  is a switching device and also the last switching device SW-last); 
         [0161]    4.1.2) If there is intermediate switching device, then the intermediate switching device receives and directly forwards the communication data packet of the type of Type 1; and 
         [0162]    4.1.3) The destination node N Destination  decrypts the data packet using the switch key shared between the destination node N Destination  and the transmitting source node N Source . 
         [0163]    Communication from a switching device to a switching device includes communication from a switching device to an adjacent switching device (communication from the switching device SW-B to the switching device SW-E as illustrated in FIG.  6 - a ) and communication from a switching device to a nonadjacent switching device (communication from the switching device SW-B to the switching device SW-G as illustrated in FIG.  6 - b ). In FIG.  6 - a  the data packet is encrypted and decrypted directly using the switch key SWkey B-E;  and in FIG.  6 - b,  the data packet is encrypted and decrypted directly using the switch key SWkey B-G  and simply forwarded directly through an intermediate switching device (e.g., the switching devices SW-A and SW-D). 
         [0164]    4.2) Type 2: communication from a switching device to a terminal directly connected to the switching device 
         [0165]    There is a unicast session key between a switching device and a terminal directly connected to the switching device in the network (a process of creating a unicast session key will not be defined or limited in the invention), and a secure communication strategy adopted for data communication of the type of Type 2 is as follows: 
         [0166]    4.2.1) The transmitting source node N Source  (here the transmitting source node N Source  is a switching device and also both the first switching device SW-first and the last switching device SW-last) encrypts the data packet using the unicast session key shared between transmitting source node N Source  and the destination node N Destination  (here a terminal); and 
         [0167]    4.2.2) The destination node N Destination  decrypts the data packet using the unicast session key shared between the transmitting source node N Source  and the destination node N Destination . 
         [0168]    As illustrated in  FIG. 7 , communication from the switching device SW-E to the terminal STA 3  belongs to Type 2, the switching device SW-E as the transmission source node encrypts the data packet using the unicast session key USK 3-E , and the terminal STA 3  as the destination node decrypts the data packet using the unicast session key USK 3-E . 
         [0169]    4.3) Type 3: communication from a switching device to a terminal indirectly connected to the switching device 
         [0170]    There are a unicast session key between a switching device and a terminal directly connected to the switching and a switch key between switching devices in the network, and a secure communication strategy adopted for data communication of the type of Type 3 is as follows: 
         [0171]    4.3.1) The transmitting source node N Source  (here the transmitting source node N Source  is a switching device and also the first switching device SW-first) encrypts the data packet using the switch key shared between the transmitting source node N Source  and the last switching device SW-last; 
         [0172]    4.3.2) If there is intermediate switching device, then the intermediate switching device directly forwards the data packet of the type of Type 3; 
         [0173]    4.3.3) The last switching device SW-last decrypts the data packet using the switch key shared between the transmission source node N Source  and the last switching device SW-last and then encrypts and then forwards the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination  (here a terminal); and 
         [0174]    4.3.4) The destination node N Destination  decrypts the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination . 
         [0175]    As illustrated in  FIG. 8 , communication from the switching device SW-A to the terminal STA 3  belongs to Type 3, and SW-E is the last switching device. The switching device SW-A as the transmitting source node encrypts the data packet using the switch key SWkey A-E  shared between SW-A and SW-E; the switching device SW-B belonging to an intermediate switching device directly forwards the data packet; the switching device SW-E as the last switching device decrypts the data packet using the switch key SWkey A-E , then encrypts the data packet using the unicast session key USK 3-E  shared between SW-E and the terminal STA 3  and then forwards the data packet; and the terminal STA 3  as the destination node decrypts the data packet using the unicast session key USK 3-E . 
         [0176]    4.4) Type 4: communication from a terminal to a switching device directly connected to the terminal 
         [0177]    There is a unicast session key between a terminal and a switching device directly connected to the terminal, and a secure communication strategy adopted for data communication of the type of Type 4 is as follows: 
         [0178]    4.4.1) The transmission source node N Source  (here a terminal) encrypts the data packet using the unicast session key shared between the transmission source node N Source  and the destination node N Destination  (here the destination node N Destination  is a switching device and also both the first switching device SW-first and the last switching device SW-last); and 
         [0179]    4.4.2) The destination node N Destination  decrypts the data packet using the unicast session key shared between the transmission source node N Source  and the destination node N Destination . 
         [0180]    As illustrated in  FIG. 9 , communication from the terminal STA 3  to the switching device SW-E belongs to Type 4, and the terminal STA 3  as the transmitting source node encrypts the data packet using the unicast session key USK 3-E ; and the switching device SW-E as the destination node decrypts the data packet using the unicast session key USK 3-E . The data packet is encrypted and decrypted using the unicast session key between the transmitting source node and the destination node for both communication of the type of Type 4 and communication of the type of Type 2, which are different only in their directions. 
         [0181]    4.5) Type 5: communication from a terminal to a connected switching device indirectly connected to the terminal 
         [0182]    There are a unicast session key between a terminal and a switching device indirectly connected to the terminal and a switch key between switching devices in the network, and a secure communication strategy adopted for data communication of the type of Type 5 is as follows: 
         [0183]    4.5.1) The transmitting source node N Source  (here a terminal) encrypts the data packet using the unicast session key shared between the transmitting source node N Source  and th e first switching device SW-first; 
         [0184]    4.5.2) The first switching device SW-first decrypts the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypts the data packet using the switch key shared between the first switching device SW-first and the destination node N Destination  (here the destination node N Destination  is a switching device and also the last switching device SW-last) and then forwards the data packet; 
         [0185]    4.5.3) If there is intermediate switching device, then the intermediate switching device directly forwards the data packet of the type of Type 5; and 
         [0186]    4.5.4) The destination node N Destination  decrypts the data packet using the switch key shared between the first switching device SW-first and the destination node N Destination . 
         [0187]    As illustrated in  FIG. 10 , communication from the terminal STA 3  to the switching device SW-A belongs to Type 5, and SW-E is the first switching device. The terminal STA 3  as the transmitting source node encrypts the data packet using the unicast session key USK 3-E ; the switching device SW-E as the first switching device decrypts the data packet using the unicast session key USK 3-E , then encrypts the data packet using the switch key SWkey A-E  shared between the switching device SW-E and the destination node SW-A and then forwards the data packet; and the switching device SW-A as the destination node decrypts the data packet using the switch key SWkey A-E  with shared between SW-E and SW-A. The keys are the same for both communication of the type of Type 5 and the communication of the type of Type 3, which are different only in their directions. 
         [0188]    3.2.6) Type 6: communication from a terminal to another terminal directly connected to the same switching device 
         [0189]    There is a unicast session key between a terminal and a switching device directly connected to the terminal and a station key can be created selectively between terminals directly connected to the same switching device according to a local strategy (a process of creating a station key will not be defined or limited according to the invention) in the network. A secure communication strategy adopted for data communication of the type of Type 6 may vary with whether a station key has been created. 
         [0190]    4.6.1) A secure communication strategy adopted for data communication of the type of Type 6 with a created station key is as follows: 
         [0191]    4.6.1.1) The transmission source node N Source  encrypts the data packet using the station key shared between the transmission source node N Source  and the destination node N Destination  (here a terminal); 
         [0192]    4.6.1.2) The first switching device SW-first (here the first switching device SW-first is also the last switching device) directly forwards the data packet of the type of Type 6; and 
         [0193]    4.6.1.3) The destination node N Destination  decrypts the data packet using the station key shared between the transmission source node N Source  and the destination node N Destination ; and 
         [0194]    4.6.2) A secure communication strategy adopted for data communication of the type of Type 6 without any created station key is as follows: 
         [0195]    4.6.2.1) The transmission source node N Source  encrypts the data packet using the unicast session key shared between the transmission source node N Source  and a switching device directly connected to the transmission source node N Source ; 
         [0196]    4.6.2.2) The first switching device SW-first (here the first switching device SW-first is also the last switching device) decrypts the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypts the data packet using the unicast session key shared between the first switching device SW-first and the destination node N Destination  and then forwards the data packet; and 
         [0197]    4.6.2.3) The destination node N Destination  decrypts the data packet using the unicast session key shared between the destination node N Destination  and the switching device directly connected to the destination node N Destination . 
         [0198]    As illustrated in FIG.  11 - a  and FIG.  11 - b,  data communication between the terminals STA 1  and STA 3  belongs to the type of Type 6. 
         [0199]    FIG.  11 - a  illustrates communication with a created station key, and the terminal STA 1  as the transmitting source node encrypts the data packet using the station key STAkey 1-3  shared between STA 1  and STA 3 ; the switching device SW-E directly forwards the data packet; and the terminal STA 3  as the destination node decrypts the data packet using the station key STAkey 1-3  shared between STA 1  and STA 3 . 
         [0200]    FIG.  11 - b  illustrates communication without any created station key, and the terminal STA 1  as the transmitting source node encrypts the data packet using the unicast session key USK 1-E  shared between the STA 1  and the switching device SW-E; the switching device SW-E decrypts the data packet using the unicast session key USK 1-E  and then encrypts the data packet using the unicast session key USK 3-E  and then forwards the data packet; and the terminal STA 3  as the destination node decrypts the data packet using the unicast session key USK 3-E . 
         [0201]    4.7) Type 7: communication from a terminal to another terminal directly connected to a different switching device 
         [0202]    There are a unicast session key between a terminal and a switching device directly connected to the terminal and a switch key between switching devices in the network, and a secure communication strategy adopted for data communication of the type of Type 7 is as follows: 
         [0203]    4.7.1) The transmission source node N Source  (here a terminal) encrypts the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first; 
         [0204]    4.7.2) The first switching device SW-first decrypts the data packet using the unicast session key shared between the transmission source node N Source  and the first switching device SW-first, then encrypts the data packet using the switch key shared between the first switching device SW-first and the last switching device SW-last and then forwards the data packet; 
         [0205]    4.7.3) If there is intermediate switching device, then the intermediate switching device directly forwards the data packet of the type of Type 7; 
         [0206]    4.7.4) The last switching device SW-last decrypts the data packet using the switch key shared between the first switching device SW-first and the last switching device SW-last, then encrypts the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination  (here a terminal) and then forwards the data packet; and 
         [0207]    4.7.5) The destination node N Destination  decrypts the data packet using the unicast session key shared between the last switching device SW-last and the destination node N Destination . 
         [0208]    As illustrated in  FIG. 12 , communication from the terminals STA 3  to STA 9  belongs to the type of Type 7. Communication of the type of Type 7 can be divided into three segments of the transmission source node to the first switching device, the first switching device to the last switching device and the last switching device to the destination node. In  FIG. 12 , the terminal STA 3  as the transmission source node encrypts the data packet using the unicast session key USK 3-E  shared between the STA 3  and the switching device SW-E; the switching device SW-E as the first switching device decrypts the data packet using the unicast session key USK 3-E  shared between the transmission source node and the SW-E, encrypts the data packet using the switch key SWkey E-G  shared between the SW-E and the last switching device SW-G and then forwards the data packet; the switching device SW-D, SW-A and SW-D as the intermediate switching device directly forward the data packet; the switching device SW-G as the last switching device decrypts the data packet using the switch key SWkey E-G  shared between the first switching device SW-E and the last switching device SW-G, then encrypts the data packet using the unicast session key USK 9-G  shared between the SW-G and the destination node and then forwards the data packet; and the terminal STA 9  as the destination node decrypts the data packet using the unicast session key USK 9-G  shared between the last switching device SW-G and the STA 9 . 
         [0209]    A system for secure communication between nodes according to the invention includes a transmission source node N Source , a first switching device SW-first, a second switching device SW-last (i.e., a last switching device) and a destination node N Destination , where: 
         [0210]    The transmission source node N Source  is configured to transmit a switching route seeking packet and an encrypted data packet to the destination node N Destination , to receive a switching route response packet transmitted from the destination node N Destination , and to record information on a switching route from the transmission source node N Source  to the destination node N Destination  [ID Source , ID SW-first , ID SW-last , ID Destination ]; the first switching device SW-first is configured to forward the data packet from the transmission source node N Source  to the destination node N Destination  and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination  [ID Source , ID SW-first , ID SW-last , ID Destination ]; the second switching device SW-last is configured to forward the data packet from the transmission source node N Source  to the destination node N Destination  and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination  [ID Source , ID SW-first , ID SW-last , ID Destination ]; and the destination node N Destination  is configured to receive the switching route seeking packet and the encrypted packet transmitted from the transmission source node N Source , to transmit the switching route response packet to the transmission source node N Source , and to record the information on the switching route from the transmission source node N Source  to the destination node N Destination  [ID Source , ID SW-first , ID SW-last , ID Destination ], where the information on the switching route from the transmission source node N Source  to the destination node N Destination  includes ID Source , ID SW-first , ID SW-last  and ID Destination . 
         [0211]    Preferably the system further includes an intermediate switching device configured to transmit transparently all data packets from the transmission source node N Source  to the destination node N Destination . 
         [0212]    The method for secure communication between nodes according to the invention can categorize different scenarios of communication between nodes and select an appropriate secure communication strategy. A calculation load of a switching device can be reduced and a delay of transmitting a data packet can be shortened as compared with hop-by-hop encryption; and the number of keys can be reduced and key management can be simplified as compared with the method for securing communication confidentiality by creating station keys between every two nodes. 
         [0213]    The foregoing description is merely illustrative of preferred embodiments of the invention, and it shall be noted that those ordinarily skilled in the art can further make several adaptations and modifications without departing from the principle of the invention and these adaptations and modifications shall also be construed as coming into the scope of the invention.