CN116980130A - File sharing method, system and storage medium - Google Patents

File sharing method, system and storage medium Download PDF

Info

Publication number
CN116980130A
CN116980130A CN202311236196.XA CN202311236196A CN116980130A CN 116980130 A CN116980130 A CN 116980130A CN 202311236196 A CN202311236196 A CN 202311236196A CN 116980130 A CN116980130 A CN 116980130A
Authority
CN
China
Prior art keywords
identification
ciphertext
file
broadcast
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311236196.XA
Other languages
Chinese (zh)
Other versions
CN116980130B (en
Inventor
崔岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Open Security Research Inc
Original Assignee
Open Security Research Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Open Security Research Inc filed Critical Open Security Research Inc
Priority to CN202311236196.XA priority Critical patent/CN116980130B/en
Publication of CN116980130A publication Critical patent/CN116980130A/en
Application granted granted Critical
Publication of CN116980130B publication Critical patent/CN116980130B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0866Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses a file sharing method, a system and a storage medium, wherein the method applied to a first terminal comprises the following steps: generating an identification encryption ciphertext based on a key encrypted by the file to be shared, and broadcasting the identification encryption ciphertext; acquiring identification information of at least one target object of a file to be shared, and generating authorization information of a corresponding target object based on the identification information of the target object respectively; and determining authorization token information based on the authorization information of the at least one target object, and sending the authorization token information to the cloud server. Through the technical scheme, not only one-to-one file sharing is realized, but also one-to-many file sharing is realized, so that the file sharing mode is more diversified, and the flexibility of file sharing is improved.

Description

File sharing method, system and storage medium
Technical Field
The application relates to the technical field of cloud storage security, in particular to a file sharing method, a system and a storage medium.
Background
At present, the cloud storage platform is widely applied to file storage and sharing, and aiming at cloud storage encryption file sharing, the existing scheme can only realize the conversion of file access rights from single user to single user, so that the flexibility of file sharing is lower.
Disclosure of Invention
The embodiment of the application provides a file sharing method, a system and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a file sharing method, which is applied to a first terminal and comprises the following steps: generating an identification encryption ciphertext based on a key encrypted by a file to be shared, and broadcasting the identification encryption ciphertext; acquiring identification information of at least one target object of the file to be shared, and generating authorization information corresponding to the target object based on the identification information of the target object respectively; and determining authorization token information based on the authorization information of the at least one target object, and sending the authorization token information to a cloud server.
The embodiment of the application provides a file sharing method, which is applied to a cloud server and comprises the following steps:
receiving authorization token information of a file to be shared and sent by a first terminal, and broadcasting an identification encryption ciphertext; based on the identification encryption ciphertext, performing ciphertext conversion on the authorization token information to convert the authorization token information into identification broadcast encryption ciphertext; and broadcasting the identification broadcast encryption ciphertext to a second terminal used by the target object of the file to be shared.
The embodiment of the application provides a file sharing method which is applied to a second terminal, and comprises the following steps:
acquiring an identification broadcast encryption ciphertext broadcast by a cloud server, and decrypting the key encrypted by the file to be shared based on the identification broadcast encryption ciphertext; and decrypting the file to be shared by using the secret key to obtain the file to be shared.
The embodiment of the application provides a first terminal, which comprises:
the first broadcasting module is used for generating an identification encryption ciphertext based on a key encrypted by a file to be shared and broadcasting the identification encryption ciphertext;
the generation module is used for acquiring the identification information of at least one target object of the file to be shared and generating authorization information corresponding to the target object based on the identification information of the target object respectively;
and the sending module is used for determining authorization token information based on the authorization information of at least one target object and sending the authorization token information to the cloud server.
The embodiment of the application provides a first terminal, which comprises: a first processor, a first memory, and a first communication bus;
the first communication bus is used for realizing communication connection between the first processor and the first memory;
The first processor is configured to execute the program stored in the first memory, so as to implement the file sharing method applied to the first terminal.
The embodiment of the application provides a cloud server, which comprises:
the receiving module is used for receiving the authorization token information of the file to be shared, which is sent by the first terminal, and the broadcasted identification encryption ciphertext;
the conversion module is used for carrying out ciphertext conversion on the authorization token information based on the identification encryption ciphertext and converting the authorization token information into an identification broadcast encryption ciphertext;
and the second broadcasting module is used for broadcasting the identification broadcast encryption ciphertext to a second terminal used by the target object of the file to be shared.
The embodiment of the application provides a cloud server, which comprises a second processor, a second memory and a second communication bus;
the second communication bus is used for realizing communication connection between the second processor and the second memory;
and the second processor is used for executing the program stored in the second memory so as to realize the file sharing method applied to the cloud server.
The embodiment of the application provides a second terminal, which comprises:
The acquisition module is used for acquiring an identification broadcast encryption ciphertext broadcast by the cloud server and decrypting a key for encrypting the file to be shared based on the identification broadcast encryption ciphertext;
and the decryption module is used for decrypting the file to be shared by using the secret key to obtain the file to be shared.
The embodiment of the application provides a second terminal, which comprises a third processor, a third memory and a third communication bus;
the third communication bus is used for realizing communication connection between the third processor and the third memory;
and the third processor is used for executing the program stored in the third memory so as to realize the file sharing method of the application second terminal.
The embodiment of the application provides a file sharing system, which is characterized by comprising a first terminal, a cloud server and a second terminal, wherein the first terminal is used for broadcasting an identification encryption ciphertext generated based on a key for encrypting a file to be shared and generating authorization token information based on identification information corresponding to at least one target object of the file to be shared to the cloud server;
the cloud server is used for receiving the authorization token information sent by the first terminal and the identifier encrypted ciphertext of the broadcast, converting the authorization token information into the identifier broadcast encrypted ciphertext based on the identifier encrypted ciphertext, and broadcasting the identifier broadcast encrypted ciphertext to the second terminal;
The second terminal is configured to receive the identification broadcast encryption ciphertext sent by the cloud server, decrypt the key encrypted by the file to be shared based on the identification broadcast encryption ciphertext, and decrypt the file to be shared based on the key.
Embodiments of the present application provide a computer readable storage medium storing one or more computer programs executable by one or more processors to implement the above-described file sharing method.
The embodiment of the application provides a file sharing method, a system and a storage medium, wherein the method applied to a first terminal comprises the following steps: generating an identification encryption ciphertext based on a key encrypted by the file to be shared, and broadcasting the identification encryption ciphertext; acquiring identification information of at least one target object of a file to be shared, and generating authorization information of a corresponding target object based on the identification information of the target object respectively; and determining authorization token information based on the authorization information of the at least one target object, and sending the authorization token information to the cloud server. According to the technical scheme provided by the application, the authorization token information is determined based on the identification information of at least one target object of the file to be shared, so that the at least one target object can decrypt the file to be shared based on the authorization token information, one-to-one file sharing is realized, one-to-many file sharing is realized, the file sharing mode is diversified, and the flexibility of file sharing is improved.
Drawings
Fig. 1 is a schematic flow chart of a file sharing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an exemplary process for generating an encrypted ciphertext according to an embodiment of the present application;
FIG. 3 is a flow chart of an exemplary visit scenario provided by an embodiment of the present application;
fig. 4 is a second exemplary flowchart of generating an encrypted ciphertext according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating an exemplary generation of authorization information according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating an exemplary generation of authorization token information according to an embodiment of the present application;
fig. 7 is a second flowchart of a file sharing method according to an embodiment of the present application;
FIG. 8 is a schematic flow chart of an exemplary method for generating an encrypted ciphertext of an identification broadcast according to an embodiment of the present application;
fig. 9 is a flowchart illustrating a file sharing method according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating an exemplary process for decrypting a file to be shared according to an embodiment of the present application;
FIG. 11 is a second flowchart illustrating an exemplary decryption process for a file to be shared according to an embodiment of the present application;
FIG. 12 is a flowchart illustrating an exemplary file sharing method according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a first terminal according to an embodiment of the present application;
fig. 14 is a second schematic structural diagram of a first terminal according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a cloud server according to an embodiment of the present application;
fig. 16 is a schematic diagram ii of a structure of a cloud server according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of a second terminal according to an embodiment of the present application;
fig. 18 is a schematic diagram of a second structure of a second terminal according to an embodiment of the present application.
Detailed Description
The technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and not limiting of the application. It should be noted that, for convenience of description, only a portion related to the related application is shown in the drawings.
The embodiment of the application provides a file sharing method, which is realized by a first terminal, as shown in fig. 1, and comprises the following steps S101 to S103:
And step S101, generating an identification encryption ciphertext based on a key for encrypting the file to be shared, and broadcasting the identification encryption ciphertext.
In the embodiment of the application, the first terminal is a device with a file sharing function. Exemplary file sharing devices may be notebook computers, tablet computers, desktop computers, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and the like.
In the embodiment of the application, the file to be shared is a file to be shared by a first user using the first terminal, the first terminal acquires the file to be shared, then selects a key for encrypting the file to be shared, further generates an identification encryption ciphertext by using the selected key, and broadcasts the identification encryption ciphertext.
Step S102, obtaining identification information of at least one target object of the file to be shared, and generating authorization information of the corresponding target object based on the identification information of the target object respectively.
In the embodiment of the application, the first terminal acquires at least one target object of the file to be shared, and each target object is an authorized object of the file to be shared, so that the first terminal generates corresponding authorization information through the acquired identification information of the target object. The identification information can be information such as an identification card number, a mailbox address and the like of the target object, and the specific identification information can be selected according to actual requirements and application scenes, so that the application is not limited.
Step S103, authorization token information is determined based on the authorization information of at least one target object, and the authorization token information is sent to the cloud server.
In the embodiment of the application, the first terminal generates one piece of authorization information aiming at the identification information of each target object, namely, the authorization information of at least one target object can be obtained, then, the authorization token information is determined based on the authorization information of at least one target object, and the authorization token information is sent to the cloud server. Thus, the cloud server can receive the identification encryption ciphertext broadcast by the first terminal and can also receive the authorization token information, and thus, the cloud server can further operate based on the identification encryption ciphertext and the authorization token information.
Compared with the prior art, the technical scheme provided by the application has the advantages that the authorization token information is determined based on the identification information of at least one target object of the file to be shared, so that the at least one target object can decrypt the file to be shared based on the authorization token information, one-to-one file sharing is realized, one-to-many file sharing is realized, the file sharing mode is diversified, and the file sharing flexibility is improved.
In some embodiments, the identification encryption ciphertext includes at least a first identification ciphertext and a second identification ciphertext, and the first terminal generates the identification encryption ciphertext based on the key for encrypting the file to be shared in executing step S101, which may include the following steps S201 to S205:
step S201, randomly selecting a key for encrypting the file to be shared from a preset multiplication loop group, and randomly selecting a first numerical value from a preset integer group.
In the embodiment of the present application, before the first terminal performs step S101, the trusted authority (in key generation) generates the system public parameter, that is, the preset system public parameter, based on the current application scenario. Exemplary application scenarios may be medical scenarios, or scenarios such as vehicle ad hoc networks that require data sharing by a data owner with more users or a user.
As shown in fig. 3, for a medical scenario, for example, sensitive information such as a user's medical record is stored in the cloud server 31 in the form of ciphertext, and when a patient 33 makes a medical visit, he/she first shares his/her medical record 32 with a doctor 34. If the patient 33 has a complicated condition, the patient will be referred to by other specialists in other departments of the hospital in order to fully understand the condition of the patient. At this time, the own records of the doctor's visit 32 are shared with different doctors, that is, with the expert 35 of other departments in the hospital, for diagnosing the own illness state, while for other people in the hospital, it is not desirable for those people to view the own diagnosis report. Application scenarios for vehicular ad hoc networks (VANET). When a vehicle receives an encrypted report regarding the status of the preceding vehicle or a front accident, it is desirable to further broadcast this to the following vehicles.
In an embodiment of the application, the key generation center will obtain the security parametersAnd the maximum number m of the number of the file access authorized users, wherein the security parameter is the character length of the key, and the value of the maximum number m can be obtained according to actual requirements and application scenes. For example, for a doctor's scenario, if the number of doctors in a hospital is 1000, the maximum number may be set to 3000, or other values greater than 1000, and if the actual number of application scenarios is greater than the maximum number, the key generation center will redetermine the preset system disclosure parameters, and setting the maximum number too much will make the calculation more complicated, so that too much or too little will not be pursued, and a smaller value should be set as appropriate for the current scenario.
Illustratively, the key generation center will be based on security parametersAnd generating a system main public parameter (preset system public parameter) and a system main private key by using the maximum number m of the file access authorized users. The implementation steps comprise 1 to 4:
1. the key generation center obtains the security parametersAnd the maximum number m of authorized users for file access, based on the security parameters Generating bilinear clusters with maximum number mWherein the bilinear group comprises an addition loop group (preset addition loop group)Andthe method comprises the steps of carrying out a first treatment on the surface of the Multiplication cycle group (preset multiplication cycle group)The method comprises the steps of carrying out a first treatment on the surface of the Bilinear mapping(preset bilinear algorithm)And the order of the cyclic groupWhereinIs greater thanPrime numbers of (a).
2. Key generation center will be atRandom numbers in a groupAs a system master private key. At the position ofRandomly selected generator in groupIn the followingRandomly selected generator in groupSecret preservation
3. For any oneComputing additive cycle groupsElements of (a)The method comprises the steps of carrying out a first treatment on the surface of the Computing additive cycle groupsElements of (a)The method comprises the steps of carrying out a first treatment on the surface of the Computing a multiplicative cyclic groupElements of (a)
4. Selecting two cryptographic hash functionsWherein, the method comprises the steps of, wherein,the algorithm may employ an SM3 cryptographic hash algorithm (first preset cryptographic hash algorithm).
Thus, the key generation center sets the system public parameter (preset system public parameter) asSystem master private key. The preset system public parameters can be obtained from the first terminal, the cloud server and the second terminal.
In an embodiment of the present application, the first terminal may perform a predetermined multiplication cycle groupRandomly selecting out key for encrypting file to be shared And from a predetermined integer groupRandomly selecting a first value
Step S202, a first parameter included in a preset system public parameter is multiplied by a first numerical value, and the product of the numerical value obtained by the multiplication and the secret key is determined to be a first identification ciphertext.
In the embodiment of the application, the preset system public parameter is directly acquired by the first terminal, and under the condition that the first terminal acquires the secret key and the first numerical value, the first numerical value can be utilized to carry out power on the first parameter included in the preset system public parameter, and the product of the numerical value obtained by the power and the secret key is determined as the first identification encryption ciphertext. For an exemplary manner of determining the first identified encrypted ciphertext, see equation (1):
(1);
wherein, the liquid crystal display device comprises a liquid crystal display device,for presetting a first parameter of the system public parameters,as a key to be used for the encryption,at the level of the first value of the first,for the first identified ciphertext of the first one,as a master private key of the system,in order to preset the bilinear algorithm,the third parameter included for the preset system disclosure parameter,parameters that are kept secret for the system (key generation center).
Due toAndthe parameters stored for the system secret cannot be obtained when the first identification encryption ciphertext is actually determined, so that the first identification encryption ciphertext can be determined by using the following equation of the formula (1), namely, the first parameter in the preset system public parameters is known Secret keyFirst numerical valueAnd (3) obtaining the product.
Step 203, obtain the user identification information of the first object using the first terminal, and determine a first password hash value corresponding to the user identification information by using a first preset password hash algorithm.
In an embodiment of the present application, the first terminal may acquire user identification information of a first object using the first terminalThen, a first preset password hash algorithm in preset system public parameters is utilizedDetermining a first cryptographic hash value corresponding to user identification information
Step S204, determining the product of the first value and the second parameter included in the preset system public parameter as a first product, and determining the product of the first value, the first cryptographic hash value, and the third parameter included in the preset system public parameter as a second product.
In an embodiment of the present application, the first terminal will send the first valueSecond parameters included with preset system disclosure parametersThe product is determined as the first productThen the first numerical valueFirst cryptographic hash valueAnd a third parameter included in the preset system disclosure parametersThe product is determined as the second product
Step S205, determining the sum of the first product and the second product as a second identification ciphertext.
In an embodiment of the application, the first terminal multiplies the first productAnd a second product ofThe sum is determined as the second identification ciphertext
Illustratively, the manner in which the second identifying ciphertext is determined is as described in equation (2):
(2);
wherein, the liquid crystal display device comprises a liquid crystal display device,the second parameter included for the preset system disclosure parameter,the third parameter included for the preset system disclosure parameter,as a master private key of the system,in order to select the first value of the first,for the first predetermined cryptographic hash algorithm,for the user to identify the information as such,is the second identification ciphertext.
Due toFor the system master private key, the first terminal cannot actually acquire the parameter, so that when the second identification encrypted ciphertext is actually determined, the second identification encrypted ciphertext is determined by using the equation behind the formula (2), namely, the parameter in the preset system public parameter is knownAndfirst preset cipher hashing algorithmFirst numerical valueAnd user identification informationAnd (3) obtaining the product.
That is, the encrypted ciphertext is identifiedMay include a first identification ciphertext and a second identification ciphertext, i.e. an identification encryption ciphertext
In some embodiments, the identification encryption ciphertext further includes a third identification ciphertext, and the step of the first terminal determining the third identification ciphertext includes the steps of S401 to S403:
Step S401, determining the product of the first value and the fourth parameter included in the preset system disclosure parameter as a third product.
In an embodiment of the present application, the first terminal transmits a first valueFourth parameter included with preset system disclosure parameterThe product is determined as the third product
Step S402, determining the product of the first value, the first cryptographic hash value, and a fifth parameter included in the predetermined system public parameter as a fourth product.
In an embodiment of the present application, the first terminal transmits a first valueFirst cryptographic hash valueToPresetting a fifth parameter included by system public parametersThe product is determined as the fourth product
Step S403, determining the sum of the third product and the fourth product as a third identification ciphertext.
In an embodiment of the application, the first terminal multiplies the third productWith the fourth productThe sum is determined as the third identification ciphertext
Illustratively, the manner in which the third identifying ciphertext is determined is as described in equation (3):
(3);
wherein, the liquid crystal display device comprises a liquid crystal display device,for presetting a fourth parameter of the system public parameters,for a fifth parameter among the preset system disclosure parameters,as a master private key of the system,at the level of the first value of the first,for the first predetermined cryptographic hash algorithm,for the user to identify the information as such,and (5) identifying the ciphertext for the third.
That is, the encrypted ciphertext is identifiedIn the case of a first identification ciphertext and a second identification ciphertext, a third identification ciphertext, namely an identification encryption ciphertext, may also be provided
For example, the identification ciphertext included with the identification ciphertext may be set based on the application requirements. First case: for sensitive data (private photos of users, files, etc.), the users (data owners) do not want to share with others, and the files are only accessible by themselves, and at this time, the identification encryption ciphertext can only comprise a first identification ciphertext and a second identification ciphertext; second case: for some working confidential documents, the user needs to share with other people, but cannot be determined in advance, in which case the identification encrypted ciphertext may include a first identification ciphertext, a second identification ciphertext, and a third identification ciphertext. The third identification ciphertext at this time is an important element for ciphertext conversion.
In some embodiments, the first terminal generates the authorization information of the corresponding target object based on the identification information of the target object in performing step S102, respectively, and may include the following steps S501 to S503:
step S501, determining a second password hash value corresponding to the identification information by using a first preset password hash algorithm.
In the embodiment of the application, under the condition that the first terminal obtains the identification information of the target object, a first preset password hash algorithm is utilizedDetermining a second cryptographic hash value corresponding to the identification information. Wherein, the liquid crystal display device comprises a liquid crystal display device,is the firstAnd (3) target objects.
Step S502, determining the product of the second password hash value and the third parameter included in the preset system public parameter as the fifth product corresponding to the identification information.
In an embodiment of the application, the first terminal hashes the value corresponding to the second passwordThird parameter included with preset system disclosure parameterThe product is determined as the corresponding fifth product
Step S503, determining the sum of the fifth product corresponding to the corresponding identification information and the second parameter included in the preset system disclosure parameter as the authorization information of the corresponding target object.
In the embodiment of the application, the first terminal corresponds the fifth product corresponding to the corresponding identification informationSecond parameters included with preset system disclosure parametersThe sum of the authorization information determined as the target object
In some embodiments, the authorization token information includes at least one or more of first token information, second token information, and third token information, and the implementation process of the first terminal to determine the first token information, the second token information, and the third token information may include the following steps S601 to S605:
Step S601, obtaining a first user private key of a first object using the first terminal, and randomly selecting a second value and a third value from a preset integer group.
In an embodiment of the present application, the first terminal may obtain the first user private key using the first object of the first terminal. An exemplary acquisition is: the first object sends a registration request carrying self user identification information to a key generation center (trusted authority), the trusted authority firstly verifies the identity of the first object, if the verification is passed, the trusted authority calculates a user private key by using the user identification information carried in the registration request to obtain a first user private key, and sends the first user private key to a user through a secure channel, wherein the calculation mode of the user private key is shown in a formula (4):
(4);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the private key of the user,as a master private key of the system,for the user to identify the information as such,parameters that are kept secret for the trusted authority,a hash algorithm for the first predetermined password.
In an embodiment of the present application, the first terminal is selected from a preset integer groupRandomly selecting the secondNumerical valueAnd a third value
Step S602, the sixth parameter included in the preset system public parameter is subjected to power by using the second value, and the first token information is determined.
In an embodiment of the application, the first terminal uses the second valueThe sixth parameter included in the parameters disclosed for the preset systemAnd performing power to determine the first token information.
For exemplary determination of the first token information see equation (5):
(5);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the first token information to be used,as a master private key of the system,at the level of the second value of the first value,parameters that are kept secret for the trusted authority,and a sixth parameter included in the parameters is disclosed for the preset system.
In an embodiment of the application, due toAndis stored only for trusted institutions, so the first terminal can utilize the sixth parameter included in the preset system disclosure parametersGenerating first token information from second value
Step S603, performing power computation on the first parameter included in the preset public system parameter by using the second value to obtain a sixth product, and determining a third cryptographic hash value of the sixth product by using a second preset cryptographic hash algorithm.
In an embodiment of the application, the first terminal uses the second valueFor the first parameter included in the preset public system parametersPerforming power calculation to obtain a sixth productAnd uses a second preset password hash algorithmDetermining a third cryptographic hash value of the sixth product
Step S604, determining the sum of the product of the third value and the third parameter included in the preset public system parameter and the third password hash value as the second token information.
In an embodiment of the present application, the first terminal sets a third valueAnd preset public system parametersIncluding a third parameterProduct of (2)Hash with a third cipherAnd is determined as second token information
Illustratively, the manner in which the second token information is determined is described by equation (6):
(6);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the second token information to be used,at the level of the second value of the first value,for presetting a first parameter of the system public parameters,for presetting a third parameter of the system public parameters,at the level of the third value of the number,is the third cryptographic hash value.
Step S605, determining the difference between the product of the third value and the fifth parameter included in the preset system public parameter and the first user private key as the third token information.
In an embodiment of the present application, the first terminal sets a third valueAnd a fifth parameterProduct of (2)With the first user private keyIs determined as the third token information
Illustratively, the manner in which the third token information is determined is described by equation (7):
(7);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the third token information to be used,at the level of the third value of the number,for a fifth parameter among the preset system disclosure parameters,is the first user private key.
The authorization information determined as the target object in the above steps S501 to S503 Thereafter, determining authorization token information based on the authorization information of the at least one target object in step S103 includes: the product of the authorization information of at least one target object is multiplied by the second value to determine the target token information.
In an embodiment of the application, the target token informationIncluded in authorization token information. Illustratively, the manner in which the target token information is determined is described by equation (8):
(8);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the purpose of the token information of the object,at the level of the second value of the first value,as a master private key of the system,is the first in the target objectThe number of objects to be processed is the number of objects,for the number of target objects,for presetting a third parameter of the system public parameters,a hash algorithm for the first predetermined password.
Thus, the authorization token information obtained by the first terminal isAnd then sent to the cloud server.
The embodiment of the application provides a file sharing method, which is applied to a first terminal, generates an identification encryption ciphertext based on a key of file encryption to be shared, and broadcasts the identification encryption ciphertext; acquiring identification information of at least one target object of a file to be shared, and generating authorization information of a corresponding target object based on the identification information of the target object respectively; and determining authorization token information based on the authorization information of at least one target object, converting the authorization token information into an identification broadcast encryption ciphertext based on the identification encryption ciphertext through the cloud server, and broadcasting the identification broadcast encryption ciphertext to a second terminal used by the target object. According to the file sharing method provided by the application, the authorization token information is determined based on the identification information of at least one target object of the file to be shared, so that the at least one target object can decrypt the file to be shared based on the authorization token information, one-to-one file sharing is realized, one-to-many file sharing is realized, the file sharing mode is diversified, and the flexibility of file sharing is improved.
The embodiment of the application provides a file sharing method, which is realized by a cloud server, as shown in fig. 7, and comprises the following steps S701 to S703:
step S701, receiving authorization token information of a file to be shared sent by a first terminal, and a broadcast identification encryption ciphertext.
In the embodiment of the application, the cloud server receives authorization token information sent by the first terminal and the identification encryption ciphertext broadcast by the first terminal.
And step S702, performing ciphertext conversion on the authorization token information based on the identification encryption ciphertext, and converting the authorization token information into the identification broadcast encryption ciphertext.
In an embodiment of the present application, after receiving the authorization token information and the identification encrypted ciphertext, the cloud server converts the authorization token information into the identification broadcast encrypted ciphertext based on the identification encrypted ciphertext.
Step S703, broadcasting the encrypted ciphertext of the identification broadcast to a second terminal used by a target object of the file to be shared.
In the embodiment of the application, the cloud server can broadcast the authorization token information after converting the authorization token information into the identification broadcast encryption ciphertext, and the second terminal used by the target object can receive the broadcasted identification broadcast encryption ciphertext, so that the encryption key of the file to be shared is decrypted based on the identification broadcast encryption ciphertext, and the file to be shared is decrypted.
Compared with the prior art, the data processed by the cloud server are all ciphertext, so that the security and privacy of file sharing can be ensured.
In some embodiments, the identification encryption ciphertext includes a first identification ciphertext, a second identification ciphertext, and a third identification ciphertext, the authorization token information includes first token information, second token information, third token information, and target token information, and the cloud server may include the following steps S801 to S804 when performing step S702:
step S801, the first token information, the second token information, and the target token information are respectively determined as a first identification broadcast ciphertext, a second identification broadcast ciphertext, and a third identification broadcast ciphertext.
In an embodiment of the application, the cloud server stores the first token informationDetermining as a first identification broadcast ciphertextI.e.The method comprises the steps of carrying out a first treatment on the surface of the Second token informationDetermining as a second identification broadcast ciphertextI.e.And target token informationIs determined as the third markIdentification broadcast ciphertextI.e.
Step S802, determining the third identification ciphertext as a fourth identification broadcast ciphertext.
In the embodiment of the application, the cloud server sends the third identification ciphertext to the cloud serverDetermining as fourth identification broadcast ciphertext I.e.
Step 803, determining a corresponding first bilinear value based on the second identification ciphertext and the third token information by using a preset bilinear algorithm, and determining a ratio of the first identification ciphertext to the first bilinear value as a fifth identification broadcast ciphertext.
In an embodiment of the present application, a bilinear algorithm is presetThe cloud server determines a corresponding first bilinear value based on the second identification ciphertext and the third token informationAnd the first identification ciphertextAnd a first bilinear valueThe ratio is determined as the fifth identification broadcast ciphertext
Illustratively, the manner in which the fifth identified broadcast ciphertext is determined is as described in equation (9):
(9);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the fifth identification broadcast ciphertext,for the first identified ciphertext of the first one,for the second identification ciphertext of the second identification,for the third token information to be used,is a preset bilinear algorithm.
Step S804, determining the first identification broadcast ciphertext, the second identification broadcast ciphertext, the third identification broadcast ciphertext, the fourth identification broadcast ciphertext, and the fifth identification broadcast ciphertext as identification broadcast encryption ciphertexts.
In an embodiment of the present application, the cloud server determines the first identification broadcast ciphertext, the second identification broadcast ciphertext, the third identification broadcast ciphertext, the fourth identification broadcast ciphertext, and the fifth identification broadcast ciphertext as identification broadcast encryption ciphertexts
Therefore, the cloud server transmits the files in the form of ciphertext in the whole process, and the safety and privacy of the files are guaranteed.
The embodiment of the application provides a file sharing method which is applied to a cloud server, and is used for receiving authorization token information of a file to be shared and an identification encryption ciphertext sent by a first terminal; based on the identification encryption ciphertext, performing ciphertext conversion on the authorization token information to convert the authorization token information into an identification broadcast encryption ciphertext; and broadcasting the identification broadcast encryption ciphertext to a second terminal used by the target object of the file to be shared. According to the file sharing method provided by the application, the data processed by the cloud server are all ciphertext, so that the safety and privacy of file sharing can be ensured.
The embodiment of the application provides a file sharing method, which is implemented by a second terminal, as shown in fig. 9, and includes the following steps S901 to S902:
step S901, an identification broadcast encryption ciphertext broadcast by a cloud server is obtained, and a key for encrypting a file to be shared is decrypted based on the identification broadcast encryption ciphertext.
In the embodiment of the application, the second terminal decrypts the key encrypted by the file to be shared based on the identification broadcast encryption ciphertext under the condition of acquiring the identification broadcast encryption ciphertext broadcast by the cloud server.
And step S902, decrypting the file to be shared by using the secret key to obtain the file to be shared.
In the embodiment of the application, the second terminal can decrypt the file to be shared based on the key after decrypting the key.
In some embodiments, identifying the broadcast encryption ciphertext includes: the second terminal executes the key to be shared encrypted based on the identification broadcast encryption ciphertext in step S901 to decrypt the key to be shared encrypted, which may include the following steps S1001 to S1004:
step S1001, obtaining a second user private key of a second object using a second terminal.
In the embodiment of the present application, the second terminal may acquire the second user private key of the second object using the second terminal, and the exemplary acquisition manner is consistent with step S601, which is not described herein.
Step S1002, determining a first element in a preset multiplication loop group based on a relationship among the first identification broadcast ciphertext, the third identification broadcast ciphertext, the second user private key, and the identification information of the second terminal.
In an embodiment of the present application, the manner of determining the elements in the preset multiplicative cycle group is described by formula (10):
(10);
Wherein, the liquid crystal display device comprises a liquid crystal display device,the ciphertext is broadcast for the first identification,for the third identification to broadcast the ciphertext,is the firstA second user's private key is provided,is the firstThe identification information of the second terminal is used,as a first element of the first-mentioned element,as a master private key of the system,for the first predetermined cryptographic hash algorithm,the third parameter included for the preset system disclosure parameter,in order to preset the bilinear algorithm,is the number of target objects.
Step S1003, determining a second element in the preset addition loop group based on a relationship between the first element and the second identification broadcast ciphertext.
In an embodiment of the present application, the manner of determining the elements in the preset addition loop group is described in formula (11):
(11);
wherein, the liquid crystal display device comprises a liquid crystal display device,the ciphertext is broadcast for the second identifier,as a first element of the first-mentioned element,a second predetermined cryptographic hash algorithm,is the product of the second element, i.e. the third value, and a third parameter comprised by a preset public system parameter.
And step S1004, determining a corresponding second bilinear value based on the second element and the fourth identification broadcast ciphertext by using a preset bilinear algorithm, and determining the ratio of the fifth identification broadcast ciphertext to the second bilinear value as a key of the file to be shared.
In an embodiment of the present application, the second terminal uses a preset bilinear algorithm Based on a second elementAnd fourth identification broadcast ciphertextDetermining a corresponding second bilinear valueAnd broadcast the fifth identification ciphertextAnd a second bilinear valueThe ratio is determined as the key of the file to be shared
Illustratively, the manner in which the key is determined is described by equation (12):
(12);
wherein, the liquid crystal display device comprises a liquid crystal display device,as a key to be used for the encryption,for the fifth identification broadcast ciphertext,as a second element of the composition,for the fourth identification broadcast ciphertext,is a preset bilinear algorithm.
And judging the correctness of the key for decrypting the encryption of the file to be shared based on the identification broadcast encryption ciphertext, wherein the judgment is as shown in a formula (13):
(13);
wherein, furthermore, obtainThus, it is possible to obtain
In some embodiments, the second terminal may further perform the following steps S1101 to S1103:
step 1101, obtaining an identification encryption ciphertext generated based on a key for encrypting the file to be shared, which is broadcasted by the first terminal.
In the embodiment of the application, the second terminal can acquire the identification encryption ciphertext generated based on the key for encrypting the file to be shared, which is broadcasted by the first terminal.
In step S1102, when the identification encrypted ciphertext includes only the first identification ciphertext and the second identification ciphertext, a second user private key of a second object that uses the second terminal is obtained.
In the embodiment of the application, if the identification encryption ciphertext only comprises the first identification ciphertext and the second identification ciphertext, a second user private key of a second object using the second terminal is obtained. The exemplary implementation of obtaining the second user private key is consistent with step S601 and step S1001, and will not be described herein.
And step 1103, determining a corresponding third bilinear value based on the second user private key and the second identification ciphertext by using a preset bilinear algorithm, and determining the ratio of the first identification ciphertext to the third bilinear value as the key of the file to be shared.
In an embodiment of the present application, the second terminal uses a preset bilinear algorithmBased on the second user private keyAnd a second identification ciphertextDetermining a corresponding third bilinear valueAnd second identification ciphertextAnd a third bilinear valueThe ratio is determined as the key of the file to be shared
Illustratively, the manner in which the key is determined is described by equation (14):
(14);
wherein, the liquid crystal display device comprises a liquid crystal display device,for the first identified ciphertext of the first one,for the second identification ciphertext of the second identification,for the second user's private key,as a key to be used for the encryption,is a preset bilinear algorithm. At this time, the second terminal can obtain the key of the file to be shared without identifying the broadcast encryption ciphertext. That is, in the case where the target object includes only one object, only the encrypted ciphertext needs to be identified.
And judging the correctness of the key for decrypting the file encryption to be shared based on the identification encryption ciphertext, wherein the judgment is as shown in a formula (15):
(15);
encrypting ciphertext for unconverted identifiersThe data user (second user) inputs his own private key (user private key) and can calculate the plaintext (file to be shared).
The embodiment of the application provides a file sharing method which is applied to a second terminal, and is used for acquiring an identification broadcast encryption ciphertext broadcast by a cloud server and decrypting a key encrypted by a file to be shared based on the identification broadcast encryption ciphertext; and decrypting the file to be shared by using the secret key to obtain the file to be shared. According to the file sharing method provided by the application, as long as the target object of the second terminal is the authorized object of the file to be shared, the key of the file to be shared can be analyzed based on the identification broadcast encryption ciphertext, so that the file to be shared is decrypted by using the key, and the file sharing is realized.
The embodiment of the application provides a file sharing system, a first terminal, a cloud server and a second terminal, wherein the first terminal is used for broadcasting an identification encryption ciphertext generated based on a key for encrypting a file to be shared and transmitting identification information corresponding to at least one target object based on the file to be shared to the cloud server;
The cloud server is used for receiving the authorization token information sent by the first terminal and the identifier encryption ciphertext of the broadcast, converting the authorization token information into the identifier broadcast encryption ciphertext based on the identifier encryption ciphertext, and broadcasting the identifier broadcast encryption ciphertext to the second terminal;
and the second terminal is used for receiving the identification broadcast encryption ciphertext sent by the cloud server, decrypting a key encrypted by the file to be shared based on the identification broadcast encryption ciphertext, and decrypting the file to be shared based on the key.
Fig. 12 is a flowchart of an exemplary file sharing method according to an embodiment of the present application. The cloud storage encrypted file flexible sharing method based on the commercial secret SM9 specifically comprises four types of entities, namely a data owner (a first user using a first terminal), a data user (a second user using a second terminal), a trusted authority (a key generation center) and a cloud service provider (cloud services provider, CSP) (cloud server). Exemplary implementations include the following steps S1201 to S1206:
step S1201, system initialization, the trusted authority generates a system main public parameter and a system main private key according to the security parameter and the maximum number of authorized users, and the system main private key is stored in a secret mode.
Here, the trusted authority is based on security parametersAnd maximum number m of authorized users, generating system main public parametersParameters and parametersAnd a system master private keySecret preservation. Exemplary implementations see steps 1 to 4 in step S201 above.
Step S1202, the user registers, the user requests to join the system to the trusted organization, after the trusted organization verifies the identity of the user, the user private key is calculated by using the identification information of the user, and the user private key is sent to the user through a secure channel.
Here, all users can register themselves with the available institutions, and the manner of calculating the private key of the user by using the identification information of the user is exemplified by the formula (4).
In step S1203, an encrypted file is generated, and when a user (all users in the system) uses a cloud storage service provided by the CSP cloud service provider to store the encrypted file, the data owner (first terminal) may encrypt the file using a symmetric cryptosystem, such as SM4 algorithm, and then encrypt the symmetric key using the method provided by the present application to generate the encrypted file.
Here, the data owner may use key encapsulation techniques to effectively reduce the time penalty in encrypting the file. By using the key encapsulation technology, the data owner can encrypt the file by using a symmetric cryptosystem, such as SM4 algorithm, and then encrypt the symmetric key by using the file sharing method in the application. Thus, the performance of the asymmetric cryptosystem is independent of the file size and only related to the number of authorized users. The way of exemplarily generating the encrypted file is referred to in steps S201 to S205, or steps S401 to S403.
In step S1204, the data owner determines other user identifications having access to the encrypted file, and generates authorization token information based on the other user identifications.
Here, when the data owner determines that other user identifications (second user) of the encrypted file are accessible, it is assumed that the authorized user identifications are grouped asData owner selectionRandom numbers in a groupFor the calculation, see step S501 to step S503 for exemplary calculation, and the authorization token information is determined based on the authorization information of at least one target object in step S103.
In step S1205, the file conversion, CSP, after receiving token (authorization token information) sent by the data owner, needs to convert a specific ciphertext (authorization token information), and for the converted file (identification broadcast encrypted ciphertext), the authorized user can access the file.
Here, the CSP converts the authorization token information to obtain the identification broadcast encryption ciphertext under the condition that the authorization token information is acquired. Exemplary switching patterns are referred to in steps S801 to S804.
In step S1206, the files are acquired, and one file in the system corresponds to different forms of ciphertext, one is original ciphertext (identification encrypted ciphertext), and the other is converted broadcast ciphertext (identification broadcast encrypted ciphertext).
Here, for the original ciphertext, decryption is performed directly based on the identification encrypted ciphertext. Exemplary decryption means are seen in steps S1101 to S1103. The manner of decrypting the converted ciphertext (the identification broadcast encrypted ciphertext) is referred to in steps S1001 to S1004.
Finally, the correctness of the application is demonstrated by the formula (13) and the formula (15).
The embodiment of the application provides a first terminal. As shown in fig. 13, includes:
the first broadcasting module 1301 is configured to generate an identifier encrypted ciphertext based on a key encrypted by a file to be shared, and broadcast the identifier encrypted ciphertext;
the generating module 1302 is configured to obtain identification information of at least one target object of the file to be shared, and generate authorization information of a corresponding target object based on the identification information of the target object, respectively;
the sending module 1303 is configured to determine authorization token information based on authorization information of at least one target object, and send the authorization token information to the cloud server.
In an embodiment of the present application, the identifier encryption ciphertext at least includes a first identifier ciphertext and a second identifier ciphertext, and the first broadcast module 1301 is further configured to randomly select a key for encrypting a file to be shared from a preset multiplication cycle group, and randomly select a first numerical value from a preset integer group; utilizing a first numerical value to carry out power on a first parameter included in a preset system public parameter, and determining the product of the numerical value obtained by the power and a secret key as a first identification ciphertext; acquiring user identification information of a first object using a first terminal, and determining a first password hash value corresponding to the user identification information by using a first preset password hash algorithm; determining a product of the first value and a second parameter included in a preset system disclosure parameter as a first product, and determining a product of the first value, the first password hash value and a third parameter included in the preset system disclosure parameter as a second product; the sum of the first product and the second product is determined as the second identification ciphertext.
In an embodiment of the present application, the identifier encryption ciphertext further includes a third identifier ciphertext, and the first broadcast module 1301 is further configured to determine a product of the first value and a fourth parameter included in the preset system public parameter as a third product; determining the product of the first numerical value, the first password hash value and a fifth parameter included in a preset system public parameter as a fourth product; and determining the sum of the third product and the fourth product as a third identification ciphertext.
In an embodiment of the present application, the generating module 1302 is further configured to determine a second cryptographic hash value corresponding to the identification information by using a first preset cryptographic hash algorithm; determining the product of the corresponding second password hash value and a third parameter included by a preset system public parameter as a fifth product corresponding to the identification information; and determining the sum of the fifth product corresponding to the corresponding identification information and the second parameter included in the preset system disclosure parameter as the authorization information of the corresponding target object.
In an embodiment of the present application, the authorization token information includes at least one or more of first token information, second token information, and third token information, and the generating module 1302 is further configured to obtain a first user private key of a first object using the first terminal, and randomly select a second value and a third value from a preset integer group; utilizing the second value to carry out power on a sixth parameter included in the public parameter of the preset system, and determining first token information; performing power calculation on a first parameter included in a preset public system parameter by using a second numerical value to obtain a sixth product, and determining a third password hash value of the sixth product by using a second preset password hash algorithm; determining the sum of a product of a third numerical value and a third parameter included by a preset public system parameter and a third password hash value as second token information; and determining the difference between the product of the third numerical value and the fifth parameter included in the preset system public parameter and the first user private key as third token information.
The embodiment of the application provides a first terminal, as shown in fig. 14, including: a first processor 1401, a first memory 1402, and a first communication bus 1403;
a first communication bus 1403 for enabling a communication connection between the first processor 1401 and the first memory 1402;
the first processor 1401 is configured to execute a program stored in the first memory 1402 to implement the file sharing method applied to the first terminal.
The embodiment of the application provides a cloud server, as shown in fig. 15, comprising:
the receiving module 1501 is configured to receive authorization token information of a file to be shared sent by a first terminal, and a broadcast identifier encryption ciphertext;
a conversion module 1502, configured to perform ciphertext conversion on the authorization token information based on the identification encrypted ciphertext, and convert the authorization token information into an identification broadcast encrypted ciphertext;
and the second broadcasting module 1503 is configured to broadcast the identification broadcast encrypted ciphertext to a second terminal used by the target object of the file to be shared.
In an embodiment of the present application, the identification encryption ciphertext includes a first identification ciphertext, a second identification ciphertext, and a third identification ciphertext, the authorization token information includes first token information, second token information, third token information, and target token information, the target token information is generated based on identification information corresponding to at least one target object, and the conversion module 1502 is further configured to determine the first token information, the second token information, and the target token information as a first identification broadcast ciphertext, a second identification broadcast ciphertext, and a third identification broadcast ciphertext, respectively; determining the third identification ciphertext as a fourth identification broadcast ciphertext; determining a corresponding first bilinear value based on the second identification ciphertext and the third token information by using a preset bilinear algorithm, and determining the ratio of the first identification ciphertext to the first bilinear value as a fifth identification broadcast ciphertext; and determining the first identification broadcast ciphertext, the second identification broadcast ciphertext, the third identification broadcast ciphertext, the fourth identification broadcast ciphertext and the fifth identification broadcast ciphertext as identification broadcast encryption ciphers.
The embodiment of the application provides a cloud server, as shown in fig. 16, the cloud server includes: a second processor 1601, a second memory 1602 and a second communication bus 1603;
a second communication bus 1603 for implementing a communication connection between the second processor 1601 and the second memory 1602;
the second processor 1601 is configured to execute a program stored in the second memory 1602, so as to implement the file sharing method applied to the cloud server.
An embodiment of the present application provides a second terminal, as shown in fig. 17, including:
the acquiring module 1701 is configured to acquire an identification broadcast encryption ciphertext broadcast by the cloud server, and decrypt a key encrypted by the file to be shared based on the identification broadcast encryption ciphertext;
the decryption module 1702 is configured to decrypt the file to be shared by using the key to obtain the file to be shared.
In one embodiment of the present application, identifying broadcast encryption ciphertext includes: the first identification broadcast ciphertext, the second identification broadcast ciphertext, the third identification broadcast ciphertext, the fourth identification broadcast ciphertext, and the fifth identification broadcast ciphertext, the obtaining module 1701 is further configured to obtain a second user private key that uses a second object of the second terminal; determining a first element in a preset multiplication cycle group based on a relation among the first identification broadcast ciphertext, the third identification broadcast ciphertext, the second user private key and identification information of the second terminal; determining a second element in a preset addition cycle group based on a relation between the first element and the second identification broadcast ciphertext; and determining a corresponding second bilinear value based on the second element and the fourth identification broadcast ciphertext by using a preset bilinear algorithm, and determining the ratio of the fifth identification broadcast ciphertext to the second bilinear value as a key of the file to be shared.
In an embodiment of the present application, the obtaining module 1701 is further configured to obtain an identifier encrypted ciphertext generated based on a key encrypted by a file to be shared, which is broadcasted by the first terminal; acquiring a second user private key of a second object using the second terminal under the condition that the identification encryption ciphertext only comprises the first identification ciphertext and the second identification ciphertext; and determining a corresponding third bilinear value based on the second user private key and the second identification ciphertext by using a preset bilinear algorithm, and determining the ratio of the first identification ciphertext to the third bilinear value as the key of the file to be shared.
The embodiment of the application provides a second terminal, as shown in fig. 18, where the second terminal includes: a third processor 1801, a third memory 1802, and a third communication bus 1803;
a third communication bus 1803 for implementing a communication connection between the third processor 1801 and the third memory 1802;
the third processor 1801 is configured to execute the program stored in the third memory 1802, so as to implement the file sharing method applied to the second terminal.
The embodiment of the application provides a file sharing system, which comprises a first terminal, a cloud server and a second terminal, wherein the first terminal is used for broadcasting an identification encryption ciphertext generated based on a key for encrypting a file to be shared and sending authorization token information generated based on identification information corresponding to at least one target object of the file to be shared to the cloud server;
The cloud server is used for receiving the authorization token information sent by the first terminal and the identifier encryption ciphertext of the broadcast, converting the authorization token information into the identifier broadcast encryption ciphertext based on the identifier encryption ciphertext, and broadcasting the identifier broadcast encryption ciphertext to the second terminal;
and the second terminal is used for receiving the identification broadcast encryption ciphertext sent by the cloud server, decrypting a key encrypted by the file to be shared based on the identification broadcast encryption ciphertext, and decrypting the file to be shared based on the key.
The embodiment of the application provides a computer readable storage medium, which stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to realize the file sharing method. The computer readable storage medium may be a volatile Memory (RAM), such as a Random-Access Memory (RAM); or a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); but may be a respective device, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc., comprising one or any combination of the above memories.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present application should be included in the present application.

