# Hamida

Quantization is a part of the process using Radio Channel Measurements to generate a secret key. Thereby the quantization is thereby the second step of the Key Generation, which can be considered by the Figure on the left side.The quantization is a signal processing function which maps a large set of numbers to a smaller set. Therefor it exists multiple different schemes. In this article, we want to introduce the Quantization Algorithm from Hamida et al. .

## Motivation

First quantization algorithms based on fixed threshold which is set by the two communication partners (i.e. Alice and Bob). The principle of this algorithm is as follows: Alice and Bob compare the estimated received signal to the shared threshold, if the amplitude of the sample is above the threshold the bit is set to 1 otherwise to 0. In some cases, the binary generated sequence is not really random. Therefore, the key is not secret and an attacker can easily break the secret key. Now Hamida et al. wanted to introduce a better quantization scheme.

## Key establishment with quantization

M should be the user who wishes to create a secret key. $\displaystyle h_M(t)$ is the length of the channel estimation, which when corrected, the length of the shared key is identical. The key generation algorithm can be described as follows.

First M estimates the noise variance N in the environment. This must be done when no activity was observed in his vicinity. The calculated value is set as the minimum threshold to reduce the probability of detecting bits by mistake. In this time the channel uses a known signal, which is given for example in a standard communication packet, to estimate the $\displaystyle h_M$ . Next M determines two thresholds $\displaystyle L_+ = max(h_M)$ and $\displaystyle L_− = min(h_M)$ . This threshold corresponds to the positive and the negative amplitude of the received signal. If a sequence is above the threshold ($\displaystyle h_M[i] > L_+)$ then the binary vector $\displaystyle BV_M(i)=1$ else if the sequence crossed the lower threshold($\displaystyle h_M[i] < L_−$ ) then $\displaystyle BV_M(i)=0$ . The position of the extracted bits is saved on a table of positions. Then M adjusts the threshold values: $\displaystyle L_+ = L+ + max(h_M) / δ$ and $\displaystyle L_− = L_− − min(h_M) / δ$ where δ is a protocol parameter. This process is shown vivid in the next Figure:

After this M repeats to calculate new thresholds boundaries and adjustments. This is done repetitive until the noise level is reached or the length of binary vector is equal to the secret key length (fixed at 128, 256 bits, or more). To guarantee that M has the same key candidate with the other communication partner an error correcting scheme is implemented. Therefore we suppose that B is the receiver and A is the emitter. In this case, A sends to B the index positions table. B compares the two tables (the one it computed and the other one it received from A) to find the disagreement bits which will be discarded and sends to A the positions of deleted bits.

A deletes the dissimilar bits and controls if the candidate key $\displaystyle K_A$ is equal to $\displaystyle K_B$ . Therfore, A chooses a node R then encrypts it with $\displaystyle K_A$ and sends the message $\displaystyle S_A = EK_A(R)$ to B, who decrypts the received message $\displaystyle SR_B = DK_B(S_A)$ adds one and sends $\displaystyle S_B = EK_B(SR_B + 1)$ . A decrypt the received message $\displaystyle SR_A = DK_A(S_B)$ and verifies if $\displaystyle SR_A$ is equal to her random node R+ 1. Then, an acknowledgement is sent to B to confirm the agreement or disagreement result.

## Key Renewal Process

After the key establishment, a process to renew the key is started. Therefor A calculates a node X, which must be contain a sufficient length and sends it encrypted to B, like mentioned before. Each node holds the condition $\displaystyle K = K_A \oplus X = K_B \oplus X$ where the $\displaystyle \oplus$ is bitwise XOR.