Data verification method and device and related equipment

By encrypting and uploading cloud storage data to the server and blockchain for verification, the characteristics of blockchain are used to solve the problem of poor validation of cloud storage data, and efficient and secure verification of data is achieved.

CN119026180APending Publication Date: 2024-11-26CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410994784.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The verification effect of cloud storage data in the prior art is poor, especially because the data needs to be downloaded locally for verification, resulting in poor confidentiality and poor adaptability.

Method used

By encrypting the stored data, encrypted ciphertext and signed data, and uploading it to the server and blockchain, the blockchain uses the blockchain to verify the integrity and security of the data, including hashing calculation of the encrypted ciphertext and signature, send verification requests to ensure data integrity and security.

Benefits of technology

The effect of data verification is improved, and the security and integrity of data are ensured through the irreversibility and unmodification of blockchain, and the problem of poor verification results in the existing technology is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026180A_ABST
    Figure CN119026180A_ABST
Patent Text Reader

Abstract

The invention provides a data verification method and device and related equipment, and is applied to a client, and the method comprises the steps: encrypting to-be-stored data, and obtaining an encrypted ciphertext and signature data; uploading the encrypted ciphertext and the hash data to a server, and uploading the encrypted ciphertext and the signature data to a block chain; sending a first data verification request to a server, and sending a second data verification request to a block chain; and receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the block chain in response to the second data verification request. According to the method and the device, after the to-be-stored data is encrypted, the encrypted ciphertext, the signature data and the Hash data are obtained, the encrypted ciphertext and the Hash data are uploaded to the server, and the encrypted ciphertext and the signature data are uploaded to the block chain, so that the security and the integrity of the to-be-stored data are verified by utilizing the block chain; and the data verification effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud computing, and in particular to a data verification method, device and related equipment. Background Art

[0002] In recent years, cloud computing has been widely used in many fields. Cloud computing regards information processing as a service, such as outsourced storage and outsourced computing. Cloud computing reduces the storage management burden of customers and realizes universal data access in independent geographical locations. At present, in the field of cloud computing technology, for verifying the data stored in the cloud, users are generally required to download all the data stored in the cloud to the local computer and then verify it. However, due to poor confidentiality and poor adaptability, this method has led to the problem that the existing technology has poor data verification effect. Summary of the invention

[0003] The embodiments of the present application provide a data verification method, device and related equipment to solve the problem of poor data verification effect in the prior art.

[0004] To solve the above problems, this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a data verification method, which is applied to a client, and the method includes:

[0006] Encrypting the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data;

[0007] Uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext;

[0008] Sending a first data verification request to the server, and sending a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain;

[0009] Receive first feedback information sent by the server in response to the first data verification request, and receive second feedback information sent by the blockchain in response to the second data verification request, the first feedback information being used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

[0010] Optionally, encrypting the data to be stored to obtain encrypted ciphertext and signature data includes:

[0011] Randomly generate a first prime number and a second prime number;

[0012] Generate an encryption public key and an encryption private key according to the first prime number and the second prime number;

[0013] Encrypting the data to be stored based on the symmetric key of the encryption private key to obtain the encrypted ciphertext;

[0014] Splitting the encrypted ciphertext to obtain a plurality of first information blocks;

[0015] The plurality of first information blocks are signed according to a preset encryption algorithm to obtain the signature data.

[0016] Optionally, signing the plurality of first information blocks according to a preset encryption algorithm to obtain the signature data includes:

[0017] updating the data of the plurality of first information blocks according to the first prime number and the second prime number to obtain a plurality of second information blocks;

[0018] Performing hash calculations on the multiple first information blocks according to a preset hash algorithm to obtain multiple hash values ​​corresponding to the multiple first information blocks one by one, the hash data including the multiple hash values;

[0019] Signing the plurality of second information blocks and the hash data according to a preset encryption algorithm to obtain the signature data;

