Average Contiguous Duration (ACD)-Based Quantization for Secret Key Generation in Generalized Gamma Fading Channels

The wireless channel-based Secret Key Generation (SKG) algorithms aim at securing the wireless link against unauthorized eavesdropping by exploiting the channel’s randomness for generating matching secret keys at the legitimate nodes for message encryption/decryption. To counter differences in hardware and noise conditions at the legitimate nodes, which can lead to key mismatch, the SKG algorithms typically include the intermediate steps of sampling, quantization, information reconciliation, and privacy amplification. These steps collectively aim to improve the performance trade-offs between Key Generation Rate (KGR), Key Agreement Probability (KAP), and Secret Key Randomness (SKR) properties. This paper derives a closed-form expression for the Average Contiguous Duration (ACD) of Generalized Gamma (GG) fading wireless channels. The ACD is a recently introduced novel quantifier for characterizing the second-order statistics of fading channels, which includes Average Fade Duration (AFD) as its special case. The proposed GG fading ACD expression is shown to include, as its special cases, the ACD for commonly observed fading distributions such as Gamma, Nakagami- $m$ , and Rayleigh. By exploiting the derived GG ACD expression, a multi-level quantization scheme for SKG is proposed that determines suitable quantization intervals for identical likelihood of an equal number of consecutive channel samples falling in each quantization interval. A comprehensive comparative analysis of the proposed ACD-based quantization for SKG is conducted in relation to conventional Uniform Quantization (UQ) and Cumulative Distribution Function (CDF)-based Non-Uniform Quantization (NUQ) schemes. The presented numerical results confirm the superior performance trade-off between KGR and KAP offered by the proposed ACD-based quantization in relation to that offered by UQ and CDF-based NUQ.


I. INTRODUCTION
The rollout of 5 th Generation (5G) communication networks commenced in 2019 with Release-15 of 3 rd Generation Partnership Project (3GPP) [1]. Researchers around the globe have recently started articulating the essential needs and requirements that may emerge in the Beyond 5G (B5G) era The associate editor coordinating the review of this manuscript and approving it for publication was Ilsun You . and Physical Layer Security (PLS) has emerged as a promising solution for augmenting secure wireless communication in B5G and 6 th Generation (6G) wireless networks [2].
PLS has found applications in almost all emerging areas of modern wireless communications, such as, Unmanned Aerial Vehicle (UAV) communications [3], [4], Ultra-Reliable Low-Latency Communications (URLLC) [1], [5], and Intelligent Reflecting Surface (IRS) assisted communications [6] to name a few. Symmetric and asymmetric encryption are used VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ in most modern day wireless communications for securing information against malicious wireless nodes [7]. However, secret key distribution and management infrastructure could become challenging in some modern modes of communications like Device-to-Device (D2D) communications due to limited device resources [8]. This motivates the use of symmetric secret key extraction from the common wireless channel, which requires no assistance from the server. Secret Key Generation (SKG) is a PLS technique to extract symmetric secret keys at the legitimate nodes. It exploits the wireless propagation channel's randomness and requires channel reciprocity between the legitimate nodes as well as spatial independence between the multipath channel of legitimate nodes, and the multipath channel to the eavesdropping node [9]. The legitimate nodes (termed Alice and Bob in this work) alternately transmit probing signals to one another to independently measure the response of the main channel between them. Due to the underlying channel reciprocity, the channel observations of Alice X n and those of Bob Y n are highly correlated, whereas the eavesdropper (termed Eve in this work) measures independent channel observations Z n and therefore she cannot estimate the key bits extracted by the legitimate nodes [10]- [12]. The SKG algorithms typically consist of channel sampling (legitimate nodes sample the reciprocal channel by alternately exchanging probing signals), channel quantization (Alice and Bob decide on channel-range thresholding scheme for channel observations so that measured channel samples can be transformed to secret key bits), information reconciliation (Alice and Bob minimize mismatch between their extracted key sequences by exchanging samples indices or using parity check codes etc.), and privacy amplification (Alice and Bob use a family of universal hash functions to transform their matched sequences into a final key not known to Eve) [13]. The performance of SKG algorithms is generally evaluated in terms of Key Generation Rate (KGR), Key Agreement Probability (KAP), and Secret Key Randomness (SKR) properties [10], and the quantizer design significantly affects these characteristics.

