Code-based encryption techniques with distributed cluster head and energy consumption routing protocol

Fog computing and the Internet of Things (IoT) played a crucial role in storing data in the third-party server. Fog computing provides various resources to collect data by managing data security. However, intermediate attacks and data sharing create enormous security challenges like data privacy, confidentiality, authentication, and integrity issues. Various researchers introduce several cryptographic techniques; security is still significant while sharing data in the distributed environment. Therefore, in this paper, Code-Based Encryption with the Energy Consumption Routing Protocol (CBE-ECR) has been proposed for managing data security and data transmission protocols using keyed-hash message authentication. Initially, the data have been analyzed, and the distributed cluster head is selected, and the stochastically distributed energy clustering protocol is utilized for making the data transmission. Code-driven cryptography relies on the severity of code theory issues such as disorder demodulation and vibration required to learn equivalence. These crypto-systems are based on error codes to build a single-way function. The encryption technique minimizes intermediate attacks, and the data have protected all means of transmission. In addition to data security management, the introduced CBE-ECR reduces unauthorized access and manages the network lifetime successfully, leading to the effective data management of 96.17% and less energy consumption of 21.11% than other popular methods.The effectiveness of the system is compared to the traditional clustering techniques.


Overview of managing data security using keyed-hash message authentication code-based encryption algorithm
Third-party data can be monitored and measured in real-time by IoT devices and technologies connected through the internet. The third-party information is data transmitted, stored, and it can still be recovered in the server [1]. IoT is a network of physical items integrated with electronics, software, sensors, and network networking to collect and transmit to third parties [2]. The fog computing-based third-party data transmission first layer contains network devices like routers and gateway for processing time-sensitive information to the layer of things [3]. The second former layer can be used for cable or wireless sensor communication. The third fog nodes layer measures the demands and forwards findings to other fog nodes or cloud nodes [4].
Third-party data is any information derived by a person not related directly to the person by which data is gathered. Primarily, the data is obtained from several websites and platforms by external providers, including a data management platform (DMP) [5,6]. The fog computing method using sensors for monitoring the physical conditions of third-party data collection [7]. Third-party data is any information received by a company or other organization that has no direct connection to the visitor [8]. Third-party data are gathered, aggregated, and businesses sold to help them develop successful advertising and return campaigns [9,10]. Its ordinary audience helps businesses expand in size to include potential prospects for which person buys related services from a direct competitor [11]. Sellers from third parties have legal access to vital infrastructure and confidential details of customers [12]. A third-party cyber-attack inherited from cloud computing, fog computing faces new security and privacy challenges. Authentication assists and confirms the identity of a user. Fog is used throughout your network by deploying fog nodes. Touch screen, toggle, wireless connection, and directional microphones devices can act as fog nodes. When an IoT device generates data, it can be analyzed via one of the nodes without returning to the cloud.
The main contribution of the paper: (i) Designing the CBE-ECR has been proposed to improve data security and enhance data collection to store third-party servers. (ii) Encryption techniques to reduce the middle attacks like pre-image attacks, birthday attacks, rainbow tables. (iii) The mathematical results have been analyzed, and the proposed CBE-ECR reduces unauthorized access and improves the network lifetime successfully.
The remaining of these paper structures has been followed: "Overview of managing data security using keyedhash message authentication code-based encryption algorithm" overview of data management based on energyefficient clustering protocol. "Literature review based on data security" literature review based on data security of exiting methods. "Code-based encryption with the energy consumption routing protocol", the proposed paper system, has been performed for third-party data security. "Keyedhash message authentication" analyses the results and discussion, and "Results and discussion" explores the conclusion of the research.