[0020] The uploading of the encrypted ciphertext and the hash data to the server, and the uploading of the encrypted ciphertext and the signature data to the blockchain, includes:

[0021] The plurality of first information blocks and the hash data are uploaded to the server, and the plurality of second information blocks and the signature data are uploaded to the blockchain.

[0022] Optionally, before sending the first data verification request to the server and sending the second data verification request to the blockchain, the method further includes:

[0023] The first data verification request is generated according to a first parameter, a second parameter and a third parameter, and the second data verification request is generated according to the first parameter, the second parameter and the third parameter, wherein the first parameter is a positive integer, and the second parameter and the third parameter are pseudo-random functions.

[0024] Optionally, the receiving first feedback information sent by the server in response to the first data verification request, and the receiving second feedback information sent by the blockchain in response to the second data verification request, include:

[0025] receiving first feedback information generated by the server in response to the first data verification request, the first feedback information being generated based on the first parameter, the second parameter, and the third parameter, the first feedback information being used to indicate a result of integrity verification of the encrypted ciphertext;

[0026] Receive second feedback information generated by the blockchain in response to the second data verification request, where the second feedback information is generated based on the signature data, and the second feedback information is used to indicate a security verification result of the signature data.

[0027] Optionally, after receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the blockchain in response to the second data verification request, the method further includes:

[0028] receiving a data sharing request sent by the server, wherein the data sharing request is used to share the encrypted ciphertext with other clients other than the client;

[0029] In response to the data sharing request, verify the encrypted ciphertext, the hash data, and the signature data to generate a verification result;

[0030] When the verification result indicates that the encrypted ciphertext, the hash data, and the signature data are verified, a transmission request is sent to the server, wherein the transmission request is used to allow the server to share the encrypted ciphertext with other clients other than the client.

[0031] In a second aspect, an embodiment of the present application further provides a data verification device, which is applied to a client, and the device includes:

[0032] An encryption module, used to encrypt the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data;

[0033] An uploading module, used to upload the encrypted ciphertext and hash data to a server, and to upload the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext;

[0034] A sending module, configured to send a first data verification request to the server, and to send a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain;

[0035] A receiving module is used to receive first feedback information sent by the server in response to the first data verification request, and to receive second feedback information sent by the blockchain in response to the second data verification request, wherein the first feedback information is used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

[0036] In a third aspect, an embodiment of the present application further provides a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the method described in the first aspect above.

[0037] In a fourth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the method described in the first aspect above.

[0038] In a fifth aspect, an embodiment of the present application further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps in the method described in the first aspect.

[0039] The present application provides a data verification method, device and related equipment, which are applied to a client, and the method includes: encrypting data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data; uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext; sending a first data verification request to the server, and sending a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain; receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the blockchain in response to the second data verification request, wherein the first feedback information is used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure. The present application encrypts the data to be stored to obtain encrypted ciphertext, signature data and hash data, and uploads the encrypted ciphertext and hash data to the server, and uploads the encrypted ciphertext and the signature data to the blockchain, thereby realizing the use of the blockchain to verify the security and integrity of the stored data, thereby improving the effect of data verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 It is a flowchart of a data verification method provided in an embodiment of the present application;

[0042] Figure 2 It is an interactive schematic diagram provided in an embodiment of the present application;

[0043] Figure 3 It is a schematic diagram of the structure of a data verification device provided in an embodiment of the present application;

[0044] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, representing the inclusion of separate A, separate B, separate C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations that A, B and C all exist.

[0047] See also Figure 1 , Figure 1 It is a flowchart of the data verification method provided in the embodiment of the present application. Figure 1 The validation method of the data shown is applied on the client side, such as Figure 1 As shown, the data verification method may include the following steps:

[0048] Step 101: Encrypt the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data.

