Method capable of verifying electronic signature based on 2D-DCT (two-dimensional discrete cosine transform)

By combining the Shamir scheme and differential privacy technology with 2D-DCT transformation, the problems of high complexity and insufficient robustness of existing electronic signature methods are solved, realizing a secure and reliable electronic signature method that ensures the authenticity and integrity of the signature.

CN119004547APending Publication Date: 2024-11-22GUIZHOU DATABAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411162470.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing verifiable electronic signature methods based on 2D-DCT transform suffer from problems such as complex signature embedding and extraction processes, high computational complexity, insufficient robustness, and vulnerability to attacks.

Method used

The signature image is segmented using the threshold image secret sharing technique of the Shamir scheme to generate a shadow image. The digital signature is then embedded into the secret share of the image through 2D-DCT transformation. Differential privacy technology is used to hide the signature, and the original image is restored by combining Lagrange interpolation. The signature is then verified using the public key of the signature manager.

Benefits of technology

It improves the security and robustness of electronic signatures, ensures the authenticity, traceability and integrity of signatures, enhances sensitivity to tampering, improves document integrity protection and circulation efficiency, and enhances the concealment and resistance to attacks of signatures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119004547A_ABST
    Figure CN119004547A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of digital signatures, and particularly discloses a method for verifying an electronic signature based on 2D-DCT (two-dimensional discrete cosine transform), which is characterized by comprising the following steps: S1, preparing a data set: inputting a signature picture into a computer, carrying out size normalization, and ensuring the resolution of the picture; s2, carrying out threshold image secret sharing based on a Shamir scheme; s3, generating a digital signature; generating a digital signature by using the information of the signature manager; s4, inserting a digital signature into an image secret share by using a differential privacy technology; S5, obtaining an electronic signature: adding an index array stored locally and an array extracted from the secret image to recover information of original pixel points, and obtaining a complete electronic signature image; and S6, verifying the electronic signature: traversing the image secret share, converting the image secret share into a DCT matrix by using DCT, extracting a digital signature, and verifying the digital signature by using a public key of a signature manager. The invention aims to solve the problem of verifying the security of the electronic signature in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signatures, and in particular to a method for verifying electronic signatures based on 2D-DCT transformation. Background Art

[0002] The rapid progress of information society and technology has made online office popular. Information security plays a very important role in e-government and is directly related to the security issues of file integrity and confidential transmission. Small-scale information leakage and information changes will cause certain economic losses to the parties involved in document interaction. Therefore, the integrity, confidentiality and verifiability of files are one of the issues that departments using electronic office in various fields pay close attention to. Tampering with file information often interferes with subsequent work. For example, after a bank issues a document, criminals use technical means to enter the company's internal system, modify the file, and then issue it to various departments through the system. The file changes caused by their behavior can easily cause huge economic losses.

[0003] Therefore, in order to ensure the integrity and secure and reliable transmission of electronic documents, some verifiable electronic signatures must be added to the electronic documents.

[0004] Electronic signature is a digital signature method, which has been widely used in e-commerce, e-government and other fields. With the continuous development of information technology, the security and reliability of electronic signatures have become increasingly important.

[0005] Among the existing electronic signature technologies, the method based on digital signature is the most common one. Digital signature is a technology based on public key cryptography, which can ensure the unforgeability and non-repudiation of signature. However, there are some problems with the traditional digital signature method, such as the long signature length and high computational complexity.

[0006] In order to solve these problems, people have proposed an image-based electronic signature method. This method uses the signature image as the carrier of the signature, and embeds and verifies the signature by processing and transforming the signature image. The image-based electronic signature method has the advantages of short signature length and low computational complexity, so it has received widespread attention.

[0007] Among the image-based electronic signature methods, the verifiable electronic signature method based on 2D-DCT transform has become one of the research hotspots in the field of electronic signature. This method performs 2D-DCT transform on the signature image, embeds the signature information into the transformed coefficients, and then obtains the signature image through inverse transform. During verification, the signature information is extracted by performing 2D-DCT transform on the signature image, and the signature administrator's public key is used for verification.

[0008] However, the existing verifiable electronic signature methods based on 2D-DCT transformation still have some problems. For example, the signature embedding and extraction process is relatively complicated and requires high computational complexity; the signature is not robust enough and is vulnerable to attacks. Summary of the invention

