Image encryption method based on 2D compressed sensing and secret sharing in cloud environment

By adopting the image encryption method of 2D compressed sensing and secret sharing in the cloud computing environment, the problem of cloud information storage security and computational imbalance is solved, efficient encryption and secure reconstruction of image information are achieved, and the privacy of cloud data is ensured. and security.

CN118555347APending Publication Date: 2024-08-27BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410647160.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In a cloud computing environment, it is difficult for existing technologies to effectively solve the problems of cloud information storage security and computational imbalance in the compressed sensing encoding and decoding process, and the security of image information is not strong.

Method used

Using an image encryption method based on 2D compressed sensing and secret sharing, the ciphertext image is generated through image scrambling encryption and non-linear encryption, and is subjected to 2D compressed sensing sampling and secret sharing encryption to generate multiple encrypted shares and upload them to cloud storage. The cloud embeds user copyright information to verify permissions and performs image reconstruction and decryption upon user request.

Benefits of technology

It significantly reduces the computational complexity of the codec, improves algorithm sampling efficiency, ensures the privacy and security of cloud data, reduces user computing overhead, and improves the efficiency of legitimate user requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118555347A
    Figure CN118555347A
Patent Text Reader

Abstract

The invention relates to the technical field of image encryption in a cloud service environment, in particular to an image encryption method based on 2D compressed sensing and secret sharing in a cloud environment, and aims to solve the problems of security of data stored in a cloud end and complexity of image reconstruction by a user. According to the method, compressed sensing and secret sharing reconstruction tasks are outsourced to a cloud end to be completed so as to save computing resources of a user, an image is encrypted before being uploaded to the cloud end, then the encrypted image is sampled through 2D compressed sensing with low computing complexity, the storage pressure of a ciphertext is reduced, and the user experience is improved. Then the sampling image is divided into a plurality of encryption shares by using secret sharing, complete image information can be obtained or reconstructed only when a specified threshold is reached, a single point of failure can be avoided, the security of the scheme is improved, the generated encryption shares are respectively uploaded to different cloud management centers for storage, and the security of the cloud management centers is improved. And unauthorized malicious users are effectively prevented from stealing or tampering the information by embedding the watermark information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image encryption in a cloud service environment, and in particular to an image encryption method based on 2D compressed sensing and secret sharing in a cloud environment. Background Art

[0002] Under the current trend, the explosive increase of information has made traditional storage methods unable to meet the management needs of large-scale data. Although cloud computing provides elastic and scalable storage services that can meet the computing, storage and management of rapidly expanding Internet data;

[0003] As a third party, users do not want cloud service providers to have access to original data; that is, the privacy and security of data needs to be protected when storing and managing data in a cloud computing environment;

[0004] Compressed sensing has the characteristics of simultaneous sampling, compression and encryption, which can not only ensure data security, but also reduce the amount of multimedia information, just meeting the needs of data storage in cloud environments;

[0005] Therefore, the existing problems in the prior art are: the storage security of cloud information and the imbalance of the computational load in the compressed sensing encoding and decoding process;

[0006] It is necessary to propose an image encryption technology that can be based on 2D compressed sensing and secret sharing. In addition, considering that the compressed sensing encryption framework itself is not very secure in protecting image information, the image is scrambled and nonlinearly encrypted before the compressed sensing operation. On the one hand, it increases the security of the scheme, and on the other hand, it ensures the output security of the cloud service provider when responding to image reconstruction requests. Summary of the invention

[0007] The present invention aims to solve the technical problems in the prior art regarding the privacy security of cloud information and the imbalance in the computational complexity of compressed sensing encoding and decoding processes, and to provide an image encryption method based on 2D compressed sensing and secret sharing in a cloud environment.

[0008] In order to solve the above technical problems, the technical solutions of the present invention are as follows:

[0009] An image encryption method based on 2D compressed sensing and secret sharing in a cloud environment, in a scenario where an image is transmitted over an untrusted channel, comprises the following steps:

[0010] Step S1, image encryption process, the data owner performs image scrambling encryption and nonlinear encryption, and then generates a ciphertext image through 2D compressed sensing sampling and secret sharing encryption to obtain multiple encrypted shares and upload them to cloud storage to ensure the security of the image in computing and storage;

[0011] Step S2, cloud data processing process, in the cloud, the cloud service provider embeds the user's copyright information in the secret share. When receiving the user's data request, the user's authority is verified first. If the verification is passed, the image is reconstructed and the reconstruction result is returned;