[0049] In this embodiment, if Figure 2 As shown, Figure 2 The following is an interactive diagram of this embodiment, in which the data holder is the client. Specifically, the data holder is an entity with a large amount of data, which can be an individual consumer or a company. The data will be stored in the cloud for maintenance and calculation. The data holder generates a verification request and sends it to the cloud server and blockchain, and verifies the response of the cloud server and blockchain. If the response can pass the verification, the remote data is considered complete; otherwise, the remote data is considered to be missing and a lawsuit is filed against the cloud server. The data holder plays the role of both data verifier and sharer.

[0050] The authorizer is a terminal other than the client. Specifically, the authorizer is an entity that can request certain information from the data holder and can obtain shared data through symmetric encryption and decryption.

[0051] A cloud server is a server. Specifically, a cloud server is an entity managed by a cloud service provider and uses its large storage space and computing resources to maintain customer data. After receiving the verification request from the data holder, the cloud server generates the corresponding data and sends it to the data holder.

[0052] Blockchain is an entity that stores some metadata for data holders. The integrity of remote data is proved by the irreversibility of data on the blockchain and the metadata stored in it. After receiving the verification request from the data holder, the blockchain generates the corresponding metadata and sends it to the data holder.

[0053] The system administrator is an entity that generates system parameters, publishes the generated public parameters in the system, and sends secret parameters to the corresponding entities through a trusted channel.

[0054] In this embodiment, the data to be stored is data that the client needs to upload to the server for storage. The data to be stored is encrypted in an encryption manner to obtain encrypted ciphertext and signature data. Specifically, the encrypted ciphertext and signature data correspond to each other, that is, the encrypted ciphertext can be verified through the signature data.

[0055] Step 102: Upload the encrypted ciphertext and hash data to the server, and upload the encrypted ciphertext and the signature data to the blockchain, wherein the hash data is data obtained by performing hash calculation on the encrypted ciphertext.

[0056] In this embodiment, the hash data is the data obtained by performing a hash calculation on the encrypted ciphertext. Thus, the encrypted ciphertext and the hash data are uploaded to the server for storage, and the encrypted ciphertext and the signature data are uploaded to the blockchain for storage.

[0057] Step 103: Send a first data verification request to the server, and send a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored in the blockchain.

[0058] In this embodiment, when the encrypted ciphertext needs to be verified, a first data verification request is sent to the server, and a second data verification request is sent to the blockchain, thereby satisfying the simultaneous verification of the data integrity of the encrypted ciphertext and the security of the signature data. The blockchain is effectively integrated into the process of remote data integrity verification and sharing, and data integrity verification of the semi-trusted cloud server is realized.

[0059] Step 104: Receive first feedback information sent by the server in response to the first data verification request, and receive second feedback information sent by the blockchain in response to the second data verification request, wherein the first feedback information is used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

[0060] In this embodiment, the client receives the first feedback information sent by the server in response to the first data verification request and the second feedback information sent by the blockchain in response to the second data verification request, thereby obtaining the result of verifying the security and integrity of the data. For example, for a semi-trusted cloud server, when the data stored therein is damaged or modified, the user can verify the ownership of the data by using the blockchain.

[0061] Since data storage is completed by utilizing the irreversibility and unchangeability of blockchain, all parties can trust the data in the blockchain. Once the data is changed, it will affect the data of the entire blockchain. Therefore, verifying the data through blockchain can ensure the effectiveness of data verification.

[0062] The present application provides a data verification method, the method comprising: encrypting data to be stored to obtain encrypted ciphertext and signature data, the encrypted ciphertext corresponding to the signature data; uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and the signature data to a blockchain, the hash data being data obtained by performing hash calculation on the encrypted ciphertext; sending a first data verification request to the server, and sending a second data verification request to the blockchain, the first data verification request being used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request being used to verify the security of the signature data stored by the blockchain; receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the blockchain in response to the second data verification request, the first feedback information being used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure. The present application encrypts the data to be stored to obtain encrypted ciphertext, signature data and hash data, and uploads the encrypted ciphertext and hash data to the server, and uploads the encrypted ciphertext and the signature data to the blockchain, thereby realizing the use of the blockchain to verify the security and integrity of the stored data, thereby improving the effect of data verification.

