## 8 Key Performance Evaluation
### Body Area Communication Scenario  
Our system focuses on IMDs, where they will be part of Body Area Networks [38] or using in-vivo (through living organisms) communications [39]. Both scenarios imply that the communicating devices are close to each other, mostly as it will be the case of an in-body to off-body communication. As a matter of fact, the patient's medical devices will be either controlled by hand or attached/implanted in the body, and while interacting with a doctor, they will be within a one-meter radius area of each other. Thus, no interaction is needed between distant devices. On the other hand, if there is a malicious third-party that intends to hack the system or eavesdrop, it will be quite distant from the target; unless performing a relay attack. Designed to communicate within a short range, the emitted signals from the devices are subject to a meaningful path loss [40] that limits the eavesdropper from intercepting the signal, increasing the probability of receiving erroneous bits in the intercepted packets. To prove this point, we achieved a simulation of the communication scenario between two devices where the first is implanted inside the human body and the second is outside. Body area communications differ from conventional Radio-Frequency (RF) communications due to the human body effect within the channel. Live tissue is a complex frequency-dependent dielectric material with relatively high permittivity and certain conductivity [41]. In this IMD case, the path loss model of the transmitted signal can be modeled with Equation (9) as follows:  
\[PL=Ae^{\alpha(d-d_{0})}+S; \tag{9}\]  
where \(d_{0}\) is the implant depth with a typical value of 1.5 cm, \(A\) is equal to 251, 188.6 and \(\alpha\) is equal to 8.8 m\({}^{-1}\). \(S\) represents the shadowing effect of the channel [42]. Most IMDs use only error detection algorithms in their wireless communication [32; 43]. Therefore, in order to establish the performance of the encryption scheme on this communication, we will find the Bit Error Rate (BER) as a function of the distance between the two devices. In our scenario, the error probability [42] is:  
\[P_{b}(\overline{\gamma})=\int_{0}^{\infty}P_{0}(\gamma)p(\gamma)d\gamma; \tag{10}\]  
where \(\overline{\gamma}\) represents the average Signal-to-Noise Ratio (SNR), \(P_{0}(\gamma)\) is the BER in an Additive White Gaussian Noise (AWGN) channel and \(p(\gamma)\) is the PDF of \(\gamma\). The path loss represents the fraction between the transmitted power \(P_{t}\) and the received power \(P_{r}\):  
\[P_{r}=\frac{P_{t}}{PL}; \tag{11}\]  
Therefore, we can define the SNR as a function of the path loss by:  
Figure 16: Change in Key Bits of 128 bit Length. \[\gamma=\frac{E_{b}}{N_{0}}=\frac{P_{r}/f_{b}}{N_{0}}=\frac{P_{t}}{N_{0}f_{b}} \times\frac{1}{PL} \tag{12}\]  
where \(E_{b}\) is the energy received per bit, \(N_{0}\) is the thermal noise power spectral density (PSD) and \(f_{b}\) is the data rate. The thermal noise PSD can be expressed as:  
\[N_{0}=k_{B}\times\left[T_{a}+(N_{F}-1)T_{0}\right]; \tag{13}\]  
where \(k_{B}\) is the Boltzmann constant, \(T_{a}\) is the human body temperature, \(T_{0}\) is the environment temperature and \(N_{F}\) is the noise figure of the receiving device. Having that, the PDF of \(\gamma\) is:  
\[p(\gamma)=\frac{1}{\sqrt{2\pi}\sigma\gamma}\exp\left(-\frac{(ln\gamma-\mu)^{2 }}{2\sigma^{2}}\right); \tag{14}\]  
with  
\[\mu=ln\overline{\gamma}-\frac{1}{2}\rho^{2}\sigma_{dB}; \tag{15}\]  
\[\sigma=\rho\times\sigma_{dB}; \tag{16}\]  
where \(\rho=\frac{ln(10)}{10}\) and \(\sigma_{dB}\) is the standard deviation of the distribution of the shadow fading. The result of the simulation is as shown in Figure 17 with parameters [42] as given by Table 4.  
As explained earlier, the communication range of these devices is not more than a meter of coverage. This close area is the normal operational range of any device that needs to communicate with the IMD, whether it is the case of an external wearable device or the doctor's control device.