## 3 Material and Methods
### Authentication and Proximity Detection Framework  
Before the users interact with the matching users, they should carry out mutual recognition. Mutual recognition serves to find the matching users in the physical world and authenticate whether they are the matching people who interact with the user. Only after mutual recognition is complete can users safely interact with matched users. Therefore, a method to perform mutual recognition is a critical issue in the system. To explain mutual recognition, a framework is illustrated in Figure 2. This shows mutual recognition consisting of proximity detection and authentication. Proximity detection is used to measure the distance between the user and the matching person who interacts with the user. Proximity detection consists of 2 steps. The first step is a pre-processing step, which aims to reduce RSSI data fluctuations. The Kalman filter (KF), denoising autoencoder (DAE), and Kalman filter implemented autoencoder (KFAE) are used as methods that reduce fluctuation in RSSI data. Pre-processing models can be applied up to 2 times. The types of pre-processing are listed in Table 3, resulting in 1 raw and 7 pre-processed pieces of data after this step. It is worth noting that the pre-processing step is automatically carried out without additional human-based effort. This allows the system to be easily deployed to a new environment only with raw RSSI data. That is, the various pre-processed data and the classification models are automatically created and used to improve the accuracy of proximity detection. Eight classification models classify proximity levels with pre-processed data. The types of classification models are MLP, 1D-CNN, and SVM. By using 8 classification models, 8 results are obtained. The soft voting method of an ensemble technique is then applied to enhance classification accuracy. Finally, if the obtained proximity level is below the system-defined distance threshold, it means that the two users participating in the interaction are ready for mutual authentication.  
Figure 2: Framework for authentication and proximity detection process.  
Figure 3 shows the execution time when proximity detection is used in the system. \(T_{TP}\) is the train time of pre-processing models. \(T_{TC}\) is the train time of classification models. The point to note here is that \(T_{TP}\) and \(T_{TC}\) are the times that are executed only once before the system is applied. \(T_{Scan}\) is the time it takes to collect BLE signals to be used for proximity detection. \(T_{Pre}\) is the time taken to use pre-processing models to remove fluctuations in the collected RSSI values. \(T_{Cla}\) is the time taken to classify the 8 pre-processed data into 8 classification models. \(T_{Ens}\) is the time taken to classify the final proximity level using soft voting on the results of the 8 classification models. \(T_{Scan}\), \(T_{Pre}\), \(T_{Cla}\), and \(T_{Ens}\) are spent repeatedly each time proximity detection is used.  
After the proximity detection step is complete, a user ID is generated based on the user identity information, user location information, and time information in the digital twin. So, the ID is only valid at a specific location and time. In the authentication step, a token that is generated with the user's ID is used to authenticate the user's identity. Like this, tokens that use the ID are also only valid at a specific location and time. In the physical world, it is transmitted to the other user. When the user receives the token, it is passed to the user's digital twin. In the digital twin, the token received from the physical world is compared with the token it has. If these tokens are the same, authentication is successful.