A. RELEVANT WORK
Suitable quantizer design is of prime significance in the overall design of SKG algorithms as it significantly impacts the desirable SKG performance, i.e., increasing the KGR, SKR, and the KAP between the legitimate nodes [10], [14]. The SKG quantizers can be classified either as a Uniform Quantizer (UQ) or a Non-Uniform Quantizer (NUQ). In the UQ, the observed range of channel samples is divided into equal width quantization intervals and guard-strips of equal interval are placed equidistant from one another, whereas in NUQ the observed channel-range is divided into un-equal width intervals to attain some desirable characteristic such as identical occurrence probability of samples across the quantization intervals. An M -level UQ (M -UQ) divides the channel-range into M uniform quantization intervals, whereas an M -level NUQ (M -NUQ) divides the observed channel-range into M non-uniform qantization intervals. The number M is typically a power of 2. In [15], a 2-NUQ was proposed to exploit the Received Signal Strength (RSS) variations for SKG. The deep fades of the signal's envelope in a Rayleigh fading environment were used to construct a 2-NUQ to increase the SKR of the generated secret key. In [11], an Adaptive Secret Bit Generation (ASBG) quantization strategy was proposed by employing 2-UQ for effective SKG. In [12], a 2-UQ was proposed for Channel Impulse Response (CIR)-based SKG to generate secret key bits with high SKR and KAP at the cost of reduced KGR. In [16], the authors proposed to modify channel quantization for SKG as Channel Quantization with Guard-band (CQG) to effectively increase KAP, and Channel Quantization Alternating (CQA) to avoid the guard-band/guard-strip loss by using a bank of M-NUQ for SKG. In [17], SKG analysis was conducted for wideband channels and a quantization strategy was proposed that effectively increases KAP of secret keys between the legitimate nodes. In [18], a 2-UQ using vector quantization was proposed to minimize the disagreement between secret key bits extracted from those channel samples that lie on the quantization interval edges. In [19], a 2-UQ based on Lloyd-Max quantizer coupled with RSS pre-processing with sliding window averaging of channel samples was considered for efficient SKG. In [20], a Two Layer Secure (TLS) 2-UQ scheme was proposed with an intent to increase KGR using the correlated phase information of the wireless channel. In [10], an M -NUQ was proposed for Gamma distributed RSS channel samples to extract high entropy secret key bits from the wireless channel. In [21], 2-NUQ was used for Rayleigh channel to extract high entropy secret key bits from the envelope of the wireless channel. Most of the aforementioned quantizer designs have targeted increasing only the KAP of the legitimate nodes and little attention was given to jointly increasing the KAP and SKR. Furthermore, many of these quantizer designs are environment specific and lack generality in their design to be applicable to a wide variety of channel fading conditions.
In the existing literature for SKG, the 2-Level UQ strategy is commonly employed by determining the quantization thresholds from measured channel samples. In [22], the Channel Frequency Response (CFR) is utilized in a deep learning-based system for the Gaussian channel model by applying a 2-level NUQ scheme. An analytical framework for determining quantization intervals for SKG was recently proposed in [10] that employs a multi-level Cumulative Distribution Function (CDF)-based NUQ strategy intending to increase SKR performance in conjunction with KGR and KAP. In [21], a 2-level Average Fade Duration (AFD)-based quantization scheme is proposed for the Rayleigh fading channels. Recently, [14] proposed a novel quantifier named Average Contiguous Duration (ACD) for the characterization of wireless fading channels, and the Nakagami-m, Rice, and Rayleigh fading channels were investigated. The ACD metric can represent AFD as its special case. Multi-level quantization for SKG is one of the prime applications of the ACD metric. Nevertheless, there exists a wide research scope to thoroughly investigate the potential of the ACD metric for the quantization of fading signals for SKG under different practical fading conditions. The Generalized Gamma (GG) distribution was first proposed by Stacy [23] and later revisited as the α − µ distribution for modeling wireless fading channels [24]. The GG distribution can not only model a wide variety of channel fading types as its special cases, such as Rayleigh, Nakagami-m, Gamma, and Weibull, but it can also compositely model both the small-and large-scale fading [25]. In this context, this work models the wireless channels in the considered system model as GG fading channels. Table 1 summarizes the relevant literature on quantization schemes for SKG from wireless channel samples.

B. CONTRIBUTIONS AND PAPER ORGANIZATION
This work focuses on SKG quantizer design to jointly enhance KAP and SKR for the GG fading channel conditions. This makes the proposed analysis general and applicable to a variety of channel fading conditions. The key contributions are listed as follows.
• A closed-form expression for the ACD of GG fading channels is derived. The derived expression is shown to include the ACD of Gamma, exponential, Rayleigh, and Nakagami-m fading as its special cases.
• An ACD-based multi-level non-uniform quantization scheme for GG fading is proposed, which incorporates a mathematical framework to determine the bounding thresholds of guard and quantization intervals to attain identical ACD values across all quantization intervals.
• An improved SKG algorithm is proposed by employing the proposed ACD-based quantization scheme into some notable SKG algorithms.
• A comparative performance analysis of the proposed ACD-based non-uniform quantization scheme is conducted in relation to conventional uniform quantization and CDF-based non-uniform quantization schemes on the basis of the KGR, KAP, and the SKR metrics. The rest of this paper is organized as follows. Section II describes the considered system and channel model. Section III provides derivations for the proposed ACD-based quantization scheme. Section IV describes the proposed SKG algorithm and related key algorithmic and channel parameters. Section V provides numerical results for performance evaluation of the proposed quantization and SKG strategy. Finally, Section VI concludes this work.
Notational conventions are given in Table 2.

