# Secure Audio-Visual Data Exchange for Android In-Vehicle Ecosystems
## 3 Protocol and Results
### Test Scenarios and Results
#### 3.3.1 In-Door Experiments with Smartphones  
It was natural for us to expect that the success of the key exchange will decrease and the BER will increase with the distance. To get a more accurate image on the exact rate at which these values decrease and increase, we perform 30 indoors experiments with the Motorola E6 and Samsung S7 smartphones at different distances, i.e., 20 cm, 50 cm, 100 cm and 200 cm and depicted the results in Figure 10. The results confirm our expectations, the BER increases with the distance and the percentage of correct keys decreases. These changes are not linear and not identical between the devices due to the different hardware \begin{table}
\begin{tabular}{c c c} \hline \hline  & \multicolumn{2}{c}{**SPEKE-160 bit (secp160r1)**} \\ \hline
**Phone** & **Share** & **Recover** \\ \hline Motorola E6 Plus & 17 ms & 52 ms \\ Samsung Galaxy S7 Edge & 37 ms & 8 ms \\ Samsung Galaxy A3 & 18 ms & 13 ms \\ Google Nexus 7 & 17 ms & 7 ms \\ PXS head unit & 27 ms & 5 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Computational time of SPEKE in the pairing operation. Figure 9: Code snippet for the SPEKE protocol implementation in Java. with which they are equipped. For example, the increase and decrease are much more pronounced in the Motorola E6 when compared to the Samsung S7. We marked with green the results of the receiver app running on Motorola E6 and with black the results of the receiver app running on Samsung S7. Afterwards, with all the other smartphones we established three scenarios, with devices placed at different distances, i.e., 20, 50 and 100 cm (as shown on the left side of Figure 11) and frequency range between 16.7 kHz and 20 kHz. We have calculated the bit error rate (BER) for each pair of smartphones as follows: \(BER=\frac{m_{opt}}{m_{all}}\), where \(no_{err}\) is the number of wrongly received bits and \(no_{all}\) is the total number of received bits. In Table 4 we show the percentage of the correct key received and in Table 5 we show the BER for each distance. In some cases the BER is influenced by which smartphone is the sender and which is the receiver, e.g., in case of experiments at 20 cm between Samsung S7 and Motorola E6, when Samsung S7 is the sender and Motorola E6 is the receiver, the BER is 5.92% and when Motorola E6 is the sender and S7 is the receiver the BER is 0%. This behavior is also observed between Samsung A3 and Samsung S7 at 20 cm. For all in-door experiments scenarios the range of the BER is between 0% and 9.66%. In case of 50 cm and 100 cm, in our table we marked with \(NW\) the pair of devices, which are not able to receive all frequencies. In Figure 12 we depict a graphical representation of the results for our indoors experiments for each smartphone pair, except the Samsung S7-Samsung A3 pair where in some cases the exchange did not work. For each pair of smartphones, we have three bars marked with blue when the distance between devices was 20 cm, red for 50 cm and yellow for 100 cm. We depict on the abscissa the pair of smartphones using the following acronyms: N (Nexus), M (Motorola E6), S7 (Samsung S7) and S3 (Samsung A3). \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**20 cm**} & \multicolumn{6}{c}{**50 cm**} & \multicolumn{6}{c}{**100 cm**} \\ \hline \multirow{2}{*}{**Snd. **} & \multirow{2}{*}{**E6**} & \multirow{2  
Figure 11: Distance between phones at indoor measurements (**left**) and in-vehicle measurements (**right**).