A homomorphic encryption-based soft decryption method and secure semantic communication system
By using a soft decryption method based on homomorphic encryption, the loss of soft information and cliff effect caused by hard decryption are solved, improving the reconstruction quality and security of UAV image transmission, adapting to various channel conditions, and reducing computational and bandwidth overhead.
Patent Information
- Application Number
- CN202610752597.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-25
AI Technical Summary
Existing secure semantic communication systems suffer from soft information loss and cliff effects due to hard decryption, cannot adapt to the dynamic fluctuations of UAV links, and have high integration overhead on resource-constrained platforms, lacking uncertainty perception capabilities.
A soft decryption method based on homomorphic encryption is adopted. The log-likelihood ratio is extracted at the receiving end, the first moment and the second moment are calculated, and the homomorphic encryption decryption operation is used to propagate to the scaling domain. The posterior probability is calculated and mapped back to the feature space. The image is then reconstructed by combining it with an uncertainty-aware decoder.
It eliminates the decryption cliff effect, preserves channel soft information, improves reconstruction quality, reduces computational overhead, adapts to various channel conditions, maintains security, and is suitable for resource-constrained platforms.
Smart Images

Figure CN122640102A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of wireless communication security and semantic communication technology, and in particular to a soft decryption method and secure semantic communication system based on homomorphic encryption, which is applicable to scenarios where channel quality changes dynamically and privacy protection is required, such as UAV image transmission, IoT security sensing, and edge computing. Background Technology
[0002] With the rapid development of technologies such as drones and the Internet of Things, high-resolution images need to be transmitted between devices in real time via wireless channels. Drones rely on wireless channels to transmit images in missions such as disaster response, environmental monitoring, and military reconnaissance. However, wireless channels suffer from fading, interference, and path loss. Traditional separate source channel coding suffers from the "cliff effect": when the channel signal-to-noise ratio (SNR) is lower than the design threshold, the reconstruction quality collapses drastically and cannot adapt to the dynamic fluctuations of the drone link.
[0003] In recent years, Deep Joint Source-Channel Coding (DeepJSCC) has emerged as a promising approach in the field of semantic communication. DeepJSCC directly maps source images to channel symbols, avoiding the cliff effect of traditional separation schemes and achieving graceful quality degradation across a continuous SNR range. The SwinTransformer-based architecture further leverages multi-scale semantics, demonstrating superior performance.
[0004] However, the broadcast nature of wireless channels makes transmitted symbols vulnerable to interception by eavesdroppers. Existing secure semantic communication schemes have the following shortcomings: (1) Cliff effect in the encryption domain: Existing schemes use hard demodulation and hard decryption, and make hard decisions on the demodulation results at the receiving end, discarding the soft information provided by the channel. When the channel signal-to-noise ratio is lower than a certain threshold, decryption errors surge, reintroducing the cliff effect that semantic communication should avoid; (2) Loss of soft information: Existing encryption semantic schemes only output the decrypted integer plaintext, which cannot transmit the posterior uncertainty carried by the received signal. The decoder cannot distinguish between clean features and features affected by noise, resulting in a decrease in reconstruction quality. (3) High integration overhead: Existing methods that combine homomorphic encryption (HE) with semantic communication are either designed for classification tasks rather than high-quality image reconstruction, or require a lot of retraining and parameter expansion, making them difficult to adapt to resource-constrained UAV platforms; (4) Lack of uncertainty perception: Existing decoders process all features in a deterministic manner and cannot adaptively adjust weights according to the credibility of each element, resulting in severe distortion when the channel noise is high.
[0005] Therefore, how to preserve channel soft information and eliminate the decryption cliff effect in semantic communication systems while maintaining the security of homomorphic encryption is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0006] This invention proposes a soft decryption method and a secure semantic communication system based on homomorphic encryption, which solves the problems of soft information loss and cliff effect caused by hard decryption in existing secure semantic communication systems.
[0007] The technical solution of this invention is implemented as follows: The first aspect of this invention provides a software decryption method based on homomorphic encryption, comprising the following steps: The receiving end receives the modulation symbols transmitted via the wireless channel and extracts the log-likelihood ratio of each bit from each received symbol; Calculate the first and second moments of each ciphertext element based on the log-likelihood ratio; By utilizing the linear property of homomorphic encryption and decryption operations, the first and second moments are propagated to the scaling domain to obtain the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain. Based on the Gaussian mean and Gaussian variance, considering the periodic aliasing of the plaintext modulus, the posterior probability of each candidate plaintext value in the plaintext alphabet is calculated, and then the minimum mean square error posterior mean and posterior variance are calculated. The posterior mean is mapped back to the feature space as the soft decryption output, and the posterior variance is used as uncertainty information and input into the decoder for uncertainty-aware image reconstruction.
[0008] Specifically, the modulation symbol is a quadrature amplitude modulation symbol, and the formula for calculating the log-likelihood ratio is as follows: ; in, For the first The log-likelihood ratio of bits. and They represent the first The probability that a bit is 1 or 0; The first one received by the receiving end A QAM symbol, For the constellations, For noise power spectral density, , They represent the first The set of constellation points with positions 1 and 0.
[0009] Specifically, the method for calculating the first and second moments of each ciphertext element based on the log-likelihood ratio is as follows: Set ciphertext elements The binary representation of is: ; in, The first one encrypted by BFV One encrypted element; The number of bits in the ciphertext element. For the first The first ciphertext element 1 bit; Calculate the bit probability based on the log-likelihood ratio. : ; in, For the Sigmoid function; The first and second moments of the ciphertext element are as follows: ; ; in, and These are the first and second moments of the ciphertext element, respectively.
[0010] Specifically, the method of propagation using the linear property of homomorphic encryption and decryption operations is as follows: Let the decryption auxiliary component stored locally at the receiving end be... The BFV ciphertext modulus is BFV plaintext modulus is Scaling factor is ; Substituting the first and second moments of the ciphertext elements into the BFV linear decryption structure, we obtain the Gaussian mean and variance of the plaintext observations in the scaling domain: ; ; in, and These are the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain, respectively. For centralized operation, the module The result is mapped to the interval .
[0011] Specifically, the method for calculating the posterior mean and posterior variance of the minimum mean square error is as follows: Plaintext candidate values Mapped into the scaling domain An interval centered at a width of 1, and in Repeat periodically at multiples of , and calculate each plaintext candidate value. posterior probability : ; in, is a normalization constant that makes the sum of the posterior probabilities of all plaintext candidate values equal to 1; The number of replicas in the periodic aliasing; The cumulative distribution function of the standard normal distribution; Calculate the minimum mean square error estimate, i.e., the posterior mean and posterior variance: ; ; in, For the first The posterior mean of each plaintext element, i.e., the soft decryption output; For the first The posterior variance of each plaintext element is used as a measure of uncertainty.
[0012] Specifically, the method of using posterior variance as uncertainty information input into the decoder for uncertainty-aware reconstruction is as follows: posterior mean Mapping back to the semantic feature space yields the feature tensor. ; posterior variance Taking the logarithm yields To ensure numerical stability; In the decoder, the backbone network is first processed through a linear projection layer (Head). At the same time, a lightweight Sigma projection branch was added for processing. The two are then fused to obtain the input features of the decoder: ; The decoder processes data through a SwinTransformer or a convolutional neural network with SNR conditional spatial modulation. Finally, the reconstructed image is obtained. .
[0013] A second aspect of the present invention provides a secure semantic communication method based on homomorphic encryption, which, prior to the soft decryption method, further includes the following sending-end steps: The transmitting end extracts features from the input semantic signal x using a neural network encoder to obtain continuous semantic features z; The continuous semantic feature z is quantized into integer plaintext using a quantizer. ; Use the BFV homomorphic encryption algorithm to process integer plaintext. Encryption is performed to obtain the ciphertext component; The ciphertext components are mapped to QAM symbols via quadrature amplitude modulation and then transmitted to the receiving end via a wireless channel.
[0014] Specifically, the method also includes a model training method that employs a two-stage training strategy: Decoder adaptation phase: Freeze the semantic encoder parameters and train only the decoder, enabling the decoder to learn to utilize uncertainty information; End-to-end fine-tuning stage: Unfreeze all parameters and jointly optimize the quantization friendliness of the encoder and the robustness of the decoder; During training, the channel signal-to-noise ratio is randomly sampled from multiple preset discrete values to enable a single model to adapt to multiple signal-to-noise ratio conditions, and the training loss is the mean square error between the input image and the reconstructed image; For non-differentiable operations in encrypted pipelines, a pass-through estimator is used for gradient bypassing. The forward and backward computation methods are as follows: ; in, The hard decision value output by the quantizer; This is the posterior mean of the output from the software decryption. This indicates an operation that prevents gradient backpropagation; The combined feature tensor constructed by the pass-through estimator is equal to the soft-decryption output during forward propagation. It is used to provide soft information; during backpropagation, the gradient is only passed through hard quantized values. The data is transmitted back, bypassing the non-differentiable encryption and quantization steps, to achieve end-to-end training.
[0015] A third aspect of the present invention provides a secure semantic communication system based on homomorphic encryption, comprising: A semantic encoder is used to map an input image into a continuous feature vector; A quantizer is used to quantize the continuous feature vector into discrete plaintext; The BFV homomorphic encryption module is used to encrypt discrete plaintext into ciphertext. A QAM modulation module is used to map ciphertext into constellation symbols and transmit them via a wireless channel; The soft decryption module is used to extract soft information from the received QAM symbols and output the posterior mean and posterior variance. An uncertainty-aware decoder is used to reconstruct images based on the posterior mean and posterior variance.
[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method.
[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) Eliminating the decryption cliff effect: This invention uses continuous MMSE posterior estimation to replace traditional hard decision decryption. This mechanism converts discrete decryption errors into continuous signal degradation. At high signal-to-noise ratio, the posterior probability is concentrated near the real plaintext, and the soft output has sub-integer precision. At low signal-to-noise ratio, the posterior probability tends to be uniformly distributed, and the estimated value smoothly approaches the prior mean. It completely avoids the catastrophic error of "all or nothing", so that the reconstruction quality changes smoothly with the channel signal-to-noise ratio and no longer suffers from threshold collapse. (2) Preserving channel soft information: This invention preserves probability information throughout the entire decryption pipeline. Through moment propagation and posterior calculation, the posterior uncertainty (variance) of the received signal is passed to the decoder, enabling the decoder to adaptively weigh reliable and unreliable features, effectively converting discrete decryption errors into smooth and continuous degradation. (3) Significantly improves reconstruction quality: Experiments on the DIV2K image dataset and AWGN channel show that, under medium-high signal-to-noise ratio (≥13dB), the soft decryption of this invention achieves a peak signal-to-noise ratio (PSNR) gain of up to +3.10dB (at 30dB) compared to the hard decryption baseline, and a gain of +2.94dB at 19dB, with an average improvement of +1.25dB across all SNR points; reducing the performance gap between secure semantic communication and the unencrypted baseline from 8.85dB to 7.60dB; (4) Maintaining the same level of security: Soft decryption is performed entirely on the legitimate recipient using a locally stored secret key, without transmitting any additional information through the channel. Therefore, it has the same semantic security as hard decryption based on the loop learning error (RLWE) problem, and the key space reaches 2^192 (192-bit security level). Eavesdroppers only observe the QAM symbols corresponding to the ciphertext and cannot obtain soft a posteriori information; (5) Low computational overhead: The additional computational load added by software decryption (possibly involving 256 Gaussian CDF evaluations per element for t, with a total of 5 periodic replicas, i.e., 1280 CDF evaluations) is implemented on the GPU using the efficient torch.erf, with the additional time accounting for less than 5%. The addition of the SigmaProj layer only adds about 31,000 parameters (0.1%), making it friendly to resource-constrained platforms; (6) Strong generalization ability: The method of the present invention is not only applicable to the WITTSwinTransformer backbone, but also to the CNN-based DeepJSCC backbone; it is not only applicable to AWGN channels, but can be extended to Rayleigh fading channels by modifying the LLR calculation (introducing the fading coefficient). Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a secure semantic communication method based on homomorphic encryption according to the present invention.
[0020] Figure 2 This is a graph comparing the peak signal-to-noise ratio performance of the method of the present invention with that of existing solutions.
[0021] Figure 3 Comparison of reconstructed image quality between the method of this invention and existing solutions under different SNR conditions. Detailed Implementation
[0022] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0023] Reference Figure 1 The first aspect of this invention provides a secure semantic communication method based on homomorphic encryption, comprising the following steps: Step S1: The transmitting end (in this embodiment, a drone) extracts features from the input semantic signal x using a neural network encoder to obtain continuous semantic features. ;in The WITT structure, using the Swin Transformer skeleton, has embedding dimensions of [128, 192, 256, 320] and depths of [2, 2, 6, 2], and outputs a tensor. , L = (H / 16)×(W / 16), C = 96; Step S2: Use soft and hard quantizers Q(·) to quantize the continuous semantic features z into integer plaintext. ∈{0,1,…,255}; The quantizer adopts a temperature annealing strategy, annealing from σ=5 to σ=200, with a codebook size of N=256 and a quantization range of [-8,8]; Step S3: Use the BFV homomorphic encryption algorithm to process the integer plaintext. Encryption is performed to obtain the ciphertext component. The BFV parameters are: plaintext modulus t=256, ciphertext modulus t=256. Scaling factor Δ = q / t = 256, key dimension n = 192; Step S4: The ciphertext components are mapped to QAM symbols s via quadrature amplitude (64-QAM) modulation and then transmitted to the receiver through the AWGN channel. Each ciphertext element corresponds to... 1 bit, or 2 64-QAM symbols; Step S5: The receiving end (in this embodiment, a ground station) receives the quadrature amplitude modulation (QAM) symbol y transmitted via the wireless channel, and extracts the log-likelihood ratio (LLR) of each bit from each received symbol. The calculation formula is as follows: ; in, For the first The log-likelihood ratio of bits. and They represent the first The probability that a bit is 1 or 0; The first one received by the receiving end A QAM symbol, For the constellations, For noise power spectral density, , They represent the first The set of constellation points with bits 1 and 0; for 64-QAM, Bits; then the obtained LLR is reassembled bit by bit to obtain the bit probability information corresponding to each ciphertext element.
[0024] Step S6: Calculate each ciphertext element based on the log-likelihood ratio. The first and second moments are obtained by means of the following steps: Set ciphertext elements The binary representation of is: ; in, The first one encrypted by BFV One encrypted element; The number of bits in the ciphertext element (for the BFV scheme, ), For the first The first ciphertext element 1 bit; Calculate the bit probability based on the log-likelihood ratio. : ; in, For the Sigmoid function; Since the bits are conditionally independent given the received symbol, the first and second moments of the ciphertext elements are respectively: ; ; in, and These are the first and second moments of the ciphertext element, respectively; the calculation uses double-precision 64-bit floating-point numbers to avoid numerical problems caused by large bit weights.
[0025] Step S7: Utilizing the linear property of homomorphic encryption / decryption operations, the first and second moments are propagated to the scaling domain to obtain the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain; specifically, this includes the following steps: Let the decryption auxiliary component stored locally at the receiving end be... ( No noise and never transmitted), BFV ciphertext modulus is BFV plaintext modulus is Scaling factor is ; Substituting the first and second moments of the ciphertext elements into the BFV linear decryption structure, we obtain the Gaussian mean and variance of the plaintext observations in the scaling domain: ; ; in, and These are the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain, respectively. For centralized operation, the module The result is mapped to the interval Thus, the Gaussian approximation of plaintext observations in the scaling domain is obtained: .
[0026] Step S8, based on the Gaussian mean and Gaussian variance, considering the periodic aliasing of the plaintext modulus, calculate the posterior probability of each candidate plaintext value in the plaintext alphabet, and then calculate the minimum mean square error posterior mean and posterior variance; specifically including the following steps: Plaintext candidate values Mapped into the scaling domain An interval centered at a width of 1, and in ( The calculation is repeated periodically at multiples of ), and each plaintext candidate value is calculated. posterior probability : ; in, is a normalization constant that makes the sum of the posterior probabilities of all plaintext candidate values equal to 1; The number of replicas in the periodic aliasing (take) ); The cumulative distribution function of the standard normal distribution; Calculate the minimum mean squared error (MMSE) estimate, which is the posterior mean and posterior variance: ; ; in, For the first The posterior mean of each plaintext element, i.e., the soft decryption output (mapped back to the feature space). For the first The posterior variance of each plaintext element is used as a measure of uncertainty.
[0027] Step S9 involves mapping the posterior mean back to the feature space as the soft decryption output, and using the posterior variance as uncertainty information, inputting it into the decoder for uncertainty-aware image reconstruction; specifically including the following steps: posterior mean Mapping back to the semantic feature space yields the feature tensor. ; posterior variance Taking the logarithm yields To ensure numerical stability; In the decoder, the backbone network is first processed through a linear projection layer (Head). At the same time, a lightweight Sigma projection branch was added for processing. The two are then fused to obtain the input features of the decoder: ; in, For pre-trained linear projections, To add a new linear layer (with initial weights close to zero) The newly added parameters are only about [number missing]. (approximately % of the total parameters of the model) The decoder processes data via a SwinTransformer or a convolutional neural network with SNR conditional spatial modulation. Finally, the reconstructed image is obtained. .
[0028] Specifically, the method also includes a model training method that employs a two-stage training strategy: Decoder adaptation phase (phase 1): Freeze semantic encoder parameters and train only the decoder (including the SigmaProj layer), with a learning rate of... Cosine annealing schedule It consists of 20 rounds. The goal is to teach the decoder to utilize uncertainty information without interfering with the representations learned by the encoder. End-to-end fine-tuning phase (second phase): Unfreeze all parameters, encoder learning rate Decoder learning rate Cosine annealing scheduling with a gradient clipping norm of 1.0 is used for a total of 30 rounds. The aim is to jointly optimize the quantization friendliness of the encoder and the robustness of the decoder. During training, the signal-to-noise ratio is... Random sampling is used to achieve single-model deployment with multiple signal-to-noise ratios. Training loss. Mean squared error (MSE) between the input image and the reconstructed image: ; in, and These are the height and width of the image, respectively. and These are the input image and the reconstructed image, respectively. Since the encrypted pipeline (integer modulo arithmetic, random key generation, discrete QAM mapping) is not differentiable, a pass-through estimator (STE) is used for gradient bypass. Its forward and backward computation methods are as follows: ; in, The hard decision value output by the quantizer; This is the posterior mean of the output from the software decryption. This indicates an operation that prevents gradient backpropagation; The combined feature tensor constructed by the pass-through estimator is equal to the soft-decryption output during forward propagation. It is used to provide soft information; during backpropagation, the gradient is only passed through hard quantized values. The feedback bypasses the non-differentiable encryption and quantization steps, enabling end-to-end training. This bypass is only used for encoder gradient calculation during optional fine-tuning phases; the core soft-decryption forward inference does not rely on this bypass.
[0029] A second aspect of the present invention provides a secure semantic communication system based on homomorphic encryption, comprising: A semantic encoder is used to map an input image into a continuous feature vector; A quantizer is used to quantize the continuous feature vector into discrete plaintext; The BFV homomorphic encryption module is used to encrypt discrete plaintext into ciphertext. A QAM modulation module is used to map ciphertext into constellation symbols and transmit them via a wireless channel; The soft decryption module is used to extract soft information from the received QAM symbols and output the posterior mean and posterior variance. An uncertainty-aware decoder is used to reconstruct images based on the posterior mean and posterior variance.
[0030] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method.
[0031] Example 1: Secure Image Transmission in UAV Power Line Inspection Scenarios
[0032] This embodiment uses a UAV power line inspection scenario as an example. The ground control station needs to transmit high-definition images (resolution) to the inspection UAV in real time. The wireless channel is an additive white Gaussian noise (AWGN) channel, with the channel signal-to-noise ratio dynamically varying from 1dB to 30dB. The system employs BFV homomorphic encryption to protect the transmitted content and uses the soft decryption method proposed in this invention to achieve high-quality reconstruction. The specific implementation process is as follows: I. System Initialization and Parameter Configuration (1) Semantic encoder: The WITTSwinTransformer backbone network is adopted, with an embedding dimension of . Depth is Window size is 8, bottleneck channel number The encoder performs spatial modulation based on the channel signal-to-noise ratio (SNR) to achieve single-model multi-SNR adaptive modulation.
[0033] (2) Quantizer: Converts the features output by the encoder from the range linear scaling to 8-bit quantization is used. During training, soft assignment approximates hard quantization with temperature annealing, and the temperature parameter... The gradient increases linearly from 5 to 200 within 1000 steps; forward propagation uses a pass-through estimator to pass the gradient.
[0034] (3) BFV encryption parameters: plaintext modulus ciphertext modulus scaling factor Key Dimension Each plaintext element Independent encryption yields the first ciphertext component. Decryptor Stored locally at the receiving end, never transmitted. Encryption security is based on the RLWE problem, key space. .
[0035] (4) Modulation and Channel: 16-bit ciphertext integer The data is grouped into 6-bit blocks, mapped to 64-QAM constellation points using Gray coding, and transmitted through an AWGN channel. Channel signal-to-noise ratio. dB.
[0036] II. Software Decryption Process (Receiving End)
[0037] The receiver performs the following operations for each received QAM symbol: (1) LLR extraction: Calculate the log-likelihood ratio for each bit. ( For example, when the signal-to-noise ratio is 25dB, the bit error rate is less than 0.05%, and the absolute value of the LLR is relatively large; when the signal-to-noise ratio is 7dB, the bit error rate is about 27.7%, and the LLR is close to zero.
[0038] (2) Moment propagation: Calculate the first moment of each ciphertext element. and variance Double-precision floating-point numbers are used to avoid large bit weights. Numerical overflow.
[0039] (3) Linear transformation propagation: Calculate the mean and variance in the scaling domain, since the decryptor There is no noise; the variance comes only from the propagation of channel noise.
[0040] (4) Calculation of posterior distribution: Calculation of plaintext The posterior probability, taking the number of periodic replicas. Then calculate the posterior mean of the MMSE. and posterior variance .
[0041] For example, at a high signal-to-noise ratio (30dB), the posterior probability is concentrated around the true plaintext. Plain text close to an integer When the signal-to-noise ratio is close to 0, the posterior probability tends to a uniform distribution at low signal-to-noise ratios (1dB). ), It converged to 127.5. It converges to approximately 5461.
[0042] (5) Uncertainty perception decoding: Decoding the posterior mean After mapping back to the feature space, the data is input into the backbone of the decoder, along with the logarithm of the posterior variance. The input is the SigmaProj layer (a linear layer, input dimension 96, output dimension 320). The output of the SigmaProj layer is added to the output of the backbone Head, and then fed into the SwingTransformer decoder. The decoder reconstructs the image through signal-to-noise ratio conditional spatial modulation. .
[0043] III. Model Training
[0044] A two-stage training strategy is adopted: Phase 1 (Decoder Adaptation): Freeze the semantic encoder, train only the WITT decoder and SigmaProj layer, learning rate... Cosine annealing schedule This process consists of 20 rounds. This stage teaches the decoder to utilize uncertain information.
[0045] Phase Two (End-to-End Fine-Tuning): Unfreeze all parameters, encoder learning rate Decoder learning rate Cosine annealing scheduling with a gradient clipping norm of 1.0 is used for a total of 30 rounds. This stage jointly optimizes the quantization friendliness of the encoder and the robustness of the decoder. The training signal-to-noise ratio is... Random sampling is used, with a batch size of 2 and a loss of MSE.
[0046] IV. Experimental Results and Effect Verification
[0047] Figure 2 The graphs showing the PSNR versus SNR variation of the proposed solution and existing solutions on the DIV2K dataset further quantify and verify the superiority of the proposed solution. Figure 2 As can be seen, the method of this invention achieves usable quality earliest and with smooth growth. At 19dB, the PSNR of the proposed scheme (BFV Soft Decrypt) reaches over 25dB, while DeepJSCC-BFV is below 20dB, CKKS and EC-ElGamal are both below 10dB, and Arnold Chaos is between 10-15dB. Performance at high signal-to-noise ratios approaches the upper limit of no encryption. At 25dB, the PSNR of the proposed scheme exceeds 30dB, only slightly lower than the upper limit of no encryption; at 30dB, the difference further narrows to almost negligible. This proves that the MMSE estimation of the semi-soft decryption of this invention can effectively compensate for residual decryption errors without introducing additional bandwidth overhead.
[0048] Figure 3 This visually demonstrates the image reconstruction effects of the proposed BFV semi-soft decryption scheme and four existing encryption methods under different channel signal-to-noise ratio conditions; from Figure 3 It can be seen that the solution of this invention (BFV Soft Decrypt) is the only encryption scheme that can output visually usable images under medium to low signal-to-noise ratios (≤19dB). When the SNR is 19dB, the image reconstructed by the solution of this invention has clear contours and recognizable content (PSNR is 30.7dB), with only slight blurring; while the outputs of WITT-CKKS, EC-ElGamal, Arnold Chaos and DeepJSCC-BFV at the same time are all noisy or completely distorted images, and no semantic information can be identified.
[0049] V. Security and Cost Analysis
[0050] Security: The soft decryption of this invention is performed entirely at the legitimate receiving end using a locally stored secret key, without transmitting any additional information through the channel. Therefore, it has the same semantic security (192-bit security level) based on RLWE as hard decryption. Eavesdroppers can only observe the QAM symbols corresponding to the ciphertext and cannot obtain the soft a posteriori information.
[0051] Bandwidth overhead: BFV encryption expands 8-bit plaintext into 16-bit ciphertext. After 64-QAM modulation, the channel bandwidth ratio (CBR) is 0.333, which is approximately 5.3 times that of unencrypted semantic communication (CBR=0.0625). This overhead is inherent to the BFV scheme and is independent of software / hardware decryption.
[0052] Computational overhead: The CDF evaluation operations added by software decryption are efficiently implemented on the GPU using torch.erf, with the additional time accounting for less than 5%. The SigmaProj layer only adds 31,000 parameters.
[0053] Example 2: Encrypted Image Upload in IoT Security Sensing Scenarios
[0054] This embodiment considers images captured by Internet of Things (IoT) terminal devices (such as security cameras) and uploaded to a cloud analysis server via a wireless channel. The terminal devices have limited computing power, requiring low-power encrypted transmission; the cloud requires high-fidelity image reconstruction for subsequent analysis.
[0055] The system adopts the same BFV encryption and software decryption framework as in Example 1, but makes the following adjustments for the characteristics of the Internet of Things: (1) Encoder simplification: A lightweight CNN-based DeepJSCC encoder is adopted (including residual blocks and downsampling with a stride of 2, for a total of 16 times downsampling, and the number of channels is reduced). This reduces the computing burden on the terminal. (2) Channel Adaptive: The encoder integrates an SNR-based attention feature (AF) module, which can dynamically adjust the coding according to the real-time channel quality during deployment without retraining; (3) Cloud decoding: Deploy the uncertainty-aware decoder (WITT or DeepJSCC backbone) of the present invention in the cloud, receive encrypted QAM symbols from the terminal, perform soft decryption and reconstruct the image.
[0056] Example 3: Extended Applications in Rayleigh Fading Channels
[0057] This embodiment considers a drone flying in an urban canyon environment where the wireless channel exhibits Rayleigh fading. The soft decryption method of this invention can be naturally extended to Rayleigh fading channels by simply modifying the LLR calculation formula.
[0058] Assume the receiver knows the channel fading coefficient. (For coherent reception), the LLR calculation formula is modified as follows: ; The remaining soft decryption procedures (moment propagation, linear transform propagation, posterior calculation, and uncertainty-aware decoding) remain unchanged. Experiments show that, under Rayleigh fading channels, the PSNR gain of the method of this invention compared to hard decryption is similar to that under AWGN channels, demonstrating its robustness.
[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A soft decryption method based on homomorphic encryption, characterized in that, Includes the following steps: The receiving end receives the modulation symbols transmitted via the wireless channel and extracts the log-likelihood ratio of each bit from each received symbol; Calculate the first and second moments of each ciphertext element based on the log-likelihood ratio; By utilizing the linear property of homomorphic encryption and decryption operations, the first and second moments are propagated to the scaling domain to obtain the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain. Based on the Gaussian mean and Gaussian variance, considering the periodic aliasing of the plaintext modulus, the posterior probability of each candidate plaintext value in the plaintext alphabet is calculated, and then the minimum mean square error posterior mean and posterior variance are calculated. The posterior mean is mapped back to the feature space as the soft decryption output, and the posterior variance is used as uncertainty information and input into the decoder for uncertainty-aware image reconstruction.
2. The soft decryption method based on homomorphic encryption as described in claim 1, characterized in that, The modulation symbol is a quadrature amplitude modulation symbol, and the formula for calculating the log-likelihood ratio is as follows: ; in, For the first The log-likelihood ratio of bits. and They represent the first The probability that a bit is 1 or 0; The first one received by the receiving end A QAM symbol, For the constellations, For noise power spectral density, , They represent the first The set of constellation points with positions 1 and 0.
3. The soft decryption method based on homomorphic encryption as described in claim 2, characterized in that, The method for calculating the first and second moments of each ciphertext element based on the log-likelihood ratio is as follows: Set ciphertext elements The binary representation of is: ; in, The first one after BFV encryption One encrypted element; The number of bits in the ciphertext element. For the first The first ciphertext element 1 bit; Calculate the bit probability based on the log-likelihood ratio. : ; in, For the Sigmoid function; The first and second moments of the ciphertext element are as follows: ; ; in, and These are the first and second moments of the ciphertext element, respectively.
4. The soft decryption method based on homomorphic encryption as described in claim 3, characterized in that, The method of propagation using the linear property of homomorphic encryption and decryption operations is as follows: Let the decryption auxiliary component stored locally at the receiving end be... The BFV ciphertext modulus is The plaintext modulus of BFV is The scaling factor is ; Substituting the first and second moments of the ciphertext elements into the BFV linear decryption structure, we obtain the Gaussian mean and variance of the plaintext observations in the scaling domain: ; ; in, and These are the Gaussian mean and Gaussian variance of the plaintext observations in the scaling domain, respectively. For centralized operation, the module The result is mapped to the interval .
5. The soft decryption method based on homomorphic encryption as described in claim 4, characterized in that, The method for calculating the posterior mean and posterior variance of the minimum mean square error is as follows: Plaintext candidate values Mapped into the scaling domain An interval centered at a width of 1, and in Repeat periodically at multiples of , and calculate each plaintext candidate value. posterior probability : ; in, Let be a normalization constant, so that the sum of the posterior probabilities of all plaintext candidate values is 1; The number of replicas in the periodic aliasing; The cumulative distribution function of the standard normal distribution; Calculate the minimum mean square error estimate, i.e., the posterior mean and posterior variance: ; ; in, For the first The posterior mean of each plaintext element, i.e., the soft decryption output; For the first The posterior variance of each plaintext element is used as a measure of uncertainty.
6. The soft decryption method based on homomorphic encryption as described in claim 1, characterized in that, The method for uncertainty-aware reconstruction by using posterior variance as uncertainty information input into the decoder is as follows: posterior mean Mapping back to the semantic feature space yields the feature tensor. ; posterior variance Taking the logarithm yields To ensure numerical stability; In the decoder, the backbone network is first processed through a linear projection layer (Head). At the same time, a lightweight Sigma projection branch is added for processing. The two are then fused to obtain the input features of the decoder: ; The decoder processes data through a WinTransformer or a convolutional neural network with SNR conditional spatial modulation. Finally, the reconstructed image is obtained. .
7. A secure semantic communication method based on homomorphic encryption, further comprising the following sending-end step before the soft decryption method described in any one of claims 1-6: The transmitting end extracts features from the input semantic signal x using a neural network encoder to obtain continuous semantic features z; The continuous semantic feature z is quantized into integer plaintext using a quantizer. ; Use the BFV homomorphic encryption algorithm to process integer plaintext. Encryption is performed to obtain the ciphertext component; The ciphertext components are mapped to QAM symbols via quadrature amplitude modulation and then transmitted to the receiving end via a wireless channel.
8. A secure semantic communication method based on homomorphic encryption as described in claim 7, characterized in that, The method also includes a model training method, which employs a two-stage training strategy: Decoder adaptation phase: Freeze the semantic encoder parameters and train only the decoder, enabling the decoder to learn to utilize uncertainty information; End-to-end fine-tuning phase: Unfreeze all parameters and jointly optimize the encoder's quantization friendliness and the decoder's robustness; During training, the channel signal-to-noise ratio is randomly sampled from multiple preset discrete values to enable a single model to adapt to various signal-to-noise ratio conditions. The training loss is the mean square error between the input image and the reconstructed image. For non-differentiable operations in encrypted pipelines, a pass-through estimator is used for gradient bypassing. The forward and backward computation methods are as follows: ; in, The hard decision value output by the quantizer; This is the posterior mean of the output from the software decryption. This indicates an operation that prevents gradient backpropagation; The combined feature tensor constructed by the pass-through estimator is equal to the soft decryption output during forward propagation. It is used to provide soft information; during backpropagation, the gradient is only passed through hard quantized values. The data is transmitted back, bypassing the non-differentiable encryption and quantization steps, to achieve end-to-end training.
9. A secure semantic communication system based on homomorphic encryption, used to implement the steps of the communication method of claim 7 or 8, characterized in that, include: A semantic encoder is used to map an input image into a continuous feature vector; A quantizer is used to quantize the continuous feature vector into discrete plaintext; The BFV homomorphic encryption module is used to encrypt discrete plaintext into ciphertext. A QAM modulation module is used to map ciphertext into constellation symbols and transmit them via a wireless channel; The soft decryption module is used to extract soft information from the received QAM symbols and output the posterior mean and posterior variance. An uncertainty-aware decoder is used to reconstruct images based on the posterior mean and posterior variance.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in claim 7 or 8.