II. SYSTEM MODEL
Consider the wireless communication scenario shown in Fig. 1 in which Alice and Bob are the legitimate nodes who want to communicate securely in the presence of a passive eavesdropping node Eve, who does not disrupt their ongoing communications. Assuming a sufficiently rich scattering environment, the Eavesdropper channel between Alice and Eve will be decorrelated from the main channel between Alice and Bob provided that Eve's spatial separation from either legitimate node is as little as a fraction of the operating wavelength [9], [28]. The wireless channels between Alice and Bob are ideally considered as reciprocal, i.e., the channel from Alice to Bob is identical to that from Bob to Alice. However, due to the difference in hardware and noise conditions of Alice and Bob, their observation of the common channel between them may differ. Practically, these observations will be correlated random variables with similar statistical properties. Considering that Alice's channel is h a , Bob's channel can be related to Alice's channel by using the Gauss Markov model [10] as where ρ ∈ [0, 1] represents the correlation coefficient between h a and h b , which are modeled as correlated GG fading channels in this work. Furthermore, n • is the VOLUME 9, 2021 difference between Alice and Bob's observation of their common channel h and it can be modeled as n • ∼ N (0, σ 2 • ). The channel from Alice to Eve and Bob to Eve is h ae and h be , respectively, as indicated in Fig 1. The absolute value of channel envelope |h (·) | is used for SKG. However, for mathematical simplicity, we notate |h (·) | as h (·) for the rest of the paper, where the subscript (.) takes label from {a, b, ae, be}.
The Probability Density Function (PDF) of a GG-distributed channel envelope h (·) can be expressed as [24], [25], [29] where β is a fading parameter, (·) is the Gamma function [30], and = E[h β (·) ], where E[·] denotes the statistical expectation. The parameter c > 0 is the inverse of the normalized variance of h β (·) , which can be represented as where V [·] computes the statistical variance. This GG distribution can be used to represent various distribution types as its special case, e.g., Rayleigh (β = 2, c = 1), Nakagami-m (β = 2 and c = m), and Weibull (c = 1). The PDF in (2) can be used to determine CDF of GG fading envelope, which is given as [25] F(h (·) ) = γ c, where γ (·, ·) is the lower incomplete Gamma function [30]. The joint PDF of the GG fading channels observed by Alice and Bob can be expressed as [25] p(h a , where I c−1 (·) is the (c-1) th -order modified Bessel function of first kind and ρ ∈ [0, 1] is the correlation coefficient. The conditional PDF can be obtained by manipulating (2) and (5), as The conditional CDF can be obtained by integrating p(h a |h b ) over h a with appropriate limits to obtain where Q c (·, ·) is the Marcum-Q function of order c [31].

A. SECOND-ORDER FADING STATISTICS
Analytical expression for LCR N h (·) (q) and AFD τ h (·) (q) of GG fading channels with reference to an arbitrary envelope threshold q can be expressed as [25] where f m represents the maximum Doppler shift. The ACD of a fading signal is defined as the average time duration for which a signal contiguously remains within an interval defined by two bounding thresholds [14]. In Fig. 2, an example signal is illustrated for which computations of ACD for 2 different quantization intervals are shown. For the quantization interval Q 1 defined by the amplitude range from 0 to q − 1 , there are J = 3 contiguous duration instances (CDIs) indicated in the figure (i.e., labeled as δ Q 1 (1), δ Q 1 (2), and δ Q 1 (3)), which can be used to find ACD for this interval as Similarly, for the quantization interval Q 2 defined from q + 1 to q max (peak amplitude), there exist J = 4 CDIs labeled as δ Q 2 (1), · · · , δ Q 2 (4), which correspond to the computation of ACD as For the guard-strip interval G 1 from q − 1 to q + 1 , there exist a total of J = 6 CDIs for which the ACD can be computed as q 1 with reference to two arbitrary thresholds q 1 and q 2 (i.e., q 2 > q 1 ) in generic form (for any distribution type) can be defined in a rigorous way as [14] q 2 By substituting the CDF F(·) given in (4) and LCR N (.) (.) given in (8) into (10), closed-form analytical expression of ACD for the GG fading channels can be derived as This closed-form expression of the ACD for GG fading channels is one of the main contributions of this work. This analytical expression can represent the ACD of several distribution types as its special case, e.g., by substituting β = 2 and c = 1 in (11) it deduces to the ACD for Rayleigh distribution given in [14]. Table 3 provides further details. We define Cumulative Contiguous Duration (CCD) as the total time duration for which the channel envelope h (·) stays within the amplitude interval of interest (i.e., defined as bounded by q 1 and q 2 ) as where τ total is the total observed channel envelope time. This can be represented as a function of ACD, i.e., by multiplying ACD with number of CDIs and τ total as The CCD metric is of significance in conducting the performance analysis of SKG algorithm, e.g., in deriving expression for KGR. VOLUME 9, 2021

III. QUANTIZATION FOR SKG
Among the three conventional performance measures of SKG algorithms the SKR, which is quantified in terms of the National Institute of Standards and Technology (NIST) test suite [32], is the most critical. Ideally, an SKG scheme should generate a noise-like bit sequence with each generated bit equally likely to be 0 or 1. This requirement puts restrictions on the design of channel quantization and sample encoding steps of the SKG schemes. Channel quantization is usually performed either based on the PDF [10], the AFD [21], or channel parameters such as the sample mean µ computed from samples collected at Alice and Bob [11]. Recently, [14] has proposed the ACD as another important channel metric to determine suitable quantization thresholds for the channel samples to perform SKG. Fig. 3 plots the GG fading main channel variations separately for Alice and Bob. The h (·) variations observed at Alice and Bob are highly correlated due to the underlying reciprocity of the main channel. This allows the legitimate nodes to extract a secret key from the channel variations, unknown to Eve, even when their channel strength is weaker than that of Eve. To transform the channel variations such as those shown in Fig. 3 to a secret key sequence, the channel variations are first sampled. This is achieved by alternately sending probe signals between Alice and Bob within a channel coherence time (T c ) for the receiving node to measure its channel response. Since the channel response does not change during one T c , respective measurements of the main channel at Alice and Bob will be highly correlated and will contribute one channel sample for SKG. This process continues until sufficient channel samples are collected at both legitimate nodes to extract key sequence of the desired length. Let Alice and Bob each collect N channel samples, then the vector of samples R A collected at Alice can be expressed as  r ← rand (1) 3: , h b (i) 5: end for where [·] T represents the matrix transpose operation. Similarly the sample vector collected at Bob can be expressed as The corresponding array of sample index values for Alice is and for Bob the sample index array is To assist in simulation-based investigations, a method for generating correlated GG fading channel envelope samples is given in Algorithm 1, where the function rand(·) generates a number r uniformly distributed over the interval [0, 1] and solve(r = f (x), x) solves the equation for the unknown x.
The channel sampling step in SKG is followed by the quantization step, i.e., setting thresholds for transforming the measured channel samples into bit sequences. As shown in Fig. 3, Alice and Bob's estimates of the reciprocal main channel can be different but highly correlated. Alice and Bob then determine suitable threshold values to identify quantization intervals. To avoid the event that slightly differing channel samples near quantization thresholds fall in different quantization intervals at Alice and Bob leading to mismatch in the extracted key bits, a guard-strip of interval z is used between two quantization intervals and any sample that lies within this guard-strip is discarded [10]- [12]. The legitimate nodes can thus extract identical keys despite differing channel observations as long as the absolute difference between their channel samples is less than z. However, this requires determination of z and placement of its thresholds q ± i on the channel-range axis. Fig. 3 shows the quantization by a single node, where the observed channel-range is divided into M quantization intervals Q 1 to Q M separated by M − 1 guard-strips G 1 to G M −1 each of interval z defined as bounded by thresholds . Based on the quantization and guard-strip intervals determining strategy, the quantization can be classified into following categories.

A. UNIFORM QUANTIZATION (UQ)
For UQ the channel-range is quantized such that the guard-strips are placed at uniform intervals above and below the mean of the channel samples. The UQ strategy has been adopted in most of the measurement-based SKG algorithms [11], [12]. However, this scheme fails to satisfy the SKR requirements of the generated secret key when the underlying channel distribution is not uniform. The channel-range is defined as R c = q max -0, where 0 and q max represent the minimum and maximum values of the GG fading channel parameter, respectively. For M -level UQ scheme, the channel-range can be divided into M quantization intervals of equal length L Q by defining the M -1 separating guard-strips each of interval z such that which for given values of R c , M , and z can be solved for L Q as The lower thresholds q − i can then be computed as and the corresponding upper thresholds are computed as For an M -UQ, a sample is rejected (Rj.) with probability and accepted (Ac.) with probability P In NUQ, the channel-range is divided into quantization intervals of unequal widths (with the exception of uniformly distributed channel envelope) based on statistical knowledge of the wireless channel. Such a NUQ scheme can be based on CDF (or equivalently PDF) of the channel samples [10], [21] or it can be based on the ACD metric [14].

1) CDF BASED NON-UNIFORM QUANTIZATION (CDF-NUQ)
CDF-NUQ is characterized by the division of the channel-range into non-uniform quantization intervals such that the area under each quantization interval is equal. This corresponds to a single channel sample having identical probability of lying in any quantization interval. For M -NUQ, we define the M -CDF function as where F| b a is the area under the PDF curve from a to b, i.e., it represents the likelihood of a channel sample to fall in the quantization interval bounded by a and b. To ensure equal probability for each M quantization intervals, the M non-uniform quantization intervals are determined by setting guard-strip bounding thresholds q − 1 to q + M −1 such that where 0 ≤ ≤ 1/M . This can equivalently be expressed by using the distribution's PDF as [10], By manipulating M − 1 pairs of equations representing the PDF area of different quantization intervals, as provided in (24), the M − 1 thresholds {q − 1 , q − 2 , · · · , q − M −1 } can be computed. The fixed guard-strip interval z is added to lower bounding threshold of each guard-strip to obtain the upper bounding threshold, i.e., q + (.) = q − (.) + z. For M -level CDF-based NUQ, the total probability of rejected samples can be determined by adding the area of PDF curve associated to each guard strip as Similarly, the total probability of accepted samples can be determined, as P CDF−NUQ Ac.
(M ). The 2-CDF-NUQ quantizer with lower threshold q − 1 and upper threshold q + 1 = q − 1 + z can be expressed using Eq. (4) and Eq. (24) for the GG fading channels as which can be solved given values of c, β, and for the required q − 1 and q + 1 with guard-strip interval z. For M = 4 level CDF-based NUQ, the following equation are numerically solved for q − 1 , q − 2 , and q − 3 γ c, and the upper thresholds q + 1 , q + 2 , and q + 3 are computed by adding guard-strip interval z to each corresponding negative thresholds.

