Data hosting method, system, electronic device and storage medium

Through the combination of preset formulas and Paillier algorithm, data is verified and encrypted, which solves the problem of non-compliant data hosting in cloud storage, improves the security of data storage, and ensures the storage and transmission of data in ciphertext form on the hosting side.

CN117041275BActive Publication Date: 2024-09-17SSC HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310997293.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2024-09-17
Estimated Expiration
2043-08-09

AI Technical Summary

Technical Problem

Existing cloud storage technology cannot effectively avoid the hosting of non-compliant data, resulting in insufficient data storage security.

Method used

Use the preset formula to encrypt the data and use the Paillier algorithm for encryption. Use the verification formula to determine whether the data is in ciphertext form. If it is plain text, it will stop storing and delete it. If it is ciphertext, it will be encrypted and provide access services to the data requester. , while recording violations and adding the storage end of the clear text data upload behavior to the blacklist.

Benefits of technology

It effectively avoids the hosting of non-compliant data, improves the security of data storage, and ensures the storage and transmission of data in ciphertext form on the hosting side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117041275B
    Figure CN117041275B
Patent Text Reader

Abstract

The present application discloses a data hosting method, system, electronic device and storage medium, and the technical field to which it belongs is online storage technology. The data hosting method is applied to a data hosting end connected to a data storage end and a data request end respectively, and comprises: receiving target data π(m) uploaded by the data storage end in accordance with a data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) modn 2 ; Determine whether the target data makes the verification formula valid; where the verification formula is π(m) n modn 2 =1; if so, the target data π(m) is encrypted using the Paillier algorithm to obtain encrypted data, and access services to the encrypted data are provided to the data requesting end. This application avoids hosting non-compliant data and improves the security of data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of online storage technology, and in particular to a data hosting method, system, electronic device and storage medium. Background Art

[0002] Cloud storage is a network online storage model, which means storing data on multiple virtual servers usually hosted by cloud service providers, rather than dedicated servers. The application of cloud computing allows people to host large amounts of data in the cloud, reducing the cost of user hardware investment and improving the utilization of computing resources. At the same time, cloud storage service providers may accept the risk of non-compliant user data, such as malicious users storing and sharing their non-copyrighted movies and music.

[0003] The encryption algorithm in the related art can ensure that users transmit encrypted messages and perform data hosting on the data hosting end (service provider), but it cannot guarantee whether the ciphertext itself contains plaintext. For example, user U regards file m as ciphertext c, decrypts it using the key to obtain m*, and proves the knowledge of m* to the data hosting end. If the data hosting end accepts, user U encrypts m* and stores plaintext m on the data hosting end, thereby deceiving the data hosting end.

[0004] Therefore, how to avoid hosting non-compliant data and improve the security of data storage is a technical problem that technicians in this field currently need to solve. Summary of the invention

[0005] The purpose of this application is to provide a data hosting method, system, electronic device and storage medium to solve the technical problem of how to avoid hosting non-compliant data and improve the security of data storage.

[0006] In order to solve the above technical problems, the present application provides a data hosting method, which is applied to a data hosting end connected to a data storage end and a data request end respectively, comprising:

[0007] Receive the target data π(m) uploaded by the data storage end according to the data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) mod n 2 , φ() is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base;

[0008] Determine whether the target data makes the verification formula valid; wherein the verification formula is π(m) n mod n 2 =1;

[0009] If yes, the target data π(m) is encrypted using the Paillier algorithm to obtain encrypted data, and access services to the encrypted data are provided to the data request end.

[0010] Optionally, also include:

[0011] If a download request for the encrypted data is received from the data request end, the encrypted data is transmitted to the data request end.

[0012] Optionally, after determining whether the target data satisfies the verification formula, the method further includes:

[0013] If the target data does not make the verification formula valid, the target data π(m) is deleted locally.

[0014] Optionally, after determining whether the target data satisfies the verification formula, the method further includes:

[0015] If the target data does not make the verification formula valid, it is determined that there is plaintext data uploading behavior at the data storage end.

[0016] Optionally, after determining that the data storage terminal has plaintext data upload behavior, the method further includes:

[0017] Return prompt information to the data storage end;

