Secret Key Establishment Using Modified Quantization Log For Vehicular Ad-Hoc Network

— Traditional cryptographic approaches such as symmetric and asymmetric cryptography are commonly employed to solve network security issues. The Secret Key Generation (SKG) system has the advantage of extracting secret keys from a wireless channel's physical layer information. It allows two wireless devices within the transmission range to extract a shared symmetric key without the use of a fixed key distribution infrastructure, allowing vehicular ad hoc networks to exchange information (VANET). This study aims to create a secure data communication system on the Vehicular Ad-Hoc Network using RSS Key Generation. Starting from the Modified Quantization Log, the results of the Modified Quantization Log show that the average KDRM between Alice and Bob is the average KDRM between Alice and Bob is 9.4%; meanwhile, the average KGR is 71.4 bps. This shows that the number of bit mismatches after the Modified Quantization Log process between the two valid users is already small, because they have used the pre-processing process in front of them, namely using the Kalman Filter and from the results of the BCH Code to be matched again so that it becomes the key. The next process is Universal Hash which is tested with the NIST test. The NIST Test parameters used are approximately entropy, frequency, block frequency, longest run, cumulative sum forward, and cumulative sum reverse. The existing results are appropriate; namely, the threshold in p whose value is above 0.01 is achieved. From the results of the Average Approximate Entropy, it is found that the largest value is obtained by the 40k10ms scheme, which is 0.7352.


I. INTRODUCTION
One of the cornerstone pillars for the forthcoming 5G technological revolution is Intelligent Transportation Systems (ITS) [1]. Autonomous vehicles, in particular, are attracting a lot of attention because they don't require any human interaction. They can intelligently communicate with each other and with roadside units (RSU) to share real-time information thanks to the integration of in-vehicle sensing, communication, and networking capabilities. Vehicular ad hoc Networks (VANET), an important aspect of ITS, provide vehicle information exchange capabilities. For the targeted customers, this urban vehicle network ensures a variety of carbased services, such as road safety applications, smart traffic control, entertainment services, and so on. The notion of a linked car has been developed to give a practical autonomous system [2] [3].
Symmetric and asymmetric cryptographic techniques are conventional mechanisms that are widely used to overcome network security problems. Symmetric cryptographic schemes require a symmetric secret key distribution between two valid users before encrypting and decrypting data [4]. This scheme has low computation, but the problem lies in key distribution and key management. Key distribution risks include eavesdropping during the transmission process by third parties. The problem with key management is that it requires the generation of different keys for each communicating user. Asymmetric cryptography schemes, also known as public-key cryptography, require exchanging public keys and secret keys between users before sending information [5].
The Secret Key Generation (SKG) system is a symmetric cryptography option used on wireless communication devices with limited compute and power. The benefit of extracting a shared symmetric key using physical layer information from a wireless channel eliminates the need for a fixed key distribution infrastructure between two wireless devices within the transmission range [4] [6]. Received Signal Strength (RSS) [6] [7], Channel Impulse Response (CIR) [7] [8], and Channel State Information ( CSI) [9] are all metrics that can be used as information from the wireless network for symmetric secret key extraction at the physical layer. Wireless communications are susceptible to eavesdropping attempts due to the nature of broadcasting. Exploiting the Randomness of Wireless Channels for Communication Security has sparked a lot of research interest in this area. Alice and Bob, two genuine users, exchange encrypted communications using secret keys generated by Received Signal Strength (RSS). Part of the secret key is based on reciprocity, which claims that without interference or non-linear components, the channel impulse responses from Alice to Bob and Bob to Alice are nearly identical [9].
Three metrics can be used to assess the key generation system: key generation rate (KGR), key disagreement rate (KDR), and unpredictability [5]. KGR is the maximum number of bits that can be created in a given amount of time. A high KGR value is necessary for the key generation process in a cryptographic technique that requires a specific key length. KDR compares the total number of bits generated during the quantization process against the number of mismatched bits between Alice and Bob. The National Institute of Standard Technology (NIST) was employed to conduct the randomization test, which used the P-value parameter to evaluate confidence level. If the P-value is equal to 1, the resulting bit key will have complete Randomness. The parameter used in cryptography has a value of 0.01 [5]. If the P-value is high enough, the resulting key bit will meet the randomization requirement. [5].
The quantization scheme converts analog values into a binary sequence by comparing them with a qi reference threshold. For example, the quantization of sequence-1 with a gap, qg, is represented as where q1 is the threshold for sequence-1 quantization; km is binary quantified. When highorder quantization is adopted, several thresholds [q1, q2, •••] can be designed based on the HLog uv(m) dynamic range. A higher quantization sequence will increase the secret key generation rate but will result in serious key contention. Order and quantization gaps must be chosen carefully to balance the level of secret key generation and key disagreement [12].
Abhijit Ambekar and Hans D. Schotten [13], in their research on Enhancing Channel Reciprocity for Effective Key Management in Wireless Ad-hoc Networks, propose several methods to improve channel reciprocity. The proposed methods are l1 norm minimization, polynomial regression, and Kalman Filtering. These three methods are carried out before the quantization process (preprocess) in the SKG scheme with the aim of generating an effective secret key. The parameter used as information is the received signal strength indicator (RSSI). From the research results, this method can increase the reciprocity of RSSI so that the performance of the SKG scheme increases. This is because KDR decreased and KGR increased. In this case, the polynomial regression method produces the smallest percentage, while the l1 norm minimization produces the largest KGR value among the other three methods.
II. RESEARCH METHODOLOGY The proposed system is a Vehicular Ad-Hoc Network (VANET) SKG (Secret Key Generation) scheme, which is a secret key generation process based on Received Signal Strength (RSS). The starting with channel probing of RSS, pre-processing, quantization, Key Agreement, and Key Confirmation. If these steps have been done, then the key is obtained in the bitstream between Alice and Bob.
The quantization scheme converts analog values into a binary sequence by comparing them with a qi reference threshold. For example, sequence-1 quantization with a gap, qg, where q1 is the threshold for sequence-1 quantization; km is binary quantified. When high-order quantization is adopted, several thresholds [q1, q2, •••] can be designed based on the HLog uv(m) dynamic range. Order and quantization gaps must be chosen carefully to balance the level of secret key generation and key disagreement.
The performance of the proposed scheme is assessed based on several parameters, namely KDR, KGR, and Randomness.
KDR is defined as the percentage difference between Alice's generated key and Bob's generated key. KGR is defined as the number of bitstreams generated in each measurement per second. Randomness is a stream of key bits generated by a schema that normally must pass a NIST statistical test.