2) ACD BASED NON-UNIFORM QUANTIZATION (ACD-NUQ)
The ACD information can be exploited to perform channel quantization for SKG. The ACD can be used to determine the sample interval (or sample rate) required for ensuring a certain number of contiguous samples falling within a given quantization interval [14]. For example, by setting the sampling interval as /ϒ, on average ϒ contiguous samples will fall in the quantization interval spanning from q − (·) to q + (·) . The contiguous sample count (or excursion length) associated to the ACD can be computed as are labelled as δ Q 1 (1), · · · , δ Q 1 (3), whereas those above the threshold q + 1 are labeled δ Q 2 (1), · · · , δ Q 2 (4). Furthermore, as shown in Fig. 3 for the M -level quantization case, the aim is to set the guard-strip z and thresholds, q − 1 , q + 1 , · · · , q − M −1 , are equal. For M -level ACD-based quantization, the M -ACD functions is defined as To ensure equal ACD of all the M intervals, out of total 2M thresholds q ± (·) , after fixing q + 0 = 0 and q − M = q max , the remaining 2(M − 1) thresholds (see Fig. 3) can be computed such that where represents the ACD floor.
From the definition proposed in (13), the CCD of channel envelope h (·) for quantization interval Q i (defined as bounded by q + i−1 and q − i ) can be obtained as Similarly, CCD for the guard-strip interval G i (defined as bounded by q − i and q + i ) can be obtained as Subsequently, the Cumulative Accepted Duration (CAD) can be obtained by adding the CCD of all quantization intervals as Similarly, the total time duration for which the channel envelope stays in the guard intervals can be termed as Cumulative Rejected Duration (CRD), which can be obtained as The total observed duration of a signal under consideration can be represented as A simple exposition of the proposed M -level ACD-based quantization can be demonstrated for M = 2. The channel-range for M = 2 can be divided into two intervals such that By substituting q max = ∞ and q + 0 = 0 in (39) for GG fading channels, we get Considering the case of exponential distribution (i.e., β = 1 and c = 1) and no guard-strip (i.e., z = 0 and q − 1 = q + 1 = q), (40) can be rearranged for the separating threshold q as where the threshold q represents the median value for the considered case of exponential distribution. Similarly, considering the case of Rayleigh distribution (i.e., β = 2 and c = 1) and no guard-strip (i.e., z = 0 and q − 1 = q + 1 = q), (40) can be rearranged for the separating threshold q as This is consistent with the derivations conducted in [14] for Rayleigh fading channels; thus, it also establishes the validity of the conducted analysis.
After the channel quantization step, the quantized channel samples are mapped to the binary codes associated with each quantization interval, e.g., by using gray coding. These bit strings are sequentially concatenated to form the key sequence that is further processed by the information reconciliation step to generate the sequence of secret key bits. In this work the Bose-Chaudhuri-Hocquenghem (BCH) code [33] has been considered for the information reconciliation between the legitimate nodes.