[0009] In view of the deficiencies of the prior art, the technical problem solved by the present invention is to provide a method for embedding a signature into an electronic document using a verifiable electronic signature technology based on 2D-DCT transformation to solve the problems of existing document integrity and document circulation security.

[0010] In order to solve the above problem, the technical solution adopted by the present invention is: a method for verifying an electronic signature based on 2D-DCT transformation, characterized in that it includes the following steps: S1 Prepare the data set: Input the signature image into the computer and normalize the size; S2 Threshold image secret sharing based on Shamir's scheme: Segment the signature image and generate n shadow images from the signature image. The shadow images are secret shares, n corresponds to the number of custom image sharing, and m corresponds to the custom threshold strategy. Any m or more shadow images can reconstruct the secret image. At the same time, the secret share of the generated RGB image is transformed by 2D-DCT to obtain the DCT coefficient matrix. S3 generates digital signature: Generates digital signature using the signature manager's information; S4 uses differential privacy technology to insert the digital signature into the image secret share: convert the hexadecimal digital signature into binary, and insert the digital signature into the image secret share by changing the high-frequency part of the DCT matrix; S5 obtains the electronic signature: adds the index array stored locally to the array extracted from the secret image to restore the information of the original pixel points and obtains the complete electronic signature image; S6 verifies the electronic signature: by traversing the image secret share, using DCT transformation to convert the image secret share into a DCT matrix, extracting the digital signature and verifying it using the signature manager's public key.

[0011] The beneficial effects of this scheme are: normalizing the size of the signature image to ensure consistent resolution, which facilitates subsequent processing; using the Shamir scheme to segment the signature image and generate shadow images, ensuring that only a certain number of shadow images can reconstruct the secret image, increasing security; embedding the digital signature into the secret share and binding it with the signature manager's information to ensure the authenticity and traceability of the electronic signature; using differential privacy technology to insert the digital signature into the image secret share, further improving the security of the electronic signature; by adding the index array to the array extracted from the secret image, restoring the information of the original pixel points, and obtaining a complete electronic signature image, ensuring the integrity of the signature; using DCT The digital signature is extracted by transformation and verified using the public key of the signature manager, ensuring the legitimacy and validity of the electronic signature. The system takes the electronic signature image and the certificate issued by the CA to the personnel of each department as the research object. By issuing the private key in the certificate and the hash value of the electronic document, the identity of the signature user and the electronic document are bound together to form a digital signature share. The right to use the electronic signature is obtained by combining these digital signature shares, and finally the combined digital signature is embedded in the electronic signature, ensuring the integrity of the electronic document, and finally obtaining a verifiable electronic document model. Compared with the existing technology, this method is very sensitive to document tampering and the identity information of the signer, and can effectively improve the integrity protection of the document and the efficiency of document circulation. Image secret sharing based on 2D-DCT transformation is used as a pre-operation task of electronic signature. A kind of service that relies on the segmentation of image features to transform an image into multiple images. The embedding method of digital signatures is often related to the matrix features of the segmented image. The image transformed by 2D-DCT eventually becomes a coefficient matrix. The upper left half of the matrix is ​​the low-frequency part, which represents the part of the image where the brightness changes slowly and describes the main position of the image. The lower half of the matrix is ​​the high-frequency part, which represents the part where the image changes dramatically, that is, the details of the image. When compressing the image, the high-frequency part of the image is discarded. Therefore, embedding the digital signature into the high-frequency part of the image will not cause visual differences. The robustness of the digital signature is related to the embedding position. There are direct embedding methods and methods that change the least significant bit, etc. None of these existing methods can effectively prevent digital signatures from being attacked. Differential Privacy (DP) can ensure that digital signatures are not easily discovered and attacked by attackers, that is, when certain data is added to the image, the knowledge obtained by the attacker from the image will not change due to the appearance of these new samples at the technical level. Therefore, DP has extremely good data hiding capabilities.

[0012] Furthermore, S2 adopts the Shamir scheme for image secret sharing, where P(x) is a polynomial and s is a secret: a) Pass the signature image through the RGB coefficient matrix and perform polynomial calculation on the matrix; b) Select an m-1 degree polynomial and specify the constant term as the secret share to be divided, where S is the secret to be shared, A0=P(0)=S, and the remaining m-1 coefficients can be randomly selected. p ensures that the pixel value is between 0 and 255. Generally, p=251 is selected. The part greater than 255 is recorded for easy use in image recovery:

[0013] c) Generate secret shares and take n different , calculate the function value , , To use the secret shares of Shamir secret sharing, the polynomial can be reconstructed by any m secret shares among the n secret shares , thus obtaining the secret S, Here S represents each pixel in the image, and the custom n can determine the number of secret shares; d) The secret share of the generated RGB image is transformed into a DCT coefficient matrix through 2D-DCT. The secret share here is a constant calculated by the polynomial. The specific formula is as follows:

[0014]

[0015] Where F is the coefficient obtained by transformation, f is the pixel value in the secret share obtained by SIS, A is the conversion matrix, i is the frequency of the two-dimensional wave in the horizontal direction, j is the frequency of the two-dimensional wave in the vertical direction, , N is the size of the image block, The definition formula is:

[0016] The Shamir scheme is based on the polynomial interpolation principle. Only with a sufficient number of secret shares can the original secret be reconstructed, which improves the security of the image. The values ​​of n and m can be customized as needed to flexibly control the number of secret shares and the threshold strategy. Even if some secret shares are lost or damaged, the original secret can still be reconstructed as long as there are a sufficient number of other secret shares. Furthermore, the upper left half of the matrix obtained by DCT transformation of the image in S4 is the low-frequency part, and the lower right half is the high-frequency part. Changing the high-frequency part of the matrix does not affect the visual changes. First, the two-dimensional matrix in the DCT matrix is ​​inverted, and the last matrix is ​​swapped with the first matrix. All matrices are swapped in turn, and the binary number string is changed to an array. , align each bit string in the binary array with every two numbers in the one-dimensional array, and perform the following operations:

[0017] Among them, pos represents the position change in the DCT one-dimensional array. When the i-th number to be inserted into the array L is 1, first determine the value of the 2i+1 and 2i-th values ​​of the one-dimensional array in the DCT array. If Then there is no need to change the position, otherwise it is necessary to swap the positions of 2i+1 and 2i, and process the DCT two-dimensional matrix from top to bottom and from left to right. After inserting all the numbers in the array L, the DCT two-dimensional matrix is ​​reversed again, and finally the DCT matrix is ​​restored to the image secret share through the inverse 2D-DCT operation; By processing the high-frequency part of the DCT matrix, secret information can be hidden, which increases the security of the image. Even if part of the secret share is lost or damaged, the original secret can still be reconstructed through other shares, which improves the robustness of the system. Since the processing of the high-frequency part will not have a significant impact on vision, the processed image is visually similar to the original image, ensuring the quality of the image. Furthermore, S3 further includes the following steps: S31 When generating a digital signature, the signature manager generates a pair of public and private keys; S32 sends its own domain name, organization name, email address, public key and other identity information to the CA certification agency, which uses the sm3 algorithm to encrypt the applicant's plain text information to obtain a message digest; S33 then uses the private key of the CA certification agency to sign the message digest, and sends the CA's signature, the applicant's public key, the certificate validity period and other information to the signature manager in the form of a certificate. Through the CA's signature, other parties can be sure that the received public key does belong to the signature manager and can trust the authenticity of the public key. This establishes a trust mechanism to ensure the reliability and credibility of the digital signature. The CA uses the sm3 algorithm to encrypt the applicant's plaintext information to obtain a message digest, and uses its private key to sign the digest. This signing process ensures the integrity and immutability of the certificate. Any tampering with the certificate content will result in signature verification failure, thereby preventing the possibility of the certificate being forged or tampered with. The CA's private key is usually subject to strict security protection, making it difficult for attackers to forge the CA's signature, which increases the security of the digital signature system and reduces the risk of malicious attacks.

[0018] Furthermore, in S4, when using differential privacy technology to insert the digital signature into the image secret share, the two-dimensional matrix in the DCT matrix is ​​inverted, the binary number string is changed into an array, aligned with every two numbers in the one-dimensional array, and the digital signature is inserted into the DCT matrix by exchanging positions. By performing specific processing and insertion on the digital signature, the privacy protection of the signature information can be increased to a certain extent. This processing makes it more difficult for attackers to directly infer the original digital signature from the image secret share. Embedding the digital signature into the DCT matrix in this way can make it more difficult to detect. The DCT matrix is ​​a transformation representation of an image, which itself has a certain complexity. By aligning and exchanging positions with the numbers in the matrix, the digital signature is more easily integrated into the features of the image, thereby improving the concealment of the embedding. Embedding the digital signature into the DCT matrix can be compatible with these image processing steps and reduce interference with subsequent image processing.

