# A Study on the Design of Fog Computing Architecture Using Sensor Networks
## 1 Introduction  
With the development of the Internet of Things (IoT), a device could recognize the environment and conduct a certain function by itself. Therefore, roles of a computing model that controls IoT devices are paramount. IoT devices mainly consist of sensors. Previously, cloud computing based on a sensor network was used to manage sensor data [1; 2]. Transferring and processing huge amount of data through cloud computing caused several issues such as delayed service response time. In addition, the number of application area of a sensor network is expanding and the demand on real-time processing and transferring of information to control a device of IoT is also increasing [3].  
A new type of computing model, fog computing, is proposed as the amount of data generated by a sensor is increasing and a routine to process the data is complicate. Fog computing is a model to manage data, conducting near field communication with a sensor. As a device in fog computing uses near field communication, its response speed is faster than cloud computing and the number of sensors allocated to a device is smaller than in cloud computing. Therefore, more and faster tasks are possible, compared to cloud computing. Considering the fact that it requires data aggregation to reduce waste of energy caused by duplicate delivery of information between near devices in a sensor network, clustering-based hierarchical management has many advantages [4; 5; 6].  
In addition, fog computing services that have been developed so far consist of data creation, processing and transfer, as shown in Figure 1. In other words, a cloud server or a proxy server extractsfeatures according to a type of data once data is created at a sensor. Then, a server creates rules of pattern analysis and inference to save or process data. Data processed through the process is provided to a data owner or a user in customized service. In such systems, data for a service user was saved in a plain text type and transferred to a monitoring server for future access and use of a user. Data sharing and utilization are inevitable functions. Data generating at a sensor can be fatal information to an individual user, therefore, a delegation function to allocate the authority of data access to a legitimate user and revocation function to remove the authority of data access from the user are required.  
This paper proposes an effective solution to resolve an unnecessary power consumption issue in communication between sensors under a fog computing environment. In addition, a fog computing architecture for safe management of data generating at each sensor is proposed. The proposed architecture is based on IoT reference model proposed by CISCO. At the application level, a data security method through user attribute-based encryption and decryption and delegation and revocation of authority is proposed. At a lower level, unnecessary communication is controlled by expecting usage and frequency of communication between sensors.  
This paper consists of the following sections. The second section reviews the Internet of Things, the system environment proposed in Section 2, attribute-based encryption for fog computing and secure data management and a sensor network that is the base of communication between devices. Section 3 proposes a hierarchical management method that expects power consumption and frequency of use of a sensor to improve overall architecture and communication between devices as a description of the system proposed. In addition, a method to delegate or remove authority in attribute-based encryption for secure management. Section 4 evaluates performance of a proposed method. Finally, Section 5 describes the conclusions of this study and possible topics for future study.