IV. SECRET KEY GENERATION (SKG)
This section describes the SKG algorithm employing the proposed M -level ACD-based NUQ scheme.

A. QUANTIZATION AND GUARD INTERVALS
M − 1 guard-strips (i.e., G 1 , G 2 , · · · , G M −1 ) of interval z are introduced in the amplitude range (i.e., from 0 to q max ) separating M quantization intervals (i.e., Q 1 , Q 2 , · · · , Q M ). The guard and quantization intervals are defined according to the strategies presented in Sec. III-A, III-B1, and III-B2 for UQ, CDF-based NUQ, and ACD-based NUQ, respectively. The appropriate guard-strip interval z can be determined as a function of the mean squared error σ • between sample observations of the legitimate nodes, which is expressed as where k is a control parameter. The samples that fall in the guard-strip interval are termed as rejected samples, which are marked as • in Fig. 4. The rejected samples are not considered by the legitimate nodes for SKG. Whereas, the samples that fall in the quantization intervals are referred to as considered samples, which are marked as and accepted samples marked as • • • Fig. 4. The considered samples contribute to SKG subject to further processing of the algorithm. Excursion Qualification Length L: An excursion is defined by an occurrence of consecutive channel samples within one quantization interval. For example, Fig. 4 shows 4 excursions of different sample lengths in quantization interval Q 2 . The minimum excursion length L [12] represents the minimum number of consecutive channel samples required by an excursion to be considered valid for key extraction. Only the channel samples' excursions of length ≥ L are valid for SKG, while all the other excursions are discarded. (valid excursions may have more than one qualifying excursions of length L, see e.g., two consecutive excursions shown in Fig. 4). The parameter is pre-determined so that the legitimate nodes can reliably extract secret keys with maximal KAP. Considering Fig. 4 and assuming L = 3, 3 out of all 4 excursions (1 st , 2 nd , and 4 th ) above q + 1 shown in this figure will be considered for key extraction as each has length not less than L = 3 samples whereas the 3 rd excursion will be rejected as it does not qualify minimum excursion length requirement. In this context, in order to optimize the performance trade-off between KGR and SKR, we propose that the minimum excursion length threshold L may be suitably set with reference to the ACD floor value, i.e., L ∝ floor( ).

