Method and device for exchanging a cryptographic watermark of a remote sensing image
Patent Information
- Application Number
- CN202610875325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2046-06-17
AI Technical Summary
这类方法在一定程度上降低了明文直接暴露的风险,但在处理高分辨率、浮点值的遥感影像数据时,仍然存在适用性不足的问题:
(1)加密与水印操作的交换性及检测一致性。基于CKKS同态加密的线性保持特性,在预设数值误差范围内,明文域与密文域两种嵌入路径在解密后具有一致的水印检测结果,支持先加密后嵌入水印或先嵌入水印后加密的处理流程,从而避免水印嵌入与验证过程中明文数据的直接暴露,有效实现遥感影像全生命周期的数据隐私保护。
Smart Images

Figure CN122415311B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image security processing technology, specifically to a method and apparatus for remote sensing image exchange cryptographic watermarking based on spatial mapping and CKKS (Cheon-Kim-Kim-Song) homomorphic encryption, applicable to copyright protection, secure sharing and traceability verification of remote sensing images in encrypted form in cloud environments or untrusted third-party platforms. Background Technology
[0002] With the rapid development of high-resolution Earth observation technology, the ability to acquire remote sensing image data has grown exponentially. This image data not only contains high-value geospatial information but also involves national defense, resource exploration, and trade secrets, making it highly sensitive. To address the storage and computing needs of massive amounts of data, cloud-based remote sensing big data processing and distribution models have gradually become mainstream. However, in open cloud environments or on untrusted third-party servers, remote sensing images face risks of copyright infringement and privacy breaches during storage, transmission, and processing.
[0003] Currently, the main means of ensuring remote sensing data security are cryptography and digital watermarking. Cryptography prevents unauthorized access through encryption, while digital watermarking enables traceability of origin by embedding copyright information. In traditional security systems, these two are often independent. For example, to embed or verify encrypted images, it is usually required to first decrypt the ciphertext back to plaintext. This forces highly sensitive data to be exposed in plaintext form in memory or computing nodes, creating security risks throughout the data's lifecycle and failing to meet the data security requirements of a "zero-trust" architecture.
[0004] To address the aforementioned plaintext exposure problem, researchers proposed the Commutative Encryption and Watermarking (CEW) technique. This technique constructs encryption and watermark embedding operations with commutative properties, allowing data to be encrypted first and then watermarked, or watermarked first and then encrypted. After decryption, consistent or nearly consistent watermark detection results can be obtained, thus avoiding direct exposure of the original data during watermark processing to some extent. Therefore, this type of method is considered suitable for data security protection in cloud computing and third-party processing scenarios.
[0005] In realizing this invention, it was found that existing CEW-related research mainly focuses on general digital images, multimedia content, or simple signal scenarios, typically relying on traditional symmetric or partially homomorphic encryption mechanisms to complete watermark embedding and detection in the plaintext or semi-plaintext domain. While these methods reduce the risk of direct plaintext exposure to some extent, they still have insufficient applicability when processing high-resolution, floating-point remote sensing image data. First, there is the incompatibility between traditional cryptographic algorithms and watermarking operations. Typical encryption algorithms (such as AES and RSA) have a strong avalanche effect, which destroys the spatial correlation of image pixels, making it difficult to directly apply watermarking methods based on the spatial domain or transform domain. While weak encryption methods such as simple scrambling or XOR can maintain commutativity to a certain extent, they are not resistant to known-plaintext attacks and have insufficient security.
[0006] Secondly, existing homomorphic encryption schemes have limited adaptability to remote sensing data. Some methods are based on Paillier (semi-homomorphic) or BFV / BGV (integer fully homomorphic) schemes, but since remote sensing images and watermark signals are usually floating-point data, they need to be converted into integer form through amplification and quantization, which can easily introduce irreversible errors and cause ciphertext expansion, thus affecting image quality and system efficiency.
[0007] Furthermore, the efficient mapping mechanism for the CKKS homomorphic encryption scheme still needs improvement. As a homomorphic encryption scheme that supports floating-point approximation calculations, CKKS has the potential advantage in processing remote sensing images. However, in the current technology, there is still a lack of a mapping method that can balance the preservation of spatial structure and the efficient utilization of vector slots to support the parallel watermark embedding and detection of large-scale remote sensing images in the ciphertext domain.
[0008] Therefore, designing a method that can maintain the floating-point precision of remote sensing images, enable interchangeable encryption and watermarking operations, and support efficient processing of the ciphertext field has become a pressing technical challenge in this field. Summary of the Invention
[0009] This invention addresses the shortcomings of existing technologies by proposing a method and apparatus for exchanging cryptographic watermarks on remote sensing images. This method utilizes a vectorized mapping that preserves spatial locality through Hilbert curves, combined with the floating-point operations of CKKS homomorphic encryption and the parallel computing capabilities of SIMD. This enables high-precision watermark embedding and blind detection in the encrypted domain of remote sensing images, and achieves commutativity between encryption and watermark embedding operations within a preset numerical error range.
[0010] The technical solution adopted by this invention to solve its technical problem is as follows: On the one hand, a method for exchanging cryptographic watermarks on remote sensing images is provided, including the following steps: Acquire the original remote sensing image, normalize the original remote sensing image, and divide it into multiple non-overlapping image blocks of size N×N; For each image patch, a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence indices is established based on the Hilbert space-filling curve. The image patches are then converted into one-dimensional plaintext vectors according to the order of the one-dimensional sequence indices, where the size N of the image patch is a positive integer power of 2. ; The one-dimensional plaintext vector is encoded into a plaintext polynomial and encrypted using the CKKS homomorphic encryption scheme to generate a ciphertext block, wherein the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity. A watermark sequence with the same length as the one-dimensional plaintext vector is generated based on the watermark key, and zero-mean and strength control are performed to obtain the watermark vector. The watermark vector is encoded into a CKKS plaintext object, and slot-by-slot homomorphic addition is performed on the ciphertext block to obtain a watermarked ciphertext block, such that the decryption result is equivalent to the sum of the one-dimensional plaintext vector and the watermark vector within a preset error range, thereby realizing the commutativity of watermark embedding operation and encryption operation. The watermarked ciphertext block is decrypted and restored to a two-dimensional watermarked image block through the inverse mapping of the Hilbert space-filling curve. After stitching, the image is inversely normalized to obtain the watermarked remote sensing image.
[0011] This method normalizes and divides the original remote sensing image into blocks, uses Hilbert space-filling curves to map two-dimensional image blocks to one-dimensional vectors, preserving pixel spatial locality while matching the CKKS vector coding structure; utilizes CKKS homomorphic encryption to achieve ciphertext representation of floating-point data; embeds the watermark by constructing a zero-mean watermark vector and performing slot-by-slot homomorphic addition in the ciphertext domain; in the detection phase, correlation calculation is achieved through slot-by-slot homomorphic multiplication combined with cyclic shift and accumulation operations, without decrypting the original image; finally, the watermarked image is recovered through decryption and inverse mapping. The above process maintains consistency between the plaintext and ciphertext domain processing results within a preset error range, thus constructing a complete ciphertext domain copyright protection and verification mechanism.
[0012] On the other hand, an apparatus for exchanging cryptographic watermarks on remote sensing images is provided, including a preprocessing module, a spatial mapping module, a CKKS encryption module, a watermark generation module, a watermark embedding module, and a decryption module, for implementing the above method.
[0013] One of the above technical solutions has the following advantages or beneficial effects: (1) Interchangeability and consistency of encryption and watermarking operations. Based on the linearity preservation characteristics of CKKS homomorphic encryption, within the preset numerical error range, the two embedding paths in the plaintext and ciphertext domains have consistent watermark detection results after decryption. It supports the processing flow of encryption before watermarking or watermarking before encryption, thereby avoiding the direct exposure of plaintext data during watermark embedding and verification, and effectively realizing data privacy protection throughout the entire life cycle of remote sensing images.
[0014] (2) High precision and low distortion processing capability. The CKKS homomorphic encryption scheme natively supports floating-point arithmetic. Combined with normalization processing, it avoids the quantization and rounding errors introduced by integer-based homomorphic encryption, thus maintaining the radiometric accuracy of remote sensing images well. After watermark embedding, the image can still maintain a high peak signal-to-noise ratio, meeting the requirements of high-precision remote sensing interpretation.
[0015] (3) High-efficiency parallel processing capability of ciphertext. By combining the block strategy with the SIMD parallel computing mechanism of CKKS, each ciphertext block can be processed in parallel. Using pixel-by-pixel data significantly reduces the number of homomorphic operations compared to pixel-by-pixel processing, reducing the computational complexity to approximately the same level as the original. This increases the scale, thereby improving the efficiency of encrypted processing of large-format remote sensing images.
[0016] (4) Comprehensive performance improvement brought about by the synergy of multiple technologies. In this invention, the mapping method based on Hilbert space-filling curves maintains the spatial locality of pixels during vectorization, making the distribution of watermarks in the ciphertext domain more stable, which is conducive to improving the robustness of correlation-based detection; CKKS homomorphic encryption provides a computational basis for floating-point domain watermark embedding; the combination of block partitioning and SIMD parallel mechanism makes the overall scheme feasible in engineering implementation. The synergistic effect of the above-mentioned multiple technical features enables this invention to achieve ciphertext domain watermark embedding and detection process in untrusted environments while maintaining the high fidelity of remote sensing images, achieving a good balance between accuracy and efficiency, and demonstrating comprehensive performance superior to existing technologies. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for exchanging cryptographic watermarks for remote sensing images, according to an exemplary embodiment. Figure 2 This is a schematic diagram of a device structure for exchanging cryptographic watermarks for remote sensing images, according to an exemplary embodiment. Figure 3 This is a flowchart illustrating a technique for encryption and watermark embedding of remote sensing images according to an exemplary embodiment; Figure 4 This is a flowchart illustrating a watermark detection and decryption technique according to an exemplary embodiment; Figure 5 This is a visual comparison image of a decrypted watermarked image of an original remote sensing image and watermarked ciphertext, according to an exemplary embodiment. Figure 5 In the image, (a) is the original remote sensing image, (b) is the decrypted watermarked image, and (c) is a visual representation of the watermarked ciphertext. Detailed Implementation
[0018] To more clearly illustrate the technical features of the present invention, the invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Of course, these are merely examples and are not intended to limit the invention.
[0019] like Figure 1 As shown in the figure, an embodiment of the present invention provides a method for exchanging cryptographic watermarks on remote sensing images, comprising the following steps: Step 1: Acquire the original remote sensing image, normalize the original remote sensing image, and divide it into multiple non-overlapping image blocks of size N×N.
[0020] Step 1 specifically includes: normalizing the original remote sensing image and mapping the image pixel values to a preset real number range; determining whether the length and width dimensions of the original remote sensing image are integer multiples of the block size N, and performing edge filling processing on images that are not integer multiples; and dividing the filled remote sensing image into multiple non-overlapping image blocks of size N×N.
[0021] The normalization process preferentially adopts the formula. ,in These are the pixel values of the original remote sensing image. This represents the maximum value corresponding to the bit depth of the image data. The image is normalized; zero-fill or mirror fill is used for edge filling to ensure that the image size is an integer multiple of N.
[0022] Step 2: For each image block, establish a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence index based on the Hilbert space filling curve, and convert the image block into a one-dimensional plaintext vector according to the order of the one-dimensional sequence index.
[0023] Step 2 specifically includes: for each N×N image block obtained after block processing, establishing a bijective mapping relationship from two-dimensional pixel coordinates to one-dimensional sequence indices based on the Hilbert space-filling curve; extracting all pixel values within the image block according to the order of the one-dimensional sequence indices; arranging the extracted pixel values sequentially to construct a one-dimensional plaintext vector corresponding to the image block, wherein the size N of the image block is a positive integer power of 2, i.e. .
[0024] Wherein, the order p of the Hilbert space-filling curve satisfies The mapping function is ,in d is a one-dimensional index; the one-dimensional plaintext vector is .
[0025] Step 3: Encode the one-dimensional plaintext vector into a plaintext polynomial using the CKKS homomorphic encryption scheme and encrypt it to generate a ciphertext block, wherein the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity.
[0026] In this process, a one-dimensional plaintext vector is encoded into a CKKS plaintext slot structure to achieve parallel encapsulation of single-ciphertext multi-pixel data; each image block corresponds to a ciphertext block, and the encoding and encryption are completed using the SIMD parallel computing capability of CKKS. The length of the one-dimensional plaintext vector does not exceed the capacity of the CKKS plaintext slot.
[0027] Homomorphic encryption uses the CKKS public-key encryption mechanism, and the generated ciphertext blocks support subsequent homomorphic addition and homomorphic multiplication operations.
[0028] Step 4: Generate a watermark sequence with the same length as the one-dimensional plaintext vector based on the watermark key, and perform zero-mean normalization and strength control to obtain the watermark vector.
[0029] Generating a watermark sequence with the same length as the one-dimensional plaintext vector includes: initializing a pseudo-random generator using the watermark key K to generate a sequence of length K. The pseudo-random real number sequence is zero-mean-normalized and multiplied by the watermark intensity factor α to obtain the watermark vector W, where the d-th component of W corresponds to the watermark value at the d-th pixel position in the Hilbert mapping order.
[0030] Step 5: Encode the watermark vector into a CKKS plaintext object, and perform slot-by-slot homomorphic addition on the ciphertext block to obtain a watermarked ciphertext block, so that the decryption result is equivalent to the sum of the one-dimensional plaintext vector and the watermark vector within a preset error range, thereby realizing the commutativity of watermark embedding operation and encryption operation.
[0031] Specifically, the commutativity is manifested in the following ways: either watermarking is added to a one-dimensional plaintext vector before encryption, or encryption is performed first and then watermarking is embedded in the ciphertext domain through homomorphic addition. Both paths yield equivalent watermarked plaintext vectors within a preset error range, and the corresponding watermark detection results are consistent.
[0032] Step 6: Decrypt the watermarked ciphertext block and recover it into a two-dimensional watermarked image block through the inverse mapping of the Hilbert space-filling curve. After stitching, the watermarked remote sensing image is obtained by inverse normalization.
[0033] Wherein, the inverse normalization formula is , This is the temporary pixel matrix obtained by inverse normalization calculation. This represents the maximum value corresponding to the bit depth of the image data. To stitch together the normalized watermarked image, the above... The final remote sensing image is recovered by limiting the values to the valid range of the original remote sensing image.
[0034] Furthermore, the encrypted domain watermark detection steps include: Obtain the watermarked ciphertext block to be detected The watermark vector obtained in step 4 is encoded into a CKKS plaintext object. The product ciphertext vector is obtained by performing slot-by-slot homomorphic multiplication. ; right implement The next iteration of the shift and accumulation operations sums all slots together to the first slot, yielding the ciphertext scalar. ; Decrypting the scalar yields the relevant value. ,like If the value is greater than the preset threshold T, the watermark is considered to exist; otherwise, it does not exist.
[0035] The above process achieves encrypted domain copyright detection without decrypting the original image content.
[0036] Furthermore, a plaintext field watermark verification step is included after step 6: The decrypted one-dimensional image vector containing the watermark The correlation in the plaintext domain is obtained by calculating the inner product with the watermark vector W. ,Will The consistency of the ciphertext field detection results is verified by comparing them with the threshold T.
[0037] like Figure 2 As shown in the figure, an embodiment of the present invention provides a device for remote sensing image exchange cryptographic watermarking, comprising: The preprocessing module is used to acquire the original remote sensing image, normalize the original remote sensing image, and divide it into multiple non-overlapping image blocks of size N×N. The spatial mapping module is used to establish a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence indices based on the Hilbert space-filling curve for each image patch, and to convert the image patches into one-dimensional plaintext vectors according to the order of the one-dimensional sequence indices, wherein the size N of the image patch is a positive integer power of 2, i.e. ; The CKKS encryption module is used to encode the one-dimensional plaintext vector into a plaintext polynomial and encrypt it using the CKKS homomorphic encryption scheme to generate a ciphertext block, wherein the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity. The watermark generation module is used to generate a watermark sequence with the same length as the one-dimensional plaintext vector based on the watermark key, and to perform zero-mean normalization and strength control to obtain the watermark vector. The watermark embedding module is used to encode the watermark vector into a CKKS plaintext object and perform slot-by-slot homomorphic addition on the ciphertext block to obtain a watermarked ciphertext block, so that the decryption result is equivalent to the sum of the one-dimensional plaintext vector and the watermark vector within a preset error range, thereby realizing the commutativity of watermark embedding operation and encryption operation. The decryption module is used to decrypt the watermarked ciphertext block and restore it to a two-dimensional watermarked image block through the inverse mapping of the Hilbert space filling curve. After stitching, the watermarked remote sensing image is obtained by inverse normalization.
[0038] The watermark embedding module supports two embedding paths: the plaintext field embedding path first embeds the watermark into the one-dimensional plaintext vector and then encrypts it; the ciphertext field embedding path first encrypts the one-dimensional plaintext vector and then embeds the watermark through homomorphic addition. The two paths yield equivalent watermarked plaintext results within a preset numerical error range, and the corresponding watermark detection results are consistent within the preset error range, thereby achieving commutativity between encryption and watermark embedding operations.
[0039] The CKKS encryption module utilizes the SIMD encoding slots of the CKKS scheme to encode the one-dimensional plaintext vector. Each pixel value is encoded into the same plaintext polynomial, so that a single ciphertext block encapsulates all pixel information of an image block, and the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity.
[0040] This invention uses remote sensing image data as the processing object. First, the remote sensing image is normalized and segmented. Then, a spatially localized mapping method is used to convert two-dimensional image blocks into one-dimensional vectors, enabling them to be effectively encapsulated into vector slots of the CKKS homomorphic encryption scheme. Subsequently, the image vectors are homomorphically encrypted, and watermark information is embedded in the ciphertext domain without decrypting the image data. Based on the linearity-preserving properties of CKKS homomorphic encryption, the result of watermark embedding in the ciphertext domain is equivalent to the result of embedding the watermark in the plaintext domain before encryption, within a preset numerical error range, thus achieving commutativity between encryption and watermark embedding operations.
[0041] In the watermark detection stage, this invention performs correlation calculation in the encrypted domain through slot-by-slot homomorphic multiplication combined with cyclic shift and accumulation operations. This extracts watermark features without decrypting the original remote sensing image, enabling copyright authentication under privacy protection conditions. Simultaneously, after image decryption, watermark extraction and verification are completed through correlation analysis based on the same spatial mapping and vectorization method. This ensures that the watermark detection results of the remote sensing image remain consistent within a preset error range in both plaintext and encrypted states, making it suitable for secure sharing and copyright management in untrusted computing environments.
[0042] (I) Remote sensing image encryption and watermark embedding like Figure 3 As shown, the specific implementation process of remote sensing image encryption and watermark embedding is as follows.
[0043] Step 1: Normalization and Grid Partitioning. This step standardizes the pixel values of the raw remote sensing data and converts them into a block structure of uniform size, providing a data foundation suitable for homomorphic encryption for subsequent spatial mapping, ciphertext calculation, and watermarking operations.
[0044] First, data reading and normalization. Raw remote sensing image data or high-precision products typically use a high bit depth (such as 12-bit or 16-bit). To avoid amplifying approximation errors caused by excessively large numerical scales during CKKS calculations, normalization processing is required to map pixel values to the [0,1] interval. The specific formula is as follows: (1), Secondly, edge filling and block processing are performed using the same methods as the steps described above, and will not be repeated here.
[0045] Step 2: Spatial mapping encoding based on Hilbert curves. The purpose of this step is to convert the two-dimensional remote sensing image patch obtained in Step 1 into a one-dimensional vector representation to adapt to the SIMD (Single Instruction Multiple Data) coding structure of CKKS homomorphic encryption, and to preserve the spatial local structural features of the image as much as possible during the vectorization process.
[0046] First, construct the mapping index. Set the order of the Hilbert space-filling curve to 1. , making Establish a mapping: (2) , Secondly, vectorized rearrangement. This involves iterating through all pixels in each image and rearranging them according to their indices. From 0 to Extract pixel values sequentially to construct a one-dimensional plaintext vector. : (3), In equation (3), through this mapping, spatially adjacent pixels in a two-dimensional image are mapped to vectors. Maintaining proximity storage reduces the destruction of spatial structure information during vectorization, providing a stable structural foundation for subsequent watermark embedding and detection.
[0047] Step 3: CKKS Homomorphic Encryption to Generate Ciphertext Image. This step encodes and encrypts the one-dimensional plaintext vector obtained in Step 2 into a CKKS ciphertext vector that supports approximate real number operations, ensuring the remote sensing image data remains encryptable while maintaining its computability. In this embodiment, the polynomial degree of the CKKS scheme is chosen to be 8192, and the scaling factor is 2.40 The number of plaintext slots is 4096, which is exactly equal to the number of pixels in the image block, thus achieving full-slot encoding.
[0048] First, encoding. Using the CKKS encoding mechanism, the one-dimensional plaintext vector is... Mapped to plaintext polynomial It is embedded into the CKKS plaintext slot structure.
[0049] Then, the plaintext is encrypted. This is done on the plaintext polynomial. Perform encryption operations to generate the corresponding ciphertext blocks. At this point, a ciphertext object encapsulates all the pixel information within a single image patch and supports subsequent homomorphic computation operations.
[0050] Step 4: Watermark Sequence Generation and Strength Control. This step generates a watermark sequence with a structure consistent with the image data and controlled numerical values, providing a unified watermark benchmark for subsequent watermark embedding in the plaintext or ciphertext domains.
[0051] First, the watermark sequence is generated. This is done using the watermark key. Initialize the pseudo-random generator, generating a length of... A pseudo-random real number sequence is used as the basic watermark signal. This pseudo-random real number sequence is repeatable under the same key condition, ensuring consistency between watermark embedding and detection.
[0052] Secondly, the watermark sequence is zero-mean and its intensity is controlled. The pseudo-random real number sequence is mapped to a real number sequence with a mean of 0, and a watermark intensity factor α is introduced to control its magnitude, resulting in a watermark vector. Among them, the watermark vector The length of the watermark is consistent with the length of the one-dimensional image vector corresponding to a single image block, and is used to control the perturbation amplitude of the watermark on the image values. The preferred range of the watermark intensity factor α is 0.01~0.1.
[0053] Then, the watermark index consistency is defined. Watermark vector. Define the one-dimensional image index order as determined in step 2, so that the d-th component in the watermark vector corresponds to the d-th image pixel position under the Hilbert mapping order, thereby establishing a one-to-one correspondence between the watermark component and the image pixel at the vector index level.
[0054] Step 5: Watermark Embedding (Dual-Path Interchangeable Embedding). This step enables flexible embedding of the watermark in either the plaintext or ciphertext domains, while ensuring that encryption and watermark embedding operations are interchangeable.
[0055] Step 5A: Plaintext domain watermark embedding. In this path, the watermark can be directly embedded into the plaintext image vector.
[0056] First, the one-dimensional plaintext vector obtained from step 2 is... With watermark vector Performing the addition operation yields the plaintext image vector with the watermark embedded: (4), Subsequently, using the CKKS encoding and encryption mechanism, the plaintext vector after embedding the watermark is processed. Encode and encrypt to generate corresponding watermarked ciphertext. .
[0057] Step 5B: Ciphertext Watermark Embedding. In this path, the watermark, after encoding, can be directly embedded into the ciphertext without decrypting the image data.
[0058] First, the watermark vector generated in step 4... Encoded as CKKS plaintext object .
[0059] Then, the ciphertext block obtained in step 3 With watermark Performing a homomorphic addition operation yields the watermarked ciphertext: (5), In equation (5), This represents homomorphic addition. Based on the approximate preservation property of addition operations in CKKS homomorphic encryption, after decrypting the watermarked ciphertext, an equivalent watermarked plaintext vector is obtained within a preset numerical error range, thereby realizing the embedding of the additive watermark in the ciphertext domain.
[0060] To ensure commutativity, this invention uses the same CKKS encryption context parameters (polynomial degree 8192, scaling factor 2). 40 Verification was performed using two embedding paths (using the same key): plaintext watermarking followed by encryption and encryption followed by homomorphic watermarking. The infinite norm error of the decryption results for both methods was less than 1e. -5 (ε is taken as 1e) -5 ), satisfying the commutativity condition.
[0061] The specific value of ε can be flexibly selected according to the actual accuracy requirements and CKKS parameters: when higher accuracy commutativity is required (such as error-sensitive applications), ε=1e can be selected. -6 At this point, the polynomial degree can be appropriately increased or the scaling factor can be improved; when a larger error is acceptable to improve computational efficiency, ε=1e can be chosen. -3 Even so, the peak signal-to-noise ratio of the decrypted image can still be maintained above 40dB. By adjusting the CKKS parameters, the technical solution of this invention can achieve 1e -6 up to 1e -3It operates stably throughout the entire ε range.
[0062] (II) Watermark Detection and Decryption Based on the specific implementation of remote sensing image encryption and watermark embedding, such as Figure 4 As shown, the specific implementation process of watermark detection and decryption is as follows.
[0063] Step 6: Ciphertext Field Watermark Detection. The purpose of this step is to verify the watermark without decrypting the image content.
[0064] First, the correlation is calculated using slot-by-slot homomorphic multiplication: (6), In equation (6), This represents homomorphic multiplication. At this point, Still of length The ciphertext vector.
[0065] Secondly, the summation within the slot is obtained through cyclic shifting and accumulation operations. .
[0066] Then, threshold determination. (Only for...) Decrypt the first component to obtain the relevant value. .like > ( If the threshold is set based on the false alarm rate, the watermark is determined to exist; otherwise, it is determined not to exist.
[0067] Step 7: Image Decryption and Plaintext Watermark Detection. This step, based on the completed encrypted watermark detection, decrypts the watermarked image and verifies the watermark in plaintext mode, demonstrating the consistency of watermark detection results under different data states.
[0068] First, image decryption. This involves processing the watermarked ciphertext obtained in step 5. Decryption is performed to obtain the watermarked image vector. The decryption process does not involve any adjustment of watermark parameters, and the resulting image data is numerically consistent with the ciphertext field processing result.
[0069] Secondly, the watermarked image vector Compared with the watermark vector in step 4 Perform correlation calculations to obtain the plaintext domain correlation scalar value through vector dot product. Compare the scalar value with the threshold used in step 6. If a comparison is made, If the results are consistent, then the plaintext and ciphertext watermark detection results can be considered to be the same; otherwise, they are not.
[0070] Step 8: Image Reconstruction and Restoration. The purpose of this step is to reconstruct the watermarked image vector obtained after decryption into two-dimensional remote sensing image data and restore its original numerical scale.
[0071] First, the inverse mapping from vector to image patch. This involves converting the one-dimensional vector of the watermarked image obtained in step 7... Following the Hilbert spatial mapping relationship used in step 2, each component of the vector is sequentially mapped back to its corresponding two-dimensional pixel position, reconstructing an image block of size N×N. This inverse mapping process ensures that the reconstructed image block maintains the same spatial structure as the original image block.
[0072] Secondly, image stitching and reconstruction. Based on the spatial location information recorded in step 1, the reconstructed image blocks are stitched together according to their original spatial order to reconstruct a complete, normalized remote sensing image. .
[0073] Then, inverse normalization is performed. To restore the original numerical scale of the image, inverse normalization is performed on the normalized image: (7), In equation (7), The numerical scaling parameters of the image used in step 1.
[0074] Finally, numerical truncation and format restoration are performed on the denormalized image data. Numerical range constraints are applied to truncate the data to the valid range of values in the remote sensing image, thus restoring it to a visualized remote sensing image.
[0075] To visually demonstrate the technical effects of this invention, the following is combined with... Figure 5 Please provide an explanation. For example... Figure 5 As shown, where Figure 5 In the image, (a) is the original remote sensing image (example: a high-resolution urban image), (b) is the watermarked remote sensing image obtained after decryption, and (c) is the visual representation of the watermarked ciphertext (i.e., the visual presentation of the ciphertext block before decryption, exhibiting a noise-like distribution). From Figure 5 As can be seen, the original image (a) and the decrypted watermarked image (b) are visually almost indistinguishable, indicating that the watermark embedding of this invention has minimal impact on the visual quality of the image and possesses high fidelity. Meanwhile, the encrypted image (c) exhibits a completely unrecognizable noise-like distribution, effectively protecting the privacy of the image content. Furthermore, objective evaluation shows that the peak signal-to-noise ratio (PSNR) of the decrypted image after watermark embedding in this embodiment reaches 49.2 dB, and the structural similarity (SSIM) is greater than 0.99, verifying the high precision and low distortion characteristics of the method described in this invention. Figure 5The visual effects and objective indicators together prove that the present invention can complete the watermark embedding in the encrypted state without affecting the usability of the decrypted image.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.
Claims
1. A method for exchanging encrypted watermarks on remote sensing images, characterized in that, Includes the following steps: Acquire the original remote sensing image, normalize the original remote sensing image, and divide it into multiple non-overlapping image blocks of size N×N; For each image patch, a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence indices is established based on the Hilbert space-filling curve. The image patches are then converted into one-dimensional plaintext vectors according to the order of the one-dimensional sequence indices, where the size N of the image patch is a positive integer power of 2. , where p is the order of the Hilbert space-filling curve, and p is a positive integer; The one-dimensional plaintext vector is encoded into a plaintext polynomial and encrypted using the CKKS homomorphic encryption scheme to generate a ciphertext block, wherein the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity. A watermark sequence with the same length as the one-dimensional plaintext vector is generated based on the watermark key, and zero-mean and strength control are performed to obtain the watermark vector. The watermark vector is encoded into a CKKS plaintext object, and slot-by-slot homomorphic addition is performed on the ciphertext block to obtain a watermarked ciphertext block, such that the decryption result is equivalent to the sum of the one-dimensional plaintext vector and the watermark vector within a preset error range, thereby realizing the commutativity of watermark embedding operation and encryption operation. The watermarked ciphertext block is decrypted and restored to a two-dimensional watermarked image block through the inverse mapping of the Hilbert space-filling curve. After stitching, the image is inversely normalized to obtain the watermarked remote sensing image.
2. The method for exchanging cryptographic watermarks of remote sensing images according to claim 1, characterized in that, The normalization process of the original remote sensing image and its division into multiple non-overlapping image patches of size N×N includes: The original remote sensing image is normalized to map the image pixel values to a preset real number range; When the image size is not an integer multiple of the block size N, perform edge padding on the image; The filled remote sensing image is divided into multiple non-overlapping image blocks of size N×N.
3. The method for exchanging cryptographic watermarks of remote sensing images according to claim 1, characterized in that, The normalization process includes mapping pixel values to a preset real number range, in the following form: ,in These are the pixel values of the original remote sensing image. This represents the maximum value corresponding to the bit depth of the image data. The image is normalized; zero-fill or mirror fill is used for edge filling to ensure that the image size is an integer multiple of N.
4. The method for exchanging cryptographic watermarks of remote sensing images according to claim 1, characterized in that, The process of establishing a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence indices based on the Hilbert space-filling curve, and converting image patches into one-dimensional plaintext vectors according to the order of the one-dimensional sequence indices, includes: For each N×N image block obtained after block processing, a bijective mapping relationship from two-dimensional pixel coordinates to one-dimensional sequence index is established based on the Hilbert space-filling curve, wherein the size of the image block satisfies p is a positive integer; Extract all pixel values within the image block according to the order of the one-dimensional sequence index; The extracted pixel values are arranged sequentially to construct a one-dimensional plaintext vector corresponding to the image patch.
5. The method for exchanging cryptographic watermarks of remote sensing images according to claim 1, characterized in that, The process of generating a watermark sequence with the same length as the one-dimensional plaintext vector includes: initializing a pseudo-random generator using the watermark key K, and generating a repeatable watermark sequence of length K under the same key condition. A pseudo-random real number sequence is obtained; the pseudo-random real number sequence is subjected to zero-mean processing and multiplied by a preset watermark intensity parameter α to obtain a watermark vector W; wherein the watermark vector is a real number vector, and its d-th component corresponds to the d-th pixel position in the Hilbert mapping order.
6. The method for cryptographic watermarking of remote sensing images according to claim 1, characterized in that, The preset error range is ensured by using the same CKKS encryption context parameters, including the same polynomial degree, scaling factor, and key, such that the infinity norm error between the result obtained by adding the watermark vector to the one-dimensional plaintext vector and then performing CKKS encryption, and the result obtained by first performing CKKS encryption on the one-dimensional plaintext vector and then embedding the watermark using homomorphic addition, does not exceed a preset threshold ε, where ε ranges from 1e^(-1 / 2). -6 up to 1e -3 This ensures the interchangeability of watermark embedding and encryption operations.
7. A method for exchanging cryptographic watermarks for remote sensing images according to any one of claims 1-6, characterized in that, It also includes the encrypted domain watermark detection step: Obtain the watermarked ciphertext block to be detected The obtained watermark vector is encoded into a CKKS plaintext object. A slot-by-slot homomorphic multiplication operation is performed on the ciphertext block and the plaintext object to obtain the product ciphertext vector. ; By utilizing the homomorphic cyclic shift and addition operations of CKKS, several rotation-accumulation operations are performed on the product ciphertext vector to accumulate all components into a single slot, thus obtaining the ciphertext result. ; The encrypted result is decrypted and the values of the corresponding slots are extracted to obtain the relevant values. ,like If the value is greater than the preset threshold T, the watermark is considered to exist; otherwise, it does not exist.
8. A method for exchanging cryptographic watermarks for remote sensing images according to any one of claims 1-6, characterized in that, After stitching together all image patches and performing inverse normalization to obtain the watermarked remote sensing image, the process also includes a plaintext domain watermark verification step: The decrypted one-dimensional image vector containing the watermark Performing a vector inner product operation with the watermark vector W yields the plaintext domain correlation. The plaintext domain correlation The results are compared with a preset threshold T and the watermark detection results of the ciphertext field to verify the consistency between the watermark detection results of the ciphertext field and the plaintext field. The consistency is defined as the consistency of the decisions within a preset numerical error range.
9. A method for cryptographic watermarking of remote sensing images according to any one of claims 1-6, characterized in that, The denormalization process includes restoring the normalized image to its original numerical range, in the following form: ,in, This is the temporary pixel matrix obtained by inverse normalization calculation. This represents the maximum value corresponding to the bit depth of the image data. To stitch together the normalized watermarked image, and then... The final remote sensing image is recovered by limiting the values to the valid range of the original remote sensing image.
10. A device for exchanging encrypted watermarks on remote sensing images, characterized in that, include: The preprocessing module is used to acquire the original remote sensing image, normalize the original remote sensing image, and divide it into multiple non-overlapping image blocks of size N×N. The spatial mapping module is used to establish a dual mapping relationship between two-dimensional pixel coordinates and one-dimensional sequence indices based on the Hilbert space-filling curve for each image patch, and to convert the image patches into one-dimensional plaintext vectors according to the order of the one-dimensional sequence indices, wherein the size N of the image patch is a positive integer power of 2, i.e. , where p is the order of the Hilbert space-filling curve, and p is a positive integer; The CKKS encryption module is used to encode the one-dimensional plaintext vector into a plaintext polynomial and encrypt it using the CKKS homomorphic encryption scheme to generate a ciphertext block, wherein the length of the one-dimensional plaintext vector does not exceed the CKKS plaintext slot capacity. The watermark generation module is used to generate a watermark sequence with the same length as the one-dimensional plaintext vector based on the watermark key, and to perform zero-mean normalization and strength control to obtain the watermark vector. The watermark embedding module is used to encode the watermark vector into a CKKS plaintext object and perform slot-by-slot homomorphic addition on the ciphertext block to obtain a watermarked ciphertext block, so that the decryption result is equivalent to the sum of the one-dimensional plaintext vector and the watermark vector within a preset error range, thereby realizing the commutativity of watermark embedding operation and encryption operation. The decryption module is used to decrypt the watermarked ciphertext block and restore it to a two-dimensional watermarked image block through the inverse mapping of the Hilbert space filling curve. After stitching, the watermarked remote sensing image is obtained by inverse normalization.
Citation Information
Patent Citations
GF-2 image safety protection method using exchange password watermarks
CN112561769A
Face recognition encryption authentication method and system combining watermark and deep learning
CN114170658A