III. RESULT AND DISCUSSION
We outline our proposed system in this section. RSS channel probing, pre-processing, quantization, Key Agreement, and Key Confirmation are the four stages of our proposed method. Figure 1 depicts the proposed scheme in greater detail.

A. Channel Probing Of RSS
The first stage is channel probing [4], where Alice and Bob, as legitimate users, take advantage of the wireless environment to generate RSS estimates. Meanwhile, Eve, who intercepts all communication information on the wireless channel between Alice and Bob, intercepts all communication information on the wireless channel. Therefore, Eve can record the secret key used by Alice and Bob to exchange messages during transmission. The channel probing scenario is shown in Figure 2. The ping command, which employs the ICMP protocol, is used to collect RSS data between Alice and Bob. The channel information measured by Bob from Alice is assumed to be, whereas the channel information measured by Alice from Bob is assumed to be. On the other hand, Eve received channel information from Alice as well as bob because the distance between Eve, Alice, and Bob is greater than half the wavelength broadcast and [10]. Alice and Bob exchange information within a specific amount of time, as defined by the equation below (1).
The time interval for probing between these two users is dependent on the coherence time required for Alice and Bob to have the same RSS value. Coherence time is defined as the time limit for a channel's impulse response time that remains constant or does not change in wireless communication systems. This parameter must be addressed in the secret key generation technique in V2V communication to get a high correlation value. The effect of the Doppler shift must be taken into account when V2V communication between Alice and Bob involves speed, especially for fast movement. The coherence time is inversely proportional to the maximum Doppler frequency [11].
The performance of the system is tested by looking at the reliability of the system in generating keys. Where the key has a match level and a level of confidentiality. The test scenario is outdoor or being on the road. So that through the process of generating keys between nodes that move at different speeds for each measurement. The initial goal for the current implementation is to employ the Received Signal Strength (RSS) scheme by taking it directly into the field. However, data collection is not possible, and existing data will be used to complete the next procedure, with all data obtained being RSS data.
System measurements were carried out using a wireless USB adapter TL-WN722N, an IEEE802.11b/g/n standard wireless network with a frequency of 2.4 GHz used for communication. Alice acts as the initiator while Bob acts as the responder. Between Alice and Bob, a 3-meter space was maintained. On the other hand, Eve is a tapper around 3 meters away and moves in the same direction as Alice and Bob and the circumstances at the time of collecting, which included a non-congested route.
The speeds are 0, 20, 40, and 60 kilometers per hour. So that it may be determined quickly after the secret key generation procedure has been analyzed. The second parameter, which is based on different ping intervals, also affects the measurement data between the two nodes. In this case, the ping interval is set based on the calculation of the coherence time, which must be above the coherence time value within a certain speed with an interval value of 7 ms, 10 ms, and 20 ms.
Vehicle 1 and Vehicle 2 communicate in an Ad-hoc (peerto-peer) configuration and in the same channel. The RSS (Received Signal Strength Indicator) measurement process is carried out using the tcpdump command in monitor mode. Vehicle 1 will measure Vehicle 2's RSS signal strength, and Vehicle 2 will measure Vehicle 1's RSS signal strength during probing. When Vehicle 2 and Vehicle 1 get the same RSS signal strength, and the randomness condition is met. The key will be generated by Vehicle 1 to send a text message from Vehicle 1 to Vehicle 2 using a symmetric key where the key used for the text message encryption process will be the same as the key used to decrypt the message.
There are nine scenarios (A-I) that will be tested in secret key generation in Table I. In this scenario, there are two parameters, namely vehicle speed, and time interval. In the channel probing process, Alice and Bob send probing. The channel probing mechanism is recording RSS data using Wireshark or by using a data retrieval program with the python program, with periodic ping requests from Alice to Bob, as shown in Figure 3.  Figure 3 shows the channel probing mechanism that generates 3000 Alice and Bob's RSS measurement data. From the 3000 RSS, the next process is carried out, namely the quantization log in accordance with the quantization of the data above.