B. CENTRAL INDEX OF A QUALIFYING EXCURSION
This is the index of the centrally-located sample in a qualifying excursion. The central index is calculated as θ c = i start +i end 2 where i start is the index of first sample of a qualifying excursion and i end is the index of last sample of the same qualifying excursion. The function · rounds its argument to the nearest lower integer. In Fig. 4, the indices shown as • are central indices of their respective qualifying excursions.

C. MATCHING EXCURSION AND ACCEPTED SAMPLES
Due to the main channel being not ideally reciprocal, Alice and Bob may measure different central indices of some of the qualifying excursions. An excursion for which Alice and Bob successfully determine the same central index is termed as a matching excursion. The samples corresponding to the central indices of such matching excursions are termed as accepted samples, which are marked with •) in Fig. 4.
The generic steps for SKG are described below.
• Alice parses her observed channel sample vector R A to identify qualifying excursions of length L samples. Let there are u such excursions χ k A , k = 1 . . . u, which are collected in array χ A expressed as The array of central indices of these excursions is where θ k A is k th central index at Alice. VOLUME 9, 2021 • Bob repeats the above step to compute his own array of qualifying excursions and their central indices. Let there be v such excursions at Bob that are collected in array χ B expressed as The corresponding array of central indices at Bob is given by where θ k B represents k th central index at Bob. • Alice and Bob use indices exchange-based information reconciliation (IR) scheme. Alice first sends ∇ A to Bob, who compares ∇ A with ∇ B and places their common indices in the array ∇ of length w, which can be expressed as where w ≤ min(u, v) and min(·) returns the minimum of input arguments.
• Bob sends ∇ to Alice so that both have knowledge of central indices of their matching excursions.
• Using the indices in ∇, Alice and Bob transform their relevant channel samples in R A and R B into length L K bit secret key sequencesK A andK B , respectively. This mapping can be expressed aŝ where the function H(·) maps the channel sample value at its index argument into a bit sequence according to gray-code bit assignment of quantization intervals. Alice and Bob employ BCH coding-based information reconciliation scheme (BR scheme) as the second step after employing the IR scheme, i.e., the combination of IR and BR schemes is referred to as IBR scheme in Algorithm 2. This is applied on the respective extracted key-bitsK i to obtain matching secret keys K A and K B , i.e., Bob's key is reconciled with the Alice's key.

D. BCH CODES-BASED SECRET KEY RECONCILIATION (BR SCHEME)
To further increase the index-based key agreement probability K A between the legitimate nodes, BCH code-based reconciliation is applied. The (n, s, f ) BCH code converts blocks of s message bits into n-bit codewords, where each codeword contains (n − s) parity bits to correct up to f errors at the receiver. Alice divides her extracted secret key sequence into ℵ = L K s message blocks, where a single block is denoted as K A ℵ,s . At the BCH encoder output, each K A ℵ,s provides a BCH codeword C A ℵ,n = [K A ℵ,s | P A ℵ,n−s ], where P A ℵ,n−s denotes the (n − s) parity bits and [·|·] represents concatenation of row vectors. For each K A ℵ,s , Alice sends the parity block P ℵ,n−s to Bob. On the other side, Bob divides his sequence of secret key bits into ℵ message blocks of s bits each and appends to them the corresponding received blocks of parity bits to Algorithm 2 Proposed ACD-Based SKG With M -Level NUQ Parameter Definition: • Set M and k. • Estimate c, ρ, β, . Channel Sample Measurement: • Measure channel profiles R A and R B at Alice and Bob, respectively. Algorithm 1 may be used for simulations. M -ACD-based NUQ: • Compute bounding thresholds of M − 1 guard intervals by following the ACD-based NUQ strategy given in Sec.III-B2.
• Assign unique binary code to each quantization interval, e.g., by using Gray code. Initial Key Generation: • Set minimum excursion length to ACD floor (33), i.e, L = .
• Search R A and R B for qualifying excursions whose central indices are stored in ∇ A and ∇ B , respectively. Key Reconciliation: Step 1 -IR: • Alice sends ∇ A to Bob who compares it with ∇ B and records the matching indices in ∇.
• Bob extracts his secret keys from channel samples in R A indexed by ∇ and sends ∇ to Alice.
• Alice extracts her secret keys from channel samples in R A indexed by ∇.
• Alice and Bob store their initial secret keys asK A and K B , respectively.