Literature review based on data security
The encryption technique reduces advanced threats, and all data transfer methods have been protected. Concerning managing security and privacy, the introduced CBE-ECR reduces unregistered access and successfully manages the network life leading to effective transmission of knowledge.
Pedro Gonzalez-Gil et al. [25] suggested the DS4IoT for IoT based on lightweight data-security ontology. Current method estimates show steady IoT development, with many works depicting an even nascent security technology. In addition, new rules, including general data protection regulation (GDPR), include new approaches to data storage and personal data coverage. In this work, DS4IoT is a data security ontology for IoT that covers representing data protection principles with a modern approach from a data point of view and introducing classic concepts, including access control and authentication, certifications, and provenance.DS4IoT is an IoT cybersecurity metaphysics covering the data protection act 1998 with a modern data approach and conventional concepts including access control and encryption mechanics, accreditation, and origin.
Omar DIB et al. [26] explored the novel data exploitation framework (NDEF) based on blockchain technologies. These intelligent devices constantly produce vast quantities of data, which can be of use to many utilities. One major obstacle to the development of such services is that they often handle confidential and personal data. To accomplish this, they aim to introduce a new NDEF based on a blockchain platform to facilitate personal data in this article. Experimental research found that the approach presented is secure and efficient enough to be built into a real-world program. These electronic sensors constantly produce huge amounts of data that many utilities can make use of. The fact that confidential and personal information is often used is a major problem in developing such services.
Zhao Huang et al. [27] expressed the physical unclonable function (PUF)-based unified identity verification framework (PUF-UIVF) for secure authentication with hardware device for IoT. Millions of mobile devices were connected and communicated through networks during the era of the IoT. Silicon PUF has been introduced to complete system authentication and key storage to mitigate this threat effectively and is considered a reliable antipiracy solution. The proposed system is implemented and tested on the fieldprogrammable gate array (FPGA) platforms. Experience findings show that the suggested architecture distinguishes embedded device hardware's robberies on low silicon overhead uniquely and reliably.
Data Management Framework (DMF) for pervasive IoT applications deliberated by saniyazahoor et al. [28]. The overall IoT's key objective is to make everyday devices available, responsive, and interconnected within the global framework of the internet in the future. The resources of IoT equipment (such as storage, processing, and energy) are restricted in many IoT applications; this document further suggests a DMF focused on parallelization for resourcecontrolled IoT applications. The findings show an increase in capacity, processing, and storage requirements about the sequential solution for IoT data processing within the proposed system.
Novel Data Flow and Distributed Deep Neural Network (DF-DDNN) based IoT-Edge model for less latency in Big Data edge computation described by Veeramanikandan et al. [29]. Deep learning provides nearly half the time accurate knowledge relative to other learning algorithms. The edge/ fog computing environment supports the IoT problem, such as latency, bandwidth utilization, and the network's eternal connectivity. In this regard, the IoT-edge model based on DF-DDNN is proposed for large data sets. Compared to the conventional IoT-Cloud model, our proposed approach reduced the latency by up to 33%.
Low-rank-matrix-completion problem (LRMC) and topological interference management (TIM) for clustering for D2D networks discussed by Salam Doumiati et al. [30].In this document, they are developing a popular clustering and TIM architecture for a D2D network. To this end, they are TIM model as an LRMC problem and solve it using a new system based on semi-definite programming (SDP) with low complexity. Our scheme reduces the LRMC-based TIM approach's computation time.
For latency-sensitive IoT services, such as sensor monitoring, Fog Computing offers moving computing, communication, and store systems between the clouds to the edge of the network. Safety in fog-enabled services, such as healthcare monitoring, is, however, a fundamental problem. In contrast, here received decentralized, efficient clouds security protocols (RDECS), including continued data monitoring given by Viejo et al. [31].
IoT plays a major role in the diagnostic and detection process in Healthcare (H-IoT). Various medical sensors based on IoT are used for biometric measurement and transmission to the cloud for additional analysis by Sarrab et al. [32]. Therefore, this work proposes an IoT-fog framework to categorize streamed data critically and detect anomalies in the fog with low latency and high response times.
Based on the existing PUF-UIVF, DMF, DF-DDNN, and LRMC-TIMF analyses, some issues are computation time, latency, and accuracy. Hence in this paper, CBE-ECR has been proposed to have less computation time, less latency, accurately predict the attack based on the keyed-hash message authentication technique.
Code-based encryption with the energy consumption routing protocol CBE-ECRis used for controlling data protection and data transfer protocols using key-hash authentication services. At first, the data is analyzed, and the cluster head is chosen, then the energy clustering protocol that is stochastically distributed is utilized for transmission. Encryption minimizes transitional assaults and the attack by unknown users. The developed CBE-ECReliminates unauthorized access and effectively manages network life as well as data protection management.
Three devices, namely IoT device (N), regulator device (CRN), and fog computing device, are used in the CBE-ECR. IoT system involves both the IoT device and the regulator device. IoT device is resource devices that are restricted while regulator device is not restricted either within or outside the IoT system. IoT devices sometimes communicate directly with the regulator device, but it is granted for interaction among points. The architecture of CBE-ECR is shown in Fig. 1. The architecture includes data protection with the 1 3 data transfer protocol. The attack by unknown users can be avoided by the Encryption techniques that utilize the authentication services.
Fog computing equipment, IoT devices, and the expert decryption algorithm are generally assumed to remain securely stored in the data store. When an instant post correlation verifies IoT, it creates evidence of connection attack by unknown users with the variable at the beginning of encryption. Fog Computing devices, IoT device provisions, and the master secret key are presumed to remain in safe storage in the device's database. When an IoT device authenticates with the immediate post connection, unknown at the outset of encryption, it generates a Proof of Association with the variable. Data protection is encrypted by all public key data transfer protocols that rely on the hardness of decoding in a linear error corrective code, partially or totally with authentication services, for their security, if selected with some techniques.CBE-ECR encourages the confirmation of the IoT device by the regulator device and notifies for computing devices' practical domestic practice.
Data security management effectively supervises and manages an organization's data to ensure that unauthorized users do not access or corrupt the data. A data security management plan includes planning, implementing, verifying, and updating the scheme's components. In the CBE-ECR framework, it is believed that different regulator nodes use a specific server. Therefore, after IoT devices are authorized and licensed, all fog devices get notified by specific personal regulators. Such expectation allows information from one device in a clever manner in which the IoT domain remains safely and securely. The secured data transmission between the regulator device, fog computing device, IoT device with the authenticated users flow is illustrated n Fig. 2.
Furthermore, specific nodes in virtual environment fields have to interact with various devices within the contexts. The data transfer between all the devices or nodes within the protocols is controlled by keyed-hash message authentication. The management of data security is shown in Fig. 2.

