Website data security protection system based on block chain

By adopting blockchain and smart contract technology in the website data security protection system, combining proxy re-encryption algorithm and IPFS distributed storage, the single point of failure problem of traditional centralized authentication is solved, and efficient and reliable data access and security protection are achieved.

CN119628882AInactive Publication Date: 2025-03-14HANGZHOU FENGQI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411664320.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional website data security protection relies on centralized authentication and authorization mechanisms and is vulnerable to single points of failure and attacks, resulting in instability in user authentication and data access.

Method used

Using blockchain-based decentralized technology and smart contracts, the verification, encryption, storage and decryption of data access is realized through proxy re-encryption algorithms and IPFS distributed storage, ensuring data security and privacy.

Benefits of technology

Through the decentralized characteristics of blockchain and the automatic execution of smart contracts, data access is efficient and reliable, the risk of single point of failure of centralized authentication is avoided, and the system's anti-attack capability and data security are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119628882A_ABST
    Figure CN119628882A_ABST
Patent Text Reader

Abstract

The invention relates to a website data security protection system based on a block chain. The system comprises an access verification module used for verifying a data access request initiated by a user terminal at a proxy re-encryption node based on a distributed account book and an intelligent contract of a block chain to obtain a verification result; the data acquisition module is used for acquiring encrypted website data corresponding to the data access request when the verification result meets a preset condition; the data processing module is used for re-encrypting the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data; and the data sending module is used for sending the new ciphertext data to the user terminal, and the data is decrypted based on the user private key to obtain the original website data. According to the system, by utilizing the block chain and proxy re-encryption, the potential safety hazard of a traditional centralized authentication system is avoided, the security of data can be guaranteed, and the transparency and credibility of data access are improved at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain, and in particular relates to a website data security protection system based on blockchain. Background Art

[0002] With the rapid development of Internet technology and digital transformation, the amount of data stored and processed in websites and online service platforms continues to grow, and the user privacy and sensitive data involved are becoming more and more complex and important.

[0003] However, traditional website data security protection often relies on centralized authentication and authorization mechanisms. It is usually the website operator or a third-party certification agency that manages the user's identity information and access rights. For example, when a user logs in to a website, they need to enter their username and password, which will be sent to a centralized server for verification. The server determines whether to allow the user to access specific data based on the stored user data and permission settings. Once the authentication server is attacked or fails, the user authentication and data access of the entire system will be seriously affected. Summary of the invention

[0004] Based on this, it is necessary to address the above technical problems. The purpose of the present invention is to provide a website data security protection system based on blockchain, so as to achieve high efficiency and reliability of data access while ensuring the security of website data through the decentralized characteristics of blockchain and the automatic execution function of smart contracts, and ensure that users can get data access experience based on encryption technology when using the website.

[0005] In the first aspect, the present application provides a website data security protection system based on blockchain, the system comprising:

[0006] The access verification module is used to verify the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain at the proxy re-encryption node to obtain the verification result; wherein the data access request includes identity information, the identifier of the data to be accessed and the user's public key;

[0007] A data acquisition module, used to acquire the encrypted website data corresponding to the data access request when the verification result meets the preset conditions;

[0008] A data processing module, used to re-encrypt the encrypted website data through a proxy re-encryption algorithm based on a data access request to obtain new ciphertext data;

[0009] The data sending module is used to send new ciphertext data to the user terminal. The new ciphertext data is used to decrypt based on the user's private key to obtain the original website data. The user's public key corresponds to the user's private key.

[0010] In one embodiment, the system further comprises:

[0011] The data encryption module is used to cut the website data to obtain multiple cut website data; and encrypt each cut website data based on a preset encryption public key to obtain encrypted website data; wherein the preset encryption public key corresponds to the preset encryption private key;

[0012] The data storage module is used to store the encrypted website data in the corresponding storage location on the IPFS network and obtain a locator corresponding to the storage location.

[0013] In one embodiment, the system further comprises:

[0014] The data summary module is used to analyze the cut website data based on deep learning to obtain key features; calculate the cut website data according to the hash algorithm to obtain the hash value; combine the key features with the hash value to obtain summary data, and the summary data corresponds to the encrypted website data; and merge the locator with the summary data to obtain the index data corresponding to the encrypted website data;

[0015] Summary storage module for storing index data via blockchain.

[0016] In one embodiment, when the verification result meets the preset condition, the data acquisition module acquires the encrypted website data corresponding to the data access request, and further includes:

[0017] Obtain corresponding index data according to the verification result;

[0018] Through the locator in the index data, the corresponding encrypted website data is queried.

[0019] In one embodiment, the data processing module re-encrypts the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data, and further includes:

[0020] Based on the verification result, a preset encryption private key is obtained;

[0021] Calculate based on the user's public key and the preset encrypted private key to obtain the corresponding re-encryption key;

[0022] The encrypted website data is re-encrypted according to the re-encryption key to obtain new ciphertext data.

[0023] In one embodiment, a re-encryption key generation algorithm is used to calculate the corresponding re-encryption key based on the user public key and the encrypted private key, including:

[0024] Use the following formula to calculate the corresponding re-encryption key based on the user's public key and the preset encrypted private key based on the re-encryption key generation algorithm:

[0025] ReKeyGen(Sk A , Pk B )

[0026]

[0027]

[0028] R A→B =Sk A ·d -1

[0029] Among them, Sk A is the preset encrypted private key corresponding to the preset encrypted public key, Pk B is the user's public key, X A is any random number, Z q is a finite field, g is a generator, d is part of the re-encryption key, H 3 is a hash function, RK A→B The re-encryption key.

[0030] In one embodiment, the system further comprises an identity verification module, which is used to:

[0031] Sending random data salt to the user terminal at the proxy re-encryption node based on a challenge-response mechanism;

[0032] Obtain the signature of the user terminal, which is obtained by the user terminal using the user's private key to sign the random data salt and the user's public key;

[0033] The signature is verified based on the user's public key to obtain an identity verification result, which is used to characterize the identity authenticity of the user terminal.

[0034] In the second aspect, the present application also provides a website data security protection method based on blockchain, the method comprising:

[0035] The proxy re-encryption node verifies the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain to obtain a verification result; wherein the data access request includes identity information, the identifier of the data to be accessed, and the user's public key;

[0036] When the verification result meets the preset conditions, the encrypted website data corresponding to the data access request is obtained;

[0037] Based on the data access request, the encrypted website data is re-encrypted by a proxy re-encryption algorithm to obtain new ciphertext data;

[0038] The new ciphertext data is sent to the user terminal, and the new ciphertext data is used to decrypt based on the user's private key to obtain the original website data. The user's public key corresponds to the user's private key.

[0039] In a third aspect, the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any system of the first aspect of the present application are implemented.

[0040] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any system of the first aspect of the present application when the computer program is executed by a processor.

[0041] The above-mentioned blockchain-based website data security protection system, method, computer device and storage medium can effectively protect website data and ensure the security and privacy of users in the process of accessing website data through the collaborative work of the access verification module, data acquisition module, data processing module and data sending module.

[0042] First, through the distributed ledger based on blockchain, the system can ensure the immutability of data access logs, provide users with complete data access track records, increase the transparency and trust of the system, and realize accurate verification of user identities through smart contracts, avoiding the risk of leakage that may exist in the traditional data transmission process. Secondly, the system can also ensure the effectiveness and security of data access on the premise that the verification results meet the preset conditions, avoiding unnecessary waste of resources. Finally, through the proxy re-encryption mechanism based on the user's public key and private key, even if there is an interruption or theft during the data transmission process, unauthorized third parties cannot decrypt the data, thereby providing strong privacy protection for user and website data.

[0043] The system ensures the security and validity of data by encrypting and re-encrypting website data, avoiding the risks of malicious attacks and data leakage, while providing an efficient and traceable data access mechanism, thus providing users with a more secure and reliable Internet data transmission environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are 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 creative work.