Claims (12)

1. The file sharing method is characterized by being applied to a first terminal, and comprises the following steps:
generating an identification encryption ciphertext based on a key encrypted by a file to be shared, and broadcasting the identification encryption ciphertext;
acquiring identification information of at least one target object of the file to be shared, and generating authorization information corresponding to the target object based on the identification information of the target object respectively;
and determining authorization token information based on the authorization information of the at least one target object, and sending the authorization token information to a cloud server.
2. The method for sharing files according to claim 1, wherein the identification encrypted ciphertext includes at least a first identification ciphertext and a second identification ciphertext, and the generating the identification encrypted ciphertext based on the key for encrypting the files to be shared includes:
randomly selecting the secret key for encrypting the file to be shared from a preset multiplication cycle group, and randomly selecting a first numerical value from a preset integer group;
utilizing the first numerical value to carry out power on a first parameter included in a preset system public parameter, and determining the product of the numerical value obtained by the power and the secret key as the first identification ciphertext;
Acquiring user identification information of a first object using the first terminal, and determining a first password hash value corresponding to the user identification information by using a first preset password hash algorithm;
determining a product of the first value and a second parameter included in the preset system disclosure parameter as a first product, and determining a product of the first value, the first cryptographic hash value, and a third parameter included in the preset system disclosure parameter as a second product;
and determining the sum of the first product and the second product as the second identification ciphertext.
3. The file sharing method according to claim 2, wherein the identification encrypted ciphertext further includes a third identification ciphertext, the method further comprising:
determining a product of the first value and a fourth parameter included in the preset system disclosure parameter as a third product;
determining the product of the first numerical value, the first password hash value and a fifth parameter included in the preset system disclosure parameter as a fourth product;
and determining the sum of the third product and the fourth product as the third identification ciphertext.
4. The file sharing method according to claim 1, wherein the generating authorization information corresponding to the target object based on the identification information of the target object, respectively, includes:
Determining a second password hash value corresponding to the identification information by using a first preset password hash algorithm;
determining the product of the second password hash value and a third parameter included by a preset system public parameter as a fifth product corresponding to the identification information;
and determining the sum of the fifth product corresponding to the identification information and the second parameter included in the preset system disclosure parameter as authorization information corresponding to the target object.
5. The file sharing method according to any one of claims 1 to 4, wherein the authorization token information includes at least one or more of first token information, second token information, and third token information, the method further comprising:
acquiring a first user private key of a first object using the first terminal, and randomly selecting a second numerical value and a third numerical value from a preset integer group;
utilizing the second value to carry out power on a sixth parameter included in a preset system disclosure parameter, and determining the first token information;
performing power calculation on the first parameter included in the preset public system parameter by using the second value to obtain a sixth product, and determining a third password hash value of the sixth product by using a second preset password hash algorithm;
Determining the sum of the product of the third numerical value and the third parameter included by the preset public system parameter and the third password hash value as the second token information;
and determining the difference between the product of the third numerical value and the fifth parameter included in the preset system public parameter and the first user private key as the third token information.
6. The file sharing method is characterized by being applied to a cloud server, and comprises the following steps:
receiving authorization token information of a file to be shared and sent by a first terminal, and broadcasting an identification encryption ciphertext;
based on the identification encryption ciphertext, performing ciphertext conversion on the authorization token information to convert the authorization token information into identification broadcast encryption ciphertext;
and broadcasting the identification broadcast encryption ciphertext to a second terminal used by the target object of the file to be shared.
7. The file sharing method according to claim 6, wherein the identification encryption ciphertext includes a first identification ciphertext, a second identification ciphertext, and a third identification ciphertext, the authorization token information includes first token information, second token information, third token information, and target token information, the target token information is generated based on identification information corresponding to at least one target object of the file to be shared, and the performing ciphertext conversion on the authorization token information based on the identification encryption ciphertext into an identification broadcast encryption ciphertext includes:
Determining the first token information, the second token information and the target token information as a first identification broadcast ciphertext, a second identification broadcast ciphertext and a third identification broadcast ciphertext respectively;
determining the third identification ciphertext as a fourth identification broadcast ciphertext;
determining a corresponding first bilinear value based on the second identification ciphertext and the third token information by using a preset bilinear algorithm, and determining the ratio of the first identification ciphertext to the first bilinear value as a fifth identification broadcast ciphertext;
and determining the first identification broadcast ciphertext, the second identification broadcast ciphertext, the third identification broadcast ciphertext, the fourth identification broadcast ciphertext and the fifth identification broadcast ciphertext as the identification broadcast encryption ciphertext.
8. The file sharing method is characterized by being applied to a second terminal, and comprises the following steps:
acquiring an identification broadcast encryption ciphertext broadcast by a cloud server, and decrypting a key for encrypting a file to be shared based on the identification broadcast encryption ciphertext;
and decrypting the file to be shared by using the secret key to obtain the file to be shared.
9. The file sharing method of claim 8, wherein the identifying broadcast encryption ciphertext comprises: the method comprises the steps of decrypting a key for encrypting a file to be shared based on the identification broadcast encryption ciphertext, wherein the key comprises the following steps:
Acquiring a second user private key of a second object using the second terminal;
determining a first element in a preset multiplication cycle group based on the relation among the first identification broadcast ciphertext, the third identification broadcast ciphertext, the second user private key and the identification information of the second terminal;
determining a second element in a preset addition cycle group based on a relation between the first element and the second identification broadcast ciphertext;
and determining a corresponding second bilinear value based on the second element and the fourth identification broadcast ciphertext by using a preset bilinear algorithm, and determining the ratio of the fifth identification broadcast ciphertext to the second bilinear value as the key of the file to be shared.
10. The file sharing method according to claim 8 or 9, characterized in that the file sharing method further comprises:
acquiring an identification encryption ciphertext of the file to be shared, which is broadcasted by a first terminal;
acquiring a second user private key of a second object using the second terminal under the condition that the identification encryption ciphertext only comprises the first identification ciphertext and the second identification ciphertext;
and determining a corresponding third bilinear value based on the second user private key and the second identification ciphertext by using a preset bilinear algorithm, and determining the ratio of the first identification ciphertext to the third bilinear value as the key of the file to be shared.
11. The file sharing system is characterized by comprising a first terminal, a cloud server and a second terminal,
the first terminal is used for broadcasting an identification encryption ciphertext generated based on a key encrypted by a file to be shared, generating authorization token information based on identification information corresponding to at least one target object of the file to be shared, and sending the authorization token information to the cloud server;
the cloud server is used for receiving the authorization token information sent by the first terminal and the identifier encrypted ciphertext of the broadcast, converting the authorization token information into the identifier broadcast encrypted ciphertext based on the identifier encrypted ciphertext, and broadcasting the identifier broadcast encrypted ciphertext to the second terminal;
the second terminal is configured to receive the identification broadcast encryption ciphertext sent by the cloud server, decrypt the key encrypted by the file to be shared based on the identification broadcast encryption ciphertext, and decrypt the file to be shared based on the key.
12. A computer-readable storage medium storing one or more programs executable by one or more processors to implement the file sharing method of any of claims 1-5, 6-7, or 8-10.
CN202311236196.XA 2023-09-25 2023-09-25 File sharing method, system and storage medium Active CN116980130B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311236196.XA CN116980130B (en) 2023-09-25 2023-09-25 File sharing method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311236196.XA CN116980130B (en) 2023-09-25 2023-09-25 File sharing method, system and storage medium