[0063] In some feasible implementations, optionally, encrypting the data to be stored to obtain encrypted ciphertext and signature data includes:

[0064] Randomly generate a first prime number and a second prime number;

[0065] Generate an encryption public key and an encryption private key according to the first prime number and the second prime number;

[0066] Encrypting the data to be stored based on the symmetric key of the encryption private key to obtain the encrypted ciphertext;

[0067] Splitting the encrypted ciphertext to obtain a plurality of first information blocks;

[0068] The plurality of first information blocks are signed according to a preset encryption algorithm to obtain the signature data.

[0069] In this embodiment, the first prime number and the second prime number are p′ and q′ respectively, and two safe prime numbers p=2p′+1 and q=2q′+1 are calculated, and N=pq. For the square residue group QR with order p′q′ N , let its generator be g. Let the user's public key be pk = (N, g, e), and the corresponding private key be sk = d, where e is a large prime number and satisfies ed = 1 (mod p′q′). For the function H:{0,1} *→QR N , which is a secure and deterministic hash encoding function that uniformly maps strings to QR N In addition, the function f: Defined as a pseudo-random function, function π: Defined as a pseudo-random permutation.

[0070] The public key pk, hash function H, pseudo-random function f and pseudo-random permutation π are made public in the system. The private key is kept secret by the client. At this time, the QR N It is also not public, and the order p′q′ is only known to the user.

[0071] Optionally, signing the plurality of first information blocks according to a preset encryption algorithm to obtain the signature data includes:

[0072] updating the data of the plurality of first information blocks according to the first prime number and the second prime number to obtain a plurality of second information blocks;

[0073] Performing hash calculations on the multiple first information blocks according to a preset hash algorithm to obtain multiple hash values ​​corresponding to the multiple first information blocks one by one, the hash data including the multiple hash values;

[0074] Signing the plurality of second information blocks and the hash data according to a preset encryption algorithm to obtain the signature data;

[0075] The uploading of the encrypted ciphertext and the hash data to the server, and the uploading of the encrypted ciphertext and the signature data to the blockchain, includes:

[0076] The plurality of first information blocks and the hash data are uploaded to the server, and the plurality of second information blocks and the signature data are uploaded to the blockchain.

[0077] In this embodiment, for information M={M1, M2, ..., M t}, encrypted using the symmetric key ssk in Divide F into information blocks with l bit rows, F = (F1, F2, ..., F n ), the user performs the following operations: for 1≤i≤n, calculate f i =F i (mod p′q′), Calculate the hash value H of file F F =H(F). For information H F and (T1, T2, ..., T n), use RSA to sign it σ=H(T1,T2,...,T n , H F ) d (modN). The information block and the hash value (F1, F2, ..., F n , H F ) is uploaded to the cloud server; at the same time, (T1, F2, ..., T n , H F ) and σ are written into the blockchain. The cloud server receives (F1, F2, ..., F n , H F ) and verify equation H F =H(F) holds, and H F Whether it has been written into the blockchain. If both conditions are met, the cloud server receives the information block and its hash value (F1, T2, ..., F n , H F ). It should be noted that H F It needs to be stored in the blockchain to ensure that it is complete and correct and can be directly read and used by the client.

[0078] Optionally, before sending the first data verification request to the server and sending the second data verification request to the blockchain, the method further includes:

[0079] The first data verification request is generated according to a first parameter, a second parameter and a third parameter, and the second data verification request is generated according to the first parameter, the second parameter and the third parameter, wherein the first parameter is a positive integer, and the second parameter and the third parameter are pseudo-random functions.