[0012] Step S3, image restoration process, after the user obtains the reconstruction result, the reconstructed image is further decrypted using the key shared with the content owner to obtain a decrypted image.

[0013] Specifically, the image encryption process includes:

[0014] Image encryption is performed on the image P. The encrypted image P is obtained by formula (10), where formula (10) is:

[0015] E_img = Eng(P) (10);

[0016] Where Eng(*) represents the image encryption operation, and E_img represents the ciphertext image;

[0017] The steps of encrypting the image P using the formula (10) include:

[0018] Step S11, the scrambling process, first encrypts the initial image P through a pixel scrambling operation and is expressed as:

[0019] S=Scr ks (P) (11);

[0020] Among them, Scr ks (*) represents the scrambling function, ks is the scrambling key, and S represents the scrambled encrypted image.

[0021] Specifically, after step S11, step S12 is performed;

[0022] In step S12, the image S is encrypted by a nonlinear encryption strategy, and the encryption process is expressed as:

[0023]

[0024] in, is the encrypted image, is a random binary matrix generated by the key kn;

[0025] T(x,y), S(x,y), B(x,y) are the entries of the matrix T, matrix S, and matrix B respectively;

[0026] The step S12 can change the grayscale value of the scrambled image S to prevent the statistical information of the initial image from being leaked, thereby enhancing the security performance of the solution.

[0027] Specifically, a 2D compressed sensing process is performed through a step S13, and a grayscale mapping strategy is used to reduce the dynamic range of the compressed sensing sample, and the final compression performance is improved by using fewer bits to represent each compressed sensing sample.

[0028] Specifically, the 2D compressed sensing process is adopted to generate a bit stream after compressed sensing sampling through a quantization strategy, and the compression process is as follows:

[0029] S21, using the grayscale mapping strategy to map the grayscale value of the encrypted image to the range of -128 to 128, expressed as:

[0030] T map =TR (13);

[0031] Among them, R is a template matrix with values ​​of 128, T map is the matrix after mapping;

[0032] S22, instead of directly sampling the encrypted image T, 2D compressed sensing is used to map the matrix T map Sampling is performed, namely:

[0033] C map =Φ 1 T map Φ 2 T =Φ 1 TΦ 2 T -Φ 1 RΦ 2 T =CC R (14);

[0034] in, Respectively represent T, T map and two-dimensional measurements of R;

[0035] S23, C map Input into the SQ encoder to get the final sample bit stream

[0036] Specifically, the method further comprises step S14: As input image, randomly select z i ∈GF(q),1≤i≤k-1, based on the polynomial:

[0037] g(x)=S+z 1 x+z 2 x 2 +…+z k-1 x k-1 (15);

[0038] Among them, S is elements as a shared secret.

[0039] Specifically, in the cloud data processing process, in order to ensure that the watermark information can be effectively extracted from the encrypted share, the watermark image is embedded into the secret share by constructing an orthogonal matrix OM;

[0040] The orthogonal matrix OM is constructed by a scrambled matrix PM and a diagonal matrix DM, and further comprises the following steps:

[0041] Step S210, for a secret share G of size M×M i , and a watermark image W of size m×m, converting the watermark image into an image of dimension m'×M;

[0042] Step S220, diagonal matrix generation, using the key kd to generate a diagonal matrix DM of size (M+m')×(M+m'); the diagonal matrix DM satisfies (DM -1 ) T =DM -1 ;