Publications (2)

Publication Number Publication Date
CN116980130A true CN116980130A (en) 2023-10-31
CN116980130B CN116980130B (en) 2023-12-22

Family

ID=88471662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311236196.XA Active CN116980130B (en) 2023-09-25 2023-09-25 File sharing method, system and storage medium

Country Status (1)

Country Link
CN (1) CN116980130B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850656A (en) * 2017-02-27 2017-06-13 淮阴工学院 Multi-user's file-sharing control method under a kind of cloud environment
CN111586064A (en) * 2020-05-11 2020-08-25 福建师范大学 Anonymous identity-based broadcast encryption method and system
CN112702160A (en) * 2020-12-16 2021-04-23 江苏通付盾区块链科技有限公司 Method, device and system for encrypted storage and sharing of cloud data
CN114144781A (en) * 2019-05-17 2022-03-04 Q5Id公司 Identity verification and management system
CN115296810A (en) * 2022-08-02 2022-11-04 安徽大学 Medical shared cloud storage file auditing method supporting accurate examination
CN115499229A (en) * 2022-09-22 2022-12-20 淮阴工学院 Identity-based cloud storage encrypted data conversion method and system
WO2022266502A1 (en) * 2021-06-19 2022-12-22 Ntt Research, Inc. Broadcast encryption with improved resource utilization

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850656A (en) * 2017-02-27 2017-06-13 淮阴工学院 Multi-user's file-sharing control method under a kind of cloud environment
CN114144781A (en) * 2019-05-17 2022-03-04 Q5Id公司 Identity verification and management system
CN111586064A (en) * 2020-05-11 2020-08-25 福建师范大学 Anonymous identity-based broadcast encryption method and system
CN112702160A (en) * 2020-12-16 2021-04-23 江苏通付盾区块链科技有限公司 Method, device and system for encrypted storage and sharing of cloud data
WO2022266502A1 (en) * 2021-06-19 2022-12-22 Ntt Research, Inc. Broadcast encryption with improved resource utilization
CN115296810A (en) * 2022-08-02 2022-11-04 安徽大学 Medical shared cloud storage file auditing method supporting accurate examination
CN115499229A (en) * 2022-09-22 2022-12-20 淮阴工学院 Identity-based cloud storage encrypted data conversion method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KAI HE ETAL.: "Anonymous identity-based broadcast encryption with chosen-ciphert", 《PROCEEDINGS OF THE 11TH ACM ON ASIA CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY》 *
崔岩 等: "公钥广播加密研究综述", 《广州大学学报( 自然科学版)》, vol. 21, no. 4 *
赖建昌 等: "一种基于商密SM9的高效标识广播加密方案", 《计算机学报》, vol. 44, no. 5 *

