Information verification method based on blockchain
Through the zero-knowledge proof principle based on the discrete logarithm problem, the information ciphertext and parameter ciphertext are generated, and the preset exponential offset formula is used to calculate the information certificate and upload it to the blockchain, which solves the problem that user sensitive information cannot be stored in the blockchain in the existing technology. It solves the problem of public verification and realizes the privacy and authenticity of information verification.
Patent Information
- Application Number
- CN202111645066.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-12-29
AI Technical Summary
Existing hash-based information on-chain and verification methods cannot perform public verification on the blockchain while protecting user sensitive information from being published, resulting in user sensitive information being potentially disclosed.
Using the zero-knowledge proof principle based on the discrete logarithm problem, the information holder sends the original information to the certificate generator to generate the information ciphertext and parameter ciphertext, and uses the preset exponential offset formula to calculate the information certificate and upload it to the block Chain storage certificate ensures that the information cipher text is verified on the blockchain before being verified to avoid leakage of the original information.
It realizes publicly verifiable information verification on the blockchain while protecting users' sensitive information from being published, ensuring the authenticity of information ciphertext and the privacy of user information.
Smart Images

Figure CN114297690B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an information verification method based on blockchain. Background Art
[0002] At present, in order to protect sensitive information when uploading information to the blockchain, the original information is generally hashed, and the hash is put on the blockchain for evidence. When verifying the information, the stored hash is taken out from the blockchain, the original information disclosed by the user is hashed, and compared with the hash taken out from the blockchain to verify the information disclosed by the user. However, this method of uploading information to the chain and verification can only be verified locally by the user in order to ensure the sensitive information of the user, and cannot be publicly verified on the blockchain. That is, public verification will cause the user's sensitive information to be disclosed. Summary of the invention
[0003] The main purpose of the present invention is to provide a blockchain-based information verification method, which aims to solve the technical problem that the current hash-based information chain and verification method cannot perform on-chain public verification while protecting user sensitive information from being disclosed.
[0004] To achieve the above object, the present invention provides a blockchain-based information verification method, which is applied to the information holder and includes the following steps:
[0005] The original information is sent to the credential generator, so that the credential generator uses the original information as the exponent of a preset large number to obtain information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to obtain parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate an information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder;
[0006] The information voucher is sent to an information verifier and the first information digest is sent to a blockchain, so that the information verifier can send the information voucher to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent;
[0007] The information to be verified corresponding to the original information is sent to the information verifier, so that the information verifier can verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0008] Optionally, the step of sending the original information to the credential generator includes:
[0009] The information to be uploaded to the chain is split according to the preset selective disclosure granularity to obtain multiple pieces of split information to be uploaded to the chain;
[0010] Each piece of split information to be uploaded to the chain is sent to the credential generator as the original text of the information.
[0011] Optionally, the step of sending the original information to the credential generator includes:
[0012] Generate random numbers for the information to be uploaded to the chain;
[0013] The information to be uploaded to the chain and the random number are sent as original information to the credential generator.
[0014] Optionally, the step of sending the information credential to an information verifier and sending the first information summary to a blockchain includes:
[0015] Sending the information credential to an information verifier;
[0016] After monitoring that the information verifier sends the information certificate to the blockchain, the first summary information is sent to the blockchain.
[0017] To achieve the above object, the present invention also provides a blockchain-based information verification method, which is applied to a credential generator and includes the following steps:
[0018] Obtain the original information of the information holder, calculate the ciphertext of the information by using the original information as the exponent of a preset large number, and upload the preset large number and the ciphertext of the information to the blockchain for evidence storage;
[0019] A parameter ciphertext is obtained by using a randomly selected intermediate parameter as an exponent of the preset large number, a digest is calculated based on at least the parameter ciphertext and the information ciphertext to obtain a first information digest, and the intermediate parameter, the first information digest and the original information are substituted into a preset exponent offset formula for reconstructing the parameter ciphertext to obtain an information voucher;
[0020] The first information digest and the information voucher are returned to the information holder, so that the information holder can send the information voucher to the information verifier and send the first information digest to the blockchain, so that after the information verifier sends the information voucher to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and they are consistent, and when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the verified information ciphertext on the blockchain.
[0021] Optionally, the step of calculating the information ciphertext by using the original information as an exponent of a preset large number, and uploading the preset large number and the information ciphertext to the blockchain for evidence storage includes:
[0022] The information to be uploaded to the chain and the random number in the original information are used as the exponents of the first large number and the second large number respectively to calculate the information ciphertext, and the first large number, the second large number and the information ciphertext are uploaded to the blockchain for evidence storage, wherein the preset large number includes the first large number and the second large number;
[0023] The step of calculating the parameter ciphertext by using the randomly selected intermediate parameter as the exponent of the preset large number comprises:
[0024] Calculate a parameter ciphertext by using the randomly selected first intermediate parameter and the second intermediate parameter as exponents of the first large number and the second large number respectively;
[0025] The step of substituting the intermediate parameter, the first information summary and the original information into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate and obtain the information voucher comprises:
[0026] Substituting the first intermediate parameter, the first information digest and the information to be uploaded into a first preset exponent offset formula for reconstructing the parameter ciphertext to calculate a first information voucher;
[0027] Substituting the second intermediate parameter, the first information digest and the random number into a second preset exponent cancellation formula for reconstructing the parameter ciphertext to calculate a second information voucher;
[0028] The step of returning the information voucher to the information holder comprises:
[0029] The first information certificate and the second information certificate are returned to the information holder as information certificates, so that when the blockchain calculates the first intermediate result, the first information certificate and the second information certificate are used as the exponents of the first large number and the second large number to obtain the first intermediate result.
[0030] To achieve the above object, the present invention also provides a blockchain-based information verification method, which is applied to an information verifier and includes the following steps:
[0031] Receive an information voucher sent by an information holder, wherein after obtaining the original information of the information holder, the voucher generator uses the original information as the exponent of a preset large number to calculate the information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to calculate the parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information voucher, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information voucher to the information holder;
[0032] Send the information voucher to the blockchain, so that after the information holder sends the first information digest to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent;
[0033] Receive the information to be verified corresponding to the original text of the information sent by the information holder, and verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0034] Optionally, the step of verifying the information to be verified based on the information ciphertext that has been verified on the blockchain includes:
[0035] Obtain the preset large number from the blockchain;
[0036] Calculate the information to be verified as the exponent of the preset large number to obtain a verification ciphertext;
[0037] If the verification ciphertext is compared with the information ciphertext that has been verified on the blockchain and they are consistent, it is determined that the information to be verified is the original text of the information.
[0038] To achieve the above object, the present invention also provides a blockchain-based information verification method, which is applied to blockchain and includes the following steps:
[0039] Receiving a preset large number and information ciphertext sent by a credential generator, wherein after obtaining the original information of the information holder, the credential generator uses the original information as the exponent of the preset large number to calculate the information ciphertext, and sends the preset large number and the information ciphertext to the blockchain for evidence storage;
[0040] Receiving an information voucher sent by an information verifier, and receiving a first information digest sent by the information holder, wherein the voucher generator uses a randomly selected intermediate parameter as an exponent of the preset large number to calculate a parameter ciphertext, calculates a digest based at least on the parameter ciphertext and the information ciphertext to obtain the first information digest, substitutes the intermediate parameter, the first information digest and the information original text into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate the information voucher, returns the first information digest and the information voucher to the information holder, so that the information holder sends the information voucher to the information verifier;
[0041] The information voucher is used as the exponent of the preset large number to obtain a first intermediate result, and the first information summary is used as the exponent of the information ciphertext to obtain a second intermediate result;
[0042] Substituting the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, and calculating a second information summary based at least on the reconstructed information and the information ciphertext;
[0043] When the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified, so that when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the information ciphertext that has been verified on the blockchain.
[0044] Optionally, the step of receiving a preset large number and information ciphertext sent by a credential generator includes:
[0045] Receiving the signed preset large number and the information ciphertext sent by the credential generator, wherein after calculating the information ciphertext, the credential generator uses the private key of the credential generator to sign the preset large number and the information ciphertext;
[0046] Using the public key of the credential generator to perform signature verification on the signed preset large number and the information ciphertext;
[0047] When the verification is passed, the preset large number and the information ciphertext are stored on the blockchain.
[0048] To achieve the above-mentioned objectives, the present invention also provides a blockchain-based information verification device, which includes: a memory, a processor, and a blockchain-based information verification program stored in the memory and executable on the processor, wherein the blockchain-based information verification program, when executed by the processor, implements the steps of the blockchain-based information verification method as described above.
[0049] In addition, to achieve the above-mentioned purpose, the present invention also proposes a computer-readable storage medium, on which a blockchain-based information verification program is stored. When the blockchain-based information verification program is executed by a processor, the steps of the blockchain-based information verification method as described above are implemented.
[0050] In the present invention, the information holder sends the original information to the credential generator, and the credential generator uses the original information as the exponent of a preset large number to calculate the information ciphertext, uses the randomly selected intermediate parameter as the exponent of the preset large number to calculate the parameter ciphertext, calculates the summary based on at least the parameter ciphertext and the information ciphertext to obtain the first information summary, substitutes the intermediate parameter, the first information summary and the original information into the preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder; the information holder sends the information credential to the information verifier and sends the first information summary to the blockchain for the information verifier to verify. The information voucher is sent to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate the first intermediate result, the first information summary is used as the exponent of the information ciphertext to calculate the second intermediate result, the first intermediate result and the second intermediate result are substituted into the reconstruction formula corresponding to the preset exponent offset formula to calculate the reconstructed information, and the second information summary is calculated based on at least the reconstructed information and the information ciphertext. When the second information summary is compared with the first information summary and is consistent, it is determined that the information ciphertext on the blockchain has been verified; the information to be verified corresponding to the original information is sent to the information verifier, so that the information verifier can verify the information to be verified based on the information ciphertext that has been verified on the blockchain. In the present invention, through the above-mentioned information chain and verification method, public verification on the blockchain is achieved while protecting the user's sensitive information from being published. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 A schematic diagram of the structure of the hardware operating environment involved in the embodiment of the present invention;
[0052] Figure 2 This is a flowchart of the first embodiment of the information verification method based on blockchain of the present invention;
[0053] Figure 3 The figure is a schematic diagram of a system framework involved in an embodiment of the present invention.
[0054] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0056] Definitions of Abbreviations and Key Terms:
[0057] Selective information disclosure: Selective information disclosure refers to the selective disclosure of information such as content and disclosure time for special interests based on the impression management theory of social psychology.
[0058] Zero-Knowledge Proof: It was proposed by S. Goldwasser, S. Micali and C. Rackoff in the early 1980s. It means that the prover can convince the verifier that a certain assertion is correct without providing any useful information to the verifier. Zero-knowledge proof is essentially a protocol involving two or more parties, that is, a series of steps required for two or more parties to complete a task. The prover proves to the verifier and makes him believe that he knows or has a certain message, but the proof process cannot leak any information about the proved message to the verifier.
[0059] Discrete logarithm problem: First define a primitive root of a prime number p that produces all integer roots from 1 to p-1 for its powers. That is, if a is a primitive root of prime number p, then the values a mod p, a^2 mod p, ..., a^(p-1) mod p are all different integers and form all integers from 1 to p-1 in a certain arrangement. For an integer b and a primitive root a of prime number p, a unique exponent i can be found such that b = a^i mod p where 0≤i≤(p-1) The exponent i is called the discrete logarithm or exponent of b modulo p with a as the base. This value is denoted as inda,p(b). Although it is relatively easy to calculate the exponent modulo a prime number, it is difficult to calculate the discrete logarithm. For large prime numbers, it is almost impossible to calculate the discrete logarithm.
[0060] Verifiable Credential: A digital representation of a physical credential in the real world. The W3C Verifiable Credentials Data Model 1.0 specification defines the data format of a verifiable credential. It is a standardized way of expressing digital credentials. Its usage scenarios and core model design are based on physical credentials in the real world, with the goal of introducing the advantages of physical credentials into the digital world.
[0061] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.
[0062] It should be noted that the information verification device based on blockchain in the embodiment of the present invention can be a smart phone, a personal computer, a server and other devices, and no specific restrictions are made here.
[0063] like Figure 1As shown, the blockchain-based information verification device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0064] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation on the blockchain-based information verification device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0065] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a blockchain-based information verification program. The operating system is a program that manages and controls the hardware and software resources of the device, and supports the operation of the blockchain-based information verification program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server.
[0066] In one embodiment, when the information verification device of the blockchain acts as the information holder, the processor 1001 can be used to call the information verification program based on the blockchain stored in the memory 1005 and perform the following operations:
[0067] The original information is sent to the credential generator, so that the credential generator uses the original information as the exponent of a preset large number to obtain information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to obtain parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate an information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder;
[0068] The information voucher is sent to an information verifier and the first information digest is sent to a blockchain, so that the information verifier can send the information voucher to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent;
[0069] The information to be verified corresponding to the original information is sent to the information verifier, so that the information verifier can verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0070] Furthermore, the operation of sending the original information to the credential generator includes:
[0071] The information to be uploaded to the chain is split according to the preset selective disclosure granularity to obtain multiple pieces of split information to be uploaded to the chain;
[0072] Each piece of split information to be uploaded to the chain is sent to the credential generator as the original text of the information.
[0073] Furthermore, the operation of sending the original information to the credential generator includes:
[0074] Generate random numbers for the information to be uploaded to the chain;
[0075] The information to be uploaded to the chain and the random number are sent as original information to the credential generator.
[0076] Furthermore, the operation of sending the information credential to the information verifier and sending the first information summary to the blockchain includes:
[0077] Sending the information credential to an information verifier;
[0078] After monitoring that the information verifier sends the information certificate to the blockchain, the first summary information is sent to the blockchain.
[0079] In one embodiment, when the information verification device of the blockchain acts as a credential generator, the processor 1001 may be used to call the information verification program based on the blockchain stored in the memory 1005 and perform the following operations:
[0080] Obtain the original information of the information holder, calculate the ciphertext of the information by using the original information as the exponent of a preset large number, and upload the preset large number and the ciphertext of the information to the blockchain for evidence storage;
[0081] A parameter ciphertext is obtained by using a randomly selected intermediate parameter as an exponent of the preset large number, a digest is calculated based on at least the parameter ciphertext and the information ciphertext to obtain a first information digest, and the intermediate parameter, the first information digest and the original information are substituted into a preset exponent offset formula for reconstructing the parameter ciphertext to obtain an information voucher;
[0082] The first information digest and the information voucher are returned to the information holder, so that the information holder can send the information voucher to the information verifier and send the first information digest to the blockchain, so that after the information verifier sends the information voucher to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and they are consistent, and when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the verified information ciphertext on the blockchain.
[0083] Furthermore, the operation of calculating the information ciphertext by using the original information as the exponent of a preset large number, and uploading the preset large number and the information ciphertext to the blockchain for evidence storage includes:
[0084] The information to be uploaded to the chain and the random number in the original information are used as the exponents of the first large number and the second large number respectively to calculate the information ciphertext, and the first large number, the second large number and the information ciphertext are uploaded to the blockchain for evidence storage, wherein the preset large number includes the first large number and the second large number;
[0085] The operation of calculating the parameter ciphertext by using the randomly selected intermediate parameter as the exponent of the preset large number includes:
[0086] Calculate a parameter ciphertext by using the randomly selected first intermediate parameter and the second intermediate parameter as exponents of the first large number and the second large number respectively;
[0087] The operation of substituting the intermediate parameter, the first information digest and the original information into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate and obtain the information voucher includes:
[0088] Substituting the first intermediate parameter, the first information digest and the information to be uploaded into a first preset exponent offset formula for reconstructing the parameter ciphertext to calculate a first information voucher;
[0089] Substituting the second intermediate parameter, the first information digest and the random number into a second preset exponent cancellation formula for reconstructing the parameter ciphertext to calculate a second information voucher;
[0090] The operation of returning the information voucher to the information holder includes:
[0091] The first information certificate and the second information certificate are returned to the information holder as information certificates, so that when the blockchain calculates the first intermediate result, the first information certificate and the second information certificate are used as the exponents of the first large number and the second large number to obtain the first intermediate result.
[0092] In one embodiment, when the information verification device of the blockchain serves as the information verifier, the processor 1001 may be used to call the blockchain-based information verification program stored in the memory 1005 and perform the following operations:
[0093] Receive an information voucher sent by an information holder, wherein after obtaining the original information of the information holder, the voucher generator uses the original information as the exponent of a preset large number to calculate the information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to calculate the parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information voucher, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information voucher to the information holder;
[0094] Send the information voucher to the blockchain, so that after the information holder sends the first information digest to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent;
[0095] Receive the information to be verified corresponding to the original text of the information sent by the information holder, and verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0096] Furthermore, the operation of verifying the information to be verified based on the information ciphertext that has been verified on the blockchain includes:
[0097] Obtain the preset large number from the blockchain;
[0098] Calculate the information to be verified as the exponent of the preset large number to obtain a verification ciphertext;
[0099] If the verification ciphertext is compared with the information ciphertext that has been verified on the blockchain and they are consistent, it is determined that the information to be verified is the original text of the information.
[0100] In one embodiment, when the information verification device of the blockchain is used as a device in the blockchain system, the processor 1001 can be used to call the information verification program based on the blockchain stored in the memory 1005, and perform the following operations:
[0101] Receiving a preset large number and information ciphertext sent by a credential generator, wherein after obtaining the original information of the information holder, the credential generator uses the original information as the exponent of the preset large number to calculate the information ciphertext, and sends the preset large number and the information ciphertext to the blockchain for evidence storage;
[0102] Receiving an information voucher sent by an information verifier, and receiving a first information digest sent by the information holder, wherein the voucher generator uses a randomly selected intermediate parameter as an exponent of the preset large number to calculate a parameter ciphertext, calculates a digest based at least on the parameter ciphertext and the information ciphertext to obtain the first information digest, substitutes the intermediate parameter, the first information digest and the information original text into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate the information voucher, returns the first information digest and the information voucher to the information holder, so that the information holder sends the information voucher to the information verifier;
[0103] The information voucher is used as the exponent of the preset large number to obtain a first intermediate result, and the first information summary is used as the exponent of the information ciphertext to obtain a second intermediate result;
[0104] Substituting the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, and calculating a second information summary based at least on the reconstructed information and the information ciphertext;
[0105] When the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified, so that when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the information ciphertext that has been verified on the blockchain.
[0106] Furthermore, the operation of receiving the preset large number and information ciphertext sent by the credential generator includes:
[0107] Receiving the signed preset large number and the information ciphertext sent by the credential generator, wherein after calculating the information ciphertext, the credential generator uses the private key of the credential generator to sign the preset large number and the information ciphertext;
[0108] Using the public key of the credential generator to perform signature verification on the signed preset large number and the information ciphertext;
[0109] When the verification is passed, the preset large number and the information ciphertext are stored on the blockchain.
[0110] Based on the above structure, various embodiments of the blockchain-based information verification method are proposed.
[0111] Reference Figure 2 , Figure 2 This is a flow chart of the first embodiment of the information verification method based on blockchain of the present invention.
[0112] The embodiment of the present invention provides an embodiment of the information verification method based on blockchain. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than here. In this embodiment, the information verification method based on blockchain is applied to the information holder, and the information holder can be a client connected to the user. The client can be deployed on a smart phone, a personal computer, a server and other devices, which are not limited here. The method includes the following steps:
[0113] Step S10, sending the original information to the credential generator, so that the credential generator uses the original information as the exponent of a preset large number to obtain information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to obtain parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate an information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder;
[0114] In this embodiment, in order to solve the problem that sensitive information cannot be publicly verified on the blockchain, a process of information on-chain and verification using the zero-knowledge proof principle based on the discrete logarithm problem is proposed, as follows. In one embodiment, the relationship between the information holder, the credential generator, the information verifier and the blockchain can be as follows: Figure 3 shown.
[0115] In this embodiment, the information holder can send the information to be uploaded to the blockchain as the original information to the credential generator. The original information here is called the original information to distinguish it from the ciphertext of the information that is finally stored on the blockchain. The credential generator can be a device deployed in an institution that issues verifiable credentials for the user's information to be uploaded to the blockchain. For example, when the user is a student, the credential generator can be a server device deployed in the school, which is not specifically limited in this embodiment; in this scenario, the information in the student's graduation certificate can be sent to the credential generator through the client as the original information; the graduation certificate is issued by the school to the student, not necessarily the graduation certificate information given by the student to the school, so in some embodiments, the credential generator can also obtain the original information of the information holder from other channels.
[0116] After obtaining the original information of the information holder, the credential generator can use the original information as the exponent of a preset large number to calculate the ciphertext of the information. The preset large number can be a large number selected by the credential generator based on the original information. The number of large numbers can be selected according to the number of copies of the original information. The following is an example of only one copy of the original information. Assuming that the original information is represented by v, the ciphertext is represented by y, and the preset large number is represented by g, then y=g v After calculating the ciphertext of the information, the credential generator can send the ciphertext of the information and the preset large number to the blockchain for storage, so that the subsequent information verifier can obtain it from the blockchain when verifying the information.
[0117] For the original text of the information with only one copy, the credential generator selects a random number as the intermediate parameter. In order to increase the difficulty of the original text of the information being cracked, in one embodiment, the intermediate parameter can be a randomly selected 256-bit number in the Zq number field, where Zq is a finite field composed of a prime number q. After selecting the intermediate parameter, the credential generator uses the intermediate parameter as the exponent of the preset large number to calculate the parameter ciphertext. Assuming that the intermediate parameter is represented by a, the preset large number is represented by g, and the parameter ciphertext is represented by t, then t=g a .
[0118] In order to achieve public verifiability on the blockchain, the credential generator can generate a credential for verifying the authenticity of the information ciphertext. Since the authenticity of the information ciphertext is verified here, it can be publicly verified on the blockchain without disclosing the original information on the blockchain. Specifically, after calculating the parameter ciphertext and the information ciphertext, the credential generator can calculate the summary based on at least the parameter ciphertext and the information ciphertext, and the result is used as the first information summary. Among them, calculating the summary based on the parameter ciphertext and the information ciphertext means that the summary of the two ciphertexts is calculated using a summary algorithm (also called a hash algorithm). Calculating the summary based on at least the parameter ciphertext and the information ciphertext means that the summary can also be calculated together with other information to increase the difficulty of the original information being cracked; for example, the summary of the preset large number, the information ciphertext and the parameter ciphertext can also be calculated to obtain the first information summary; the first information summary is represented by c, then c = H (g, y, t).
[0119] Furthermore, in order to enable the credential to be used for verification, the credential generator may substitute the intermediate parameter, the first information summary and the original information into the preset exponential offset formula for reconstructing the parameter ciphertext for calculation, and use the calculation result as the information credential. Among them, if the credential held by the information holder can enable the blockchain to restore the parameter ciphertext, then the credential held by the information holder can be considered to be authentic; based on this, an exponential offset formula for reconstructing the parameter ciphertext can be set in the credential generator in advance, and a reconstruction formula corresponding to the exponential offset formula can be set in the blockchain in a matching manner, so that the exponents can eventually be offset and the parameter ciphertext can be finally restored (reconstructed). For example, the parameter ciphertext is g a This form, so the formula is designed so that the exponent left in the parameter ciphertext after the subsequent exponent offset is a, and the specific formula used is not limited in this embodiment. For example, the information voucher is represented by z, the preset exponent offset formula is set to z = a-cv, and the corresponding reconstruction formula can be set to t' = g z y c ; The preset exponential cancellation formula is set to z = a-2cv, and the corresponding reconstruction formula can be set to t' = g z (y c ) 2 .
[0120] The credential generator returns the first information digest and the information credential to the information holder, that is, the first information digest and the information credential are given to the information holder together as credentials, so that when the information holder needs to use the original information in the future, he can use the credential to verify the authenticity of the ciphertext of the information with the information verifier, and then verify the correctness of the original information based on the authentic ciphertext of the information.
[0121] Step S20, sending the information voucher to the information verifier and sending the first information digest to the blockchain, so that the information verifier can send the information voucher to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and when the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified;
[0122] After receiving the first information digest and information credential returned by the credential generator, the information holder can use the first information digest and information credential to verify the authenticity of the information ciphertext with the information verifier when the original information is needed, and then verify the correctness of the original information based on the authentic information ciphertext.
[0123] Specifically, when verification with the information verifier is required, the information holder sends the information certificate to the information verifier and sends the first information digest to the blockchain. After receiving the information certificate, the information verifier sends the information certificate to the blockchain, and the blockchain verifies the authenticity of the information ciphertext based on the information certificate received from the information verifier and the first information digest received from the information holder.
[0124] The blockchain can use the information voucher as the exponent of the preset large number for calculation, and the result obtained is called the first intermediate result. For example, the first intermediate result can be expressed as g z The preset large number is sent to the blockchain by the credential generator in advance. The blockchain calculates the first information digest as the exponent of the information ciphertext, and the result is called the second intermediate result. For example, the second intermediate result can be expressed as y c After obtaining the first intermediate result and the second intermediate result, the blockchain can substitute the first intermediate result and the second intermediate result into the reconstruction formula corresponding to the preset exponential offset formula to calculate the reconstructed information. It can be understood that if the information certificate and the first information summary given by the information holder are correct, then the reconstructed information is equal to the parameter ciphertext, that is, this step is to reconstruct the parameter ciphertext to verify whether the information certificate held by the information holder is authentic, and also to verify the authenticity of the information ciphertext on the blockchain.
[0125] After calculating the reconstruction information, the blockchain can calculate the summary based on at least the reconstruction information and the information ciphertext, and the result is used as the second information summary. Among them, calculating the summary based on the reconstruction information and the information ciphertext means that the summary of the two information is calculated using a summary algorithm (also called a hash algorithm). Calculating the summary based on at least the reconstruction information and the information ciphertext means that the summary can also be calculated together with the two information and other information; the other information here is the same as the other information added when calculating the first information summary; for example, when calculating the summary of the preset large number, the information ciphertext and the parameter ciphertext to obtain the first information summary, the summary of the preset large number, the information ciphertext and the reconstruction information can be calculated to obtain the second information summary; the second information summary is represented by c', then c'=H(g, y, t').
[0126] The blockchain compares the second information digest with the first information digest. If the two are consistent, it means that the reconstruction parameter and the parameter ciphertext are equal, the information certificate held by the information holder is authentic, and the information ciphertext on the blockchain is also authentic. At this point, the public verification on the blockchain is completed, and the blockchain can determine that the information ciphertext has been verified. Furthermore, in one embodiment, the blockchain can mark the information ciphertext as verified, so that the subsequent information holder does not need to verify the authenticity of the information ciphertext when using the original information, that is, avoiding repeated verification.
[0127] Step S30, sending the information to be verified corresponding to the original information to the information verifier, so that the information verifier can verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0128] When the information holder needs to use the original information, he / she sends the original information as the information to be verified to the information verifier. For example, when the user is a student and needs to show his / her graduation certificate to the company for an interview, he / she can send the information in the graduation certificate as the information to be verified to the company's device for verification through the client. After receiving the information to be verified, the information verifier verifies the information to be verified based on the information ciphertext that has been verified on the blockchain. Specifically, the information verifier can obtain the preset large number of evidence stored on the blockchain, calculate the information to be verified as the exponent of the preset large number, and the result obtained by the calculation is called the verification ciphertext; the information verifier compares the verification ciphertext with the information ciphertext that has been verified on the blockchain; if they are consistent, it can be determined that the information to be verified is the original information, that is, the information to be verified sent by the information holder to the information verifier is true, and the information to be verified can be adopted; if they are inconsistent, it can be determined that the information to be verified is not the original information, that is, the information to be verified sent by the information holder to the information verifier is not true. For example, the original information is the information in the student's graduation certificate. The client can send the information in the graduation certificate as information to be verified to the device deployed by the interviewing company. The device will verify the information to be verified to determine the authenticity of the graduation certificate information provided by the student, and then determine whether to hire the student.
[0129] In this embodiment, the information holder sends the original information to the credential generator, and the credential generator uses the original information as the exponent of a preset large number to obtain the information ciphertext, uses the randomly selected intermediate parameter as the exponent of the preset large number to obtain the parameter ciphertext, calculates the summary based on at least the parameter ciphertext and the information ciphertext to obtain the first information summary, substitutes the intermediate parameter, the first information summary and the original information into the preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder; the information holder sends the information credential to the information verifier and sends the first information summary to the blockchain for information verification The information voucher is sent to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate the first intermediate result, and the first information summary is used as the exponent of the information ciphertext to calculate the second intermediate result, and the first intermediate result and the second intermediate result are substituted into the reconstruction formula corresponding to the preset exponent offset formula to calculate the reconstructed information, and the second information summary is calculated based on at least the reconstructed information and the information ciphertext. When the second information summary is compared with the first information summary and is consistent, it is determined that the information ciphertext on the blockchain has been verified; the information to be verified corresponding to the original information is sent to the information verifier, so that the information verifier can verify the information to be verified based on the information ciphertext that has been verified on the blockchain. In this embodiment, through the above-mentioned information chain and verification method, public verification on the blockchain is achieved while protecting the user's sensitive information from being published.
[0130] Further, based on the above first embodiment, a second embodiment of the information verification method based on blockchain of the present invention is proposed. In this embodiment, the step S10 includes:
[0131] Step S101, splitting the information to be uploaded to the chain according to the preset selective disclosure granularity to obtain multiple pieces of split information to be uploaded to the chain;
[0132] Information that needs to be uploaded to the chain is called information to be uploaded to the chain. The information holder can split the information to be uploaded to the chain according to the preset selective disclosure granularity to obtain multiple copies of the split information to be uploaded to the chain. Among them, the preset selective disclosure granularity can be set according to user needs, indicating the granularity at which the information to be uploaded to the chain needs to be selectively disclosed when used. That is, when the user uses the information to be uploaded to the chain, he does not want to disclose all the information to the information verifier. At this time, the information to be uploaded to the chain can be split into multiple copies according to the selective disclosure granularity, and uploaded and verified separately. For example, if the user is a student, the information to be uploaded to the chain is the information in the graduation certificate, including the name of the student, the graduation certificate number, the time of issuance of the graduation certificate and other information items. The information item can be used as the selective disclosure granularity, that is, each information item is used as a split information to be uploaded to the chain. In this way, when the student needs to use part of the information items in the graduation certificate, only part of the information items can be shown to the information verifier.
[0133] Step S102, each piece of split information to be uploaded to the chain is sent as the original text to the credential generator.
[0134] After the information holder has split the information to be put on the chain, he can send each piece of information to be put on the chain as the original text to the credential generator, that is, the credential generator can put each piece of information to be put on the chain and generate a credential. When using the information, the information holder can select the split information to be put on the chain that needs to be used, and send the first summary information and information credential of the information to the blockchain and the information verifier for verification, without exposing other split information to be put on the chain to the information verifier.
[0135] Furthermore, in one embodiment, step S10 includes:
[0136] Step S103, generating a random number for the information to be uploaded;
[0137] Step S104, sending the information to be uploaded to the chain and the random number as the original information to the credential generator.
[0138] In order to improve the security of the information to be uploaded to the chain, the information holder can generate a random number for the information to be uploaded to the chain, and send the information to be uploaded to the chain and the random number as the original information to the credential generator, so that the credential generator can calculate the information ciphertext based on the information to be uploaded to the chain and the random number and upload it to the chain.
[0139] Specifically, the preset large numbers in the credential generator may include a first large number selected for the information to be uploaded and a second large number selected for the random number. When calculating the information ciphertext, the credential generator uses the information to be uploaded and the random number as the exponents of the first large number and the second large number respectively to obtain the information ciphertext. Specifically, the information to be uploaded can be used as the exponent of the first large number to obtain a result, and then multiplied by the result obtained by using the random number as the exponent of the second large number to obtain the information ciphertext. For example, when the first large number is represented as g, the second large number is represented as h, the information to be uploaded is represented as v, and the random number is represented as r, the information ciphertext y=g v h r. When the preset large number and information ciphertext are uploaded to the chain for evidence storage, the first large number, the second large number and the information ciphertext are specifically uploaded to the chain for evidence storage. The intermediate parameters selected by the credential generator can be two, namely, the first intermediate parameter selected for the first large number and the second intermediate parameter selected for the second large number. When the credential generator calculates the parameter ciphertext, the parameter ciphertext is calculated using the randomly selected first intermediate parameter and the second intermediate parameter as the exponents of the first large number and the second large number. Specifically, the first intermediate parameter can be used as the exponent of the first large number to obtain a result, and then the result obtained by calculating the second intermediate parameter as the exponent of the second large number is multiplied to obtain the parameter ciphertext. For example, when the first intermediate parameter is represented as a and the second intermediate parameter is represented as b, the parameter ciphertext t=g a h b . When generating the first information summary, the credential generator can calculate the summary of the first large number, the second large number, the information ciphertext and the parameter ciphertext to obtain the first information summary. For example, the first information summary can be expressed as c=H(g, h, y, t), and the corresponding second information summary calculated by the blockchain can be expressed as c'=H(g, h, y, t'). The preset exponent offset formula may include two formulas, a first preset exponent offset formula for the first intermediate parameter and a second preset exponent offset formula for the second intermediate parameter. When generating the information credential, the credential generator can substitute the first intermediate parameter, the first information summary and the information to be uploaded into the first preset exponent offset formula to obtain the first information credential, and substitute the second intermediate parameter, the first information summary and the random number into the second preset exponent offset formula to obtain the second information credential. The first information credential is represented by z1, and the second information credential is represented by z2. In one embodiment, the first preset exponent offset formula can be set to z1=a-cv, the second preset exponent offset formula can be set to z2=b-cr, and the corresponding reconstruction formula can be set to t'=g z1 h z2 y c . The credential generator may return the information credential to the information holder by returning the first information credential and the second information credential together. When the information holder sends the information credential to the information verifier, the first information credential and the second information credential are also sent to the information verifier. After receiving the first information credential and the second information credential sent by the information verifier, the blockchain may calculate the first intermediate result by using the first information credential and the second information credential as the exponents of the first large number and the second large number respectively. Specifically, the first information credential may be used as the exponent of the first large number to obtain a result, and then multiplied by the result obtained by using the second information credential as the exponent of the second large number to obtain the first intermediate result. For example, the first intermediate result may be expressed as g z1 h z2 .
[0140] Furthermore, in one embodiment, the information holder may split the information to be uploaded into multiple pieces of information to be uploaded, generate a random number for each piece of information to be uploaded, and send each piece of information to be uploaded and its corresponding random number as the original information to the credential generator. For example, if the information to be uploaded is v, the information holder may split v into four pieces v1, v2, v3 and v4 according to the granularity of selective disclosure, and randomly generate random numbers r1, r2, r3 and r4 for v1, v2, v3 and v4, and then send (v1, r1), (v1, r1), (v1, r1) and (v1, r1) as the original information to the credential generator, and the credential generator uploads the information to the chain and generates a credential according to the above method for each group (v, r).
[0141] Further, in one embodiment, step S20 includes:
[0142] Step S201, sending the information certificate to the information verifier;
[0143] Step S202: after monitoring the information verifier sending the information certificate to the blockchain, send the first summary information to the blockchain.
[0144] When using the information credential and the first information summary for verification, the information holder can first send the information credential to the information verifier, and the information verifier will send the information credential to the blockchain for verification. After the information holder monitors the information verifier sending the information credential to the blockchain, the first summary information will be sent to the blockchain.
[0145] Further, based on the above-mentioned first and / or second embodiments, a third embodiment of the information verification method based on blockchain of the present invention is proposed. In this embodiment, the method is applied to a credential generator, which can be a device deployed in an institution that issues verifiable credentials for user information to be uploaded to the blockchain. For example, when the user is a student, the credential generator can be a server device deployed in a school, which is not specifically limited in this embodiment. In this embodiment, the method includes the following steps:
[0146] Step A10, obtaining the original information of the information holder, using the original information as the exponent of a preset large number to calculate the information ciphertext, and uploading the preset large number and the information ciphertext to the blockchain for evidence storage;
[0147] Step A20, using a randomly selected intermediate parameter as an exponent of the preset large number to obtain a parameter ciphertext, calculating a digest based at least on the parameter ciphertext and the information ciphertext to obtain a first information digest, substituting the intermediate parameter, the first information digest and the original information into a preset exponent cancellation formula for reconstructing the parameter ciphertext to obtain an information voucher;
[0148] Step A30, returning the first information digest and the information voucher to the information holder, so that the information holder can send the information voucher to the information verifier and send the first information digest to the blockchain, so that after the information verifier sends the information voucher to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and they are consistent, and when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the verified information ciphertext on the blockchain.
[0149] The specific implementation of steps A10 to A30 of this embodiment may refer to the specific implementation of steps S10 to S30 in the first embodiment. The detailed implementation of steps A10 to A30 may also refer to the second embodiment, which will not be described in detail here.
[0150] Furthermore, in one embodiment, in step A10, the information original text is used as the exponent of a preset large number to calculate the information ciphertext, and the step of uploading the preset large number and the information ciphertext to the blockchain for evidence storage includes:
[0151] Step A101, using the information to be uploaded to the chain and the random number in the original information as the exponents of the first large number and the second large number respectively to calculate the information ciphertext, uploading the first large number, the second large number and the information ciphertext to the blockchain for evidence storage, wherein the preset large number includes the first large number and the second large number;
[0152] The step of calculating the parameter ciphertext by using the randomly selected intermediate parameter as the exponent of the preset large number in step A20 includes:
[0153] Step A201, using the randomly selected first intermediate parameter and the second intermediate parameter as the exponents of the first large number and the second large number to calculate and obtain a parameter ciphertext;
[0154] The step of substituting the intermediate parameter, the first information digest and the original information into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate and obtain the information voucher in step A20 includes:
[0155] Step A202, substituting the first intermediate parameter, the first information digest and the information to be uploaded into a first preset exponent offset formula for reconstructing the parameter ciphertext to calculate a first information voucher;
[0156] Step A203, substituting the second intermediate parameter, the first information digest and the random number into a second preset exponent offset formula for reconstructing the parameter ciphertext to calculate a second information voucher;
[0157] The step of returning the information voucher to the information holder in step A30 includes:
[0158] Step A301, returning the first information certificate and the second information certificate as information certificates to the information holder, so that when the blockchain calculates the first intermediate result, the first information certificate and the second information certificate are used as the exponents of the first large number and the second large number to obtain the first intermediate result.
[0159] The specific implementation of steps A101, A201-A203 and A301 in this embodiment can refer to the specific implementation of steps S103 and S104 in the second embodiment above, and will not be described in detail here.
[0160] Further, based on the above-mentioned first, second and / or third embodiments, a fourth embodiment of the information verification method based on blockchain of the present invention is proposed. In this embodiment, the method is applied to the information verifier, and the information verifier can be a device deployed at the user information user object. For example, when the user is a student and the information uploaded by the user is the graduation certificate information, the information verifier can be a device deployed at the enterprise that the user wants to interview. The specific embodiment is not limited. In this embodiment, the method includes the following steps:
[0161] Step B10, receiving an information voucher sent by an information holder, wherein after obtaining the original information of the information holder, the voucher generator uses the original information as an exponent of a preset large number to calculate an information ciphertext, uses a randomly selected intermediate parameter as an exponent of the preset large number to calculate a parameter ciphertext, calculates a summary based at least on the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information voucher, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information voucher to the information holder;
[0162] Step B20, sending the information voucher to the blockchain, so that after the information holder sends the first information digest to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and when the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified;
[0163] Step B30, receiving the information to be verified corresponding to the original text of the information sent by the information holder, and verifying the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
[0164] The specific implementation of steps B10 to B30 of this embodiment may refer to the specific implementation of steps S10 to S30 in the first embodiment. The detailed implementation of steps B10 to B30 may also refer to the second embodiment, which will not be described in detail here.
[0165] Furthermore, in one embodiment, the step of verifying the information to be verified based on the information ciphertext that has been verified on the blockchain in step B30 includes:
[0166] Step B301, obtaining the preset large number from the blockchain;
[0167] Step B302, using the information to be verified as the exponent of the preset large number to calculate the verification ciphertext;
[0168] Step B303: If the verification ciphertext is compared with the information ciphertext that has been verified on the blockchain and they are consistent, it is determined that the information to be verified is the original text of the information.
[0169] The specific implementation of steps B301 to B303 may refer to the detailed implementation of step S30 above, and will not be described in detail here.
[0170] Furthermore, based on the above-mentioned first, second, third and / or fourth embodiments, a fifth embodiment of the information verification method based on blockchain of the present invention is proposed. In this embodiment, the method is applied to blockchain, which can be a consortium chain, a private chain, or a public chain, which is not limited in this embodiment.
[0171] In this embodiment, the method comprises the following steps:
[0172] C10, receiving a preset large number and information ciphertext sent by a credential generator, wherein after obtaining the original information of the information holder, the credential generator uses the original information as an exponent of the preset large number to calculate the information ciphertext, and sends the preset large number and the information ciphertext to the blockchain for evidence storage;
[0173] C20, receiving an information voucher sent by an information verifier, and receiving a first information digest sent by the information holder, wherein the voucher generator uses a randomly selected intermediate parameter as an exponent of the preset large number to calculate a parameter ciphertext, calculates a digest based at least on the parameter ciphertext and the information ciphertext to obtain the first information digest, substitutes the intermediate parameter, the first information digest and the information original text into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate the information voucher, returns the first information digest and the information voucher to the information holder, so that the information holder sends the information voucher to the information verifier;
[0174] C30, using the information voucher as the exponent of the preset large number to obtain a first intermediate result, and using the first information summary as the exponent of the information ciphertext to obtain a second intermediate result;
[0175] C40, substituting the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to obtain reconstruction information, and obtaining a second information summary based on at least the reconstruction information and the information ciphertext;
[0176] C50, when the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified, so that when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the information ciphertext that has been verified on the blockchain.
[0177] The specific implementation of steps C10 to C50 of this embodiment may refer to the specific implementation of steps S10 to S30 in the first embodiment. The detailed implementation of steps C10 to C50 may also refer to the second embodiment, which will not be described in detail here.
[0178] Furthermore, in one embodiment, the step C10 includes:
[0179] Step C101, receiving the signed preset large number and the information ciphertext sent by the credential generator, wherein the credential generator uses the private key of the credential generator to sign the preset large number and the information ciphertext after calculating the information ciphertext;
[0180] Step C102, using the public key of the credential generator to perform signature verification on the signed preset large number and the information ciphertext;
[0181] Step C103, when the verification is passed, the preset large number and the information ciphertext are stored on the blockchain.
[0182] When the credential generator uploads the preset large number and information ciphertext to the chain for evidence storage, he can use his own private key to sign the preset large number and information ciphertext, and send the signed preset large number and information ciphertext to the blockchain. After the blockchain receives the signed preset large number and information ciphertext, it first uses the public key of the credential generator to verify the signature of the signed preset large number and information ciphertext. Only when the verification is passed will the preset large number and information ciphertext be stored on the blockchain, and the subsequent public verification of the information ciphertext will be accepted. If the verification fails, the blockchain can do nothing, or return a verification failure notification to the credential generator. By signing and verifying the information uploaded to the chain, it is prevented from the attacker impersonating the credential generator to upload forged information to the chain.
[0183] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, on which a blockchain-based information verification program is stored. When the blockchain-based information verification program is executed by a processor, the steps of the blockchain-based information verification method described in the above embodiment are implemented.
[0184] The various embodiments of the information verification device and computer-readable storage medium based on blockchain of the present invention can all refer to the various embodiments of the information verification method based on blockchain of the present invention, and will not be repeated here.
[0185] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0186] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0188] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A blockchain-based information verification method, characterized in that: The method is applied to the information holder, and the method comprises the following steps: The original information is sent to the credential generator, so that the credential generator uses the original information as the exponent of a preset large number to obtain information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to obtain parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate an information credential, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information credential to the information holder; The information voucher is sent to an information verifier and the first information digest is sent to a blockchain, so that the information verifier can send the information voucher to the blockchain, so that the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent; The information to be verified corresponding to the original information is sent to the information verifier, so that the information verifier can verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
2. The information verification method based on blockchain as claimed in claim 1, characterized in that: The step of sending the original information to the credential generator comprises: The information to be uploaded to the chain is split according to the preset selective disclosure granularity to obtain multiple pieces of split information to be uploaded to the chain; Each piece of split information to be uploaded to the chain is sent to the credential generator as the original text of the information.
3. The information verification method based on blockchain as claimed in claim 1, characterized in that: The step of sending the original information to the credential generator comprises: Generate random numbers for the information to be uploaded to the chain; The information to be uploaded to the chain and the random number are sent as original information to the credential generator.
4. The blockchain-based information verification method according to any one of claims 1 to 3, characterized in that: The step of sending the information voucher to the information verifier and sending the first information summary to the blockchain comprises: Sending the information credential to an information verifier; After monitoring that the information verifier sends the information certificate to the blockchain, the first summary information is sent to the blockchain.
5. A blockchain-based information verification method, characterized in that: The method is applied to a credential generator, and the method comprises the following steps: Obtain the original information of the information holder, calculate the ciphertext of the information by using the original information as the exponent of a preset large number, and upload the preset large number and the ciphertext of the information to the blockchain for evidence storage; A parameter ciphertext is obtained by using a randomly selected intermediate parameter as an exponent of the preset large number, a digest is calculated based on at least the parameter ciphertext and the information ciphertext to obtain a first information digest, and the intermediate parameter, the first information digest and the original information are substituted into a preset exponent offset formula for reconstructing the parameter ciphertext to obtain an information voucher; The first information digest and the information voucher are returned to the information holder, so that the information holder can send the information voucher to the information verifier and send the first information digest to the blockchain, so that after the information verifier sends the information voucher to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and they are consistent, and when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the verified information ciphertext on the blockchain.
6. The information verification method based on blockchain as claimed in claim 5, characterized in that: The steps of calculating the information ciphertext by using the original information as the exponent of a preset large number, and uploading the preset large number and the information ciphertext to the blockchain for evidence storage include: The information to be uploaded to the chain and the random number in the original information are used as the exponents of the first large number and the second large number respectively to calculate the information ciphertext, and the first large number, the second large number and the information ciphertext are uploaded to the blockchain for evidence storage, wherein the preset large number includes the first large number and the second large number; The step of calculating the parameter ciphertext by using the randomly selected intermediate parameter as the exponent of the preset large number comprises: Calculate a parameter ciphertext by using the randomly selected first intermediate parameter and the second intermediate parameter as exponents of the first large number and the second large number respectively; The step of substituting the intermediate parameter, the first information summary and the original information into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate and obtain the information voucher comprises: Substituting the first intermediate parameter, the first information digest and the information to be uploaded into a first preset exponent offset formula for reconstructing the parameter ciphertext to calculate a first information voucher; Substituting the second intermediate parameter, the first information digest and the random number into a second preset exponent cancellation formula for reconstructing the parameter ciphertext to calculate a second information voucher; The step of returning the information voucher to the information holder comprises: The first information certificate and the second information certificate are returned to the information holder as information certificates, so that when the blockchain calculates the first intermediate result, the first information certificate and the second information certificate are used as the exponents of the first large number and the second large number to obtain the first intermediate result.
7. A blockchain-based information verification method, characterized in that: The method is applied to an information verifier, and the method comprises the following steps: Receive an information voucher sent by an information holder, wherein after obtaining the original information of the information holder, the voucher generator uses the original information as the exponent of a preset large number to calculate the information ciphertext, uses a randomly selected intermediate parameter as the exponent of the preset large number to calculate the parameter ciphertext, calculates a summary based on at least the parameter ciphertext and the information ciphertext to obtain a first information summary, substitutes the intermediate parameter, the first information summary and the original information into a preset exponent offset formula for reconstructing the parameter ciphertext to calculate the information voucher, uploads the preset large number and the information ciphertext to the blockchain for evidence storage, and returns the first information summary and the information voucher to the information holder; Send the information voucher to the blockchain, so that after the information holder sends the first information digest to the blockchain, the blockchain uses the information voucher as the exponent of the preset large number to calculate a first intermediate result, uses the first information digest as the exponent of the information ciphertext to calculate a second intermediate result, substitutes the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, calculates a second information digest based on at least the reconstructed information and the information ciphertext, and determines that the information ciphertext on the blockchain has been verified when the second information digest is compared with the first information digest and is consistent; Receive the information to be verified corresponding to the original text of the information sent by the information holder, and verify the information to be verified based on the ciphertext of the information that has been verified on the blockchain.
8. The information verification method based on blockchain as claimed in claim 7, characterized in that: The step of verifying the information to be verified based on the information ciphertext that has been verified on the blockchain includes: Obtain the preset large number from the blockchain; Calculate the information to be verified as the exponent of the preset large number to obtain a verification ciphertext; If the verification ciphertext is compared with the information ciphertext that has been verified on the blockchain and they are consistent, it is determined that the information to be verified is the original text of the information.
9. A blockchain-based information verification method, characterized in that: The method is applied to blockchain, and the method comprises the following steps: Receiving a preset large number and information ciphertext sent by a credential generator, wherein after obtaining the original information of the information holder, the credential generator uses the original information as the exponent of the preset large number to calculate the information ciphertext, and sends the preset large number and the information ciphertext to the blockchain for evidence storage; Receiving an information voucher sent by an information verifier, and receiving a first information digest sent by the information holder, wherein the voucher generator uses a randomly selected intermediate parameter as an exponent of the preset large number to calculate a parameter ciphertext, calculates a digest based at least on the parameter ciphertext and the information ciphertext to obtain the first information digest, substitutes the intermediate parameter, the first information digest and the information original text into a preset exponential offset formula for reconstructing the parameter ciphertext to calculate the information voucher, returns the first information digest and the information voucher to the information holder, so that the information holder sends the information voucher to the information verifier; The information voucher is used as the exponent of the preset large number to obtain a first intermediate result, and the first information summary is used as the exponent of the information ciphertext to obtain a second intermediate result; Substituting the first intermediate result and the second intermediate result into a reconstruction formula corresponding to the preset exponent offset formula to calculate reconstructed information, and calculating a second information summary based at least on the reconstructed information and the information ciphertext; When the second information digest is compared with the first information digest and they are consistent, it is determined that the information ciphertext on the blockchain has been verified, so that when the information holder sends the information to be verified corresponding to the original information to the information verifier, the information verifier verifies the information to be verified based on the information ciphertext that has been verified on the blockchain.
10. The information verification method based on blockchain as claimed in claim 9, characterized in that: The step of receiving the preset large number and information ciphertext sent by the credential generator includes: Receiving the signed preset large number and the information ciphertext sent by the credential generator, wherein after calculating the information ciphertext, the credential generator uses the private key of the credential generator to sign the preset large number and the information ciphertext; Using the public key of the credential generator to perform signature verification on the signed preset large number and the information ciphertext; When the verification is passed, the preset large number and the information ciphertext are stored on the blockchain.
