# QuietPlace: An Ultrasound-Based Proof of Location Protocol with Strong Identities
## 8 Implementation  
The protocol was implemented as an application for Android-based smartphones. For the ultrasound communication between the prover and witness, Quiet for Android [31] was used. Quiet for Android is based on the digital signal processor liquid-dsp [32]. Quiet can be used either in frame layer mode, where messages are broadcasted as frames, or in UDP/TCP mode, where messages are send over the IP protocol. In our implementation the simple frame layer mode was used. Quiet supports many audio profiles, either audible or inaudible (ultrasound). It comes with some presets but also gives the opportunity for fine configuration and creation of custom profiles. Quiet Profile Lab [33] is an online tool that helps with testing user-defined configurations and extracting the configuration file for Quiet, easily creating a new profile. Before starting the implementation of QuietPlace, we set up two experiments in order to compare the performance of each preset profile in Quiet, except for \"cable-64k\", which is meant for transmission over a cable. We used QuietShare [34], a message sharing application for Android that uses Quiet in frame layer mode. The two devices we used were a Xiaomi Redmi Note 5 as a transmitter and a Samsung Galaxy S6 as a receiver. In the first experiment, we measured the maximum distance for which message reception is possible. The two devices were put in a way that the speaker of the transmitter is always facing the microphone of the receiver. As the purpose was to compare the different profiles, we kept the volume setting of the transmitter unchanged throughout the experiment. For each profile, we gradually moved the transmitter away from the receiver, each time sending the message \"testmessage\" and checking whether the receiver successfully received it or not, until message was no more received. The results are shown in the below table (Table 5). From the above table, we conclude that ultrasound-based profiles offer a far better performance in terms of receiving distance than audible profiles. In the second experiment, we measured the directionality of each profile. The receiver remained stationary during the experiment. We made sure that its speaker was always targeting the receiver and that the distance between speaker and microphone was 30 cm. For each profile, we rotated the transmitter around the receiver, 10 degrees at a time, sending the message \"testmessage\" each time and checking whether it was received or not. We consider as 0\({}^{\circ}\) the placement of the devices where the  
Figure 7: Man-in-the-middle (M) possesses the cryptographic keys of prover (P) and therefore is able to provide signed response (R) messages to the witness (W), without the need to retransmit them. speaker is facing the microphone and we count clockwise. We note the points where the message was received with '1' and the rest with '0'. The reception points are shown in Figure 8.  
Figure 8: Cont. In QuietPlace, the 'ultrasound-experimental' profile is used, which showed almost the biggest range and the smallest directionality in our tests. The ultrasound communication performed well in a room with normal noise levels. Also, the ultrasound profiles were found to be less vulnerable to noise. When the distance of the devices was below the maximum receiving distance, we rarely observed message loss. The sum of the time needed for the QuietPlace messages to be exchanged between a prover and a witness was about 32 s, which is acceptable when i.e., two people meet or when an employee sits at their office. However, it could be a problem for moving users. Also, the time is increased when more witnesses are present. During our tests with Quiet Profile Lab [33], the throughput of 'ultrasound' profile was measured at about 500-550 bps, explaining the above duration. Optimizing the throughput and speed of ultrasound transmission is out of the scope of this paper and is left for future research. The messages were represented as Java objects and were sent using the JSON format.