# Key Agreement and Authentication Protocols in the Internet of Things: A Survey
## 1 Introduction  
The rapid development of Internet of Things (IoT) technology has made the IoT applicable in many areas of life and contributed to its improvement [1]. We can find IoT devices in everyday life because we use intelligent washing machines, TV sets, and light bulbs. In combination with appropriate sensors, these devices intelligently control the lighting or water heating in a building. They can also protect our security with tracking devices [2; 3; 4; 5]. In medical IoT, devices help to control the vital functions of chronically ill people, test blood glucose levels in people with diabetes, signal the patient's need for medications, and deliver them to the patient on time [6; 7; 8]. One of the typical applications of IoT in the industry to alert people about the possibility of an earthquake [9]. Athletes can also use IoT to control vital functions and performance to prevent life-threatening situations [10; 11; 12].  
IoT devices are equipped with various sensors (for example, temperature, pressure, and velocity sensors) that enable them to perform the tasks for which they were designed. Sensors process signals from their work environment and then react to them appropriately. For example, if the room temperature is too high, the heating devices will be switched off to lower the temperature. IoT devices can also communicate with each other to convey relevant information [13; 14; 15]. Usually, the connected sensors form wireless sensor networks (WSNs), within which various operations and data exchanges are performed. Both networks, IoT and WSN, primarily use the standards IEEE 802.15.4 [16], NFC [17], 6 LoWPAN [18], MQTT [19], and Bluetooth Low Energy [20] for communication.  
Communication between IoT devices requires the use of various protocols that will define the purpose of the communication, the sequence of steps performed during it,and cryptographic techniques used to secure the transmitted information. The protocol's purpose may be to support communication between devices, but the protocol may also target aspects of communication security. Here, the protocol's goals can be the mutual authentication of the parties as well as the agreement of the session key. Usually, these protocols are described as security protocols. Securing communication is a necessary activity due to the possibility of various cyberattacks. Attacking users can try to intercept and modify transmitted messages, as well as steal confidential information [21; 22; 23; 24; 25; 26]. In addition, the implementation of protocols in networks of interconnected IoT devices must take into account technical aspects such as the purpose of the network, the energy demand of the devices and the type of communication that will be carried out in it [27].  
In the case of security protocols, it is essential to verify their correct operation, check whether they provide an appropriate level of security and whether they are not vulnerable to the latest methods of attacks. When verifying security protocols, we can use methods such as time automatics [28; 29], BAN logic [30], GNY logic [31], real-or-random (ROR) [32], random Oracle model (ROM) [33], or Syverson-Van Oorschot (SVO) logic [34]. In addition, protocol verification is possible with such tools as Scyther [35; 36], Tamarin [37; 38], ProVerif [39; 40; 41], Avispa [42], or the tools mentioned in [22; 43], or [44].