Elliptic curve encryption and decryption method based on compressed sensing and chaotic block scrambling
By combining compression perception, chaos chaotic and elliptic curve algorithms, the images are encrypted and decrypted, and the problems of large data transmission volume and insufficient security in the prior art are solved, thereby achieving efficient and secure image communication.
Patent Information
- Application Number
- CN202411529963.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-25
AI Technical Summary
In the existing asymmetric elliptic curve encryption technology, the data transmission volume is relatively large, and there are problems with security and efficiency.
The compression perception technology is used to reduce the dimensionality of the image, and combine chaotic chaos and elliptic curve algorithms to encrypt and decrypt the image. The specific steps include: wavelet transform to obtain sparse vectors, using the fractional order Lorentz chaotic system to generate random sequences, perform confusion and encryption, calculate the Hash value and perform digital signature. The receiver restores the original image through private key decryption, reverse scrambling and Bayesian compression perception algorithms.
Effectively reduces the amount of data transmission, enhances the security of image communication, and prevents attacks through digital signature verification.
Smart Images

Figure CN119696788A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology, and relates to a method for recovering and elliptic curve encryption and decryption using a Bayesian compressed sensing learning algorithm, and specifically relates to an elliptic curve encryption and decryption method using compressed sensing and chaotic block scrambling. Background Art
[0002] Compressed sensing is a principal component analysis compressed sensing technology, which is widely used in the field of data transmission. Chaos has noise-like characteristics and is sensitive to initial values. It can well achieve secure communication by using chaotic modulation and masking. However, in the existing asymmetric elliptic curve encryption scheme, the amount of encrypted data is large. Since the amount of data transmission in the existing elliptic curve encryption technology scheme is large, it is necessary to compress the data and then perform elliptic curve encryption. Based on this, the present invention provides an elliptic curve encryption and decryption method with compressed sensing and chaotic block scrambling. Summary of the invention
[0003] In view of the fact that the existing elliptic curve encryption technology has the disadvantage of large data transmission volume, the present invention provides an elliptic curve encryption and decryption method with compressed sensing and chaotic block scrambling. The present invention uses chaos to scramble and diffuse images, and combines compressed sensing and elliptic curve algorithms to realize image encryption. Elliptic curve encryption is an asymmetric public key encryption algorithm, which has higher security than traditional asymmetric public key encryption methods (such as RSA). In the existing asymmetric elliptic curve encryption scheme, the amount of encrypted data is large. The difference of the present invention is that firstly, compressed sensing technology is used to reduce the dimension of the image, the compressed pixel value is converted into hexadecimal characters, the image is divided into several fields, and the pixels in the field are connected to form a large number, and an algorithm is designed to scramble the characters of each field using chaos, and then restore them to separate pixel symbols, and encrypt them according to the public key using the elliptic curve algorithm, calculate the hash value of the encrypted image, and design an algorithm to digitally sign it. At the receiving end, the digital signature is first verified (the calculation method is consistent with that of the sending end). If they are consistent, it means that there is no attack. The elliptic curve algorithm is used to decrypt it according to the private key, and then chaos is used to reverse scramble it. The Bayesian compressed sensing learning algorithm is used to restore the data of each field.
[0004] The present invention converts the pixel matrix of the image into a vector of length m, uses a transformation basis formed by wavelet transformation to transform the vector of length m composed of pixels into a sparse vector of length m, generates m mutually orthogonal random sequences of length n by a fractional-order Lorentz chaotic system, combines the m random sequences into an m×n measurement matrix, and then multiplies the measurement matrix by the vector composed of pixels, that is, uses the measurement matrix to project the sparse vector into a low-dimensional space, and obtains a compressed signal vector of length n. The compressed pixel value is converted into a hexadecimal character, the image is divided into several fields, the pixels in the field are connected to form a large number, an algorithm is designed, chaos is used to scramble the characters of each field, an elliptic curve algorithm is used to encrypt it according to a public key, a hash value of the encrypted image is calculated, and an algorithm is designed to digitally sign it. At the receiving end, the digital signature is first verified (the calculation method is consistent with that of the sending end). If it is consistent, it means that it has not been attacked, and the elliptic curve algorithm is used to decrypt it according to a private key, and then chaos is used to reversely scramble it, and the Bayesian compressed sensing learning algorithm is used to restore the data of each field.
[0005] The invention discloses an elliptic curve encryption and decryption method for compressed sensing and chaotic block scrambling, which involves a sending end and a receiving end. The receiving end and the sending end first negotiate the initial value of the Lorentz chaotic system. At the receiving end, the sender designs a private key k, selects a base point G on the elliptic curve, uses an elliptic curve-related algorithm, generates a public key Q=kG, and sends (G, Q) to the sending end on a public channel.
[0006] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions at the sending end:
[0007] An elliptic curve encryption method based on compressed sensing and chaotic block scrambling is carried out in the following steps:
[0008] Step 1: Convert the pixel matrix of the image into a vector of length m;
[0009] Step 2: Using the transformation basis formed by wavelet transformation, the vector of length m composed of pixels is transformed into a sparse vector of length m containing high-frequency and low-frequency components;
[0010] Step 3: Use the fractional-order Lorentz chaotic system to generate m mutually orthogonal random sequences of length n;
[0011] Step 4: Combine m random sequences into an m×n measurement matrix;
[0012] Step 5: Use this measurement matrix to project the sparse vector into a low-dimensional space to obtain a compressed signal vector of length n;
[0013] Step 6: Scramble the vector; preferably, convert the compressed pixel values into hexadecimal characters, divide the vector into several sub-segments, splice the pixels in each sub-segment to form a large number, design an algorithm, and use chaos to scramble the characters in each sub-segment to form a large number;
[0014] Step 7: Perform elliptic curve addition operation on the scrambled vector using the public key;
[0015] Step 8: Perform digital signature on the encrypted image.
[0016] The present invention first converts the pixel matrix of the image into a vector of length m, and uses the transformation basis composed of wavelet transform to transform the vector composed of pixels with length m into a sparse vector with length m containing high-frequency and low-frequency components.
[0017] Then, negotiate the initial value of the Lorenz fractional-order chaotic system with the receiving end, generate m quasi-orthogonal random sequences with length n (<m), combine the m random sequences into an m×n measurement matrix, and then multiply the measurement matrix by the vector composed of pixels, that is, project the sparse vector into a low-dimensional space using this measurement matrix to obtain a compressed signal vector with length n.
[0018] Convert the compressed pixel values into hexadecimal characters, divide the image into several fields, connect the pixels in each field to form a large number, design an algorithm, and use chaos to scramble the characters in each field.
[0019] For the scrambled field, encrypt it using the algorithm of elliptic curve according to the public key.
[0020] Calculate the Hash value of the encrypted image, design an algorithm, and perform digital signature on it. At the receiving end, first verify the digital signature (the calculation method is the same as that of the sending end). If they are the same, it means that there is no attack.
[0021] At the receiving end, verify the signature of the encrypted image, then use the private key d to perform elliptic curve subtraction operation on the received image to obtain the large number after splicing and scrambling, and then use the chaos generated by the initial value of the negotiated Lorenz chaotic system to perform reverse scrambling, separate the spliced large number into 8-bit codes to obtain the compressed signal;
[0022] Multiply the chaos generated by the initial value of the negotiated Lorenz chaotic system by the transformation matrix generated by wavelet transform to generate a sensing matrix, and use the Bayesian compressive sensing algorithm to recover the vector constituting the original image.
[0023] As a preferred solution, at the sending end, convert the image matrix into a vector with length m.
[0024] As a preferred solution, in step two, at the sending end, the image is subjected to wavelet transform using the Baubechies wavelet basis function.
[0025] As a preferred solution, in step three, at the sending end, the initial values x0, y0, z0, w0 of the fractional-order Lorenz chaotic system are selected as the secret key and sent to the receiving end through a secure channel. m quasi-orthogonal random sequences of length n (<m) are generated using these initial values, and the m random sequences are combined into an m×n measurement matrix. The fractional-order Lorenz chaotic system is:
[0026]
[0027] Where, represents the fractional-order differential with respect to time, q is the order, and x, y, z, and w are the amplitudes of chaos.
[0028] As a preferred solution, at the sending end, the measurement matrix is multiplied by the vector obtained from the wavelet transform to generate a sensing vector.
[0029] As a preferred solution, at the sending end, the generated vectors are concatenated to generate a large number.
[0030] As a preferred solution, in step six, at the sending end, using the randomness of chaos, the generated large number is scrambled. Specifically: scramble the vector: convert the compressed pixel values into hexadecimal characters, divide the image into several fields, and connect the pixels in the fields to form a large number. Assume the length is l1, and there are l2 large numbers in total. Design an algorithm, that is, use the chaotic sequence y1(1,2,···,l1),···,y l2 (1,2,···,l1) generated by the Lorenz chaotic system, extract the serial numbers of the chaotic values in the chaotic sequence and form a vector. For example, the vector corresponding to the sorting serial numbers of y i (1,2,···,l1) is (q(1),q(2),···,q(l1)), and then the i-th large number is scrambled to become (imag1(q(1)),imag2(q(2)),···,imag l1 (q(l1))), thus realizing the scrambling of the characters in each large number field.
[0031] As a preferred solution, in step seven, at the sending end, the scrambled large number is encrypted using the public key on an elliptic curve. The specific process is as follows: The receiving end gives the private key d (any positive integer) and the base point G (G x ,G y ) in the elliptic curve decryptor, calculates the public key Q = dG, and sends G and Q to the sending end. The elliptic curve encryptor accepts K and G. The sender selects a random number k (from 1 to p - 1), where p is a hexadecimal prime number. The sender calculates in the elliptic curve encryptor M is the scrambled large number, mod(p) is the remainder operation, ( represents the additive elliptic operation), where U2=kG, U1 is the ciphertext, U2 is the decrypted data, and (U1, U2) is sent to the receiving end as the encrypted data.
[0032] As a preferred solution, in step 8, at the sending end, the encrypted image is digitally signed. The hash value z of the encrypted image is calculated first, and the private key d and the hash value z of the message to be signed are used. A temporary key k is randomly selected (it must be different for each image signature). The curve point R = k·G is calculated, and then the horizontal coordinate r = R of point R is taken. x mod(p). If r=0, reselect k. Calculate the other part s of the signature, the formula is: If s = 0, k is reselected. The generated signature is (r, s).
[0033] The present invention also discloses an elliptic curve decryption method of compressed sensing and chaotic block scrambling. After the above encryption method, the sending end transmits the image to the receiving end, and the receiving end takes the following steps:
[0034] Step 1: Verify the digital signature of the encrypted image;
[0035] Step 2: The receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling;
[0036] Step 3: Then, the chaos generated by the negotiated initial value of the Lorentz chaotic system is used to perform reverse scrambling, separate the spliced large numbers, and obtain the compressed signal;
[0037] Step 4: Multiply the chaos generated by the negotiated initial value of the Lorentz chaotic system by the transformation matrix generated by the wavelet transform to generate a perception matrix;
[0038] Step 5: Use the Bayesian compressed sensing algorithm to restore the vector composed of the original image;
[0039] Step 6: Restore the vector to the image matrix.
[0040] The innovation of the present invention lies in that the image is encrypted by combining wavelet transform, compressed sensing, chaotic scrambling, and elliptic curve algorithm. In order to prevent the encrypted image from being attacked, an algorithm is designed to digitally sign the image. At the receiving end, the encrypted image is verified by using the signature verification algorithm to confirm that it has not been tampered with, and then the original image data is restored by using elliptic curve subtraction, chaotic reverse scrambling, inverse wavelet transform, and Bayesian compressed sensing algorithm.
[0041] As a preferred solution, at the receiving end, the encrypted image is signed and verified. The signature verification process uses the message hash value z, the signature (r, s) and the signer's public key Q. Check whether r and s are in the range [1, p-1], otherwise the signature is invalid. Calculate w = s-1mod(p), and two elliptic curve points u1 = zwmod(p), u2 = rwmod(p), and then calculate Take the horizontal coordinate P of point P x , if r = P x , the signature is valid, otherwise it has been attacked.
[0042] As a preferred solution, the receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain a large number after splicing and scrambling. The elliptic curve decryptor receives (U1, U2) and performs calculations on U1. Get M and restore the large number after scrambling.
[0043] As a preferred solution, at the receiving end, chaotic reverse scrambling is used to obtain the large number spliced by the sending end.
[0044] As a preferred solution, at the receiving end, the large number is decomposed into 8-bit codes, and the original image vector is restored using the Bayesian compressed sensing algorithm.
[0045] As a preferred solution, the sparse representation algorithm of the sparse Bayesian compressed sensing learning data recovers the sparse signal by: the chaos generated by the negotiated initial values x0, y0, z0, w0 of the Lorentz chaotic system further generates the perception matrix N, and uses Restoring sparse signals by combining sparse Bayesian compressed sensing algorithm ε is the noise error. The specific process is: given X2, Ν, Σ (covariance), find the maximum posterior probability of X1. The calculation formula is:
[0046]
[0047] pass get:
[0048]
[0049] Among them, σ 2 is the mean square error, Σ is the covariance, N is the perception matrix, and T represents the transpose.
[0050] The principle and process of an elliptic curve encryption and decoding method based on compressive sensing and chaotic block scrambling are as follows: First, transform the pixel matrix of the image into a vector of length m, and use the transformation basis composed of wavelet transform to transform the vector X composed of pixels with length m into a sparse vector X1 with length m containing high-frequency and low-frequency components, that is, X1 = DWT(X), where DWT refers to discrete wavelet transform.
[0051] Then, negotiate the initial values x0, y0, z0, w0 of the Lorenz fractional-order chaotic system with the receiving end, and use the fractional-order Lorenz chaotic system,
[0052]
[0053] where, represents the fractional-order differentiation with respect to time, q is the order, and x, y, z, and w are the amplitudes of chaos.
[0054] generate m quasi-orthogonal random sequences x1(1, 2, ···, n), ···, x m (1, 2, ···, n) of length n (< m), combine the m random sequences into an m × n measurement matrix N, and then multiply the measurement matrix by the vector NX1 composed of pixels, that is, project the sparse vector into a low-dimensional space using this measurement matrix to obtain a compressed signal vector X2 = NX1 of length n.
[0055] Convert the compressed pixel values into hexadecimal characters, divide the image into several fields, connect the pixels in the fields to form a large number, assume the length is l1, and there are l2 large numbers in total. Through an algorithm, that is, use the chaotic sequence y1(1, 2, ···, l1), ···, y l2 (1, 2, ···, l1) generated by the Lorenz chaotic system, extract the serial numbers of the chaotic values in the chaotic sequence and form a vector. For example, the vector corresponding to the sorting serial numbers of y i (1, 2, ···, l1) is (q(1), q(2), ···, q(l1)), and then scramble the i-th large number to become (imag1(q(1)), imag2(q(2)), ···, imag l1 (q(l1))), so as to realize the scrambling of the characters in each large number field.
[0056] For the scrambled field (imag1(q(1)), imag2(q(2)), ···, imag l1 (q(l1))), encrypt it according to the public key using the elliptic curve algorithm. Specifically: The receiving end gives a private key d (any positive integer) in the elliptic curve decryptor, and the base point G (G x , G y), calculate the public key Q = dG, G and Q are sent to the sender, the elliptic curve encryptor accepts Q and G, the sender selects a random number k (1 to p-1), and the sender calculates in the elliptic curve encryptor mod(p) is the remainder operation, ( represents the additive elliptic operation), where U2=kG, U1 is the ciphertext, U2 is the decrypted data, and (U1, U2) is sent to the receiving end as the encrypted data.
[0057] Calculate the hash value of the encrypted image, and digitally sign it through the algorithm. Perform digital signature operation on the encrypted image. First calculate the hash value z of the encrypted image, and use the private key d and the hash value z of the message to be signed to randomly select a temporary key k (which must be different for each image signature). Calculate the curve point R = k·G, and then take the horizontal coordinate r = R of point R x mod(p). If r=0, reselect k. Calculate the other part s of the signature, the formula is: If s = 0, k is reselected. The generated signature is (r, s).
[0058] The receiving end first verifies the digital signature. The signature verification process uses the message hash value z, the signature (r, s) and the signer's public key Q. Check whether r and s are in the range [1, p-1], otherwise the signature is invalid. Calculate w = s -1 mod(p), and two elliptic curve points u1=zwmod(p), u2=rwmod(p), and then calculate Take the horizontal coordinate P of point P x , if r = P x , the signature is valid, otherwise it has been attacked.
[0059] The receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling. The elliptic curve decryptor receives (U1, U2) and performs operations on U1 Get M and restore the large number after scrambling.
[0060] Then, the chaos generated by the negotiated initial value of the Lorentz chaotic system is used to perform reverse scrambling, separate the concatenated large numbers into 8-bit codes, and obtain a compressed signal;
[0061] The chaos generated by the negotiated initial values x0, y0, z0, and w0 of the Lorentz chaotic system further generates the perception matrix N.
[0062]
[0063] Recovering sparse signals by combining sparse representation algorithm of learning data with sparse Bayesian compressed sensing ε is the noise error. The specific process is to find the maximum a posteriori probability of X1 given X2, Ν, Σ (covariance). The calculation formula is:
[0064]
[0065] pass get:
[0066]
[0067] Among them, σ 2 is the mean square error, Σ is the covariance, N is the perception matrix, and T represents the transpose.
[0068] Then, the image vector X is obtained through inverse wavelet transform, and then reconstructed into an image matrix to restore the original image.
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] The invention discloses an elliptic curve encryption and decryption method of compressed sensing and chaotic block scrambling, and its security lies in that after the image is transformed by wavelet, it becomes a sparse signal, and the transmission capacity of the signal is reduced through compressed sensing, and then chaotic scrambling and elliptic curve encryption are used to effectively enhance the security of image communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 This is a system architecture diagram of an elliptic curve encryption and decryption method based on compressed sensing and chaotic block scrambling according to a preferred embodiment of the present invention.
[0072] Figure 2 It is the attractor diagram of chaotic signal. Its local instability and global stability reflect the characteristics of chaos.
[0073] Figure 3 is the histogram of the encrypted and decrypted image. The encrypted image histogram indicates that encryption makes the image pixel value distribution more uniform.
[0074] Figure 4 It is the pixel correlation (horizontal) graph between the original image and the encrypted image. DETAILED DESCRIPTION
[0075] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.
[0076] Elliptic curve encryption is an asymmetric public key encryption algorithm. Compared with traditional asymmetric public key encryption methods (such as RSA), in elliptic curve encryption, once the public key is known, it is almost impossible to obtain the decrypted private key using the elliptic encryption algorithm. Therefore, it has higher security. The elliptic curve algorithm and encryption process are as follows:
[0077] Assume that p(>3) is a prime number in the finite field F, the finite field E p F p The equation of the ellipse in:
[0078] y 2 ≡x 3 +ax+bmod(p) (1)
[0079] Here a,b∈F p , 4a 3 +27b 2 ≠0.O represents the point at infinity, satisfying O+P=P, -O=O;
[0080] Inverse point: Assume A(x1,y1)∈E p , we have -A=(x1,-y1);
[0081] Addition: Assume A(x1,y1),B(x2,y2)∈E p , A≠B,A≠-B,A≠O,B≠O, then Calculate by formula (2):
[0082]
[0083] 2x operation: Assume A(x1,y1)∈E p and In this way, x3, y3 can be calculated by formula (3):
[0084]
[0085] Scalar product: If A(x1,y1)∈E p , r is an integer, we have:
[0086]
[0087] The implementation process is as follows: first, the pixel matrix of the image is converted into a vector of length m, and the transformation basis composed of wavelet transform is used to transform the vector of length m composed of pixels into a sparse vector X of length m containing high-frequency and low-frequency components.
[0088] Next, negotiate the initial values \(x_0\), \(y_0\), \(z_0\), \(w_0\) of the Lorenz fractional-order chaotic system with the receiving end, and generate \(m\) mutually quasi-orthogonal random sequences \(x_1(1, 2, \cdots, n), \cdots, x\) m (1, 2, \cdots, n). Combine the \(m\) random sequences into an \(m\times n\) measurement matrix \(N\), and then multiply the measurement matrix by the vector \(X_1\) composed of pixels, that is, project the sparse vector into a low-dimensional space using this measurement matrix to obtain a compressed signal vector \(X_2\) of length \(n\).
[0089] Convert the compressed pixel values into hexadecimal characters, divide the image into several fields, connect the pixels in the fields to form a large number, design an algorithm, use chaos to scramble the characters in each field, and for the scrambled fields, encrypt them using the elliptic curve algorithm according to the public key.
[0090] Calculate the Hash value of the encrypted image and perform a digital signature on it through an algorithm. At the receiving end, first verify the digital signature (the calculation method is the same as that at the sending end). If they are the same, it means that there is no attack.
[0091] At the receiving end, verify the signature of the encrypted image, then use the private key \(d\) to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling. Then use the chaos generated by the initial value of the negotiated Lorenz chaotic system to perform reverse scrambling, separate the spliced large number into 8-bit codes to obtain the compressed signal;
[0092] Multiply the chaos generated by the initial value of the negotiated Lorenz chaotic system by the transformation matrix generated by wavelet transform to generate a sensing matrix, and use the Bayesian compressive sensing algorithm to recover the vector composed of the original image.
[0093] The detailed principle and implementation process of this embodiment are as follows:
[0094] First, transform the pixel matrix of the image into a vector of length \(m\), and use the transformation basis composed of wavelet transform to transform the vector \(X\) composed of pixels into a sparse vector \(X_1\) of length \(m\) containing high-frequency and low-frequency components, that is, \(X_1 = DWT(X)\), where \(DWT\) refers to discrete wavelet transform.
[0095] Negotiate the initial values \(x_0\), \(y_0\), \(z_0\), \(w_0\) of the Lorenz fractional-order chaotic system with the receiving end, and use the fractional-order Lorenz chaotic system
[0096]
[0097] Generate \(m\) mutually quasi-orthogonal random sequences \(x_1(1, 2, \cdots, n), \cdots, x\) m(1,2,···,n), combine the m random sequences into an m×n measurement matrix N, and then multiply the measurement matrix by the vector composed of pixels, that is, use this measurement matrix to project the sparse vector into a low-dimensional space to obtain a compressed signal vector X2=NX1 with a length of n.
[0098] Convert the compressed pixel values into hexadecimal characters, divide the image into several fields, connect the pixels in the fields to form a large number. Assuming the length is l1, there are a total of l2 large numbers. Through the algorithm, that is, using the chaotic sequence y1(1,2,···,l1),···,y generated by the Lorenz chaotic system l2 (1,2,···,l1), extract the order of the chaotic values in the chaotic sequence to form a vector, for example, y i The vector corresponding to the sorting number (1,2,···,l1) is (q(1),q(2),···,q(l1)). Then the i-th large number is scrambled to become (imag1(q(1)),imag2(q(2)),···,imag l1 (q(l1))), thus scrambling the characters in each large number field.
[0099] For the scrambled fields (imag1(q(1)),imag2(q(2)),...,imag l1 (q(l1))), using the elliptic curve algorithm, encrypt it according to the public key. Specifically, the system receiving end gives the private key d (any positive integer) in the elliptic curve decryptor, the base point G (G x ,G y ), calculate the public key Q = dG, G and Q are sent to the sender, the elliptic curve encryptor accepts Q and G, the sender selects a random number k (1 to p-1), and the sender calculates in the elliptic curve encryptor mod(p) is the remainder operation, ( represents the additive elliptic operation), where U2=kG, U1 is the ciphertext, U2 is the decrypted data, and (U1, U2) is sent to the receiving end as the encrypted data.
[0100] Calculate the hash value of the encrypted image, design an algorithm, digitally sign it, and perform digital signature operations on the encrypted image. First, calculate the hash value z of the encrypted image, use the private key d and the hash value z of the message to be signed, and randomly select a temporary key k (which must be different for each image signature). Calculate the curve point R = k·G, and then take the horizontal coordinate r = R of point R x mod(p). If r=0, reselect k. Calculate the other part s of the signature, the formula is: If s = 0, reselect k. The generated signature is (r, s). The receiving end first verifies the digital signature. The signature verification process uses the hash value z of the message, the signature (r, s) and the signer's public key Q. Check whether r and s are in the range [1, p-1], otherwise the signature is invalid. Calculate w = s -1 mod(p), and two elliptic curve points u1=zwmod(p), u2=rwmod(p), and then calculate Take the horizontal coordinate P of point P x , if r = P x , the signature is valid, otherwise it has been attacked.
[0101] The receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling. The elliptic curve decryptor receives (U1, U2) and performs operations on U1 Get M and restore the large number after scrambling.
[0102] Then, the chaos generated by the negotiated initial value of the Lorentz chaotic system is used to perform reverse scrambling, separating the concatenated large numbers into 8-bit codes to obtain a compressed signal;
[0103] The chaos generated by the negotiated initial values x0, y0, z0, and w0 of the Lorentz chaotic system further generates the perception matrix N.
[0104]
[0105] Recover sparse signals by combining sparse representation algorithm of learning data with sparse Bayesian compressed sensing ε is the noise error. The specific process is to find the maximum a posteriori probability of X1 given X2, Ν, Σ (covariance). The calculation formula is:
[0106]
[0107] pass get:
[0108]
[0109] Then, the image vector X is obtained through inverse wavelet transform, and then reconstructed into an image matrix to restore the original image. The encrypted image undergoes electro-optical conversion and is transmitted to the receiving end through optical fiber, then undergoes photoelectric conversion, and then an elliptic curve decryptor is used to restore the original image information.
[0110] In this way, an elliptic curve encryption and decryption method based on compressed sensing and chaotic block scrambling is realized.
[0111] The encryption and decryption process of this embodiment is briefly summarized as follows:
[0112] 1. Convert the pixel matrix of the image into a vector of length m;
[0113] 2. Using the transformation basis formed by wavelet transform, the vector of length m composed of pixels is transformed into a sparse vector of length m containing high-frequency and low-frequency components;
[0114] 3. Use the fractional-order Lorentz chaotic system to generate m mutually orthogonal random sequences of length n, combine the m random sequences into an m×n measurement matrix, and use this measurement matrix to project the sparse vector into a low-dimensional space to obtain a compressed signal vector of length n;
[0115] 4. Convert the compressed pixel values into hexadecimal characters, divide the vector into several sub-segments, concatenate the pixels in the sub-segments to form a large number, design an algorithm, and use chaos to scramble the characters in each sub-segment to form a large number;
[0116] 5. Use the public key to perform elliptic curve addition on the scrambled vector;
[0117] 6. Calculate the hash value of the encrypted image, design an algorithm, and digitally sign it.
[0118] 7. The receiving end calculates the hash value of the encrypted image and uses the signature algorithm to verify the digital signature of the encrypted image;
[0119] 8. The receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling;
[0120] 9. Then, the chaos generated by the negotiated initial value of the Lorentz chaotic system is used to perform reverse scrambling, separate the concatenated large numbers into 8-bit codes, and obtain a compressed signal;
[0121] 10. Multiply the chaos generated by the initial value of the negotiated Lorentz chaotic system by the transformation matrix generated by the wavelet transform to generate a perception matrix;
[0122] 11. Use the Bayesian compressed sensing algorithm to restore the vectors that make up the original image and restore the vectors into an image matrix.
[0123] The preferred embodiments and principles of the present invention are described in detail above. For those skilled in the art, according to the ideas provided by the present invention, there may be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.
Claims
1. A compressed sensing and chaotic block scrambling elliptic curve encryption method, characterized in that: The sending end follows the following steps: Step 1: Convert the pixel matrix of the image into a vector of length m; Step 2: using the transformation basis formed by wavelet transformation, transform the vector of length m composed of pixels into a sparse vector of length m containing high-frequency and low-frequency components; Step 3: Use the fractional-order Lorentz chaotic system to generate m mutually orthogonal random sequences of length n; Step 4: Combine m random sequences into an m×n measurement matrix; Step 5: Use the m×n measurement matrix to project the sparse vector into a low-dimensional space to obtain a compressed signal vector of length n; Step 6: Scramble the compressed signal vector; Step 7: Use the public key to perform elliptic curve addition operation on the scrambled vector; Step 8: Digitally sign the encrypted image.
2. The elliptic curve encryption method of compressed sensing and chaotic block scrambling according to claim 1 is characterized in that: In step 2, the wavelet transform is to perform wavelet transform on the image vector using Baubechies wavelet basis function.
3. The elliptic curve encryption method of compressed sensing and chaotic block scrambling according to claim 1 is characterized in that: In step 3, the initial values of the fractional-order Lorentz chaotic system are x0, y0, z0, w0, and the fractional-order Lorentz chaotic system is: in, It refers to the fractional differentiation with respect to time, q is the order, and x, y, z and w are the amplitudes of chaos.
4. The elliptic curve encryption method of compressed sensing and chaotic block scrambling according to claim 1, 2 or 3, characterized in that: In step six, the vector is scrambled, specifically: the compressed pixel value is converted into hexadecimal characters, the image is divided into several fields, and the pixels in the field are connected.
5. The elliptic curve encryption method of compressed sensing and chaotic block scrambling according to claim 3 is characterized in that: In step 7, the elliptic curve addition algorithm is: given a private key d in the elliptic curve decryptor, the base point G (G x ,G y ), calculate the public key Q = dG, G and Q are sent to the sender, the elliptic curve encryptor accepts Q and G, selects a random number k, k is 1 to p-1, p is a hexadecimal prime number, and calculates M is the scrambled number, mod(p) is the remainder operation, where U2=kG, U1 is the ciphertext, U2 is the decrypted data, and (U1, U2) is sent to the receiving end as the encrypted data.
6. The elliptic curve encryption method of compressed sensing and chaotic block scrambling according to claim 5 is characterized in that: In step eight, the digital signature is as follows: First, calculate the hash value z of the encrypted image, use the private key d and the hash value z of the message to be signed, and randomly select a temporary key k; calculate the curve point R = k·G, and then take the horizontal coordinate r = R of point R x mod(p); if r = 0, reselect k; calculate the other part s of the signature, the formula is: If s=0, then reselect k; the generated signature is (r, s).
7. An elliptic curve decryption method based on compressed sensing and chaotic block scrambling, characterized in that: The encrypted image according to any one of claims 1 to 6 is transmitted to a receiving end, and the receiving end takes the following steps: Step 1: Verify the digital signature of the encrypted image; Step 2: Use the private key d to perform elliptic curve subtraction on the received image to obtain a large number after splicing and scrambling; Step 3: Use the chaos generated by the initial value of the Lorentz chaotic system negotiated with the transmitter to perform reverse scrambling, separate the spliced large numbers, and obtain a compressed signal; Step 4: Multiply the chaos generated by the initial value of the Lorentz chaotic system negotiated with the transmitter by the transformation matrix generated by the wavelet transform to generate a perception matrix; Step 5: Use the Bayesian compressed sensing algorithm to restore the vector composed of the original image; Step 6: Restore the vector to the image matrix.
8. The elliptic curve decryption method of compressed sensing and chaotic block scrambling according to claim 7 is characterized in that: In step 1, use the hash value z of the message, the signature (r, s) and the signer's public key Q; check whether r and s are in the range [1, p-1], if not, the signature is invalid; calculate w = s -1 mod(p), and two elliptic curve points u1=zwmod(p), u2=rwmod(p), and then calculate Take the horizontal coordinate P of point P x , if r = P x , the signature is valid, otherwise it has been attacked.
9. The elliptic curve decryption method of compressed sensing and chaotic block scrambling according to claim 8, characterized in that: Step 2 is as follows: The receiving end uses the private key d to perform elliptic curve subtraction on the received image to obtain the large number after splicing and scrambling. The elliptic curve decryptor receives (U1, U2) and performs calculation on U1 Get M and restore the large number after scrambling.
10. The elliptic curve decryption method of compressed sensing and chaotic block scrambling according to claim 9, characterized in that: In step 5, the chaos generated by the negotiated initial values x0, y0, z0, and w0 of the Lorentz chaotic system further generates the perception matrix N. Restoring sparse signals by combining Bayesian compressed sensing algorithm ε is the noise error. The specific process is: given X2, Ν, Σ, find The maximum posterior probability is calculated as: pass get: Among them, σ 2 is the mean square error, Σ is the covariance, N is the perception matrix, and T represents the transpose.
Citation Information
Patent Citations
Color image compression encryption method based on compressed sensing
CN112637441A
Compressed sensing OFDM-PON (Orthogonal Frequency Division Multiplexing-Passive Optical Network) secure communication system based on block scrambling
CN114157497A
Elliptic curve image encryption and decryption system and method based on deep learning and chaos
CN116582241A
Chaotic image encryption method combined with ECC asymmetric encryption algorithm
CN118233577A