[0019] Furthermore, when obtaining the electronic signature in S5, the Lagrange interpolation method is used to restore the pixels in the original image. During the restoration of the electronic signature, the Lagrange interpolation method can be used to more accurately restore the pixels in the original image, thereby ensuring the quality of the restored image. The Lagrange interpolation method usually has good smoothness and can avoid sharp transitions or discontinuities during the interpolation process. This is very important for image restoration because it can reduce jagged edges and noise in the image, making the restored image more natural and clear.

[0020] Furthermore, when verifying the electronic signature in S6, the public key of the signature manager is used for verification. If the digital signature can be decrypted successfully, the electronic signature is legal, otherwise it is used illegally.

[0021] Furthermore, in S5, by reading and processing m shadow images, the index array is taken out, and the array of pixels whose remainder is restored is formed into a one-dimensional array, which is directly added to the array of shadow images, and the pixels in the original image are restored using the Lagrange interpolation method. By taking out the index array and restoring the array of pixels whose remainder is restored, the robustness of image restoration can be increased. Even if part of the shadow image is damaged or lost, the original image can still be restored through the information in other shadow images, thereby improving the fault tolerance of the system. Adding the restored pixels directly to the array of shadow images can avoid repeated calculations and data storage, thereby improving the efficiency of image restoration. At the same time, the restored pixels can be quickly calculated using the Lagrange interpolation method, thereby further improving the speed of restoration.

[0022] Furthermore, in S6, by traversing all image secret shares, using DCT transform to convert image secret shares into DCT matrix, inverting the two-dimensional matrix in the matrix, extracting the digital signature using a specific formula, and verifying it using the public key of the signature manager, the robustness of the digital signature can be improved by inverting the two-dimensional matrix. This inversion operation can increase the signature's resistance to image transformation and noise, so that the digital signature can still be correctly extracted and verified when the image is interfered or damaged to a certain extent; using DCT transform and a specific formula to extract the digital signature can increase the security of the digital signature. DCT transform can convert image data into frequency domain representation, so that the digital signature is embedded in the frequency domain, which increases the difficulty for attackers to extract and tamper with the signature. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 Image secret sharing model structure diagram; Figure 2 Schnorr-based ECDSA threshold signature structure diagram; Figure 3 The structure diagram of the verifiable electronic signature model based on 2D-DCT transformation; Figure 4 Electronic signature identification image without elliptic curve digital signature; Figure 5 Electronic signature identification diagram with elliptic curve digital signature. DETAILED DESCRIPTION

[0024] The following is further described in detail through specific implementation methods: Embodiment 1, a method for verifying an electronic signature based on 2D-DCT transformation, comprises the following steps: The first step is to prepare the dataset.

[0025] The signature image that is unanimously approved within the organization will be used and entered into the computer. The style of the signature image should not be too simple. Simple images will cause certain difficulties for the subsequent insertion of digital signatures. In order to enable the system to standardize the management of signature images and subsequent security analysis, the size of the signature image will be normalized to ensure that the resolution of the image is 512*512, which will be used for secret sharing and watermark insertion of the image.

[0026] The second step is to perform (m,n) threshold image secret sharing (SIS) based on Shamir's scheme.

[0027] Considering the complexity of the institutions and departments in various industries, the signature needs the approval of multiple departments before it can be used. In order to improve the security and operational flexibility of the solution, Figure 1, the signature image is segmented, and n shadow images are generated from the signature image. The shadow image is the secret share. Any m or more shadow images can reconstruct the secret image. n corresponds to the number of custom image sharing, and m corresponds to the custom threshold strategy. The present invention adopts the image secret sharing of Shamir's scheme, where P(x) is a polynomial and s is a secret: a) Pass the signature image through the RGB coefficient matrix and perform polynomial calculation on the matrix; b) Select an m-1 degree polynomial and specify the constant term as the secret share to be divided, where S is the secret to be shared, A0=P(0)=S, and the remaining m-1 coefficients can be randomly selected; p ensures that the pixel value is between 0 and 255, generally p=257, and the part greater than 255 is recorded for easy use in image recovery:

[0028] c) Generate secret shares and take n different , calculate the function value , , To use the secret shares of Shamir secret sharing, the polynomial can be reconstructed by any m secret shares among the n secret shares , thus obtaining the secret S; here S represents each pixel in the image, and the custom n can determine the number of secret shares; d) The secret share of the generated RGB image is transformed by 2D-DCT to obtain the DCT coefficient matrix. The secret share here is a constant calculated by the polynomial. The specific formula is as follows:

[0029]

[0030] Where F is the coefficient obtained by transformation, f is the pixel value in the secret share obtained by SIS, A is the conversion matrix, i is the frequency of the two-dimensional wave in the horizontal direction, j is the frequency of the two-dimensional wave in the vertical direction, , N is the size of the image block, The definition formula is:

[0031] The constant can be expanded into a two-dimensional matrix, each element of which is equal to the constant. In this way, it can be regarded as a special image, and then the matrix can be transformed into a 2D-DCT.

[0032] The specific steps are as follows: Determine a constant value of the secret share, set to C.

[0033] Create a two-dimensional matrix the same size as the image to be transformed.

[0034] Assign C to each element in the matrix.

[0035] The newly created matrix is ​​transformed into a 2D-DCT matrix using the standard DCT transform algorithm, transforming it in the horizontal and vertical directions in sequence.

[0036] Alternatively, the constant secret share can be combined with a known matrix that can be DCT-transformed. For example, the constant is added or multiplied with a randomly generated image matrix to obtain a new matrix, and then the new matrix is ​​transformed into a 2D-DCT.

[0037] The specific steps are as follows: Generate a random matrix R of the same size as the image to be transformed.

[0038] The constant value C of the secret share is operated with the random matrix R, and a new matrix T is obtained by adding (R + C) or multiplying (R * C).

[0039] Perform 2D-DCT transformation on the matrix T, also using the standard DCT transformation algorithm.

[0040] The third step is to generate a digital signature. The detailed steps are as follows Figure 2 As shown, the digital signature is generated using the signature manager's information to bind the signature manager's information to the secret share, and the person is held accountable when the signature is used in violation of regulations, thus ensuring the security and legality of the use of the signature.

[0041] a) To apply for a certificate, the signature administrator generates a pair of public and private keys, sends his or her own domain name, organization name, email address, public key and other identity information to the CA certification agency, and keeps the private key locally. After receiving the application, the CA certification agency conducts an audit and evaluation to verify the legitimacy of the applicant.

[0042] b) Issue certificates to ensure the legitimacy of the user's certificate; the CA certification agency uses the sm3 algorithm to encrypt the applicant's plain text information to obtain a message digest, and then uses the CA certification agency's private key to sign the message digest, and sends the CA's signature, applicant's public key, certificate validity and other information in the form of a certificate to the signature manager. The signature manager verifies the certificate to ensure that the certificate has not been tampered with, and then can use his own private key to sign other files.

[0043] The fourth step is to use differential privacy technology to insert the digital signature into the image secret share, such as Figure 3As shown, the hexadecimal digital signature is converted into binary. The purpose of converting the hexadecimal digital signature into binary is to expand the length of the original digital signature. Each binary digit in the binary array is used to align the two digits in the DCT matrix. You can imagine putting it above the two digits. If the current binary is 1, the DCT coefficient on the left is required to be smaller than the DCT coefficient on the right. Since the high-frequency part and the low-frequency part are determined when the DCT transform is used, a DCT transform is used for a picture, then the high-frequency part is in the lower right half and the low-frequency part is in the upper left half. This is the nature of DCT's transformation of the picture. This does not need to be judged. The upper left half of the matrix obtained by using the DCT transform of the image is the low-frequency part, and the lower right half is the high-frequency part. The original DCT matrix is ​​reversed. At this time, there is no need to use the inverse method to hide the digital signature on the DCT coefficient matrix. By changing the high-frequency part of the matrix, it will not affect the visual changes. The specific method is, first, invert the two-dimensional matrix in the DCT matrix, swap the last matrix with the first matrix, swap all the matrices in turn, and change the binary digital string into an array , align each bit string in the binary array with every two numbers in the one-dimensional array, and perform the following operations:

[0044] Among them, pos represents the position change in the DCT one-dimensional array. When the i-th number to be inserted into the array L is 1, first determine the value of the 2i+1 and 2i-th values ​​of the one-dimensional array in the DCT array. If Then there is no need to change the position, otherwise it is necessary to swap the positions of 2i+1 and 2i, and process the DCT two-dimensional matrix from top to bottom and from left to right. After inserting all the numbers in the array L, the DCT two-dimensional matrix is ​​reversed again, and finally the DCT matrix is ​​restored to the image secret share through the inverse 2D-DCT operation.