Keyed-hash message authentication
A problem based on authentication method must always be regarded in addition to provide complete mutual encryption. The IoT node is then sent to the regulator with the data it wishes to transmit and generates a hash data represented as L 1 . The prior stage of authentication is described below The prior stage of authentication h r is obtained from Eq. (1), Mutual hidden Key ( MH k ), r gh v represent the Fig. 1 The architecture of CBE-ECR Keyed-hash series server, L 1 represent the hash data, l represents the resulting quality.
Besides, the hash and strings L 1 has two more values, and the Mutual hidden Key ( MH k ) have the Keyed-hash series server, and where r is the series or quality structure of the principles in which the full hash function is obtained. Thus it connects the resulting quality to the remote system of the prior stage of the authentication communication.
The keyed-hash message authentication flow with the prior stage of authentication h r , the Keyed-hash series server r gh v , hash function h 1 , Mutual hidden Key MH k is shown in Fig. 3. Eventually, the resulting hash function quality is hacked and stored in the Keyed-Hash server as a correct value with the mutual hidden key. Hash-based Message authentication code is a decryption code with a hash feature that uses a digital signature. The hash transport layer security (HMAC) creates a decentralized key to the server and client known to that particular source and destination. The new data stored in the series is shown below The new information stored in the series is described from Eq. (2), Mutual hidden Key ( MH k ), h g represent the hash function quality, r gh v represent the Keyed-hash series server, l represents the resulting quality. r + 1 represents the series transformation. Encryption involves taking plain text, such as a text message or e-mail, in an unreadable formatcalled the clipboard text. This ensures that digital data is kept confidential either on computer systems or transmitted over networks.
The regulator device applies a particular methodology to guarantee that the provided hit rate is accurate after gathering information. First, all data is obtained from M, and the hash function is represented as h 1 . In the Second stage, hash and function for h 1 with the specific keys, Mutual hidden Key ( MH k ), regulator device contained in the hash link key server. The resulting value is then compared to the received data, as shown below The comparison between the received data * h g is obtained from Eq. (3), Mutual hidden Key ( MH k ), y h g Represent the accurate data information.
It should be mentioned that specific frameworks bind the stages to pass around and haze the group's latest hash function with different components like the transient encryption key and the accumulated hash value. Therefore, the CBE-ECR seems at first glance to manage data security. A hacker may claim that the key-hash chain entries can corrupt or discover the hidden key to break that stage in the system. Even then, it's not simple to locate the encryption data because it varies in each session. If the opponent knows the hidden key or initial hash, the pointless information becomes a fleeting data packet.
The CBE-ECR is developed to maintain secrecy, although becoming theoretically quicker than diagonal encryption techniques. It can have consistency since it is focused on the development of data fingerprints. The Significance of CBE-ECR is focused on assuming that a hacker can recover the actual credential data from a hash-value utilizing broad immediate post lists of hazards beyond an adorable assault. As hazing implementations can be open to all, the implementation should produce the respective codes if everyone knows such an application. The Keyed-Hash Message Encryption Application method is used to create fingerprints to settle the Privacy of data.
CBE-ECR can be used as part of the report by creating a hash function and a pre-shared secret key to verify the validity and source. It would indeed be impossible for a hacker to produce plate interfaces despite understanding the closed key. It requires hashes to be created for all potential quality combinations transmitted using each valid secret key.
A hatching mechanism must meet specific safety criteria such as plaintext resistance, subsequent plaintext opposition, and impact opposition for managing data security. During the tolerance based on a feature's nature, there is an information stream to create particular digestion of a particular component that is impossible to locate the secured data. The Privacy and security of data can be maintained and managed by certain conditions. The suggested CBE-ECR is thus intended to be autonomous for managing data security and privacy.

