## 1 Introduction  
Wireless networks consisting of many sensor nodes designed to measure the physical conditions in the environment are called Wireless Sensor Networks (WSN). Wireless Sensor Networks are used in many areas such as home automation, industry, the military, health, the environment, commerce, and transportation. Hundreds of applications can be made in each area. For example, many applications can be made in the environmental area, such as monitoring agricultural land, measuring water pollution, and monitoring forest fires. Wireless Sensor Networks can be found in controlled environments such as gardens or stadiums. However, they can also be found in uncontrolled environments in applications such as monitoring border security and monitoring forest fires. The number of WSNs can vary depending on the application. For example, while ten-level sensor nodes are used to monitor a small pool, thousands of sensor nodes are used for the fire monitoring of a large forest. Furthermore, each application has its own priority. For example, while the priority is energy in some applications, it is delay in some applications or security in others. Wireless Sensor Networks are an important part of the IoT [1]. Especially recently, the smart city concept has become widespread in increasing people's comfort and improving their living standards. Security is an important need for data and applications in the IoT and WSNs, which pioneered the establishment of smart cities. In particular, the security threat to WSNs in uncontrolled environments is quite high. Attacking nodes can be left to the relevant environment, causing many negative effects such as the transmission of false information to the network, and causing the nodes to fail. As a result, the WSN cannot achieve its purpose and the costs incurred for this network are wasted. While message listening is performed in passive attacks in the WSN, wrong packets may be injected into the network in active attacks. Because the wireless medium is insecure, communications between nodes are considered insecure. Authentication is used to prevent such security breaches [2]. Data authentication in sensor networks allows the system to verify whether data have been sent from authorized sources and protects the original data from changes. Authentication is very important in communication security for WSNs. Thanks to authentication, during communication between two sensor nodes, the source node knows that the node to which it sent a message is a real node. With authentication, only sensor nodes that can be authenticated can access the network, while others cannot. In this way, unauthorized users are prevented from accessing the network. Authentication in WSNs can be achieved in many ways [3]. Different options such as IDs, certificates, cryptographic protocols, MAC addresses, and passwords can be used while providing authentication. However, there are some disadvantages to the methods used. ID-based authentication methods are vulnerable to an ID spoofing attack. The memory-processor needs of certificate-based authentication methods are very high in terms of sensor nodes. In cryptographic protocol-based authentication methods, security depends on the strength of the encryption protocol. Nonrepudiation is impossible for MAC address- and ID/Password-based authentication methods. A robust authentication mechanism does not allow any sensor node to join the network except its own members. It should also be strong against Data Integrity, Non-Repudiation, Sybil Attacks, Spoofing Attacks, Message Substitution Attacks, Message Replay attacks, Man in the Middle Attacks, and Denial of Service attacks [4]. It should be scalable. A well-designed authentication protocol should have Mutual Authentication. All the while, the limited energy, processing, and memory capacities of the WSN need to be considered. Blockchain, one of the emerging technologies, gives successful results in security [5].