[0045] Determine the matrix partitioning and marking method, and divide and mark the two-dimensional DCT matrix. The specific method is: 1 Consider using a combination of multiple transformation operations to ensure that the positions of high-frequency and low-frequency parts can be clearly determined; 2. Implement the inversion algorithm in the code and record the transformation process for debugging and verification; 3. Develop visualization tools to visualize the transformed matrix and help technicians to check and confirm.

[0046] 4. Test and verify the solution using different images and binary conditions to ensure stability and effectiveness. The above method can help those skilled in the art to better understand and process the inversion operation of the two-dimensional DCT matrix and clarify the positions of the high-frequency and low-frequency parts.

[0047] The fifth step is to obtain the electronic signature. Combining the above steps, the index array stored locally is added to the array extracted from the secret image to restore the information of the original pixels. First, the m shadow images are read and processed, the index array is taken out, and the array with the remainder of 256 pixels is restored to form a one-dimensional array, which is directly added to the array of the shadow image. All pixels in the m shadow images are traversed, and the Lagrange interpolation method is used to restore the pixels in the original image, and finally the complete version of the electronic signature image is obtained.

[0048] The sixth step is to verify the electronic signature. Through the above operations, the image is divided into n different image secret shares. All image secret shares are traversed, and the image secret shares are converted into DCT matrices using DCT transformation. The two-dimensional matrix in the matrix is ​​inverted, and the digital signature is extracted using the formula in step 4. The public key of the signature manager is used for verification. If the digital signature can be decrypted successfully, then the electronic visa is legal. Otherwise, the electronic signature is used illegally.

[0049] Step 6: Test the detection effect of this system (1) During the test, the electronic signature image to be tested is input into the detection model. After the above system model operation, the image is secretly shared, the official document is encrypted using the threshold signature, and the encrypted result is secretly shared again. The secret share is inserted into each image secret to ensure that each share has the identity of the signer; (2) The present invention compares the model detection results before and after the digital signature is inserted. Figure 4 This is the result of not adding a digital signature. Figure 5 This is the recognition result after adding the digital signature. It can be found that when the two images are observed with the naked eye, it is impossible to determine which image is embedded with the digital signature, which shows that this method has certain practicality.

[0050] Embodiment 2: This embodiment takes the electronic signature application of a financial institution as an example.

[0051] In financial transactions, it is necessary to ensure the security and verifiability of transactions. The agency adopts a verifiable electronic signature method based on 2D-DCT transform.

[0052] First, prepare the signature image that is unanimously approved by the organization and normalize its size. Then, use the threshold image secret sharing technology of Shamir's scheme to segment the signature image and generate multiple shadow images, which are secret shares. Next, the signature manager’s information is bound to the secret share; through the differential privacy technology, the digital signature is inserted into the high-frequency part of the DCT matrix of the image secret share; When obtaining the electronic signature, the locally stored index array is added to the array extracted from the secret image to restore the original pixel information and obtain the complete electronic signature image; Finally, when verifying the electronic signature, the image secret share is traversed, converted into a DCT matrix using DCT transform, the digital signature is extracted and verified using the signature manager's public key. If the digital signature can be decrypted successfully, the electronic signature is legal and the transaction can proceed; otherwise, the transaction is considered illegal. Embodiment 3: This embodiment relates to the signing of an electronic contract.

[0053] In the process of electronic contract signing, the authenticity and integrity of the contract need to be guaranteed. This goal can be achieved by using a verifiable electronic signature method based on 2D-DCT transformation. Similarly, the signature image of the contract is normalized and threshold image secret sharing is performed to generate a digital signature, which is then bound to the signature manager's information; The digital signature is inserted into the DCT matrix of the image secret share using the differential privacy method. When obtaining the electronic signature, the pixels in the original image are restored through the Lagrange interpolation method. Finally, when verifying the electronic signature, the signature manager's public key is used for decryption. If the decryption is successful, it means that the electronic signature is legal and the contract is valid; otherwise, there may be problems with the contract signing. Embodiment 4: This embodiment is applied to electronic document authentication.

