The invention discloses a two-factor
authentication method and a two-factor
authentication device for a
wireless sensor network and a network comprising the two-factor
authentication device. The two-factor authentication device comprises a gateway node, an intelligent terminal, a
sensor node and a two-factor authentication module, and the gateway node, the intelligent terminal and the
sensor node are communicated with each other. The Merkle
hash tree based two-factor authentication method for the
wireless sensor network is applied to the two-factor authentication module. The two-factor authentication method includes the steps of gateway pre-authentication: performing DoS (
disk operating system)-
attack resisting gateway pre-authentication on the basis of the Merkle hashtree; bidirectional authentication among gateway and sensor nodes: authenticating the
sensor node by the gateway node after the sensor node finishes in authenticating an access request from the gateway node, wherein during bidirectional authentication, one-way hash is performed after connection with sensor node ID (identification) is established, so that personalized safety parameters for the sensor node are formed to
resist attacks from gateway counterfeit and data counterfeit caused by leakage of the safety parameters. The invention further provides an
interconnection computer network comprising the two-factor authentication device for the
wireless sensor network.