B. Kalman Filter Pre-Processing Test
The Kalman Filter algorithm will make the RSS value between the two nodes have a higher level of reciprocity so that the keys that both nodes will generate are the same. The way the Kalman Filter works is by estimating and using error covariance. The parameters that become the reference for the Kalman Filter are a priori estimate and posterior estimate.
In Python, the Kalman Filter process runs by updating and estimating for as many as aa blocks (in this example, 800). This process occurs up to 10 times. There is a program to show the level of correlation when measurement data is given a Kalman Filter and without a Kalman Filter to see the performance of this Kalman Filter.
In this test, the correlation between Alice, Bob, and Eve will be calculated. 2 parameters were used, namely speed and ping interval. This first test is carried out in conditions where Alice and Bob move at a certain speed, then Alice pings with a certain ping interval. The RSS of each node will be stored in a stamp file, and then Eve will enter the Ad-Hoc network and participate in capturing the RSS of the two nodes. The results of the RSS correlation when measuring and after the estimation is carried out in the Kalman Filter program are located in Table II. The data in Table II is obtained from the python program made by the author for the Kalman filter pre-processing program by calling the np.corrcoef command in python programming. The existing results are used as a comparison to see the differences in Figure 4.  Table II, the average correlation coefficient between Alice and Bob after using the Kalman Filter is 0.5936. Meanwhile, Eve's correlation coefficient with Alice and Bob is quite low, so it is very difficult for Eve to get the same RSS as Alice and Bob.
But indeed, there is also the Eve-Alice measurement result which is greater in RSS correlation than Alice-Bob correlation. It can be seen in measurement I (60 Km/hour 20 ms) the Eve-Alice correlation 0.214090 is greater than Alice-Bob, but this correlation does not stop at the measurement data, but there is a process that is carried out, namely the Kalman Filter process, the way it works is to estimate and use error covariance. So that in the first measurement, we get a good correlation between Alice-Bob, which is 0.885036, bigger than Eve-Alice.

C. Testing Modified Quantization Log
The quantization scheme converts analog values into a binary sequence by comparing them with a qi reference threshold. For example, sequence-1 quantization with a gap, qg, where q1 is the threshold for sequence-1 quantization; km is binary quantified. When high-order quantization is adopted, several thresholds [q1, q2, …] can be designed based on the HLog uv(m) dynamic range. Order and quantization gaps must be chosen carefully to balance the level of secret key generation and key disagreement. But this quantity is not suitable for RSS data which incidentally has minus (-) data, so that the existing RSS data must be made absolute so that it produces a key with poor Randomness. It is necessary to modify the existing algorithm.
The modified algorithm in the calculation of 10log10RSS, the existing results will be calculated the mean to be compared if the results of every 10log10RSS more than the mean will be converted to 1, and vice versa if less than the mean will be converted to 0. Modified Quantization Log Algorithm (1).

Modified Quantization Log Algorithm (1)
Input Although the number of bit mismatches in the existing alterations is small, they still exist and must be processed again. This mismatch should not be good in practice, but it can still be treated at the following stage, namely the key agreement using BCH Code. KDR quantization results (denoted as KDRM) vary for each scenario, as well as KGR results from the Modified Quantization Log as shown in Table III. Based on Table III show that the average KDRM between Alice and Bob is 9.4%. In comparison, the average KGR is 71.4bps. This shows that the number of bit mismatches after the Modified Quantization Log process between two legitimate users is small because they have used the preprocessing process in front of them before carrying out the Modified Quantization Log process. This data will be used in the next process; namely, Key Aggregation, using BCH Code to find out how many matched and equal bits are generated as keys.