[0018] And / or, record the number of detections of plaintext data uploading behavior of the data storage end, and add the data storage end to a blacklist when the number of detections is greater than a preset value; wherein the data hosting end does not provide data hosting services for the data storage ends in the blacklist.

[0019] Optionally, the encrypting the target data π(m) by using the Paillier algorithm to obtain encrypted data includes:

[0020] Query a random integer r that meets preset constraints; wherein the preset conditions are: 0<r<n, and the greatest common divisor of r and n is 1;

[0021] The target data π(m) is encrypted using the random integer r to obtain encrypted data c(m;r), c(m;r)=r n π(m).

[0022] Optionally, also include:

[0023] If illegal data is received from the data storage end that is not uploaded in accordance with the data hosting agreement, the illegal data will be deleted locally.

[0024] The present application also provides a data hosting system, which is applied to a data hosting end connected to a data storage end and a data request end respectively, and includes:

[0025] A data receiving module is used to receive the target data π(m) uploaded by the data storage end according to the data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) mod n 2 , φ() is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base;

[0026] A verification module is used to determine whether the target data makes the verification formula valid; wherein the verification formula is π(m) n mod n 2 =1;

[0027] The hosting module is used to encrypt the target data π(m) using the Paillier algorithm to obtain encrypted data if the target data makes the verification formula valid, and provide access services to the encrypted data for the data request end.

[0028] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned data hosting method are implemented.

[0029] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of executing the above-mentioned data hosting method are implemented.

[0030] The present application provides a data hosting method, which is applied to a data hosting end connected to a data storage end and a data request end respectively, comprising: receiving target data π(m) uploaded by the data storage end according to a data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) mod n 2 , φ() is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base; determine whether the target data makes the verification formula valid; wherein the verification formula is π(m) n mod n 2 =1; if so, the target data π(m) is encrypted using the Paillier algorithm to obtain encrypted data, and access services to the encrypted data are provided to the data request end.

[0031] This application receives the target data π(m) uploaded by the data storage terminal in accordance with the data hosting agreement, and verifies the target data using the verification formula. n mod n 2 =1, it means that the target data π(m) is in ciphertext form. n mod n 2 ≠1, it means that the target data π(m) is data in plain text. After the target data makes the verification formula valid, the present application uses the Paillier algorithm to encrypt the target data π(m) to obtain encrypted data, and then provides access services to the encrypted data to the data request end. Before hosting the target data uploaded to the data storage end, the present application first uses the verification formula to verify the target data, which can avoid hosting non-compliant data and improve the security of data storage. The present application also provides a data hosting system, a storage medium and an electronic device, which have the above-mentioned beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 work.

[0033] Figure 1 A flowchart of a data hosting method provided in an embodiment of the present application;

[0034] Figure 2 A data hosting model diagram provided in an embodiment of the present application;

[0035] Figure 3 A schematic diagram of the structure of a data hosting system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.

[0037] See below Figure 1 , Figure 1 A flowchart of a data hosting method provided in an embodiment of the present application.

[0038] Specific steps may include:

[0039] S101: receiving target data π(m) uploaded by the data storage terminal according to the data hosting agreement;

[0040] Among them, this embodiment is applied to a data hosting end connected to a data storage end and a data request end respectively, the data storage end is a device for uploading data to a network storage, the data request end is a device for requesting to download data, and the data hosting end is a device for providing data hosting services; the data hosting service includes providing storage services for the encrypted data to the data storage end, and also includes providing access services to the encrypted data to the data request end. The above-mentioned target data can be image data, video data, audio data, text data, etc.

[0041] Before this step, there may be an operation of establishing a data hosting agreement between the data storage end and the data hosting end. The above data hosting agreement is specifically: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) mod n 2 , φ(n) is the Euler function, n is the RSA modulus, m is the plaintext data that needs to be stored in the data storage end, γ represents the preset base, and γ is determined according to the quotient group. (…) × means (…) is a multiplicative group, represents a quotient group, R represents the set of real numbers;

[0042] S102: Determine whether the target data makes the verification formula valid; if so, proceed to S103; if not, end the process;

[0043] After receiving the target data uploaded by the data storage end, the data hosting end can use the verification formula to determine whether the target data is in ciphertext form. The above verification formula is π(m) n mod n 2 =1.

