The internet of things (IoT) has provided a promising opportunity to build powerful systems and applications. Security is the main concern in IoT applications due to the privacy of exchanged data using limited resources of IoT devices (sensors/actuators). In this paper, we present a classification of IoT modes of operation based on the distribution of IoT devices, connectivity to the internet, and the typical field of application. It has been found that the majority of IoT services can be classified into one of four IoT modes: gateway, device to device, collaborative, and centralized. The management of either public or symmetric keys is essential for providing security. In the present paper, we survey different key management protocols concerning IoT, which we further allocate in a map table. The map table is a link between modes of operation and the associated security key management elements. The main target of this mapping table is to help designers select the optimum security technique that provides the best balance between the required security level and IoT system mode constraints.