Code-based encryption
Contrary to the code-based encryption technique, the CBE-ECR suggested approach encrypts a significant part of the encoding that defines the retrieval mechanism and is identical to the data stream begin key. The actual data are collected from the database server. The encryption technique can be integrated into a data generation key that must be checked during and after encoding. Rather than using the default data encryption method, the suggested code-based encryption technique encrypts the data by scratching the headers' first byte keys. Therefore, standard encryption techniques add mathematical uncertainty concerning the number of term measures since they encode the data via various systems using unique components. The code-based encryption technique improves the authentication speed since the regular secret key does not apply.
The security service provider has the components, namely database, server, encryption, to maintain data privacy. The user maintains the authentication and privacy server to lock the security model for all data streams, as illustrated in Fig. 4.
A few data choices can be the initial computation of the code-based template, except allocated and unconfirmed data security-privacy must be managed. The data can include up to few connectors, but it is not allowed to overlap. The majority of instances necessary to rebuild the actual data stream in the lowest possible situation would thus be maximized. The absolute majority of instances must be implemented in the code-based encryption technique. In particular, it is possible to verify if each case is retrievable just after data are decrypted in each phase.
The initial code-based template calculation can be a few data choices unless the data security data confidentiality is provided as allocated and not confirmed. There may be up to a small number of connectors; however, no overlap is allowed. This would maximize the large percentage of the necessary instances to rebuild the actual data stream at the minimum possible cost.
Essentially, the CBE-ECRreduces unauthorized access and manages the network lifetime successfully. The difficulty of computing the network lifetime is expressed as follows in the suggested encryption method, and the difficulty in computing is described below The difficulty in computing is obtained from Eq. (4), the completeness function is represented as D U , D V , D W , D Y that ends precisely at functions U, V, W, Y and returns to cycle start. Furthermore, This would maximize the sufficient circumstances to reconstruct the overall network traffic at the lowest possible level. In code-based data encryption, the absolute majority of cases must be carried out.
If the procedure is represented as S U , T V , T W in each step, the above Eq. (4) can be modified and shown below Each stage of procedure representation is obtained from Eq. (5), S U + S V + S W represent the contrast function parameters.Q U , Q Y represent the scaling parameter. In contrast to the code-based cryptosystem, a significant portion of encoding that defines the recovery mechanism is proposed for encoding by the CBE-ECR and is identical with the starting key of the data stream. The approximation stage and the contrast function is described below The approximation stage S Q−B and the contrast function S con is obtained from Eq. (6), S U + S V + S W represent the contrast function parameters. The encryption process suggested is about the same for the authentication of data S ES−B . The difficulty of the authentication is described as follows. Data collected by a third party are any information derived by a person not directly related to the person through whom data are collected. Data are generated by external providers, including a data management platform, from several websites and platforms.
Authentication of data is obtained from Eq. (7), here S U + S V + S W represent the contrast function parameters, S con represent the contrast function, Q U represent the scaling parameters. Protected information is collected, aggregated, and Fig. 4 The stages of code-based encryption technique sold to companies to help them develop successful campaigns for advertising and returns. Its ordinary audience helps companies expand to include potential opportunities to buy the related services from a competing product.
In specific, when the execution time is a few bits shortest, the computation time and the encryption stage of detailed data is described as follows: The computation time and the encryption stage Et of particular data is obtained from Eq. (8), S a + S b + S c represent the significance sf of each data byte bt.
The hash message authentication manages the data security and the transmission protocols. The data obtained is distributed to overall cluster heads, then the energy in the clustering protocol is utilized to make the data transmission. The cluster head is typically chosen, and it is centered on the least number of hops in the standard protocol for the fog computing device. Nevertheless, the data type leftover energy and route data usage are ignored. The chosen path can be made with the minimal hop amount; nevertheless, the length is far, or the energy usage is heavy.
Consequently, in this section, data is analyzed, and the cluster is selected. Finally, the clustering protocol is used for data transmission with the distributed energy. The complete energy usage in the x direction and the latency is described below The complete energy usage and the latency Com ene(x) is obtained from Eq. (9), cosS y , y + 1 refers to the energy cosS y , y + 1 absorbed to send and receive data from y devices in the following direction, where M x Specifies an average of x route points and can be demonstrated via an energy usage wireless communication device.y represent the number of device. Whenever the cluster energy is depleted, the relation breaks in fog computing. The lifespan of the connection thus has a clear connection with the node energies. Besides, to consider the node energy usage, the connectivity route must be chosen.
The data collection and the stages of encryption, in the form of energy absorbed by the sender and the receiver for data calculation per bit, are shown in Fig. 5. The connectivity between the devices and the energy utilized are explained below The connectivity between the devices and the energy utilized cosS y , y + 1 is obtained from Eq. (10), A T l, b y,y+1 represent the energy absorbed by the sender, A R l, b y,y+1 represent the energy absorbed by the receiver.
If a device distributes the data to a neighboring device, the sender and receiver attain an equal amount of energy. The energy usage of the device as per bit of data is calculated as follows The energy usage of the device as per bit of data is obtained from Eq. (11), l represents the distributed message of data in the form of byte, c represents the range among the devices.A T−e represent the devices on space free type, A T−a represent the communication stage of devices. The device amplifier's energy diffusion parameters in the free-range phase to calculate the accuracy and clustering protocol is shown below The energy distribution between the free-range phase A g and the clustering protocol A m is obtained from Eq. (12), the node uses a propagation descent feature b 2 if b is higher than the specified limit C o . Electrical storage is the energy usage factor, and it is represented as A e .
Computing its information collected of sensor nodes are added to the cluster that restricts most connectivity within the various network clusters and routes the release information to a sensor node. Routing protocol for energy consumption in the wireless body network for ensuring data transfer.
In a way, the existence of the path depends on the length of the connection. The lifetime of the connection among two neighboring devices is analyzed. Randomly scattered are the points in the system. The communication time is determined by assessing both networks' comparative rate and the points' position for a defined connection.
The network model with u and v points is regarded as the nearest route domain. The relation between the two devices is {u, v} and the data transmission between nodes is transmitted to r. The oscillation vector u and vare implemented with an angle between those two point vector fields. The fog computing device has no positioning system such as Graphical Positioning System; hence, the two locations' close range cannot be calculated immediately. The interval among various domains can be calculated in many ways. The time variation of the signal among the two points is used to calculate the data transmission and detect the attacks. In the CBE-ECR process, the time gap is in microseconds, and as defined, time synchronization is essential. The specific approach is to use message transmit power among devices during the journey.
Many devices are often chosen for transitional networks or deeply integrated with conventional routing for fog computing, and the energy storage is thus quickly depleted. If the linkage node's energy is consumed, the whole network sometimes collapses, and unauthorized users can attack the data.