[0044] If the target data can make the verification formula valid, it means that the target data π(m) is in ciphertext form, that is, the data hosting end cannot understand the specific content of the target data π(m). If the target data cannot make the verification formula valid, it means that the target data π(m) is in plaintext form, and the data storage end may encrypt the decryption result of the plaintext data m with a preset formula before uploading it.

[0045] Specifically, the principle of using the above verification formula to verify whether the target data π(m) is data in ciphertext form is as follows:

[0046] n:=p·q, λ:=lcm(p-1,q-1), lcm is the least common multiple, φ(n)=(p-1)(q-1);

[0047] ∴λ=k1(p-1)or k2(q-1), k1 is a first preset integer used to represent a multiple of (p-1); k2 is a second preset integer used to represent a multiple of (q-1).

[0048] From Fermat's little theorem we can get That is (g λ -1)|p, where the symbol | represents divisibility; g is any integer, representing the base;

[0049] Same reason That is (g λ -1)|q, where the symbol | indicates integer division;

[0050] That is, (g λ -1)|pq,g λ = 1 mod n;

[0051] ∴g λ (mod n 2 ) = 1 (mod n);

[0052] i.e. g λ (mod n 2 )=n*k+1, k is an integer; k<n;

[0053] have:

[0054] 1+kn=1+kn(mod n 2 )(1+kn) 2 =1+2kn+(kn) 2 =1+2kn(mod n 2 );

[0055] (1+kn) 3 =1+3(kn) 2 +3kn+(kn) 3 =1+3kn(mod n 2 );

[0056] It can be observed that:

[0057] (1+kn) m =knm+1(mod n 2 );

[0058] ∴g mλ =(1+kn) m =knm+1(mod n 2 );

[0059] In this scheme, π(m): = g m mod n 2 =γ mφ(n) mod n 2 ;

[0060] π(m) n =γ mnφ(n) mod n 2 =kn 2 m+1(mod n 2 )=1(mod n 2 );

[0061] That is, if the definition of π(m) in this embodiment is used, then π(m) n =1(mod n 2 );

[0062] If π(m) n ≠1(mod n 2 ), then m can only be the following:

[0063] ①m is not encrypted;

[0064] ②m is encrypted and then decrypted;

[0065] In both cases, storage is terminated.

[0066] If the target data makes the verification formula valid, the process may proceed to step S103 ; if the target data makes the verification formula invalid, the data hosting end may terminate the storage of the target data π(m).

[0067] S103: Encrypt the target data π(m) using the Paillier algorithm to obtain encrypted data, and provide the data request end with access services to the encrypted data.

[0068] This step is based on the fact that the target data makes the verification formula valid. At this time, the target data π(m) can be encrypted using the Paillier algorithm to obtain encrypted data, thereby providing the data request end with access services to the encrypted data. When the data request end initiates a request for encrypted data, the encrypted data can be transmitted to the data request end.

[0069] This embodiment receives the target data π(m) uploaded by the data storage terminal according to the data hosting agreement, and verifies the target data using the verification formula. n mod n 2 =1, it means that the target data π(m) is in ciphertext form. n mod n 2≠1, it means that the target data π(m) is in plain text. In this embodiment, after the target data makes the verification formula valid, the target data π(m) is encrypted using the Paillier algorithm to obtain encrypted data, and then the data request end is provided with access services to the encrypted data. In this embodiment, before the target data uploaded by the data storage end is hosted, the verification formula is used to verify the target data, which can avoid hosting non-compliant data and improve the security of data storage.

[0070] As for Figure 1 According to a further description of the corresponding embodiment, if the data hosting end receives a download request for the encrypted data from the data requesting end, the encrypted data is transmitted to the data requesting end.

[0071] As for Figure 1 Further introduction to the corresponding embodiment, after determining whether the target data makes the verification formula valid, if the target data does not make the verification formula valid, the target data π(m) is deleted locally.

[0072] As for Figure 1 Further introduction to the corresponding embodiment, after determining whether the target data makes the verification formula valid, if the target data does not make the verification formula valid, it is determined that there is plain text data uploading behavior at the data storage end.