[0045] Figure 1A schematic diagram of the structure of a website data security protection system based on blockchain provided by an exemplary embodiment of the present invention;

[0046] Figure 2 A flowchart of a blockchain-based website data security protection method provided as an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] In one embodiment, Figure 1 As shown, a blockchain-based website data security protection system 100 is provided. In the embodiment of the present application, the system is applied to the controller of the website device for example. It can be understood that the controller can also be a control terminal or control server connected to the website device, which is not limited here. The system includes:

[0049] The access verification module 101 is used to verify the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain at the proxy re-encryption node to obtain a verification result; wherein the data access request includes identity information, the identifier of the data to be accessed and the user's public key.

[0050] Specifically, the access verification module 101 is responsible for verifying the legitimacy of the data access request initiated by the user terminal. Its working principle combines proxy re-encryption technology, blockchain distributed ledgers and smart contracts to ensure that only legitimate users who meet the preset conditions can access the data, thereby ensuring the security of the system and the privacy of user data. The proxy re-encryption node receives the data access request initiated by the user terminal, and the node will query the relevant records based on the distributed ledger of the blockchain. Among them, the identity information can be the user's identifier, such as a user name or user ID, which is used to distinguish different users; the data identifier to be accessed represents the identifier of the data requested by the user, such as the specific file name to be accessed, the database table name, etc., which clearly points to a certain data resource; the user public key is used for encryption and other operations, and cooperates with the corresponding private key to ensure data security and verify the user's identity. Part of the key pair.

[0051] For example, user Xiaoming needs to view his historical order data on an e-commerce website, and initiates a data access request through a user terminal (such as an e-commerce APP on a mobile phone), where the identity information is Xiaoming's registered account "xiaoming123", the data identifier to be accessed is the "historical order data table", and the user's public key is the public key part of a corresponding set of encryption key systems (assuming that the public key is a specific string of numbers and letters). The proxy re-encryption node receives the request, checks the user registration information and permission allocation records previously stored on the blockchain, and confirms whether the "xiaoming123" account is authorized to access the "historical order data table". At the same time, smart contracts begin to work, and various verification rules are preset in the smart contracts, such as stipulating that only users who have completed real-name authentication and whose accounts are in normal status can access their historical order data. The node will check whether the identity information is authentic and valid according to the rules of the smart contract. That is, by comparing it with the authenticated user information stored on the blockchain, it will confirm whether the content corresponding to the data identifier to be accessed falls within the user's authority range (check the authority allocation table). It will also use the user's public key to perform some encryption-related verification operations, such as verifying whether it is consistent with the public key corresponding to the user recorded in the system, to further confirm the identity.

[0052] The data acquisition module 102 is used to acquire the encrypted website data corresponding to the data access request when the verification result meets the preset conditions.

[0053] The premise for starting the data acquisition module 102 is that the verification result given by the access verification module meets the preset conditions. In other words, the module will only start working when the data access request initiated by the user terminal is verified and it is determined that the user has legal access rights. This ensures that the data acquisition operation is carried out on the basis of compliance authorization, and guarantees data security from the source. Exemplarily, the preset condition can be to confirm that the identity information has been authenticated by real name, has the right to access the logistics data, and the public key verification is correct, etc., and then the data access request that passes the verification can obtain the corresponding encrypted website data through query retrieval through the data identifier to be accessed. The website data is stored by encryption, which further guarantees the security of the website data.

[0054] The data processing module 103 is used to re-encrypt the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data.

[0055] After the encrypted website data is obtained through the data acquisition module 102, it needs to be re-encrypted, for example, by re-encrypting with the user's public key to obtain new ciphertext data, thereby ensuring that the access data can safely and accurately reach the user terminal from the system background, so that the user can subsequently obtain the original website data based on his own authority and corresponding decryption means. In this way, the data processing module 103 can generate new ciphertext data, and the new ciphertext data has a new encryption structure and key association, further strengthening the confidentiality and access control of the website data.