Results and discussion
The major challenge of third-party data transfer is intermediate attacks, data security, privacy, authentication, and reputation problems. This paper discussed the CBE-ECR based third-party data security in fog computing and IoT devices. The base station synthesizes the sensor node data. Protocol for energy consumption routing in the wireless network for secure data transmittals. The protocol contains many parameters of network nodes, including continue generating, implementation cost, frequency band, and jumps. The HMAC is an encryption technique that unpacks the mix of public keys, private keys. This paper uses the HMAC approach to encrypt the data as well as to validate data integrity. The most networking limitation of scalability in different network clusters and single hop routing from the sensor node's cluster head. The key-hash message authentication code-based encryption algorithm has been used for improving data management with the distributed head cluster and energy consumption routing protocol. The cluster head summarises the data produced by the sensor nodes. Energy consumption routing protocol for safe data transmission in the wireless sensor network. The protocol includes many network node parameters, including residual capacity, transmission efficiency, bandwidth, and hops numbers. In this paper, discussion section we consider x-axis has a number of devices and Y-axis computation time, accuracy ratio, latency, energy consumption, performance, effective data management, detection rate, precision when compared to physical unclonable function (PUF)-based unified identity verification framework (PUF-UIVF) [27], Data Management Framework (DMF) [28], Data Flow and Distributed Deep Neural Network (DF-DDNN) [29], Lowrank-matrix-completion problem (LRMC) and topological interference management (TIM) [30]. Table 1 shows the discussion section results outcomes.

Detection rate and precision ratio (%)
The encryption technique has several different methods of detecting attacks on third-party servers. Many detecting instances, particularly those most suspect, can be identified by enterprise firewalls or intrusion detection systems. Assessors who intend to discover through firewalls and intrusion detection systems should understand which detect more likely to produce results without attracting the safety officers and how encryption techniques can be performed more steadily to increase their chances for success. The encryption technique can detect unwanted or rogue network devices. A third-party company using a few operating systems easily detects rogue machines using various devices. Figure  explores the Fig. 6a Detection rate and Fig. 6b Precision Ratio (%) A third-party data transmission challenge that requires studying and regularly solving to secure data's authenticity and integrity in this process successfully. Since the IoT is highly susceptible to different types of attacks such as passive eavesdropping, aggressive interference, spoofing, and blocking information, it cannot guarantee accurate and credible perceived information. Data collection and encryption phases in the form of the communicator and the recipient's energy absorbed for research performed per bit. Equation (7) is the connection between the devices and the energy used. The fog computing environment can be approximated correctly to collect sensor network data, achieve exact data, and enhance the available data. The primary processing method consists of finding, correcting, or excluding irregular information by examining the connection between third-party data. Combined with trust model data analysis technologies to ensure data authenticity from the source presented to ensure the source is reliable.

Effective data management ratio and accuracy ratio (%)
Third-party information is outsourced in fog computing, and third-party data management is transferred to the fog node, which involves the same security risks as in the cloud. First, it is difficult to protect data accuracy when outsourced data may be misplaced. Secondly, unauthorized parties may misuse the uploaded data for other reasons, in the context of the energy consumption routing protocol for data protection, auditable data storage services. Encryption techniques such as key-hash message authentication code and distributed cluster head are combined to allow a third party to verify the data stored on a non-confidential server to ensure the integrity, confidentiality, and verifications of the cloud server storage system. The low power consumption and unattended installation of the IoT and fog environment ensure more effortless internet protection. A fog sensing device based on the output rate restriction in this report solves source reliability. The increased throughput restriction provides an efficient representation of the information to minimize this confusion and volatility to produce more accurate stable data than the single sensor, boosting network and accurate data transmission in the third party.