[0073] After determining that the data storage end has uploaded plain text data, a prompt message may be returned to the data storage end; the number of detections of the plain text data upload behavior of the data storage end may also be recorded, and the data storage end may be added to a blacklist when the number of detections is greater than a preset value; wherein the data hosting end does not provide data hosting services for the data storage ends in the blacklist.

[0074] As for Figure 1 Further introduction to the corresponding embodiment, the target data π(m) can be encrypted in the following manner: query a random integer r that meets the preset constraint condition; wherein the preset condition is: 0<r<n, and the greatest common divisor of r and n is 1; use the random integer r to encrypt the target data π(m) to obtain encrypted data c(m; r), c(m; r)=r n π(m).

[0075] As for Figure 1 For further introduction to the corresponding embodiment, if the data hosting end receives illegal data that is not uploaded by the data storage end in accordance with the data hosting agreement, the illegal data will be deleted locally.

[0076] The process described in the above embodiment is explained below through an embodiment in actual application.

[0077] Cryptography is the study of secure communication technology. It is an intersection of mathematics and computer science, and can effectively prevent potential attacks. It has two main applications: one is encrypted communication, which is to ensure that information will not be tampered with or eavesdropped during transmission. The other is digital signature, which is mainly used to authenticate the identity of the signer and prevent denial of responsibility. Using cryptographic methods to constrain cloud service providers and users at the same time can effectively protect data privacy and meet the needs of service providers.

[0078] This embodiment constructs a corresponding primitive protocol to solve the problem of how to enable a third-party data hosting service provider to avoid malicious users' non-compliant data, and designs an efficient data hosting method based on the improved Paillier encryption algorithm to protect the service provider from damage by malicious users. This embodiment can find many practical applications in data publishing based on blockchain, cloud computing storage, etc.

[0079] This embodiment models the problem of hosting service providers in "cloud storage", clarifies the relationship between multiple parties, defines and implements new primitives based on the improved Paillier encryption algorithm, and realizes protection of data service providers. The above primitives are cryptographic primitives, which are random number generators and basic memory or mathematical operations required by cryptographic algorithms, including but not limited to one-way hash functions and encryption functions.

[0080] See also Figure 2 , Figure 2 A data hosting model diagram provided for an embodiment of the present application, the roles shown in the figure include: user U (i.e., the data storage end mentioned above), storage service provider S (i.e., the data hosting end mentioned above) and consumer C (i.e., the data request end mentioned above). The process of data hosting is as follows: U selects file m, U and S communicate, U uses key key to encrypt file m to obtain ciphertext c, and U sends and stores ciphertext c to S. When the interaction between U and S ends, consumer C contacts S, C retrieves and obtains ciphertext c, and C contacts U to obtain key key to convert c into information m.

[0081] In view of the above model, this embodiment proposes a Hosting Adversary's Risky Data (HARD) primitive based on the Paillier encryption algorithm.

[0082] The improved Paillier encryption algorithm is as follows:

[0083] 0≤m<n, m is the plaintext information; randomly select two prime numbers p and q (the lengths of p and q should be as close or equal as possible):

[0084] (a) n: = p·q, n is the modulus in the RSA encryption algorithm;

[0085] (b)λ:=lcm(p-1,q-1), where lcm means finding the least common multiple;

[0086] (c) Selection Calculate g: = γ φ(n) mod n 2 , where φ(n) is the Euler function;

[0087] definition:

[0088] π(m):=g m mod n 2 =γ mφ(n) mod n 2 ;

[0089] (d)

[0090] Public key pk: = (n, g), private key sk: = (λ, μ);

[0091] 0<r<n, r is a random integer, satisfying gcd(r,n)=1, gcd means finding the greatest common divisor;

[0092] Encryption: c(m;r):=r n π(m);

[0093] Decryption:

[0094] The HARD protocol is as follows:

[0095] (a) U sends the ciphertext π(m) to S;

[0096] (b) S verifies π(m) n mod n 2 Is it 1? If it is 1, the verification is successful and you can proceed to the next step; if it is not 1, the verification fails and the operation process is terminated;

[0097] (c) S stores π(m) and provides public access to π(m), where:

[0098] When U and C are not communicating, that is, when C does not obtain the decryption key from U, the primitive fails if any of the following occurs:

[0099] ①C obtains the ciphertext π(m) from S and decrypts it to obtain m (if C cannot recover m, then S cannot recover m either);

[0100] ②U obtains the ciphertext π(m) from S, but cannot obtain m after decryption;

[0101] (d) When U discloses m to a third party C, U must comply with:

[0102] U instructs C to obtain π(m) from S;

[0103] U discloses (pk, sk) and r to C, who decrypts π(m) using:

[0104]

[0105] Specifically, the user data hosting process of the above-mentioned efficient data hosting method based on the improved Paillier encryption algorithm is as follows: User U randomly selects prime numbers p and q to calculate parameters n, λ, g, μ, and obtains the public key pk = (n, g) and the private key sk = (λ, μ). User U randomly selects an integer r that satisfies 0<r<n, and calculates the ciphertext π(m) = g of file m m mod n 2 Storage service provider S verifies π(m) n mod n 2 Is it 1? If not, storage is terminated. If it is 1, π(m) is stored and public access is provided.

[0106] Specifically, the consumer data acquisition process of the above-mentioned efficient data hosting method based on the improved Paillier encryption algorithm is as follows: User U stores the public key pk=(n,g) and private key sk=(λ,μ) of the ciphertext π(m). The storage service provider S stores the ciphertext π(m) of m and provides public access to π(m). After consumer C receives the public key pk, private key sk and ciphertext π(m), he decrypts the plaintext m of π(m):

[0107]

[0108] Compared with the encryption algorithm represented by PAE, the HARD primitive proposed in this embodiment requires S to verify π(m) after user U sends the encrypted message π(m) to the trustee S. n mod n 2 , preventing U from deceiving S, preventing malicious user attacks, ensuring the honesty of users and avoiding the storage risk of users' non-compliant data.

[0109] See also Figure 3 , Figure 3 A structural diagram of a data hosting system provided in an embodiment of the present application is applied to a data hosting end connected to a data storage end and a data request end respectively, including:

[0110] The data receiving module 301 is used to receive the target data π(m) uploaded by the data storage end according to the data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γmφ(n) mod n 2 , φ(n) is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base. represents a quotient group, R represents the set of real numbers;

[0111] Verification module 302 is used to determine whether the target data makes the verification formula valid; wherein the verification formula is π(m) n mod n 2 =1;

[0112] The hosting module 303 is used to encrypt the target data π(m) using the Paillier algorithm to obtain encrypted data if the target data makes the verification formula valid, and provide access services to the encrypted data for the data request end.

[0113] This embodiment receives the target data π(m) uploaded by the data storage terminal according to the data hosting agreement, and verifies the target data using the verification formula. n mod n 2 =1, it means that the target data π(m) is in ciphertext form. n mod n 2 ≠1, it means that the target data π(m) is in plain text. In this embodiment, after the target data makes the verification formula valid, the target data π(m) is encrypted using the Paillier algorithm to obtain encrypted data, and then the data request end is provided with access services to the encrypted data. In this embodiment, before the target data uploaded by the data storage end is hosted, the verification formula is used to verify the target data, which can avoid hosting non-compliant data and improve the security of data storage.

[0114] Furthermore, the hosting module 303 is further configured to transmit the encrypted data to the data requesting end if a download request for the encrypted data is received from the data requesting end.

[0115] Furthermore, the hosting module 303 is also used to, after determining whether the target data makes the verification formula valid, delete the target data π(m) locally if the target data does not make the verification formula valid.

[0116] Furthermore, it also includes:

[0117] The abnormal behavior detection module is used to determine whether the target data makes the verification formula valid after judging whether the target data makes the verification formula valid. If the target data does not make the verification formula valid, then determine whether the data storage end has plain text data upload behavior.

[0118] Furthermore, after determining that the data storage end has plaintext data uploading behavior, the abnormal behavior detection module is also used to return prompt information to the data storage end, and / or record the number of detections of plaintext data uploading behavior of the data storage end, and add the data storage end to a blacklist when the number of detections is greater than a preset value; wherein the data hosting end does not provide data hosting services for the data storage ends in the blacklist.