[0056] The data sending module 104 is used to send new ciphertext data to the user terminal. The new ciphertext data is used to decrypt based on the user's private key to obtain the original website data. The user's public key corresponds to the user's private key.

[0057] The data sending module 104 sends the new ciphertext data obtained after the previous series of processing to the corresponding user terminal. Furthermore, the new ciphertext data has a specific encryption form and security attributes through re-encryption. Only the corresponding user terminal holding the correct user private key can decrypt it to view the original, readable website data content. This module cooperates with other modules in the entire blockchain-based website data security protection system to achieve the complete process from data verification, acquisition, processing to final delivery to the user terminal, and ensures that users can legally decrypt and view the original data, effectively maintaining the security of website data and the standardization of user access to data.

[0058] In the above-mentioned blockchain-based website data security protection system, by verifying the data access request of the user terminal, the proxy re-encryption node uses distributed ledgers and smart contracts based on blockchain technology to fully verify the request, thereby ensuring the security and transparency of data access. When the verification result meets the preset conditions, the system will obtain the corresponding encrypted website data, and re-encrypt it using the proxy re-encryption algorithm to generate new ciphertext data. This process not only ensures the security of data during transmission, but also effectively prevents unauthorized access and data tampering during data transmission using encryption technology. In addition, the system decrypts the new ciphertext data through the user's private key to obtain the original, untampered real website data, further ensuring the user's data privacy and security.

[0059] Through the decentralized nature of blockchain and the automatic execution capability of smart contracts, the entire system realizes an efficient, transparent and tamper-proof data protection mechanism, effectively solving the centralized authentication problem in the data security protection mechanism of traditional websites, and further improving the system's anti-attack capability and data security. At the same time, the application of proxy re-encryption technology has also significantly improved the system's operating efficiency in complex environments, optimized the data processing process, and reduced possible computing and storage overhead, thereby improving the system's real-time response capability and scalability.

[0060] In an exemplary embodiment, the system further includes:

[0061] The data encryption module 105 is used to cut the website data to obtain multiple cut website data; and encrypt each cut website data based on a preset encryption public key to obtain encrypted website data; wherein the preset encryption public key corresponds to the preset encryption private key;

[0062] The data storage module 106 is used to store the encrypted website data in a corresponding storage location on the IPFS network and obtain a locator corresponding to the storage location.

[0063] Specifically, website data is often a large whole, such as a product database of a large e-commerce website, which contains various information of many products (name, price, inventory, etc.). In order to facilitate subsequent encryption, storage, management and other operations, it is necessary to divide these whole data into multiple smaller data blocks according to certain rules or strategies, that is, to cut website data into multiple blocks, thereby improving encryption efficiency, enhancing data security and facilitating subsequent data distributed storage and other operations.

[0064] By using a preset encryption public key pair to encrypt the cut website data, for example, based on a symmetric encryption algorithm or an asymmetric encryption algorithm, the cut website data is converted into encrypted website data, so that even if the data is illegally obtained during storage or transmission, its content cannot be deciphered without the corresponding private key. Among them, the preset encryption public key is part of the cryptographic encryption mechanism, and the corresponding preset encryption private key also constitutes a pair of key pairs. Only the corresponding private key can decrypt the data encrypted with the public key, thereby ensuring the confidentiality of the data.

[0065] IPFS (InterPlanetary File System, IPFS) is a distributed file storage network that does not rely on the traditional centralized server architecture, but stores and shares data through the participation of many nodes. The data storage module 106 can store each data block of the encrypted website data in a suitable node and a corresponding storage location according to the internal mechanism of the IPFS network and some identification information of the data itself. In order to conveniently and accurately locate and obtain these data in the future, the data storage module 106 will generate a corresponding locator for each storage location. This locator can be based on content hash technology, by performing a specific hash calculation on the stored data content to obtain a unique identification string, or based on the Merkle tree structure to divide the data into multiple small blocks, and then hash each small block, and then hash these hash values ​​in pairs, and so on, and finally obtain a root hash value as a locator. This distributed storage method makes the data have higher redundancy and fault resistance. Even if some nodes have problems (such as attacks, hardware failures, etc.), the data can still be obtained from other normal nodes, ensuring the reliability of data storage.

[0066] In an exemplary embodiment, the system further includes:

[0067] The data summary module 107 is used to analyze the cut website data based on deep learning to obtain key features; calculate the cut website data according to the hash algorithm to obtain a hash value; combine the key features with the hash value to obtain summary data, and the summary data corresponds to the encrypted website data; and merge the locator with the summary data to obtain index data corresponding to the encrypted website data;

[0068] The summary storage module 108 is used to store index data through blockchain.

[0069] Deep learning has powerful data analysis and feature extraction capabilities. The data summary module 107 uses a deep learning algorithm (such as a convolutional neural network, a recurrent neural network, etc., depending on the type and characteristics of the data) to process the cut website data. After cutting, the cut website data may contain information in various forms such as text, images, and audio. Based on the deep learning model, by learning the deep information such as patterns and structures in the data, the key features that can represent the core content of the data block can be extracted. The hash algorithm is used to calculate the cut website data, and a hash value that uniquely identifies the content of the data block can be obtained. Common hash algorithms include SHA-256, MD5, etc.

[0070] The key features extracted by deep learning are combined with the hash value calculated by the hash algorithm to form summary data. Summary data is equivalent to a highly condensed and representative description of the cut website data. It contains both the key feature information of the essence of the data content and the data identifier based on the hash algorithm that can verify the integrity and uniqueness of the data. The summary data is associated with the corresponding encrypted website data one by one. The index data is formed by associating the locator with the summary data. The index data can facilitate the subsequent rapid search, verification and management of the encrypted data in the entire system. The index data generated by the data summary module is recorded in each block of the blockchain. Due to the chain structure and encryption algorithm of the blockchain, it is difficult to tamper with the data once it is recorded, ensuring the integrity and authenticity of the index data. In addition, through the distributed ledger characteristics of the blockchain, multiple nodes save the same copy of the index data, which further improves the reliability and availability of the data.

[0071] In an exemplary embodiment, when the verification result satisfies a preset condition, the data acquisition module 102 acquires the encrypted website data corresponding to the data access request, and further includes:

[0072] Obtain corresponding index data according to the verification result;

[0073] Through the locator in the index data, the corresponding encrypted website data is queried.

[0074] Specifically, the index data is generated by the data summary module 107 and stored on the blockchain through the summary storage module 108. It contains key descriptions of the encrypted website data and location information, which is an important basis for the subsequent accurate acquisition of the encrypted website data. Exemplarily, since the index data incorporates the locator and the summary reflecting the characteristics of the data itself, the corresponding index data can be obtained through the search query through the data identifier to be accessed in the data access request. Secondly, the locator is a key identifier pointing to the storage location of the encrypted website data in the IPFS network. A query request can be initiated to the IPFS network. The IPFS network searches and returns the corresponding encrypted website data in many storage nodes based on the storage location information represented by the locator. Through this mechanism, the corresponding encrypted website data can be accurately and orderly obtained, and other modules of the entire system can be coordinated to ensure that the data can be reasonably accessed and circulated under the premise of security.

[0075] In one embodiment, the data processing module 103 re-encrypts the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data, and further includes:

[0076] Based on the verification result, a preset encryption private key is obtained;

[0077] Calculate based on the user's public key and the preset encrypted private key to obtain the corresponding re-encryption key;

[0078] The encrypted website data is re-encrypted according to the re-encryption key to obtain new ciphertext data.

[0079] The verification result contains a lot of key information, among which the part related to access rights can indicate the scope of resources that the current user can legally use and the corresponding encryption key information. Based on such verification results, the system can extract the preset encryption private key from it. This preset encryption private key is set and stored in association when the website data is initially encrypted. It appears in pairs with the preset encryption public key to ensure the confidentiality of the data.