Also Published As

Publication number Publication date
CN116980130B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
Tong et al. Cloud-assisted mobile-access of health data with privacy and auditability
CN108881314B (en) Privacy protection method and system based on CP-ABE ciphertext under fog computing environment
US10187207B2 (en) Re-encryption key generator, re-encryption apparatus, encryption apparatus, decryption apparatus, and storage medium
Shao et al. Fine-grained data sharing in cloud computing for mobile devices
US20180013555A1 (en) Data transmission method and apparatus
EP2348446B1 (en) A computer implemented method for authenticating a user
CN107196926B (en) Cloud outsourcing privacy set comparison method and device
Guo et al. Efficient secure-channel free public key encryption with keyword search for EMRs in cloud storage
US9698984B2 (en) Re-encrypted data verification program, re-encryption apparatus and re-encryption system
Liu et al. Verifiable attribute-based keyword search over encrypted cloud data supporting data deduplication
CN108632031B (en) Key generation device and method, encryption device and method
CN113708917B (en) APP user data access control system and method based on attribute encryption
CN113411323B (en) Medical record data access control system and method based on attribute encryption
US20130198524A1 (en) Object with identity based encryption
Kaaniche et al. Cloudasec: A novel public-key based framework to handle data sharing security in clouds
Deng et al. Policy-based broadcast access authorization for flexible data sharing in clouds
Krzywiecki et al. Proof of possession for cloud storage via lagrangian interpolation techniques
JP6294882B2 (en) Key storage device, key storage method, and program thereof
CN116980130B (en) File sharing method, system and storage medium
CN116346318A (en) Data sharing method, sharing device, processor and system thereof
CN113206739B (en) Key generation method, device and storage medium for combined public key CPK
JP4080283B2 (en) Content distribution system
Salim et al. An efficient public auditing scheme for cloud storage with secure access control and resistance against DOS attack by iniquitous TPA
Sanchol et al. A mobile cloud-based access control with efficiently outsourced decryption
Parhi et al. Mp3: A more efficient private presence protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant