## 6 Results and Discussion
### Performance Evaluation  
To show the efficiency of our proposal, a comparison with the related solutions is needed. To this end, our experiments are based on the study in [29], in which the authors provided a comparison between different key exchange protocols considering different metrics: Performance, Experiments, Disk space and Security. For an efficient comparison, we implement our SeKeQ protocol with the related solutions. Taking first, the SHC (Short Hash Code) using Diffie-Hellman key agreement with MD5 Hash. Secondly, the MANA (Manual Authentication) algorithm that actually use Diffie-Hellman for key exchange and HMAC for digital signature. The third solution, UMAC (Universal Message Authentication Code); the one-time authenticator based on HMAC with SHA1. Figure 3: Android interface of the proposed Internet of Things (IoT) device-to-device (D2D) secure communication protocol. We used Python Scripts for implementing the studied algorithms (SeKeQ, UMAC, MANA and SHC) to compare time lapse, memory size allocation, CPU consumption and network throughput during the calculation and generation of the shared secret key between users. The experimentation for comparison were made on virtual devices and were not implemented for Android OS.Implementation results are shown in Figures 4-8. The figure below shows the cryptographic operations involved in the calculation of the shared key between users of each protocol. Comparing the amount of time for generating keys with the energy consumption of the shared secret with the time needed for generating keys on different bandwidths for each of the studied protocols. Time generation is represented in milliseconds, while size in memory is represented in Megabytes. Whereas, The network throughput is represented in kilobytes per second (Kb/s). As known, one of the features of key based authentication, their ability to provide smaller key sizes as presented in Figure 5. In addition, their rapidity on generating keys that is done within seconds as illustrated in Figure 4. The MD5 hash used in SHC has 128 bits size of hash, it occupies 7 Mb during its 6 ms for key exchange. The length of the keys with HMAC as used in MANA can not surpass 20 bits, however it needs more than 8 Mb and remains the slowest with 40 ms when exchanging keys. While HMAC based SHA-1 proposed for UMAC algorithm is 160 bits and shows the same value in memory as the MANA while it takes 30 ms for key exchange. Finally, our protocol SeKeQ has 256 bits in length and we can obtain a better power and delay performance by representing 5.8 MB of key size allocation in memory and a perfect time for establishing the shared secret among devices with just 4 ms and shows good values compared to the others. Key size in memory has also an impact on the wireless channel performance, the more it is reduced, the more we get less communication overhead, less data overload, and better bandwidth on exchanging data among cellular devices. Figure 4: Key Generation Time for one-to-one communication for different protocols. Figure 5: Memory Size Allocation of key generation for different protocols. Key time generation by Bandwidth  
The results of CPU consumption are presented in Figure 6. We can notice that the consumption of our scheme represented by 22.7% is less than CPU usage of SHC how stands with 30%, MANA and UMAC with the large 50% usage. Accordingly, these outperformed results of Time generation, Memory consumption and CPU usage, prove that the key exchange can be performed efficiently on mobile devices. When fixing the bandwidth from low to high throughput in order to test the proposals in different situations, e.g., in environments with lower bandwidth. Figure 8 shows that the generation time increases when the bandwidth decreases since the data transmission time increases rapidly when network throughput decreases for all protocols.