[0080] In this embodiment, the user generates a first data verification request chal=(c, k1, k2), where the first parameter, the second parameter and the third parameter are c, k1, k2 respectively, where 1≤c≤n, Send chal to the cloud server. After receiving the user's first data verification request, the cloud server performs the following operations: For 1≤i≤c, calculate calculate Send F' to the user.

[0081] Optionally, the receiving first feedback information sent by the server in response to the first data verification request, and the receiving second feedback information sent by the blockchain in response to the second data verification request, include:

[0082] receiving first feedback information generated by the server in response to the first data verification request, the first feedback information being generated based on the first parameter, the second parameter, and the third parameter, the first feedback information being used to indicate a result of integrity verification of the encrypted ciphertext;

[0083] Receive second feedback information generated by the blockchain in response to the second data verification request, where the second feedback information is generated based on the signature data, and the second feedback information is used to indicate a security verification result of the signature data.

[0084] In this embodiment, after the user receives the above F′, i.e., the first feedback information, for the second data verification request chal=(c, k1, k2), calculate Query from blockchain Verify whether the equation holds true based on the group QRN.

[0085] If true, the verification succeeds, otherwise it fails.

[0086]

[0087] It should be noted that when the remote data is modified, the cloud server needs to compensate the user. In the process of verifying the remote data, the cloud server verifies whether the following signature is valid. If it is valid, the cloud server needs to be responsible for the user.

[0088] σ e =H(T1, T2, ..., T n , H F )(mod N)

[0089] Optionally, after receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the blockchain in response to the second data verification request, the method further includes:

[0090] receiving a data sharing request sent by the server, wherein the data sharing request is used to share the encrypted ciphertext with other clients other than the client;

[0091] In response to the data sharing request, verify the encrypted ciphertext, the hash data, and the signature data to generate a verification result;

[0092] When the verification result indicates that the encrypted ciphertext, the hash data, and the signature data are verified, a transmission request is sent to the server, wherein the transmission request is used to allow the server to share the encrypted ciphertext with other clients other than the client.