Latency ratio (%)
The proposed method utilize sensor node's GPS cards to know their coordinates, distributing cluster head to maintain the network connection by still having a representative node on its virtual grid in active mode. The simulations' effects demonstrate that it works both in latency and packet loss, reducing energy consumption. Although ECR is a localized protocol on which the clusters are geographically dependent. A representative node serves as the leader to relay the data to other nodes for every specific third-party server location. The information shall be given, otherwise, the particulars are unnecessary at a specific time from the moment the information is sensed. Correspondingly, limited data latency for long-lasting applications is another requirement. The central concept is to analyze IoT devices and network data, perhaps to optimize the benefit of information while minimizing latency and bandwidth. Figure 8 deliberates the Latency ratio (%).

Computation time ratio (%)
Fog computing scenario is the communication of many heterogeneous, ubiquitous, decentralized computers and the network to carry out storage processing activities without third parties. The proposed CBE-ECR offered an autonomous data query network-layer approach. Additional overheads in energy consumption and memory store can be given in the query layer on each sensor node. Second, synchronization among nodes is necessary (not all data is obtained simultaneously from incoming sources) for efficient data computation in-network before sending it to the top node. Thirdly, the top nodes should be managed dynamically to avoid hot spots. Figure 9 shows the computation time ratio (%).

Performance ratio (%)
This paper using an energy consumption routing protocol, a distributed cluster head, to protect Privacy from the energy consumption routing protocol and protect Privacy from the server's data. Previous storage schemes have used error correction codes or network codes to address data detection and data restoration to ensure data storage security. The keyed-hash message authentication code allows for less storage, even quicker data recovery, and equivalent connectivity costs. Adequate data security, data collection storage services have been developed. Verifiable computing makes it possible for a computer to unload a function's calculation to other servers, perhaps not trusted with the verified data. Table 2 shows the performance ratio (%).

Energy consumption ratio (%)
A sensor server structure where sensor nodes choose a top node sends base station (BS) data to a third party to carry out the aggregation. The third-party BS generates and transmits the information required for the data flow and in-network calculation to the incoming question schedule's appropriate nodes. The proposed CBE-ECR minimizes energy use and picks more reliable nodes for routing packets. The most critical element in server centrality becomes stability. Residual energy, connection quality, and the number of hops required to reach the server's destinations are characteristic of a node's reliability. With low latency and high bandwidth, computational power and storage space could be provided from fog computing and IoT environment. Table 3 explores the energy consumption ratio (%).
The CBE-ECR has been proposed to increase data transmission and enhance data security to achieve detection rate, precision ratio, accuracy ratio, effective data management, less latency, the low computational time when compared to physical unclonable function (PUF)-based unified identity verification framework (PUF-UIVF), Data Management Framework (DMF), Data Flow and Distributed Deep Neural Network (DF-DDNN), Low-rank-matrix-completion problem (LRMC) and Topological interference management (TIM)methods.

Conclusion
This paper analyses IoT and fog computing environmentbased third-party server data collection and data storage. Third parties data have legitimate access to essential resources and customer confidentiality. A third-party cyberattack poses cyber protection, operations, conformity, and reputational threat to all vendor organizations. Hence in this paper, CBE-ECR is used in data security and data transmission protocol management with key-hash authentication services. The data is first processed, and the cluster head is selected stochastic energy clustering protocol used for transmission. The encryption technique minimizes transitional attacks like preimages, rainbows, birthdays. The proposed CBE-ECR created prevents unwanted access and controls both network life and data security management efficiently. The CBE-ECR has been proposed to increase data transmission and enhance data security to achieve detection rate 97.11%, accuracy ratio 95.09%, precision 98.06% effective   Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.