[0119] Furthermore, the process of the hosting module 303 using the Paillier algorithm to encrypt the target data π(m) to obtain encrypted data includes: querying a random integer r that meets the preset constraint conditions; wherein the preset condition is: 0<r<n, and the greatest common divisor of r and n is 1; using the random integer r to encrypt the target data π(m) to obtain encrypted data c(m; r), c(m; r)=r n π(m).

[0120] Furthermore, it also includes:

[0121] The hosting module 303 is also used to delete the illegal data from the local if the illegal data is received from the data storage end that is not uploaded in accordance with the data hosting agreement.

[0122] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.

[0123] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0124] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0125] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0126] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants 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 statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A data hosting method, characterized in that: Applied to a data hosting end connected to a data storage end and a data request end respectively, including: Receive the target data π(m) uploaded by the data storage end according to the data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) modn 2 , φ() is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base; Determine whether the target data π(m) makes the verification formula valid; wherein the verification formula is π(m) n modn 2 =1; If so, encrypt the target data π(m) using the Paillier algorithm to obtain encrypted data, and provide the data request end with access services for the encrypted data; Among them, after judging whether the target data π(m) makes the verification formula hold, it further includes: If the target data π(m) does not make the verification formula hold, it is determined that there is a behavior of uploading plaintext data at the data storage end; Among them, after determining that there is a behavior of uploading plaintext data at the data storage end, it further includes: Return a prompt message to the data storage end; And / or, record the detection times of the plaintext data upload behavior of the data storage end, and add the data storage end to the blacklist when the detection times are greater than a preset value; among them, the data hosting end does not provide data hosting services for the data storage ends in the blacklist.

2. The data hosting method according to claim 1, characterized in that: It further includes: If a download request for the encrypted data is received from the data request end, transmit the encrypted data to the data request end.

3. The data hosting method according to claim 1, characterized in that: After judging whether the target data π(m) makes the verification formula hold, it further includes: If the target data π(m) does not make the verification formula hold, delete the target data π(m) from the local.

4. The data hosting method according to claim 1, characterized in that: The encrypting the target data π(m) using the Paillier algorithm to obtain encrypted data includes: Query a random integer r that meets the preset constraint conditions; where the preset conditions are: 0 < r < n, and the greatest common divisor of r and n is 1; The target data π(m) is encrypted using the random integer r to obtain encrypted data c(m;r), c(m;r)=r n π(m).

5. The data hosting method according to claim 1, characterized in that: It further includes: If illegal data uploaded by the data storage end not in accordance with the data hosting protocol is received, delete the illegal data from the local.

6. A data hosting system, characterized in that: Applied to a data hosting end connected to a data storage end and a data request end respectively, including: A data receiving module is used to receive the target data π(m) uploaded by the data storage end according to the data hosting agreement; wherein the data hosting agreement is: the data uploaded by the data storage end is encrypted using a preset formula, and the preset formula is π(m)=γ mφ(n) modn 2 , φ() is the Euler function, n is the RSA modulus, m is the plaintext data, and γ represents the preset base; A verification module is used to determine whether the target data π(m) satisfies the verification formula; wherein the verification formula is π(m) n modn 2 =1; A hosting module, configured to, if the target data π(m) makes the verification formula hold, encrypt the target data π(m) using the Paillier algorithm to obtain encrypted data, and provide the data request end with access services for the encrypted data; An abnormal behavior detection module, configured to, after judging whether the target data π(m) makes the verification formula hold, if the target data π(m) does not make the verification formula hold, determine that there is a behavior of uploading plaintext data at the data storage end; Among them, after determining that there is a behavior of uploading plaintext data at the data storage end, the abnormal behavior detection module is further configured to return a prompt message to the data storage end, and / or, record the detection times of the plaintext data upload behavior of the data storage end, and add the data storage end to the blacklist when the detection times are greater than a preset value; among them, the data hosting end does not provide data hosting services for the data storage ends in the blacklist.

7. An electronic device, characterized in that: It includes a memory and a processor, and a computer program is stored in the memory. When the processor calls the computer program in the memory, the steps of the data hosting method according to any one of claims 1 to 5 are implemented.

8. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the data hosting method as described in any one of claims 1 to 5 are implemented.