Wireless sensor network plays a significant role in the construction of smart cities, and the social network includes the Internet of Things, etc. In general, networks are most vulnerable of all the wireless devices due to the massive damage caused by disrupting these networks. Hence the nodes present in the network should get validated for its reputation. Therefore a Long and Strong Security mechanism with two-level checks is proposed here. Level 1 check includes verifying node reputation value and level 2 check includes Elliptical curve cryptography (ECC). Each sensor node sends the public master key to the cloud and secretly stored in the sensor node. Before data transmission, every node checks the master key, and if the master key is a match, then it transmits the data to the next hop. This process is continued until the source reaches the destination in the network.