[0080] After obtaining the user's public key (submitted with the data access request) and the preset encryption private key, a re-encryption key is generated through a specific calculation method. This calculation method can generate a new re-encryption key through complex mathematical operations by utilizing the characteristics of the two existing keys and combining some additional parameters (such as auxiliary parameters generated by the system based on the current timestamp, user identity, etc.). This re-encryption key has unique encryption properties and is specifically used to re-encrypt the encrypted website data requested by the current user to obtain new ciphertext data, so as to further adjust the encryption status of the data so that it can not only meet the personalized needs of user access, but also enhance the security of the data during subsequent transmission and use.

[0081] In one embodiment, a re-encryption key generation algorithm is used to calculate the corresponding re-encryption key based on the user public key and the encrypted private key, including:

[0082] Use the following formula to calculate the corresponding re-encryption key based on the user's public key and the preset encrypted private key based on the re-encryption key generation algorithm:

[0083] ReKeyGen(Sk A , Pk B )

[0084]

[0085] R A→B =Sk A ·d -1

[0086] Among them, Sk A is the preset encrypted private key corresponding to the preset encrypted public key, Pk B is the user's public key, X A is any random number, Z q is a finite field, g is a generator, d is part of the re-encryption key, H 3is a hash function, RK A→B The re-encryption key.

[0087] Specifically, by introducing the random number X A And perform operations in the finite field to generate a value related to the user's public key It is used for subsequent hash calculations to ensure that each re-encryption key generated is random and unpredictable. A fixed-length hash value d is generated by mixing and compressing the user's public key, random number, and the result of the related power operation of the user's public key. The one-way and collision-resistant properties of the hash function ensure that even if an attacker obtains the hash value d, it is difficult to reverse the original input value. Through this algorithm, when a user requests to access data, a new re-encryption key is generated based on the user's public key and the system's preset encryption private key, and the data is re-encrypted to ensure the security and privacy of the data during transmission and access.

[0088] In one embodiment, the system further includes an identity verification module 109, which is used to:

[0089] Sending random data salt to the user terminal at the proxy re-encryption node based on a challenge-response mechanism;

[0090] Obtain the signature of the user terminal, which is obtained by the user terminal using the user's private key to sign the random data salt and the user's public key;

[0091] The signature is verified based on the user's public key to obtain an identity verification result, which is used to characterize the identity authenticity of the user terminal.

