{'fraction_non_alphanumeric': 0.026734104046242775, 'fraction_numerical': 0.0, 'mean_word_length': 5.266968325791855, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Buffer-Aided Relaying for Two-Hop Secure Communication

We consider using a buffer-aided relay to enhance security for two-hop half-duplex relay networks with an external eavesdropper. We propose a link selection scheme that adapts reception and transmission time slots based on channel quality, while considering both the two-hop transmission efficiency and security. Closed-form expressions for the secrecy throughput and the secrecy outage probability (SOP) are derived, and the selection parameters are optimized to maximize the secrecy throughput or minimize the SOP. We then analyze two sub-optimal link selection schemes that in general only require a line search to solve the optimization problem, and we show that, under certain conditions, these approaches also admit closed-form solutions. All schemes are discussed in the context of two different scenarios where the relay either knows or does not know the channel to the legitimate receiver. In the former case, the relay adopts adaptive-rate transmission, whereas for the latter, it uses fixed-rate transmission. Numerical results show that buffer-aided relaying provides a significant improvement in security compared with conventional unbuffered relaying. Furthermore, the performance of the sub-optimal schemes is shown to approach the optimal one for certain ranges of signal-to-noise-ratio (SNR) or SOP constraints.