[0043] Step S230, generating a scrambled matrix, generating a chaotic sequence through an initial value and a chaotic key kp according to a Logistic map, and arranging the chaotic sequence to obtain a sequence L(k), k=1, 2, ..., (M+m');

[0044] Then, the scrambled matrix PM is constructed by equation (16), namely:

[0045]

[0046] Among them, PM i,j is the i-th row and j-th column element of PM, i=1,2,…n, j=1,2,…n;

[0047] Matrix PM satisfies PM -1 =PM T ;

[0048] Step S240, calculate the orthogonal matrix OM = PM·DM = [OM 1 ,OM 2 ];

[0049] in,

[0050] Step S250, embedding the watermark, and combining the watermark W with the secret share G through the orthogonal matrix OM i And perform fusion embedding, the embedding process is expressed as follows:

[0051] G_W i =OM1 ·G i +OM 2 ·W (17).

[0052] Specifically, after receiving the reconstructed image, the user further decrypts the reconstructed image using the key shared with the data owner to obtain the initial image;

[0053] After receiving the data access request, the cloud service provider extracts the watermark information through the orthogonal matrix OM, because the matrix OM 1 and the matrix OM 2 is an orthogonal matrix, then The secret share and watermark information can be separated by the following formula:

[0054]

[0055]

[0056] Specifically, the inverse matrix of the matrix DM is divided into two sub-matrices, namely

[0057] Extract the secret share and watermark and calculate according to the following formula:

[0058]

[0059]

[0060] in,

[0061] Specifically, the image restoration process includes:

[0062] Extraction algorithm Its input is the encrypted image G_W i and the orthogonal matrix OM, the ciphertext share is obtained by formulas (20) and (21) and watermark image

[0063] Watermark Authentication Algorithm It calculates the extracted watermark image Compared with the SSIM and PSNR values ​​of the target watermark image W, the results of the two values ​​reach t 1 and t 2 , the output result is "1", indicating that the authentication is successful; otherwise, the output result is "0", indicating that the authentication fails;

[0064] Image reconstruction algorithm

[0065] Assuming that the cloud service provider can correctly provide k shares According to the Lagrange interpolation formula, we can get:

[0066]

[0067] Among them, the constant term g(0) of g(x) is the secret S, until the reconstructed image is obtained

[0068] Then according to Φ 1 , Φ 2 and 2D compressed sensing reconstruction of the image Reconstruct the image T map ', thus image T' can be obtained, and the image T' is still a ciphertext image;

[0069] Image decryption algorithm Decryption(T',ks,kn)→P', whose decryption function is represented by Dec(*), then the original image is restored according to the reconstructed image T';

[0070] P' = Dec(T') (23).

[0071] The present invention has the following beneficial effects:

[0072] First, the 2D compressed sensing adopted in this technical solution can significantly reduce the computational complexity of the codec compared to traditional compressed sensing, significantly improve the algorithm sampling efficiency, and is more suitable for processing two-dimensional image information; in addition, with the help of cloud service providers to complete part of the image reconstruction process, it can reduce the user's computing overhead and burden and improve computing efficiency.

[0073] Secondly, in order to ensure the privacy of information output in the cloud environment, we consider first performing nonlinear encryption on the image and then performing 2D compressed sensing processing on the encrypted image, so that the image reconstructed on the cloud is still in ciphertext form, thereby ensuring that the entire process of users uploading encrypted images to cloud storage and the cloud responding to requests to return reconstructed images to the client does not leak the privacy information of the initial image.

[0074] Thirdly, multiple encrypted shares are ultimately generated through secret sharing and stored in different data management centers of the cloud server, preventing information from being over-concentrated, dispersing risks, and improving the security of the technology.

[0075] Fourthly, the cloud service provider embeds watermark information that can verify the user's copyright in the stored ciphertext, which can prevent illegal users from frequently sending data requests to the cloud and performing large-scale and highly complex image reconstruction operations, thereby improving the request and execution efficiency of legitimate users. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0077] Figure 1It is a schematic diagram of a flowchart of image encryption of the present invention. DETAILED DESCRIPTION

[0078] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention; it should be noted that in this application, for the convenience of description, the "left side" in the current view is the "first end", the "right side" is the "second end", the "upper side" is the "first end", and the "lower side" is the "second end". The purpose of such description is to clearly express the technical solution, and it should not be understood as an improper limitation on the technical solution of this application.

[0079] Traditional encryption schemes are designed to generate a certain ciphertext image, which limits the concealment and disguise of the ciphertext image, making them easier to be discovered. Such schemes allow malicious users to easily obtain the certain ciphertext image and be attacked or cracked, thereby reducing their potential applicability. The technical solution of the present invention ultimately encrypts the image into multiple secret shares through secret sharing and sends them to multiple storage centers in the cloud for management, which can prevent information from being too numerous, disperse risks, and reduce the possibility of being attacked.

[0080] In addition, due to the low computational efficiency of the existing technology, it is difficult to achieve a good balance in ensuring the security and efficiency of image data. This technical solution uses 2D compressed sensing to improve signal sampling efficiency and reduce the computational overhead of the encryption process, and then enhances the security of the technology through secret sharing, and outsources secret sharing and compressed sensing reconstruction to the cloud service provider during the reconstruction phase, thereby reducing the user's reconstruction and computational burden. To ensure the output security of cloud data, the traditional solution of using cloud computing to complete the compressed sensing reconstruction task requires the reconstruction problem to be encrypted, which will directly affect the overall performance and execution efficiency of the storage service.

[0081] The method provided in this technical solution encrypts the image before compressed sensing sampling, thereby ensuring that the image reconstructed from the cloud is still a ciphertext image, eliminating the encryption conversion process, which can not only enhance the security of the solution, but also improve the efficiency of user encryption.

[0082] Compared with traditional compressed sensing, 2D compressed sensing helps to significantly improve signal sampling efficiency and reduce the computational overhead of the encoder. It generates multiple ciphertext shares through secret sharing encryption and performs distributed storage of ciphertext shares to improve data fault tolerance and disaster prevention performance. The solution also improves the security of the solution by distributing secret shares to different cloud management centers.

[0083] In the cloud, watermark information is embedded to detect the authenticity of the user's identity, reducing the risk of unauthorized access and information leakage, and effectively solving the problem of difficult analysis and management of stored data in the cloud; secret sharing reconstruction and compressed sensing reconstruction tasks are outsourced to the cloud, thereby significantly alleviating the user's computing pressure.

[0084] See also Figure 1 As shown, the image encryption method based on 2D compressed sensing and secret sharing in a cloud environment, in the scenario of transmitting images in an untrusted channel, the method includes the following steps:

[0085] Step S1, image encryption process, the data owner performs image scrambling encryption and nonlinear encryption, and then generates a ciphertext image through 2D compressed sensing sampling and secret sharing encryption to obtain multiple encrypted shares and upload them to cloud storage to ensure the security of the image in computing and storage;

[0086] Step S2, cloud data processing process, in the cloud, the cloud service provider embeds the user's copyright information in the secret share. When receiving the user's data request, the user's authority is verified first. If the verification is passed, the image is reconstructed and the reconstruction result is returned;

[0087] Step S3, image restoration process, after the user obtains the reconstruction result, the reconstructed image is further decrypted using the key shared with the content owner to obtain a decrypted image.

[0088] In a specific implementation manner, it is further described that the image encryption process includes:

[0089] Image encryption is performed on the image P. The encrypted image P is obtained by formula (10), where formula (10) is:

[0090] E_img = Eng(P) (10);

[0091] Where Eng(*) represents the image encryption operation, and E_img represents the ciphertext image;

[0092] The steps of encrypting the image P using the formula (10) include:

[0093] Step S11, the scrambling process, first encrypts the initial image (P) through a pixel scrambling operation and is expressed as:

[0094] S=Scr ks (P) (11);

[0095] Among them, Scr ks (*) represents the scrambling function, ks is the scrambling key, and S represents the scrambled encrypted image.

[0096] In a specific implementation, it is further described that step S12 is performed after step S11;

[0097] In step S12, the image S is encrypted by a nonlinear encryption strategy, and the encryption process is expressed as:

[0098]

[0100] in, is the encrypted image, is a random binary matrix generated by the key kn;

[0101] T(x,y), S(x,y), B(x,y) are the entries of the matrix T, matrix S, and matrix B respectively;

[0102] The step S12 can change the grayscale value of the scrambled image S to prevent the statistical information of the initial image from being leaked, thereby enhancing the security performance of the solution.

[0103] In a specific implementation manner, it is further described that 2D compressed sensing processing is performed through a step S13, and a grayscale mapping strategy is used to reduce the dynamic range of the compressed sensing sample, and the final compression performance is improved by using fewer bits to represent each compressed sensing sample.

[0104] In addition, the 2D compressed sensing process is adopted to generate a bit stream after compressed sensing sampling through a quantization strategy. Here, the compressed sensing sampling signal is quantized using the SQ algorithm, and the compression process is divided into three sub-steps S21-S23:

[0105] S21, using the grayscale mapping strategy to map the grayscale value of the encrypted image to the range of -128 to 128, expressed as:

[0106] T map =TR (13);

[0107] Among them, R is a template matrix with values ​​of 128, T map is the matrix after mapping;

[0108] S22, instead of directly sampling the encrypted image T, 2D compressed sensing is used to map the matrix T map Sampling is performed, namely:

[0109] C map =Φ 1 T map Φ 2 T =Φ 1 TΦ 2 T -Φ1 RΦ 2 T =CC R (14);

[0110] in, Respectively represent T, T map and two-dimensional measurements of R;

[0111] Obviously, C R does not carry any information, since it can be recovered locally at the decoder side using the measurement matrix. Therefore, once C is known map , is equivalent to knowing C, and vice versa. In other words, C map and C contain the same amount of information. However, C map It usually has a smaller dynamic range than C, which means that the bit width required to represent each CS sample is reduced, which is why we use a grayscale mapping strategy before CS encoding.

[0112] S23, C map Input into the SQ encoder to get the final sample bit stream

[0113] In a specific implementation manner, it is further described that step S14 is also included. As input image, randomly select z i ∈GF(q),1≤i≤k-1, based on the polynomial:

[0114] g(x)=S+z 1 x+z 2 x 2 +…+z k-1 x k-1 (15);

[0115] Among them, S is elements as a shared secret.

[0116] where the constant s is chosen from GF(q) i , i=1,2,…n, they are non-zero and different from each other, calculate g i =g(s i );

[0117] until After this step, all elements in get n secret shares G of size M×M. i , sent to the cloud server's n storage and processing center IDE i This step makes it difficult for attackers to obtain the complete ciphertext, reducing the possibility of data cracking.

[0118] For security reasons, cloud data processing requires the cloud to verify the identity of the user when responding to data requests, which is also a key measure to effectively prevent malicious users from illegally accessing and stealing data. Once the cloud service provider fails to effectively manage the access rights to data, the cloud may continue to receive frequent data requests from malicious visitors.

[0119] For this solution, the cloud service provider will continue to perform large-scale image secret sharing reconstruction and compressed sensing reconstruction processes;

[0120] When the amount of computing in the cloud is very large, it will directly affect the efficiency of legitimate users' data requests. Therefore, if the cloud service provider can verify the user's identity and authority when responding to user requests, it can prevent illegal theft and attacks to a large extent, thereby effectively avoiding the waste of cloud service resources and facilitating legitimate users' service requests.

[0121] Therefore, in order to prevent illegal users from obtaining private information and improve the efficiency of cloud data processing,

[0122] The cloud service provider embeds watermark information containing the user's ID in the encrypted share. The specific operation is as follows: First, in order to ensure that the watermark information can be effectively extracted from the encrypted share, an orthogonal matrix is ​​constructed to embed the watermark image into the secret share. Here, the orthogonal matrix is ​​constructed by a scrambled matrix and a diagonal matrix. The specific steps are:

[0123] In the cloud data processing process, in order to ensure that the watermark information can be effectively extracted from the encrypted share, the watermark image is embedded into the secret share by constructing an orthogonal matrix OM;

[0124] The orthogonal matrix OM is constructed by a scrambled matrix PM and a diagonal matrix DM, and further comprises the following steps:

[0125] Step S210, for a secret share G of size M×M i , and a watermark image W of size m×m, converting the watermark image into an image of dimension m'×M;

[0126] Step S220, diagonal matrix generation, using the key kd to generate a diagonal matrix DM of size (M+m')×(M+m'); the diagonal matrix DM satisfies (DM -1 ) T =DM -1 ;

[0127] Step S230, generating a scrambled matrix, generating a chaotic sequence through an initial value and a chaotic key kp according to a Logistic map, and arranging the chaotic sequence to obtain a sequence L(k), k=1, 2, ..., (M+m');

[0128] Then, the scrambled matrix PM is constructed by equation (16):

[0129]

[0130] Among them, PM i,j is the i-th row and j-th column element of PM, i=1,2,…n, j=1,2,…n;

[0131] Matrix PM satisfies PM -1 =PM T ;

[0132] Step S240, calculate the orthogonal matrix OM = PM·DM = [OM 1 ,OM 2 ];

[0133] in,

[0134] Step S250, embedding the watermark, and combining the watermark W with the secret share G through the orthogonal matrix OM i And perform fusion embedding, the embedding process is expressed as follows:

[0135] G_W i =OM 1 ·G i +OM 2 ·W (17).

[0136] Watermark detection and image recovery,After receiving the user's data request, the cloud service verifies the user's ownership information based on the watermark detection. If the user ownership matches, the cloud service provider performs secret sharing reconstruction and 2D compressed sensing reconstruction on the secret share and returns the reconstruction result to the user. Otherwise, the cloud service provider can deny the user's access. Here, the image generated by the cloud service provider after reconstructing the secret share is still in ciphertext form, and the cloud service provider cannot obtain any useful information from the reconstructed image.

[0137] After receiving the reconstructed image, the user further decrypts the reconstructed image using the key shared with the data owner to obtain the original image;

[0140] After receiving the data access request, the cloud service provider extracts the watermark information through the orthogonal matrix OM, because the matrix OM 1 and the matrix OM 2 is an orthogonal matrix, then The secret share and watermark information can be separated by the following formula:

[0141]

[0142]

[0143] Although the matrix OM 1 and OM 2 is an orthogonal matrix, but not unit orthogonal, so Considering that OM=PM·DM=[OM 1 ,OM 2 ],DM=[DM 1 ,DM 2 ], then OM 1 =PM·DM 1 , OM 2 =PM·DM 2 The above formula can be written as:

[0144]

[0145]

[0146] In the further process, the inverse matrix of the matrix DM is divided into two sub-matrices, namely

[0147] Extract the secret share and watermark and calculate according to the following formula:

[0148]

[0149]

[0150] in,

[0151] The secret share and watermark image can be extracted through the above formula.

[0152] The key algorithms of the image restoration process include:

[0153] Extraction algorithm Its input is the encrypted image G_W i and the orthogonal matrix OM, the ciphertext share is obtained by formulas (20) and (21) and watermark image

[0154] Watermark Authentication Algorithm It calculates the extracted watermark image Compared with the SSIM and PSNR values ​​of the target watermark image W, the results of the two values ​​reach t 1 and t 2 , the output result is "1", indicating that the authentication is successful; otherwise, the output result is "0", indicating that the authentication fails;

[0155] Image reconstruction algorithm

[0156] Assuming that the cloud service provider can correctly provide k shares According to the Lagrange interpolation formula, we can get:

[0157]

[0158] Among them, the constant term g(0) of g(x) is the secret S, until the reconstructed image is obtained

[0159] Then according to Φ 1 , Φ 2 and 2D compressed sensing reconstruction of the image Reconstruct the image T map ', thus image T' can be obtained, and the image T' is still a ciphertext image;

[0160] It not only solves the burden of reconstructing images for users, but also ensures the output security of information, and sends the reconstructed image T' to the user.

[0161] The image decryption algorithm Decryption(T',ks,kn)→P', whose decryption function is represented by Dec(*), restores the original image based on the reconstructed image T'.

[0162] P' = Dec(T') (23).

[0163] In order to facilitate the understanding of the technical solution in the present invention, other contents that need to be understood in combination with the technical solution are provided here, specifically including the following concepts and explanations;

[0164] 2D Compressed Sensing Sampling Algorithm

[0165] Through a 2D separable sparse basis pair image Perform sparse representation, that is:

[0166] M=DPD T (1);

[0167] in, is a two-dimensional separable sparse basis, (*) T represents the transpose operation, It is a matrix composed of coefficients in the D domain. When most elements in the matrix M are 0 or close to 0, the signal P is considered to be a 2D sparse signal. Generally speaking, compressed sensing is used for one-dimensional signal sampling. When a two-dimensional image is used as the sampling object, we convert the two-dimensional image into a long vector and then sample the converted vector, that is:

[0168] c = Avec(P) = Ap (2);

[0169] Among them, vec(*) is a vectorization function that converts a two-dimensional matrix into a one-dimensional vector, and p is the converted vector, whose size is N. 2 ×1, A is M 2 ×N 2 The measurement matrix of size M 2 ×1 measurement value.

[0170] This compressed sensing sampling process is also called 1D compressed sensing sampling, which requires O(M 2 N 2 ) operations and M 2 N 2 Therefore, there are two main challenges when 1D compressed sensing samples 2D images.

[0171] First, the encoding and decoding process is very computationally intensive. Second, the measurement matrix requires a lot of storage space. To address the above two challenges, 2D compressed sensing is proposed. Assume Φ 1 and Φ 2 They are all random matrices of size M×N (M<<N).

[0172] The two-dimensional measurement value can be obtained

[0173] C=Φ 1 PΦ 2 T (3);

[0174] Among them, Φ 1 Acting on the rows of the two-dimensional image P, Φ 2 The column to which it is applied.

[0175] Compared with 1D compressed sensing, 2D compressed sensing only requires O(MN 2 ) operations and 2MN measurement matrix storage units. It can be seen that 2D compressed sensing can significantly reduce the computational complexity of the codec and save the storage space required for the random measurement matrix. Therefore, 2D compressed sensing is more suitable for sampling two-dimensional images. Since the dimension of the measurement value C obtained after sampling is much smaller than the initial image P, C is regarded as a reduced-dimensional version of P, and the sampling rate SAR can be calculated by the following formula:

[0176]

[0177] It should be noted that compressed sensing and traditional data compression achieve different results. Compressed sensing aims to reduce the number of samples usually represented by real values ​​with infinite precision. In contrast, traditional data compression focuses on reducing the number of bits. Although compressed sensing can significantly reduce the number of samples, the bit width of the samples will be expanded.

[0178] Generally, for an 8-bit grayscale image, the bit width of the sampled signal obtained after compressed sensing encoding is significantly increased. For example, when using the Bernoulli measurement matrix, it requires 10 bits to represent each compressed sensing sample. Obviously, the dynamic range after compressed sensing sampling is larger than the original image. According to quantization theory, when the dynamic range of the sample becomes larger, more bits are required for encoding. Considering quantization, the compression ratio (CPR) is defined as

[0179]

[0180] Among them, W C and W P Represents the bit width of the compressed image C and the original image P.

[0181] At the decoder side, the prior information of the signal is used to regularize the image signal recovery in the form of penalty:

[0182]

[0183] in yes Data fidelity items, is the cost function used to deal with ill-posed problems, and the parameters is the regularization parameter.

[0184] Secret Sharing Method

[0185] The main idea of ​​secret sharing is based on the Lagrange polynomial interpolation method. The secret distributor divides the secret S into n sub-secrets by calculating a random k-1 degree polynomial and distributes each sub-secret to n participants or the processing center D. 1 ,D 2 ,...,D n Only when k or more participants can restore the secret S, any less than k participants will find it difficult to recover the initial secret.

[0186] The secret sharing method requires the predetermination of the number of sharers and the number or threshold value k required to participate in secret reconstruction. Specifically, in the secret sharing stage, let GF(q) be a finite field, q be a large prime number selected by the distributor, S represents the secret information, are k-1 integers less than q, and then a k-1 degree polynomial over the finite field GF(q) can be constructed:

[0187] F(x)=S+a 1 x+a 2 x 2 +...+a k-1 x k-1 modq (7);

[0188] The secret S and the coefficient a i Satisfy S,a i ∈GF(q)\{0}. The secret distributor is each participant D i Calculate the corresponding shadow y i =F(x i ), where 1≤i≤n.

[0189] In the information reconstruction phase, k or more participants must jointly reconstruct the secret S. The secret reconstruction process can be solved by the following linear equations:

[0190]

[0191] Calculate the linear equation system (2-28) to obtain the secret S, or recover the secret information by solving the following Lagrange interpolation

[0192]

[0193] According to formula (2-29), the secret S is reconstructed by S=F(0).

[0194] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. An image encryption method based on 2D compressed sensing and secret sharing in a cloud environment, characterized in that: In the scenario of transmitting an image through an untrusted channel, the method comprises the following steps: Step S1, image encryption process, the data owner performs image scrambling encryption and nonlinear encryption, and then generates a ciphertext image through 2D compressed sensing sampling and secret sharing encryption to obtain multiple encrypted shares and upload them to cloud storage to ensure the security of the image in computing and storage; Step S2, cloud data processing: In the cloud, the cloud service provider embeds the user's copyright information in the secret share. When receiving the user's data request, the cloud service provider first verifies the user's authority. If the verification is successful, the cloud service provider reconstructs the image and returns the reconstruction result. Step S3, image restoration process, after the user obtains the reconstruction result, the reconstructed image is further decrypted using the key shared with the content owner to obtain a decrypted image.

2. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 1, characterized in that: The image encryption process includes: The image P is encrypted, and the encrypted image P is obtained by formula (10), where formula (10) is: E_img = Eng(P) (10); Where Eng(*) represents the image encryption operation, and E_img represents the ciphertext image; The steps of encrypting the image P using the formula (10) include: Step S11, the scrambling process, first encrypts the initial image P through a pixel scrambling operation and is expressed as: S=Scr ks (P) (11); Among them, Scr ks (*) represents the scrambling function, ks is the scrambling key, and S represents the scrambled encrypted image.

3. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 2, characterized in that: After step S11, step S12 is performed; In step S12, the image S is encrypted by a nonlinear encryption strategy, and the encryption process is expressed as: in, is the encrypted image, is a random binary matrix generated by the key kn; T(x,y), S(x,y), B(x,y) are the entries of the matrix T, matrix S, and matrix B respectively; The step S12 can change the grayscale value of the scrambled image S to prevent the statistical information of the initial image from being leaked, thereby enhancing the security performance of the solution.

4. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 3, characterized in that: A 2D compressed sensing process is performed in step S13, and a grayscale mapping strategy is used to reduce the dynamic range of the compressed sensing sample, thereby improving the final compression performance by using fewer bits to represent each compressed sensing sample.

5. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 4, characterized in that: The 2D compressed sensing process is adopted to generate a bit stream after compressed sensing sampling through a quantization strategy, and the compression process is as follows: S21, using the grayscale mapping strategy to map the grayscale value of the encrypted image to the range of -128 to 128, expressed as: T map =T-R (13); Among them, R is a template matrix with values ​​of 128, T map is the matrix after mapping; S22, instead of directly sampling the encrypted image T, 2D compressed sensing is used to map the matrix T map Sampling is performed, namely: C map =Φ1T map F2 T =Φ1TΦ2 T -Φ1RΦ2 T =CC R (14); in, Respectively represent T, T map and two-dimensional measurements of R; S23, C map Input into the SQ encoder to get the final sample bit stream 6. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 5, characterized in that: The step S14 is also included. As input image, randomly select z i ∈GF(q),1≤i≤k-1, based on the polynomial: g(x)=S+z1x+z2x 2 +…+z k-1 x k-1 (15); Among them, S is elements as a shared secret.

7. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 6, characterized in that: In the cloud data processing process, in order to ensure that the watermark information can be effectively extracted from the encrypted share, the watermark image is embedded into the secret share by constructing an orthogonal matrix OM; The orthogonal matrix OM is constructed by a scrambled matrix PM and a diagonal matrix DM, and further comprises the following steps: Step S210, for a secret share G of size M×M i , and a watermark image W of size m×m, converting the watermark image into an image of dimension m'×M; Step S220, diagonal matrix generation, using the key kd to generate a diagonal matrix DM of size (M+m')×(M+m'); the diagonal matrix DM satisfies (DM -1 ) T =DM -1 ; Step S230, generating a scrambled matrix, generating a chaotic sequence through an initial value and a chaotic key kp according to a Logistic map, and arranging the chaotic sequence to obtain a sequence L(k), k=1, 2, ..., (M+m'); Then, the scrambled matrix PM is constructed by equation (16), namely: Among them, PM i,j is the i-th row and j-th column element of PM, i=1,2,…n, j=1,2,…n; Matrix PM satisfies PM -1 =PM T ; Step S240, calculating the orthogonal matrix OM=PM·DM=[OM1, OM2]; in, Step S250: embed the watermark, and use the orthogonal matrix OM to combine the watermark W with the secret share G i And perform fusion embedding, the embedding process is expressed as follows: G_W i =OM1·G i +OM2·W (17)。 8. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 7, characterized in that: The reconstructed image is further decrypted using a key shared with the data owner to obtain the original image; After receiving the data access request, the cloud service provider extracts the watermark information through the orthogonal matrix OM. Since the matrix OM1 and the matrix OM2 are orthogonal matrices, The secret share and watermark information can be separated by the following formula:

9. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 8, characterized in that: The inverse matrix of the matrix DM is divided into two sub-matrices, namely Extract the secret share and watermark and calculate according to the following formula: in, 10. The image encryption method based on 2D compressed sensing and secret sharing in a cloud environment as claimed in claim 9, characterized in that: The image restoration process includes: Extraction algorithm Its input is the encrypted image G_W i and the orthogonal matrix OM, the ciphertext share is obtained by formulas (20) and (21) and watermark image Watermark Authentication Algorithm It calculates the extracted watermark image When the SSIM and PSNR values ​​of the target watermark image W reach t1 and t2 respectively, the output result is "1", indicating that the authentication is successful; otherwise, the output result is "0", indicating that the authentication fails; Image reconstruction algorithm Assuming that the cloud service provider can correctly provide k shares According to the Lagrange interpolation formula, we can get: Among them, the constant term g(0) of g(x) is the secret S, until the reconstructed image is obtained Then the image is reconstructed based on Φ1, Φ2 and 2D compressed sensing. Reconstruct the image T map ', thus image T' can be obtained, and the image T' is still a ciphertext image; Image decryption algorithm Decryption(T',ks,kn)→P', whose decryption function is represented by Dec(*), then the original image is restored according to the reconstructed image T': P' = Dec(T') (23).

Citation Information

Cited By

  • Image steganography method, device and equipment for user level-to-level management and medium

    CN120856838A

  • Model copyright evidence obtaining and authority control method based on multi-party cooperation

    CN121456855A