Step 2 -BR:
• Alice and Bob use the same BCH code of block-length n bits to convert their respective keysK A andK B into ℵ message blocks each of length s bits, where ℵ = L K s . • Alice inputs its ℵ message blocks to a BCH encoder and the parity bits generated for each block are sent over the channel to Bob.
• Bob constructs ℵ BCH codewords by concatenating the received parity bits with its own ℵ message blocks.
• Bob inputs each of the ℵ codewords to a BCH decoder and the corrected message bits from each decoded codeword are concatenated to form final secret key K B , which is reconciled with the secret key of Alice.
generate ℵ n-bit long codewords C B ℵ,n = [K B ℵ,n | P A ℵ,n−s ]. Then Bob performs BCH decoding of these codewords to correct any discrepancies in his secret key sequence. From the decoded message bits the reconciled key K B ℵ,s is obtained, which is converted to the final key via P/S converter block. This procedure is illustrated in Fig. 5. The joint application of IR and BR schemes is referred to as IBR scheme.
The complete procedure for the proposed ACD-based SKG with M -level quantization is presented as Algorithm 2, which improves the SKG performance relative to the work of [12] as shown later in the numerical results section.  In contrast with lossless quantization in which each channel sample is considered for SKG, the quantizer in Algorithm 2 is a lossy quantizer because every sample is not used for SKG. The benefit gained by this lossy quantization is an increased KAP. The loss incurred by algorithm 2 in terms of number of rejected samples can be further categorized as follows.
• Guard-strip Loss (N GS Rj. ): A channel sample that falls inside a guard-strip at one legitimate node is not only itself rejected for SKG, but also its co-indexed sample at the other legitimate node gets rejected even though it may be in a quantization interval. The degree of reciprocity or correlation between observations by the legitimate nodes determines N GS Rj. , where a stronger correlation results in a smaller guard-strip interval z, and thus smaller N GS Rj. . • Mismatched Excursion Loss (N MME Rj. ): The SKG algorithm requires that Alice and Bob measure identical lengths of the true excursion in the main channel. If a qualifying excursion is observed simultaneously by Alice and Bob but they both estimate different central index, then that complete excursion is rejected for SKG.
and Cumulative Accepted Samples (CAS) as N CAS = N −N CRS .
In the next section on numerical results, the SKG performance shall be evaluated in terms of KGR, KAP, and SKR, which are numerically defined below.
• KGR (in bits/channel sample) is the ratio between the number of extracted secret key bits and total number of channel samples N The KGR can also be expressed as proportional to the ratio between the CAD and total observed channel envelope duration given in (36) and (38), respectively, as where L < 1 represents the cumulative loss in KGR imposed by samples rejection of SKG algorithm.
• KAP is the ratio between the number of matching key bits N M at the legitimate nodes and total length of secret key L K • SKR is quantified in terms of the P-values obtained in different tests of the NIST test suite.

V. NUMERICAL RESULTS AND DISCUSSION
This section presents a comprehensive numerical analysis of the proposed ACD-based NUQ scheme for SKG.  to increase which leads to reduction in K G performance.
The effect of change in and L on K G performance by employing the proposed ACD-based quantization scheme is shown in Fig. 7. The channel (i.e., c, ρ, and β etc.) and algorithm parameters (i.e. M , and z) set to obtain this plot are indicated in the caption of the figure. The fixed guard-strip of interval z = 0.5 is set and 2-ACD quantization scheme is employed to obtain this plot. It can be observed that with the increase in , the K G improves. This is because the increase in effectively reduces the area of the guard-strip which causes reduction in N GS Rj. . Moreover, it can also be observed that a decrease in L increases the K G which is because of the reduced number of rejected samples or excursions.

B. COMPARISON OF SKR PROPERTIES FOR UQ, CDF-BASED NUQ, AND ACD-BASED NUQ STRATEGIES
The randomness of the generated key bits is accessed by employing the NIST test suite. The test suite suggests 16 different tests which measure different behavioural aspects of a given sequence. Since some of the NIST tests require a large sample-size (e.g., > 10 6 samples), we have conducted 9 suitable tests namely frequency test, block frequency test, run test, longest run-of-ones test, discrete Fourier transform test, cumulative sum forward test, cumulative sum reversed test, binary matrix rank test, and Maurer test for studying the SKR of generated secret key bits, viz: Each test computes P-value, where P-value ≥ 0.01 is usually interpreted as a reasonably random sequence and the P-value ≤ 0.01 indicates a non-random sequence [32]. The outcome of these tests (i.e., in terms of P-value) is a function of both the channel and algorithm parameters. The impact of these parameters on the SKR for UQ, CDF-based NUQ, and ACD-based NUQ schemes is discussed in this section. Fig. 8 (a)-(i) show the impact of β, c, and L on the SKR performance of UQ, CDF-NUQ, and ACD-NUQ for fixed value of z. The variance of the fading distribution reduces with the increase in β which also transforms the fading distribution from a non-symmetric to a symmetric distribution about the mean value µ. For the setting of β = 1 and c = 1 (which represents exponential distribution), the area under the distribution curve on both sides of µ becomes equal. For this setting, both the NUQ schemes (i.e., CDF-and ACDbased) outperform UQ in terms of SKR properties, particularly for the NIST tests which emphasise on the proportion of number of 0's and 1's in a given sequence. For a fixed value of c, as the value of β increases from 1 to 2 (i.e., fading typing converging to Rayleigh), the SKR performance of UQ and ACD-based NUQ schemes improves, see e.g., notable improvement in frequency, block frequency, cumulative sum forward, and cumulative sum reversed tests. The SKR performance of CDF-based NUQ is only marginally influenced by the channel parameters, i.e., the CDF-based NUQ performs robustly under different channel conditions as long as the channel samples strictly follow the assumed underlying distribution type. In all the conducted tests, the SKR performance of both ACD-based and CDF-based NUQ schemes is superior to that of UQ. Furthermore, the SKR performance of ACD-based NUQ can be regarded as comparable to that of CDF-based NUQ.