D. BCH error correction test
After the Modified Quantization Log quantization process, then enter the Key Agreement, namely the BCH error correction test. The aim is to correct the remaining bit errors after the Modified Quantization Log quantization process in the BCH error correction test. This correction processing is done by checking each block (k), and in BCH, there is a limit for error correction that can be done for a certain length of k. In this case, the correction process is carried out with BCH (31.6), which means that the data will be checked per block with a block size of 6 bits. For n, k is 31.6, the error limit (t) that can be corrected is 7. The selection of the values of n and k is based on the error correction ability between the bit codewords Alice and Bob. Although the block size that is processed is too small, namely 6 bits per block, by using a Raspberry device, the computational time for such mathematical processing does not take a very long time. And the maximum correction size is also the highest value of various combinations of BCH codes when n is 31. The results of this BCH test can be seen in Table IV. Based on Table IV, it can be analyzed that the average error that still exists after the quantization process is more than 1512 errors. The error is an error when the input bit has become a 31-bit codeword. So by using BCH 31.6 and by checking through parity sent by Alice to Bob, the correction process is carried out on one of the nodes, namely Bob. Then Bob will send the index of the deleted block to Alice so that the bits generated after the BCH process become more equal with no errors generated.
The results obtained are that BCH is able to correct all processed blocks. For scenarios with a speed of 20 km/hour, the highest error is at an interval of 20 ms with a total of 1752 bits, and the lowest error is at an interval of 10 ms. When using correction with the BCH code, the BCH process is able to make corrections for all blocks that contain errors. And when the number of errors in the block is more than t or the maximum correction limit, it will be deleted.
In the scenario with a 40 km/hour speed, the 20 ms interval also has the most errors, but BCH can make corrections. And the lowest error is at the 7 ms interval of 1470. Likewise, for the 60 km/hour scenario with the lowest error being at the 20 ms interval, BCH can make corrections for all errors from the total block. In the correction process in this final project, blocks that have errors above t, and cannot be corrected by BCH will be deleted. So the error after BCH will be 0 or KDR 0%.

E. Universal Hash
After the BCH Code is processed, the resulting bits do not meet the randomness requirements. The entropy level of the bits generated by BCH will not always be high; consequently, a Universal Hash process is required, which will create a matrix or hash table that will be multiplied by bits sized according to the length of the key, resulting in high-entropy bits. In this case, the key length used is 256 bits.
After this is entered in NIST, NIST Test is used to determine the key to be used in the encryption and decryption process in symmetric cryptography for communication. There are several parameters in the NIST Test with a threshold of p whose value must be above 0.01. As a reference for determining the key, only the highest parameter is used from several keys that have been generated, or using a ranking of 1-3 keys is used. Only after that using sha-256.
To test the Randomness of the keys, used NIST test. The NIST Test parameters used are approximately entropy, frequency, block frequency, longest run, cumulative sum forward, and cumulative sum reverse. In order to pass the NIST test, the p-value must be greater than 0.01. Because there are 15 keys, using the NIST test can also determine which key will be used for the cryptographic process or a key winner. The results of the NIST Test can be seen in Table V. From the results of the Average Approximate Entropy in Figure 9, it is found that the largest value obtained by the 40k10ms scheme is 0.7352

Result Average Approxi mate Entropy
Result Average Approximate Entropy Figure 5. Graph of approximate entropy average results IV. CONCLUSION The results of the Modified Quantization Log show that the average KDRM between Alice and Bob is the average KDRM between Alice and Bob is 9.4%. In comparison, the average KGR is 71.4bps. This demonstrates that the number of mismatched bits following the Modified Quantization Log process between two genuine users is already low, as they used the pre-processing process in front of them, namely the Kalman Filter, before performing the Modified Quantization Log process. The combination of Modified Quantization Log and BCH Code shows that KDR has earned 0% between Alice and Bob. The bit results obtained on average are above 1512 bits, which means that the previous quantization process can fully generate a good key because when viewed, almost half more bits are suitable for quantization, from the results of the BCH code that can be processed to continue to become a key. The existing Universal Hash results have been tested with the NIST test. The expected results are appropriate, and namely, at the threshold in the form of p whose value must be above 0.01, it is achieved.

ACKNOWLEDGMENT
The author would like to thank profusely the author's supervisor and those who helped to carry out this research well.