[0092] The random data salt is a randomly generated string or digital sequence that is used to ensure the uniqueness of each verification process, thereby enhancing the security of the system. During the identity authentication process, the random data salt is passed to the user terminal as an additional variable together with the user's public key. After receiving the random data salt, the user terminal uses its own private key to sign the salt value and the user's public key. Specifically, the user terminal encrypts specific data (i.e., the random data salt and the user's public key) with the user's private key to generate a unique digital signature. Since only a terminal with the correct user private key can successfully generate this signature, the signature can effectively represent the identity of the user terminal.

[0093] When the identity authentication module 108 receives the signature returned by the user terminal, the user's public key can be used to verify the validity of the signature. The verification process may include using the user's public key to decrypt the signature and checking whether the decryption result is consistent with the original random data salt and the user's public key sent. If the decryption result matches the expected, the verification is successful, proving that the identity of the user terminal is authentic; conversely, if the result does not match, it means that the identity authentication has failed, and there may be security risks or identity fraud. In this way, the random data salt and digital signature mechanism effectively protect the authenticity of the user's identity and the security of the system.

[0094] Based on the same inventive concept, Figure 2 As shown, the embodiment of the present application also provides a website data security protection method based on blockchain, the method comprising:

[0095] S201: Verifying the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain at the proxy re-encryption node to obtain a verification result; wherein the data access request includes identity information, an identifier of the data to be accessed, and a user public key;

[0096] S202: When the verification result meets the preset conditions, the encrypted website data corresponding to the data access request is obtained;

[0097] S203: re-encrypting the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data;

[0098] S204: Send new ciphertext data to the user terminal. The new ciphertext data is used to decrypt based on the user's private key to obtain the original website data. The user's public key corresponds to the user's private key.

[0099] This method uses the distributed ledger of the blockchain to verify the legitimacy of each data access request at the proxy re-encryption node, and decides whether to allow access to encrypted website data based on the preset smart contract conditions. Compared with traditional methods, it avoids the risk of single point failure of the centralized verification system and improves the security and anti-tampering ability of the data transmission process. In addition, the new ciphertext data processed by the proxy re-encryption algorithm ensures the security of the data. Even if it is intercepted during the transmission process, the attacker cannot decrypt the original data. The user terminal uses its own private key for decryption, thereby ensuring the confidentiality of the data. In this way, not only the timeliness and reliability of website data security protection are improved, but also more scientific technical support is provided for the protection of sensitive data and the maintenance of user privacy.

[0100] Furthermore, the method also includes:

[0101] Cut the website data to obtain multiple cut website data; and encrypt each cut website data based on a preset encryption public key to obtain encrypted website data; wherein the preset encryption public key corresponds to the preset encryption private key;

[0102] The encrypted website data is stored in the corresponding storage location on the IPFS network, and a locator corresponding to the storage location is obtained.

[0103] Furthermore, the method also includes:

[0104] Based on deep learning, the cut website data is analyzed to obtain key features; the cut website data is calculated according to the hash algorithm to obtain the hash value; the key features are combined with the hash value to obtain summary data, and the summary data corresponds to the encrypted website data; and the locator is merged with the summary data to obtain the index data corresponding to the encrypted website data;

[0105] Store index data through blockchain.

[0106] Furthermore, when the verification result meets the preset conditions, obtaining the encrypted website data corresponding to the data access request also includes:

[0107] Obtain corresponding index data according to the verification result;

[0108] Through the locator in the index data, the corresponding encrypted website data is queried.

[0109] Furthermore, based on the data access request, the encrypted website data is re-encrypted by a proxy re-encryption algorithm to obtain new ciphertext data, which also includes:

[0110] Based on the verification result, a preset encryption private key is obtained;

[0111] Calculate based on the user's public key and the preset encrypted private key to obtain the corresponding re-encryption key;

[0112] The encrypted website data is re-encrypted according to the re-encryption key to obtain new ciphertext data.

[0113] Furthermore, based on the re-encryption key generation algorithm, the corresponding re-encryption key is obtained by calculating according to the user public key and the encrypted private key, including:

[0114] Use the following formula to calculate the corresponding re-encryption key based on the user's public key and the preset encrypted private key based on the re-encryption key generation algorithm:

[0115] ReKeyGen(Sk A , Pk B )

[0116]

[0117] R A→B =Sk A ·d -1

[0118] Among them, Sk A is the preset encrypted private key corresponding to the preset encrypted public key, Pk B is the user's public key, X A is any random number, Z q is a finite field, g is a generator, d is part of the re-encryption key, H 3 is a hash function, RK A→B The re-encryption key.

[0119] Furthermore, the method also includes:

[0120] Sending random data salt to the user terminal at the proxy re-encryption node based on a challenge-response mechanism;

[0121] Obtain the signature of the user terminal, which is obtained by the user terminal using the user's private key to sign the random data salt and the user's public key;

[0122] The signature is verified based on the user's public key to obtain an identity verification result, which is used to characterize the identity authenticity of the user terminal.

[0123] In an exemplary embodiment, the present invention further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of a blockchain-based website data security protection system of the present application are implemented. A multi-core processor is preferred to improve the parallel processing capability of the system. Memory: Provides sufficient temporary storage space to support the operation of the program and the processing of data. The memory capacity should be large enough to accommodate a large amount of supply information and computing tasks.

[0124] In an exemplary embodiment, the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of a website data security protection system based on blockchain in the present application are implemented. The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), or an optical disk, etc. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM).

[0125] The above-mentioned embodiments only express several implementation methods of the embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the embodiments of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the embodiments of the present application, and these all belong to the protection scope of the embodiments of the present application.