[0054] In the process of authenticating electronic documents, verifiable electronic signatures can provide assurance of the authenticity and integrity of the document; According to the above method, the signature image of the document is processed, including preparing the data set, threshold image secret sharing, generating digital signatures, embedding signatures and inserting them into the DCT matrix using differential privacy; After obtaining the electronic signature, the original pixels are restored through the corresponding algorithm. When verifying the electronic signature, the signature administrator's public key is used for decryption; If the decryption is successful, the electronic document is authenticated and the authenticity and integrity of the document can be confirmed; otherwise, further investigation of the document's source and authenticity may be required; Example 5: Basic electronic signature process 1. Prepare the dataset: Input a signature image (e.g., 800x600 pixels) into the computer and normalize its size to a uniform size, such as 500x500 pixels; 2. Secret sharing: Use the Shamir scheme to split the normalized image into five shadow images, of which any three shadow images can reconstruct the original image; 3. Generate digital signature: The signature manager generates a pair of public and private keys and submits personal information to the CA certification agency. The CA agency uses the SM3 algorithm to generate a certificate and sends it to the signature manager; 4. Differential privacy technology: insert the binary form of the digital signature into the high-frequency part of the DCT coefficient matrix of the shadow image; 5. Obtaining electronic signature: Using Lagrange interpolation method, the three shadow images are combined to restore the original image; 6. Verify the electronic signature: Use the signature administrator’s public key to verify the extracted digital signature to confirm the legitimacy of the electronic signature.

[0055] Example 6: Electronic signature with enhanced security 1. Prepare the data set: same as in Example 1; 2. Secret sharing: The image is divided into 10 shadow images, and any 6 shadow images are required to reconstruct the original image, which increases security; 3. Generate digital signature: same as in Example 5; 4. Differential privacy technology: When inserting the digital signature, a more complex algorithm is used to further obfuscate the high-frequency part of the DCT matrix to improve concealment; 5. Obtaining the electronic signature: combining the six shadow images and using the Lagrange interpolation method to restore the original image; 6. Verify the electronic signature: Same as in Example 5, but add an integrity check on the shadow image to ensure that it has not been tampered with during the reconstruction process; Example 7: Large-scale deployment of electronic signature system 1. Prepare the data set: batch process a large number of signature images, including size normalization and format unification; 2. Secret sharing: 20 shadow images are generated for each image, and any 15 shadow images are required to reconstruct the original image. This is suitable for large-scale deployment and improves the robustness of the system. 3. Generate digital signatures: The signature manager generates public and private key pairs in batches and cooperates with CA organizations to obtain certification certificates in batches; 4. Differential Privacy: Develop automated tools to efficiently insert digital signatures into the DCT matrices of a large number of shadow images; 5. Obtaining electronic signatures: Developing an automated system to recover the original image from multiple shadow images, suitable for large-scale operations; 6. Verify electronic signatures: Implement automated verification processes to quickly verify the legitimacy of a large number of electronic signatures.

[0056] Example 8: Cross-platform electronic signature solution 1. Prepare the dataset: Develop cross-platform software that allows users to upload and process signature images on different operating systems; 2. Secret Sharing: Implement a flexible system where users can customize the number of shadow images and the minimum number of shadow images required for reconstruction; 3. Generate digital signature: Provide a user-friendly interface to guide users through the process of public and private key generation and CA authentication; 4. Differential privacy technology: Integrate advanced encryption algorithms to ensure the consistency and security of inserting digital signatures on different platforms; 5. Obtain electronic signatures: Develop applications for different devices to enable users to restore electronic signatures on any device; 6. Verify electronic signatures: Provide a secure online verification service where users can verify the legitimacy of electronic signatures anywhere.

[0057] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A method for verifying electronic signature based on 2D-DCT transformation, characterized in that: The following steps are involved: S1 Prepare the data set: Input the signature image into the computer and normalize the size; S2 Threshold image secret sharing based on Shamir's scheme: Segment the signature image and generate n shadow images from the signature image. The shadow images are secret shares, n corresponds to the number of custom image sharing, and m corresponds to the custom threshold strategy. Any m or more shadow images can reconstruct the secret image. At the same time, the secret share of the generated RGB image is transformed by 2D-DCT to obtain the DCT coefficient matrix. S3 generates digital signature: Generates digital signature using the signature manager's information; S4 uses differential privacy technology to insert the digital signature into the image secret share: convert the hexadecimal digital signature into binary, and insert the digital signature into the image secret share by changing the high-frequency part of the DCT matrix; S5 obtains the electronic signature: adds the index array stored locally to the array extracted from the secret image to restore the information of the original pixel points and obtains the complete electronic signature image; S6 verifies the electronic signature: by traversing the image secret share, using DCT transformation to convert the image secret share into a DCT matrix, extracting the digital signature and verifying it using the signature manager's public key.

2. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: The image secret sharing of Shamir scheme is adopted in S2, where P(x) is a polynomial and s is a secret: a) Pass the signature image through the RGB coefficient matrix and perform polynomial calculation on the matrix; b) Select an m-1 degree polynomial and specify the constant term as the secret share to be divided, where S is the secret to be shared, A0=P(0)=S, and the remaining m-1 coefficients can be randomly selected. p ensures that the pixel value is between 0 and 255. Generally, p=257 is selected. The part greater than 255 is recorded for easy use in image recovery: c) Generate secret shares and take n different , calculate the function value , , To use the secret shares of Shamir secret sharing, the polynomial can be reconstructed by any m secret shares among the n secret shares , thus obtaining the secret S; Here S represents each pixel in the image, and the custom n can determine the number of secret shares; d) The secret share of the generated RGB image is transformed by 2D-DCT to obtain the DCT coefficient matrix. The secret share used is not a polynomial, but a constant calculated using a polynomial. The specific formula is as follows: Where F is the coefficient obtained by transformation, f is the pixel value in the secret share obtained by SIS, A is the conversion matrix, i is the frequency of the two-dimensional wave in the horizontal direction, j is the frequency of the two-dimensional wave in the vertical direction, , N is the size of the image block, The definition formula is:

3. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: The upper left half of the matrix obtained by DCT transformation of the image in S4 is the low-frequency part, and the lower right half is the high-frequency part. Changing the high-frequency part of the matrix does not affect the visual changes. First, the two-dimensional matrix in the DCT matrix is ​​inverted, and the last matrix is ​​swapped with the first matrix. All matrices are swapped in turn, and the binary digital string is changed into an array. , align each bit string in the binary array with every two numbers in the one-dimensional array, and perform the following operations: Among them, pos represents the position change in the DCT one-dimensional array. When the i-th number to be inserted into the array L is 1, first determine the value of the 2i+1 and 2i-th values ​​of the one-dimensional array in the DCT array. If Then there is no need to change the position, otherwise it is necessary to swap the positions of 2i+1 and 2i, and process the DCT two-dimensional matrix from top to bottom and from left to right. After inserting all the numbers in the array L, the DCT two-dimensional matrix is ​​reversed again, and finally the DCT matrix is ​​restored to the image secret share through the inverse 2D-DCT operation.

4. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: The S3 further comprises the following steps: S31 When generating a digital signature, the signature manager generates a pair of public and private keys; S32 sends its own domain name, organization name, email address, public key and other identity information to the CA certification agency, which uses the sm3 algorithm to encrypt the applicant's plain text information to obtain a message digest; S33 then uses the private key of the CA certification agency to sign the message digest, and sends the CA's signature, applicant's public key, certificate validity and other information in the form of a certificate to the signature manager.

5. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: In S4, when the digital signature is inserted into the image secret share using differential privacy technology, the two-dimensional matrix in the DCT matrix is ​​inverted, the binary digital string is changed into an array, aligned with every two numbers in the one-dimensional array, and the digital signature is inserted into the DCT matrix by exchanging positions.

6. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: In S5, when obtaining the electronic signature, the Lagrange interpolation method is used to restore the pixels in the original image.

7. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: When verifying the electronic signature in S6, the public key of the signature manager is used for verification. If the digital signature can be decrypted successfully, the electronic signature is legal, otherwise it is used illegally.

8. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: In S5, m shadow images are read and processed, the index array is taken out, and the array with the remainder of 256 pixels is restored to form a one-dimensional array, which is directly added to the array of the shadow image, and the pixels in the original image are restored using the Lagrange interpolation method.

9. The method for verifiable electronic signature based on 2D-DCT transformation according to claim 1, characterized in that: In S6, all image secret shares are traversed, the image secret shares are converted into DCT matrices using DCT transformation, the two-dimensional matrix in the matrix is ​​inverted, the digital signature is extracted using a specific formula, and the signature manager's public key is used for verification.

Citation Information

Cited By

  • Identity identification input method in payment process and related equipment

    CN119762072A