C. PERFORMANCE TRADE-OFF BETWEEN KGR K G AND KAP K A FOR BOTH CDF-AND ACD-BASED NUQ
The trade-off between KGR and KAP is critical in evaluating the performance of SKG algorithms. In Fig. 9 (a)-(c),   both the KGR K G and KAP K A are plotted to evaluate the proposed M -ACD NUQ strategy. The impact of change in the guard-strip interval (i.e., controlled by k) and change in c for 2-and 4-level CDF-based and ACD-based NUQ schemes is studied. The K G performance of both the CDF-based and ACD-based NUQ schemes degrades with the increase in k, while on the other hand the K A improves. This is due to increased N GS Rj. and reduced likelihood of mismatches around a widening guard-strip. For different values of k, the K G and K A performance of 2-level CDF-based and ACD-based NUQ schemes can be observed as comparable. However, for 4-level quantization strategy, the ACD-based NUQ provides better performance trade-off between K G and K A compared to CDF-based NUQ. This is because the ACD-based NUQ incurs less N ME Rj. and N MME Rj.
compared to CDF-based NUQ for 4-level quantization strategy. Furthermore, the converse comparative performance trend between {2-and 4-level} CDF-based NUQ and {2-and 4-level} ACD-based NUQ can be observed for high values of k. This trend suggests that for the channel conditions represented by high normalized channel variance (i.e., smaller value of c), a low-level (e.g., 2-level) quantization strategy may be preferable over high-level (e.g., 4-level) quantization strategy for all acceptable settings of k.
The impact of correlation coefficient ρ on K G and K A performance is shown in Fig. 10 (a)-(b) for fixed guard-strip interval. Along the increase in ρ from 0 to 1, both K G and K A performance improves, that is because high values of ρ ensure the channel reciprocity assumption.
The grade of improvement offered in terms of KAP performance by the two considered key reconciliation schemes (i.e., IR and IBR), the K A performance is compared in Fig. 11 for different settings of ρ. For both the IR and IBR schemes, as the value of L and ρ increases, the K A performance improves. For different settings of ρ and L, IBR scheme is observed to provide best KAP performance than that provided by IR scheme alone, which is because IBR performs an additional step of key reconciliation which also has an associated cost of required computational complexity.
Determining the optimal value for the minimum excursions qualification threshold L is critical to enhance the overall performance trade-off between K G and K A . In this context, the impact of variations in L for different settings of guard-strip interval k on the performance trade-off between K G and K A for 2-and 4-level CDF-based and ACD-based NUQ is shown in the Fig. 12 (a)-(c). The overall K G performance for ACD-based NUQ can be observed better than that offered by CDF-based NUQ. In Fig. 12 (c) corresponding to L = 4, the SKG algorithm delivers high K A performance, i.e., key matching stays between 99 and 100% for different quantization schemes and for increasing value of the guard-strip interval k.
Increase in L causes improvement in K A performance and degradation in K G performance, so the optimal setting of L in practical scenarios is critical to achieve a good performance trade-off between K G and K A . From the on going analysis, it can be established that by setting L = 4, i.e., as equal to the ACD-floor level L = floor( ), the optimal performance trade-off between K G and K A can be achieved. The proposed M -level ACD-based quantization scheme can be deduced to represent the 2-level AFD-based quantization scheme proposed in [21] by substituting M = 2.

VI. CONCLUSION
In this paper, first, a closed-form expression of ACD for GG fading channels has been derived. Next, an ACD-based multi-level NUQ scheme for SKG in GG fading conditions has been proposed. The proposed quantization scheme has been employed with a notable SKG algorithm and performance analysis in terms of KGR, KAP, and SKR metrics has been conducted. Furthermore, a comprehensive comparative analysis of the proposed ACD-based NUQ scheme with conventional UQ and CDF-based NUQ schemes has been conducted. It has been established that ACD-based NUQ delivers a superior performance trade-off between KGR and KAP compared to both the UQ and CDF-based NUQ. Besides, it outperforms UQ and provides comparable performance to that of CDF-based NUQ in terms of SKR properties. This performance gain has been achieved by assuring a matching likelihood of samples falling in each quantization interval and an equal number of contiguous samples falling in each quantization interval.