[0093] In this embodiment, when other clients other than the client request to share data with the client, they need to first indicate to the server that they are the data holders to prevent malicious users from stealing data. Specifically, when the client wants to share information M={M1, M2, ..., M t When sharing with an authorized person, the user needs to prove to the cloud server that the user owns the remote data, that is, verify the equation σ e =H(T1, T2, ..., T n , H F )(mod N) is true. If true, the user obtains (F1, F2, ..., F n , H F ), first verify equation H F =H(F1, F2, ..., F n ) is true; if true, decrypt the ciphertext Get {M1, M2, ..., M t}. Encrypt {M1, M2, ..., M t} to obtain F′, and calculate H F′ =H(F′), the ciphertext and H F′ Passed to the authorized person for decryption and integrity verification.

[0094] It should be noted that the present application is applied to situational awareness. Specifically, situational awareness adopts an advanced big data architecture, and uniformly processes and analyzes the network security data collected by the collection system, thereby realizing the discovery and warning of network attack behaviors, security volume and other network security issues, and creating security monitorable and threat-safe capabilities.

[0095] The present application encrypts the data to be stored to obtain encrypted ciphertext, signature data and hash data, and uploads the encrypted ciphertext and hash data to the server, and uploads the encrypted ciphertext and the signature data to the blockchain, thereby realizing the use of the blockchain to verify the security and integrity of the stored data, thereby improving the effect of data verification.

[0096] See also Figure 3 , Figure 3 is a structural diagram of a data verification device provided in an embodiment of the present application. Figure 3 As shown, the data verification device 300 is applied to the client, and the data verification device 300 includes:

[0097] The encryption module 310 is used to encrypt the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data;

[0098] An uploading module 320, configured to upload the encrypted ciphertext and hash data to a server, and to upload the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext;

[0099] A sending module 330, configured to send a first data verification request to the server, and to send a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain;

[0100] The receiving module 340 is used to receive first feedback information sent by the server in response to the first data verification request, and to receive second feedback information sent by the blockchain in response to the second data verification request, wherein the first feedback information is used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

[0101] Optionally, the encryption module includes:

[0102] A first generating submodule, used for randomly generating a first prime number and a second prime number;

[0103] A second generating submodule, used to generate an encrypted public key and an encrypted private key according to the first prime number and the second prime number;

[0104] An encryption submodule, used for encrypting the data to be stored based on the symmetric key of the encryption private key to obtain the encrypted ciphertext;

[0105] A sub-slicing module, used for segmenting the encrypted ciphertext to obtain a plurality of first information blocks;

[0106] The signature submodule is used to sign the multiple first information blocks according to a preset encryption algorithm to obtain the signature data.

[0107] Optionally, the signature submodule includes:

[0108] an updating unit, configured to update the plurality of first information blocks according to the first prime number and the second prime number to obtain a plurality of second information blocks;

[0109] a calculation unit, configured to perform hash calculation on the plurality of first information blocks according to a preset hash algorithm to obtain a plurality of hash values ​​corresponding one-to-one to the plurality of first information blocks, wherein the hash data includes the plurality of hash values;

[0110] A signing unit, configured to sign the plurality of second information blocks and the hash data according to a preset encryption algorithm to obtain the signature data;

[0111] A first uploading unit, used for uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and signature data to a blockchain, comprising:

[0112] A second uploading unit is used to upload the multiple first information blocks and the hash data to the server, and to upload the multiple second information blocks and the signature data to the blockchain.

[0113] Optionally, also include:

[0114] A generation module is used to generate the first data verification request according to a first parameter, a second parameter and a third parameter, and to generate the second data verification request according to the first parameter, the second parameter and the third parameter, wherein the first parameter is a positive integer, and the second parameter and the third parameter are pseudo-random functions.

[0115] Optionally, the generation module includes:

[0116] a first receiving submodule, configured to receive first feedback information generated by the server in response to the first data verification request, wherein the first feedback information is generated based on the first parameter, the second parameter, and the third parameter, and the first feedback information is used to indicate a result of integrity verification of the encrypted ciphertext;

[0117] The second receiving submodule is used to receive second feedback information generated by the blockchain in response to the second data verification request, the second feedback information is generated based on the signature data, and the second feedback information is used to indicate the security verification result of the signature data.

[0118] Optionally, also include:

[0119] A sharing receiving module, used for receiving a data sharing request sent by the server, wherein the data sharing request is used for sharing the encrypted ciphertext with other clients other than the client;

[0120] a sharing verification module, configured to verify the encrypted ciphertext, the hash data and the signature data in response to the data sharing request, and generate a verification result;

[0121] A request sending module is used to send a transmission request to the server when the verification result indicates that the encrypted ciphertext, the hash data and the signature data have been verified, and the transmission request is used to allow the server to share the encrypted ciphertext with other clients other than the client.

[0122] The present application encrypts the data to be stored to obtain encrypted ciphertext, signature data and hash data, and uploads the encrypted ciphertext and hash data to the server, and uploads the encrypted ciphertext and the signature data to the blockchain, thereby realizing the use of the blockchain to verify the security and integrity of the stored data, thereby improving the effect of data verification.

[0123] The present application also provides an electronic device. Figure 4 , the electronic device may include a processor 401, a memory 402, and a program 4021 stored in the memory 402 and executable on the processor 401.

[0124] When the program 4021 is executed by the processor 401, it can achieve Figure 1 Any step in the corresponding method embodiment:

[0125] Encrypting the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data;

[0126] Uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext;

[0127] Sending a first data verification request to the server, and sending a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain;

[0128] Receive first feedback information sent by the server in response to the first data verification request, and receive second feedback information sent by the blockchain in response to the second data verification request, the first feedback information being used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

[0129] Optionally, encrypting the data to be stored to obtain encrypted ciphertext and signature data includes:

[0130] Randomly generate a first prime number and a second prime number;

[0131] Generate an encryption public key and an encryption private key according to the first prime number and the second prime number;

[0132] Encrypting the data to be stored based on the symmetric key of the encryption private key to obtain the encrypted ciphertext;

[0133] Splitting the encrypted ciphertext to obtain a plurality of first information blocks;

[0134] The plurality of first information blocks are signed according to a preset encryption algorithm to obtain the signature data.

[0135] Optionally, signing the plurality of first information blocks according to a preset encryption algorithm to obtain the signature data includes:

[0136] Verifying data of the plurality of first information blocks according to the first prime number and the second prime number to obtain a plurality of second information blocks;

[0137] Performing hash calculations on the multiple first information blocks according to a preset hash algorithm to obtain multiple hash values ​​corresponding to the multiple first information blocks one by one, the hash data including the multiple hash values;

[0138] Signing the plurality of second information blocks and the hash data according to a preset encryption algorithm to obtain the signature data;

[0139] The uploading of the encrypted ciphertext and the hash data to the server, and the uploading of the encrypted ciphertext and the signature data to the blockchain, includes:

[0140] The plurality of first information blocks and the hash data are uploaded to the server, and the plurality of second information blocks and the signature data are uploaded to the blockchain.

[0141] Optionally, before sending the first data verification request to the server and sending the second data verification request to the blockchain, the method further includes:

[0142] The first data verification request is generated according to a first parameter, a second parameter and a third parameter, and the second data verification request is generated according to the first parameter, the second parameter and the third parameter, wherein the first parameter is a positive integer, and the second parameter and the third parameter are pseudo-random functions.

[0143] Optionally, the receiving first feedback information sent by the server in response to the first data verification request, and the receiving second feedback information sent by the blockchain in response to the second data verification request, include:

[0144] receiving first feedback information generated by the server in response to the first data verification request, the first feedback information being generated based on the first parameter, the second parameter, and the third parameter, the first feedback information being used to indicate a result of integrity verification of the encrypted ciphertext;

[0145] Receive second feedback information generated by the blockchain in response to the second data verification request, where the second feedback information is generated based on the signature data, and the second feedback information is used to indicate a security verification result of the signature data.

[0146] Optionally, after receiving first feedback information sent by the server in response to the first data verification request, and receiving second feedback information sent by the blockchain in response to the second data verification request, the method further includes:

[0147] receiving a data sharing request sent by the server, wherein the data sharing request is used to share the encrypted ciphertext with other clients other than the client;

[0148] In response to the data sharing request, verify the encrypted ciphertext, the hash data, and the signature data to generate a verification result;

[0149] When the verification result indicates that the encrypted ciphertext, the hash data, and the signature data are verified, a transmission request is sent to the server, wherein the transmission request is used to allow the server to share the encrypted ciphertext with other clients other than the client.

[0150] The present application encrypts the data to be stored to obtain encrypted ciphertext, signature data and hash data, and uploads the encrypted ciphertext and hash data to the server, and uploads the encrypted ciphertext and the signature data to the blockchain, thereby realizing the use of the blockchain to verify the security and integrity of the stored data, thereby improving the effect of data verification.

[0151] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned data verification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0152] The embodiment of the present application further provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned data verification method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0153] 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.

