INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL Online ISSN 1841-9844, ISSN-L 1841-9836, Volume: 17, Issue: 6, Month: December, Year: 2022 Article Number: 4363, https://doi.org/10.15837/ijccc.2022.6.4363 CCC Publications Bi-Level Minimal Resource Protected Key Generation Framework For Fog Computing Applications Arul Sindhia.P, Bharathi.R Arul Sindhia.P University College of Engineering Nagercoil, 629004, India Corresponding author: arulsindhiaphd@gmail.com Bharathi.R University College of Engineering Nagercoil, 629004, India. BharathiBharathi1993@hotmail.com Abstract Fog computing is a viewpoint that expands on the Cloud stage concept by placing processing assets at the organization’s edges. It might be described as a cloud-like platform with compara- ble data, computation, storage, and applications. They are unique in that they are decentralized in nature. Data protection and route analysis of time-sensitive data are made easier using fog computing. This minimizes the volume and distance of data sent to the cloud, lowering the risk of security and privacy breaches in IoT applications. When it comes to security and privacy, fog computing confronts several issues. The constraints of fog computing resources are the root of these difficulties. The fog system, in fact, may raise new security and privacy concerns. To address these challenges, cryptography is used in conjunction with key management techniques to provide safe data transfer. A Minimal Resource Viterbi based Bi-level Secured Key Generation (MRV-BSKG) technique for a secured fog-based system is proposed to compromise the security level and com- putational complexity. The BSKG technique, which combines Lagrange’s Key Generation (LKG) and the Location-Based Key (LBK) generation approaches, can safeguard secrecy and integrity. In comparison to the previous techniques, the new MRV, BSKG, delivers security with improved outcomes. Keywords:Minimal Resource Viterbi based Bi-level Secured Key Generation (MRV-BSKG), Fog Computing, Lagrange’s Key, Location-Based Key, Shortest path. 1 Introduction Fog computing is in great demand in most real-time applications [1], including industrial automa- tion systems, smart grid systems, smart cities, smart buildings, health care systems, surveillance and monitoring, traffic control systems, smart agriculture, and smart factories, among others. The Fog System platform is divided into three layers: the end user layer, the fog layer, and the cloud layer [2]. Fog System serves as a link between IoT devices and cloud computing. The fog computer gadget may send many types of new information. Cloud computing and fog computing have similar working https://doi.org/10.15837/ijccc.2022.6.4363 2 principles. Nonetheless, with cloud computing, the cloud can handle massive volumes of data utilizing virtual cloud resources which can be recovered from the cloud when necessary. The probability of network traffic due to a huge quantity of data transfer presents a key barrier in cloud computing [3]. The data transfer between the smart devices and the cloud requires adequate time and appro- priate bandwidth. However, maintaining these standards during data transfer in cloud computing is difficult. There are additional issues with latency, location awareness, and mobility [4]. The Inter- net of Things (IoT) is becoming an inextricable aspect of the Internet’s expanding privacy inside its bounds. However, IoT-based gadgets and tools face security and privacy risks, particularly because nodes are primarily meant to collect data about users’ behaviours, keys, and surroundings, resulting in profitable, targeted invasions. CISCO has launched Fog Computing, an improved version of cloud computing, to address these concerns. Fog nodes are employed at the network’s edge and act as a link between smart devices and the cloud. Smart population of devices are linked to fog edges rather than having direct touch with the cloud. The solution is ideal for any latency sensing applications without smart devices that can quickly obtain data thanks to fog computing. As a result, an approximation approach that provides scaled graphics processing with substantial acceleration is required. A vector- based machine learning algorithms is used [21] to approximate the shortest path distance in a large image. The main focus of the fog system is security, which can be achieved using fog forecasts and several key management schemes [5].It should be considered that the design of security methods has no impact on the system’s performance. Fog-based system design with less security leads to fraudulent activities such as hacking of information about the users. Encryption technology will also be used to improve the security of fog-based systems.But the ineffective key management technique affects the communication between the user and the cloud [6]. So there is a demand for a highly secured Fog based system to make it suitable for time-sensitive applications. In this paper, fog based system with Bi-level Secured Key Generation (BSKG) method is proposed that combines Lagrange’s Key Genera- tion (LKG) and Location-Based Key (LBK) generation. During the data transmission from source to fog nodes, LKG is done using a source encoder, and in every fog node, LBK is done using a channel encoder. The generated key is a combination of alphabetical letters and numerical characters leading tohigh-level security. On the receiver side, the generated key is decrypted using the LBK method in the channel decoder and again decrypted using the LKG method in the source decoder and then stored in the cloud. Here, the information is secured in multiple levels by encoding at source and each node based on its position. This approach provides a common security mode and provide secured data as compared to other algorithms like attribute based encryption or machine learning model. The rest of the paper is as follows. Existing works relating to techniques for fog computing and key management are described in Section 2.The fog-based smart grid system model is presented in Section 3.Section 4 describes the structure of the proposed fog-based system for the main generation of two-level protec- tion. Section 5 describes the functions of the proposed smart grid system, and Section 6 concludes the work. 2 Related work Cloud computing and fog computing services provide the same data processing, from consumers to these collectors, which are then stored in the cloud [7, 8].Cloud computing is a three-level structure, while fog computing is a tri-level structure.This tri-level structure supports real time applications due to its better services in terms of Quality of Service (QoS), latency, geographical distribution and network traffic [9].To reduce the latency in fog computing, shortest path algorithms such as Dijikshtra, Thorup’s algorithm, Pulse Coupled Neural Network (PCNN), Time Delay Neural Network (TDNN), etc. are discussed by Huang et al. which determines the minimum distance between the source and destination with the neural network. The main thing not to pay attention to in fog estimates is security and privacy issues. Only after the fog nodes collect sensitive information about the user will we send it to the cloud server.So, there may be a possibility for security threats [10].Key management techniques and cryptography algorithms can improve securities to fog nodes and cloud servers. Mate Horwath [11] has proposed Attribute-Based Encryption (ABE) that uses Linear Secret Sharing Scheme (LSSS),which supports multiple users. It is an identity-based user revocation that reduces the cloud’s https://doi.org/10.15837/ijccc.2022.6.4363 3 computational overhead by increasing the computational overhead in both encryption and decryption. The modified structure of Ciphertext Policy ABE (CP-ABE) is presented in [12] that effectively exchanges the hierarchy files in the cloud to reduce the time required for decryption. Simultaneously, the user can get all files by using a single key, which reduces the overall system’s cost. Peng Zhang et al. proposed a CP-ABE scheme to reduce the cloud’s burden by transferring some computation processes to fog nodes [13]. In this structure, the number of attributes is independent of the encryption and decryption process. Key Management Scheme for Communication Layer (KMS-CL)method exploits an access control approach to improve the security during file transmission in fog nodes. It increases the computational complexity due to the outsourced encryption process. To provide better security and privacy services, privacy-preserving data aggregation methods are presented in [14-16]. In [11- 13], ABE based mechanisms only were used for securing the data. The data can be hacked if the user information is leaked or hacked by third party. But, in [14 -16], this problem is overcome by using encryption mechanism; but its information is processed through third party and it also risk of information leakage. Lightweight Privacy Data Preserving Aggregation (LDPA) was proposed by Rongxing Lu et al. [17], primarily for IoT applications. To provide great security and privacy, it employs the Chinese Remainder Theorem (CRT) with Parlier encryption. The notion of shared keys is a flaw in this strategy since it cannot guarantee collision resistance. For traditional systems, different processing and machine learning modules are used in the physiological data processing cloud [23].The machine learning model [22 -23] based processing is best for only particular model and achieves best security in that model alone. Tian Wang et al. [18] have presented a trajectory privacy preservation method that uses Dummy Rotation (DR) algorithm to provide location-based services. By using this approach, privacy preservation is achieved, but it doesn’t focus the integrity. Zhi Li et al. presented a novel Hyper-graph-based Key Management (HKM) scheme that focused on confidentiality and integrity [19]. It has a key generation center for generating secret keys, fog server for processing the data, cloud for data storage and users. The scheme secures the storage data in both forward and backward directions. Bashar Alohali et al. [20]have presented the key management scheme in the Smart Grid (KM-CL-SG) communication layer. Since the security and privacy issues threaten modern technology, various researches focus on achieving high security. 3 Implementation of the Proposed System The major problems presented in the cloud-based system are data overloading and latency that lead to user data hacking. This can be overcome by fog-based organizations that play a key role in the construction of smart cities and smart transportation. The system model of the proposed fog-based system is shown in Figure 1. The application layer, network layer, and perception layer are the three Figure 1: The system model of Fog based System levels that make up FOG system. The perception layer at the bottom of the design is where the IoT https://doi.org/10.15837/ijccc.2022.6.4363 4 devices are positioned. Because every IoT node senses and collects the users’ information for further processing, it’s also known as an end-user layer. The network layer, which sits in the middle of the architecture, serves as a link between the perception and application levels. For processing and sending data to the upper layer, it incorporates fog nodes and network components such as routers, gateways, switches, and so on. The data are saved in the cloud at the top layer, which is an application layer. 3.1 Proposed Fog based System Due to the growth in population and technology, the Fog-based system is necessary to communicate between the cloud server and customers. The block diagram of the proposed fog-based system is shown in Figure 2. Figure 2: Proposed System Diagram While Fog Node offers services used in different locations, cloud computing tipping offers its own cache and subsequent requests locally. Act as the central controller of global service delivery and distributed fog nodes. In addition, the cloud image receives the necessary information from the fog population sensor on the end user device, which can now communicate with the IoT sensors central information database, and then use the fog terminal to communicate. It not only provides information about the devices, but it also provides the user’s private information. So there is a possibility for hacking or spoofing the user information. The proposed hybrid Bi-level can mitigate its secured key generation scheme, which combines Lagrange’s Key Generation (LKG) and Location-Based Key (LBK) generation. The encryption procedure for safeguarding information about and from users is conducted out during data transfer from end-users to fog nodes using Lagrange’s key generation technique. The fog node stores the encrypted data created. In order to offer two-level security, LBK is created in every fog node and combined with the encrypted data. Using MRV cloud nodes and fog nodes, reduce short path secretion between users. The data is decrypted again on the cloud server using the encryption logger key, and the data is eventually saved in the cloud, as shown in Figure 3. Algorithm Step 1: Create n number of nodes n1,n2,n3, .....nn Step 2: Assign the position of nodes and set the distance between nodes for (i=0; i