Claims

1. A website data security protection system based on blockchain, characterized in that: The system comprises: An access verification module is used to verify the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain at the proxy re-encryption node to obtain a verification result; wherein the data access request includes identity information, an identifier of the data to be accessed, and a user public key; A data acquisition module, used for acquiring the encrypted website data corresponding to the data access request when the verification result meets a preset condition; A data processing module, used to re-encrypt the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data; The data sending module is used to send the new ciphertext data to the user terminal, and the new ciphertext data is used to decrypt based on the user private key to obtain the original website data, and the user public key corresponds to the user private key.

2. The website data security protection system according to claim 1, characterized in that: Also includes: A data encryption module, used for cutting the website data to obtain a plurality of cut website data; and encrypting each of the cut website data based on a preset encryption public key to obtain the encrypted website data; wherein the preset encryption public key corresponds to the preset encryption private key; The data storage module is used to store the encrypted website data in a corresponding storage location on the IPFS network and obtain a locator corresponding to the storage location.

3. The website data security protection system according to claim 2, characterized in that: Also includes: A data summary module, used for analyzing the cutting website data based on deep learning to obtain key features; The cut website data is calculated according to a hash algorithm to obtain a hash value; the key feature is combined with the hash value to obtain summary data, and the summary data corresponds to the encrypted website data; and the locator is merged with the summary data to obtain index data corresponding to the encrypted website data; The summary storage module is used to store the index data through the blockchain.

4. The website data security protection system according to claim 3, characterized in that: When the verification result satisfies a preset condition, the data acquisition module acquires the encrypted website data corresponding to the data access request, and further includes: Acquire the corresponding index data according to the verification result; The corresponding encrypted website data is queried through the locator in the index data.

5. The website data security protection system according to claim 3, characterized in that: The data processing module re-encrypts the encrypted website data through a proxy re-encryption algorithm based on the data access request to obtain new ciphertext data, and further includes: Based on the verification result, obtaining the preset encryption private key; Calculate according to the user public key and the preset encryption private key to obtain a corresponding re-encryption key; The encrypted website data is re-encrypted according to the re-encryption key to obtain new ciphertext data.

6. The website data security protection system according to claim 5, characterized in that: The re-encryption key generation algorithm is calculated according to the user public key and the encrypted private key to obtain a corresponding re-encryption key, including: The following formula is used to calculate the corresponding re-encryption key based on the re-encryption key generation algorithm according to the user public key and the preset encryption private key: ReKeyGen(Sk A ,Pk B ) RK A→B =Sk A ·d -1 Among them, Sk A is the preset encryption private key corresponding to the preset encryption public key, Pk B is the user's public key, X A is any random number, Z q is a finite field, g is a generator, d is a part of the re-encryption key, H3 is a hash function, RK A→B is the re-encryption key.

7. The website data security protection system according to claim 1, characterized in that: Also includes authentication modules for: Sending a random data salt to the user terminal at a proxy re-encryption node based on a challenge-response mechanism; Obtaining a signature of the user terminal, where the signature is obtained by the user terminal signing the random data salt and the user public key using the user private key; The signature is verified based on the user public key to obtain an identity authentication result, where the identity authentication result is used to characterize the identity authenticity of the user terminal.

8. A website data security protection method based on blockchain, characterized in that: The method comprises: The proxy re-encryption node verifies the data access request initiated by the user terminal based on the distributed ledger and smart contract of the blockchain to obtain a verification result; wherein the data access request includes identity information, an identifier of the data to be accessed, and a user public key; When the verification result meets the preset condition, obtaining the encrypted website data corresponding to the data access request; Based on the data access request, the encrypted website data is re-encrypted by a proxy re-encryption algorithm to obtain new ciphertext data; The new ciphertext data is sent to the user terminal, and the new ciphertext data is used to decrypt based on the user private key to obtain the original website data, and the user public key corresponds to the user private key.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the website data security protection system according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the website data security protection system according to any one of claims 1 to 7 are implemented.