An ECC digital signature method to prevent unauthorized verification
The ECC digital signature method uses the ECDH algorithm to generate a shared key to perform XOR operation and sign the hash digest of the data, solving the problem of unauthorized verification in the data sharing scenario and realizing data security and integrity verification.
Patent Information
- Application Number
- CN202411356077.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In the data sharing scenario, the prior art cannot effectively prevent unauthorized verification, and the leaked data and signatures can be independently verified by third parties, and the security of the data cannot be guaranteed.
Using the ECC digital signature method, the shared key is generated through the ECDH algorithm to perform XOR operation on the hash digest of the data, generate an obfuscated mixed digest, and use the private key to sign to ensure that only the two parties in the data exchange can verify the integrity and truth of the data. prevents third-party verification.
It effectively prevents third parties from verifying the leaked data and signatures, ensuring the security of the data, and ensuring that only the two parties to the data exchange can independently verify the integrity and authenticity of the data.
Smart Images

Figure CN118869221B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital signatures, and in particular to an ECC digital signature method for preventing unauthorized verification in a data sharing scenario. Background Art
[0002] In the data sharing scenario, it is crucial to ensure the validity of the data. For this reason, the data holder usually attaches a digital signature when sharing data in order to verify the integrity and authenticity of the data. When the data recipient receives the data, they will use the data holder's public key to verify that the data has not been tampered with, ensuring its integrity and authenticity. However, there is a problem with doing so: if the data is leaked to a third party without authorization, then the data and the corresponding signature will also be leaked. Therefore, any third party can simply use the data holder's public key to verify the leaked data and its signature, and then confirm the integrity and authenticity of the data.
[0003] In order to solve the problem of signature verification when data is leaked, the existing technology uses the method of encrypting digital signatures. The core of this method is to encrypt the existing signature to prevent unauthorized verification. However, this method has obvious defects: the verifier must decrypt the signature during verification, and after the decrypted signature is leaked, any third party can still verify it independently. Encrypting the signature can only ensure that the signature will not be leaked during transmission, but it cannot guarantee that the signature will not be leaked after decryption.
[0004] Therefore, an ECC digital signature method that prevents unauthorized verification has become an urgent problem to be solved. Summary of the invention
[0005] The technical problem to be solved by the present invention is to propose an ECC (elliptic curve cryptography) digital signature method that is resistant to unauthorized verification and is used in data sharing scenarios; this method ensures that both parties in data exchange can independently verify data and signatures, while preventing a third party from verifying leaked data and signatures.
[0006] In order to solve the above technical problems, the technical solution provided by the present invention is: an ECC digital signature method for preventing unauthorized verification, including a signature method at the data holder end and a verification method at the data receiver end; specifically comprising the following steps:
[0007] Step 1: The data holder first uses the ECDH algorithm to calculate the first shared key based on the data holder's private key and the data recipient's public key;
[0008] Subsequently, the first shared key is used to perform an XOR operation on the hash summary value of the data to generate an obfuscated first mixed summary;
[0009] Thereafter, the obfuscated first mixed digest is signed using the private key of the data holder to generate a final signature result;
[0010] Step 2: After receiving the data, the data receiver also uses the ECDH algorithm to calculate the second shared key based on the data receiver's private key and the data holder's public key;
[0011] Using the second shared key, the same XOR operation is performed on the hash summary value of the received original data to obtain an obfuscated second mixed summary;
[0012] Finally, this obfuscated second mixed digest and its signature are verified using the data holder’s public key to ensure the integrity and authenticity of the received data.
[0013] Furthermore, the key generation method is as follows: before signing begins, the data holder and the data recipient need to generate a pair of public keys and private keys respectively, and exchange each other's public keys to facilitate the generation and verification of signatures; the public key and private key of the data holder are marked as pk1 and sk1 respectively, and the public key and private key of the data recipient are pk2 and sk2 respectively.
[0014] Furthermore, the calculation method of the first shared key on the data holder side is as follows: the data holder uses the public key pk2 of the data receiver and the private key sk1 of the data holder to calculate the first shared key through the ECDH algorithm.
[0015] Furthermore, the method for generating a hash summary is as follows: the data holder performs a hash calculation on the original data to be shared to generate a hash summary; the hash summary is a fixed-length representation of the original data, which is intended to ensure the integrity of the data.
[0016] Furthermore, the calculation method of the first mixed digest at the data holder end is as follows: perform an XOR calculation on the hash digest and the first shared key to generate the first mixed digest.
[0017] Furthermore, the method for generating a digital signature is as follows: the data holder uses his own private key sk1 to digitally sign the first mixed digest to generate a signature result.
[0018] Furthermore, the calculation method of the second shared key at the data receiver is as follows: the data receiver uses the public key pk1 of the data holder and the private key sk2 of the data receiver to calculate the second shared key based on the ECDH algorithm.
[0019] Furthermore, the calculation method of the second mixed digest at the data receiver end is as follows: the data receiver performs an XOR operation on the received hash digest and the second shared key to generate a second mixed digest; before performing the XOR operation, the length of the hash digest is adjusted according to the size of the second shared key, that is, the hash digest is truncated or the second shared key is extended to ensure that the lengths of the two match.
[0020] Furthermore, the signature verification method is as follows: the data recipient uses the public key pk1 of the data holder to verify the second mixed digest and the received signature result; if the verification is successful, it indicates that the data has not been tampered with during the transmission process.
[0021] The advantages of the present invention compared with the prior art are:
[0022] 1. Even if the data and signature are illegally leaked, the third party cannot verify the signature due to the lack of a corresponding shared key, thereby effectively preventing data verification after leakage and ensuring data security.
[0023] 2. The present invention uses the shared key generated by the ECDH algorithm and the XOR operation to confuse the hash summary of the data, and signs and verifies the signature based on the obfuscated hash summary, thereby preventing a third party from independently verifying the data signature. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is the signature flow chart of the data holder.
[0025] Figure 2 It is the verification flow chart after the data recipient receives the data and signature.
[0026] Figure 3 It is a flow chart of the method that a third-party attacker may use to verify data.
[0027] Figure 4 It is a verification flow chart based on forged original data and shared key. DETAILED DESCRIPTION
[0028] The following is a further detailed description of an ECC digital signature method for preventing unauthorized verification according to the present invention in conjunction with the accompanying drawings.
[0029] Combined with Figure 1-4 The specific implementation process of the ECC digital signature method for preventing unauthorized verification of the present invention is as follows:
[0030] Combined with Figure 1 , the signature process of the data holder is as follows:
[0031] 1. Key generation: Before starting, the data holder and the data receiver need to generate a pair of public and private keys and exchange each other's public keys to generate and verify signatures. Here, the public key and private key of the data holder are marked as pk1 and sk1 respectively, while the public key and private key of the data receiver are marked as pk2 and sk2 respectively.
[0032] 2. Calculation of the first shared key: The data holder uses the data recipient's public key pk2 and the data holder's private key sk1 to calculate the first shared key through the ECDH (Elliptic Curve Diffie-Hellman) algorithm. The first shared key will be used for subsequent data summary obfuscation to ensure that only the two parties can verify the data signature.
[0033] 3. Hash summary generation: The data holder performs hash calculation on the original data to be shared and generates a hash summary. The summary is a fixed-length representation of the original data, which is designed to ensure the integrity of the data.
[0034] 4. Calculation of the first mixed digest: Next, the hash digest is XORed with the first shared key to generate the first mixed digest.
[0035] 5. Digital signature generation: Finally, the data holder uses his private key sk1 to digitally sign the first mixed summary to generate a signature result. This step ensures the authenticity of the data, and the recipient can verify the signature to confirm that the data has not been tampered with.
[0036] Combined with Figure 2 After the data recipient receives the data and signature, the verification process is as follows:
[0037] 1. Hash summary generation: First, the data holder needs to perform hash calculation on the data to be shared to generate a hash summary.
[0038] 2. Calculation of the second shared key: Subsequently, the data recipient uses the data holder's public key pk1 and the data recipient's private key sk2 to calculate the second shared key based on the ECDH (Elliptic Curve Diffie-Hellman) algorithm. Based on the characteristics of the ECDH algorithm, it can be seen that the first shared key and the second shared key are the same.
[0039] 3. Calculation of the second mixed digest: The data receiver performs an XOR operation on the received hash digest and the second shared key to generate the second mixed digest. Before performing the XOR operation, the length of the hash digest needs to be adjusted according to the size of the second shared key, which may involve truncating the hash digest or extending the second shared key to ensure that the lengths of the two match.
[0040] 4. Signature verification: Finally, the data receiver uses the data holder's public key pk1 to verify the second mixed digest and the received signature result to obtain the verification result. If the verification is successful, that is, the first mixed digest is the same as the second mixed digest. This indicates that the data has not been tampered with during the transmission process, and the integrity and authenticity are maintained.
[0041] This verification process ensures that the data recipient can independently verify the authenticity and integrity of the data through the signature, while preventing third parties from independently verifying the data and signature.
[0042] The infeasibility of the present invention regarding third-party attackers verifying data is explained as follows:
[0043] The potential leakage of data and signatures mainly occurs in the following two situations:
[0044] 1. Data and signature leakage: Assume that the system leaks the original data, the public key pk1 of the data holder, and the signature. Despite the leakage of this information, the third party cannot perform the third step of the verification process - mixed summary calculation because the shared key has not been leaked. Therefore, the third party cannot perform effective data integrity and authenticity verification. In this case, since the critical shared key remains secure, the leaked information is not enough to pose a threat to the security of the data.
[0045] 2. Data, signature and shared key leakage: In the case of a malicious attack or data leakage by a third party, in addition to the original data, the public key pk1 of the data holder and the signature, the shared key may also be leaked. Nevertheless, since the private key is usually protected by hardware technology, its leakage risk is relatively low. Therefore, the information that may be leaked to a third party includes the shared key, the public key pk1 of the data holder, the original data and the signature.
[0046] In the event of data, signature, and shared key leakage, a third-party attacker may be able to Figure 3 Validate data in this way.
[0047] The logic of third-party attacker verifying data is as follows:
[0048] 1. A third-party attacker uses the hash summary value of the leaked original data and the shared key to calculate the mixed digest through XOR.
[0049] 2. The third-party attacker uses the data holder’s public key pk1 to verify the mixed summary and signature results.
[0050] However, this method is not reliable. A major challenge facing attackers is that the data leaker may give them a forged original data and use the XOR operation with the same mixed digest to infer another forged shared key. The forged original data and the forged shared key can obtain the same mixed digest through the XOR operation, so as to further verify the correct signature through the public key of the data holder. Although a third-party attacker can use the forged original data and the forged shared key to legally verify the signature, the forged original data at this time is not the original data signed by the data holder.
[0051] The verification process based on forged original data and shared key is as follows: Figure 4 shown.
[0052] A third-party attacker will find that since they cannot correctly derive and calculate the shared key, the forged original data can pass the verification. In this way, the third-party attacker cannot verify the integrity and authenticity of the data.
[0053] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. An ECC digital signature method for preventing unauthorized verification, characterized in that: Including the signature method on the data holder side and the verification method on the data receiver side; The specific steps include: Step 1: The data holder first uses the ECDH algorithm to calculate the first shared key based on the data holder's private key and the data recipient's public key; The data holder performs hash calculation on the original data to be shared and generates a hash summary. The hash summary is a fixed-length representation of the original data, which is designed to ensure the integrity of the data. Subsequently, the first shared key is used to perform an XOR operation on the hash summary value of the data to generate an obfuscated first mixed summary; Thereafter, the obfuscated first mixed digest is signed using the private key of the data holder to generate a final signature result; Step 2: After receiving the data, the data receiver also uses the ECDH algorithm to calculate the second shared key based on the data receiver's private key and the data holder's public key; The data receiver performs an XOR operation on the hash digest of the received original data and the second shared key to generate an obfuscated second mixed digest; before performing the XOR operation, the length of the hash digest is adjusted according to the size of the second shared key, that is, the hash digest is truncated or the second shared key is extended to ensure that the lengths of the two match; Finally, this obfuscated second mixed digest and its signature are verified using the data holder’s public key to ensure the integrity and authenticity of the received data.
2. The ECC digital signature method for preventing unauthorized verification according to claim 1, characterized in that: The key generation method is as follows: before signing begins, the data holder and the data recipient need to generate a pair of public and private keys respectively, and exchange each other's public keys to facilitate the generation and verification of signatures; the data holder's public key and private key are marked as pk1 and sk1 respectively, and the data recipient's public key and private key are marked as pk2 and sk2 respectively.
3. The ECC digital signature method for preventing unauthorized verification according to claim 2, characterized in that: The calculation method of the first shared key on the data holder side is as follows: the data holder uses the public key pk2 of the data receiver and the private key sk1 of the data holder to calculate the first shared key through the ECDH algorithm.
4. The ECC digital signature method for preventing unauthorized verification according to claim 3 is characterized in that: The calculation method of the first mixed digest on the data holder side is as follows: perform an XOR calculation on the hash digest and the first shared key to generate the first mixed digest.
5. The ECC digital signature method for preventing unauthorized verification according to claim 4, characterized in that: The method for generating a digital signature is as follows: the data holder uses his own private key sk1 to digitally sign the first mixed digest to generate a signature result.
6. The ECC digital signature method for preventing unauthorized verification according to claim 5, characterized in that: The calculation method of the second shared key at the data receiver end is as follows: the data receiver uses the public key pk1 of the data holder and the private key sk2 of the data receiver to calculate the second shared key based on the ECDH algorithm.
7. The ECC digital signature method for preventing unauthorized verification according to claim 6, characterized in that: The method of signature verification is as follows: the data recipient uses the public key pk1 of the data holder to verify the second mixed digest and the received signature result; if the verification is successful, it indicates that the data has not been tampered with during the transmission process.
Citation Information
Patent Citations
Digital signature method for incomplete data verification
CN114567441A
Automatic verification process method and system for regulation and control integrated power generation plan curve
CN116866059A
Mass data security communication method and device based on temporary key negotiation and medium
CN117201000A
Power system network security communication method
CN117278214A
Chaotic image encryption method combined with ECC asymmetric encryption algorithm
CN118233577A