  The widespread use of wireless sensor networks (WSNs) that are consisted of
resource-constrained sensor nodes in communication with gateways in open-space
environments and industries has highlighted the need for a secure yet fast
communication protocol between users, gateways, and sensor nodes. Due to the
properties of the network, elliptic-curve cryptography seems to be the most
viable choice as it requires fewer resources than most other options. In this
paper, we analyze the protocol suggested by Moghadam et al. which is based on
ECDH (elliptic-curve Diffie-Hellman), and mention some of the flaws in their
proposed authentication and key exchange protocol. Some attacks are also
mentioned to further explain the shortcomings of their schema. Then a modified
version of the protocol is proposed, analyzed, and checked against the same
attacks as an informal security proof.