[0154] 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 application, 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 a terminal (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 application.

[0155] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data verification method, It is characterized in that Applied to a client, the method comprises: Encrypting the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data; Uploading the encrypted ciphertext and hash data to a server, and uploading the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext; Sending a first data verification request to the server, and sending a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain; Receive first feedback information sent by the server in response to the first data verification request, and receive second feedback information sent by the blockchain in response to the second data verification request, the first feedback information being used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

2. The method according to claim 1, It is characterized in that The method of encrypting the data to be stored to obtain encrypted ciphertext and signature data includes: Randomly generate a first prime number and a second prime number; Generate an encryption public key and an encryption private key according to the first prime number and the second prime number; Encrypting the data to be stored based on the symmetric key of the encryption private key to obtain the encrypted ciphertext; Splitting the encrypted ciphertext to obtain a plurality of first information blocks; The plurality of first information blocks are signed according to a preset encryption algorithm to obtain the signature data.

3. The method according to claim 2, It is characterized in that The step of signing the plurality of first information blocks according to a preset encryption algorithm to obtain the signature data includes: updating the data of the plurality of first information blocks according to the first prime number and the second prime number to obtain a plurality of second information blocks; Performing hash calculations on the multiple first information blocks according to a preset hash algorithm to obtain multiple hash values ​​corresponding to the multiple first information blocks one by one, the hash data including the multiple hash values; Signing the plurality of second information blocks and the hash data according to a preset encryption algorithm to obtain the signature data; The uploading of the encrypted ciphertext and the hash data to the server, and the uploading of the encrypted ciphertext and the signature data to the blockchain, includes: The plurality of first information blocks and the hash data are uploaded to the server, and the plurality of second information blocks and the signature data are uploaded to the blockchain.

4. The method according to claim 1, It is characterized in that Before sending the first data verification request to the server and sending the second data verification request to the blockchain, the method further includes: The first data verification request is generated according to a first parameter, a second parameter and a third parameter, and the second data verification request is generated according to the first parameter, the second parameter and the third parameter, wherein the first parameter is a positive integer, and the second parameter and the third parameter are pseudo-random functions.

5. The method according to claim 4, It is characterized in that The receiving first feedback information sent by the server in response to the first data verification request, and the receiving second feedback information sent by the blockchain in response to the second data verification request, include: receiving first feedback information generated by the server in response to the first data verification request, the first feedback information being generated based on the first parameter, the second parameter, and the third parameter, the first feedback information being used to indicate a result of integrity verification of the encrypted ciphertext; Receive second feedback information generated by the blockchain in response to the second data verification request, where the second feedback information is generated based on the signature data, and the second feedback information is used to indicate a security verification result of the signature data.

6. The method according to claim 1, It is characterized in that After receiving the first feedback information sent by the server in response to the first data verification request, and receiving the second feedback information sent by the blockchain in response to the second data verification request, the method further includes: receiving a data sharing request sent by the server, wherein the data sharing request is used to share the encrypted ciphertext with other clients other than the client; In response to the data sharing request, verify the encrypted ciphertext, the hash data, and the signature data to generate a verification result; When the verification result indicates that the encrypted ciphertext, the hash data, and the signature data are verified, a transmission request is sent to the server, wherein the transmission request is used to allow the server to share the encrypted ciphertext with other clients other than the client.

7. A data verification device, It is characterized in that Applied to a client, the device comprises: An encryption module, used to encrypt the data to be stored to obtain encrypted ciphertext and signature data, wherein the encrypted ciphertext corresponds to the signature data; An uploading module, used to upload the encrypted ciphertext and hash data to a server, and to upload the encrypted ciphertext and the signature data to a blockchain, wherein the hash data is data obtained by performing a hash calculation on the encrypted ciphertext; A sending module, configured to send a first data verification request to the server, and to send a second data verification request to the blockchain, wherein the first data verification request is used to verify the data integrity of the encrypted ciphertext stored by the server, and the second data verification request is used to verify the security of the signature data stored by the blockchain; A receiving module is used to receive first feedback information sent by the server in response to the first data verification request, and to receive second feedback information sent by the blockchain in response to the second data verification request, wherein the first feedback information is used to indicate whether the encrypted ciphertext stored by the server is complete and whether the signature data stored by the blockchain is secure.

8. An electronic device, include: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the data verification method as described in any one of claims 1 to 6.

9. A readable storage medium for storing a program, It is characterized in that When the program is executed by a processor, the steps of the data verification method according to any one of claims 1 to 6 are implemented.

10. A computer program product, It is characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps in the data verification method according to any one of claims 1 to 6.