## 5 Experiments and Results
### Performance Evaluation
#### 5.2.2 Hardware Implementation Overhead  
The consumption of on-chip hardware resources by HIIMA proposed in this paper mainly comes from two parts:  
First of all, the Integrity Parameter Memory and Bitmap Memory inside the embedded processor consume a lot of storage space. Table 6 describes the storage space required for the reference information and bitmaps of the selected benchmarks. In Table 6, the size of the \(\text{CFI}_{\text{label}}\) is calculated by Equation (4). The more BBs the benchmark contains, the larger the size that is required for its \(\text{CFI}_{\text{label}}\). Since the \(\text{CFI}_{\text{label}}\) size of OpenECC is 16 bits, in order to facilitate the unified extraction of reference information, the \(\text{CFI}_{\text{label}}\) size of all benchmarks is set to 16 bits. The storage space of the \(\text{HI}_{\text{REF}}\), the storage space of the \(\text{FE}_{\text{Address}}\) Bitmap, and the storage space of the \(\text{BB}_{\text{Address}}\) Bitmap can be obtained by Equation (4). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Benchmarks** & **Direct Jump** & **Branch Jump** & **Return Address** & **Indirect Jump** & **Indirect Call** \\ \hline OpenECC & 100\% & 100\% & 91.2\% & 95.3\% & 95.4\% \\ SHA1 & 100\% & 100\% & 92.3\% & 96.5\% & 96.1\% \\ FFT & 100\% & 100\% & 90.4\% & 94.8\% & 94.3\% \\ CRC16 & 100\% & 100\% & 93.6\% & 95.6\% & 95.2\% \\ BasclMath & 100\% & 100\% & 94.6\% & 95.2\% & 96.3\% \\ AES & 100\% & 100\% & 94.5\% & 95.6\% & 94.8\% \\ Bitcount & 100\% & 100\% & 93.7\% & 94.3\% & 95.6\% \\ Blowfish & 100\% & 100\% & 92.8\% & 95.2\% & 97.9\% \\ Patricia & 100\% & 100\% & 96.2\% & 97.1\% & 96.8\% \\ QuickSort & 100\% & 100\% & 95.1\% & 96.8\% & 96.5\% \\ \hline Average & 100\% & 100\% & 93.4\% & 95.6\% & 95.9\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Statistics on the detection rate of control flow attacks. In Equation (4), Total\({}_{\text{BB}}\) is the total number of BBs. The total number of BBs for each benchmark can be found in Table 2. SIZE\({}_{\text{program}}\) is the size of the benchmark. The size of each benchmark can be found in Table 2. As shown in Figure 3, the size of the HI\({}_{\text{REF}}\) of each BB is 64 bits. Therefore, the storage space required for the reference information of each benchmark is the total number of BBs multiplied by 64 bits, and then converted into KB. According to the bitmap algorithm, we can map the address of the benchmark to points. Since we set one bit on the bitmap to correspond to 8 bytes, the data that originally occupied 64 bits now only occupy 1 bit. Therefore, the size of the bitmap is the size of the benchmark divided by 64. Because all addresses need to be traversed when creating the FE\({}_{\text{Address}}\) Bitmap and BB\({}_{\text{Address}}\) Bitmap, the size of the two bitmaps is the same. Total is the storage space required for the monitor model of each benchmark. The monitor model contains reference information and two bitmaps. Thus, the size of Total is the size of the reference information plus the size of the two bitmaps. The hardware-monitoring module (HMM) also consumes some on-chip resources. We use Xilinx ISE 14.6 to synthesize the secure embedded processor designed in this paper, and its hardware resource consumption is shown in Table 7. The logic resources consumed by the proposed HMM (excluding FPGA BRAM) account for about 10% of the SoC, while on-chip storage resources consume more than 90%. The reason is that all the monitor models are loaded into the on-chip memory, which causes the amount of on-chip memory resource overhead. To tackle this issue, monitor models can be encrypted and loaded into the off-chip memory. However, this requires the additional encryption and decryption algorithm modules on the chip [1,11], which also consume a certain amount of on-chip logic resources. In addition, since the off-chip security module will be attacked by side-channel attacks and physical attacks, the off-chip monitoring model cannot guarantee security. \[