WO2017148316A1 - 文件加密方法、文件解密方法、电子设备和存储介质 - Google Patents

文件加密方法、文件解密方法、电子设备和存储介质 Download PDF

Info

Publication number
WO2017148316A1
WO2017148316A1 PCT/CN2017/074337 CN2017074337W WO2017148316A1 WO 2017148316 A1 WO2017148316 A1 WO 2017148316A1 CN 2017074337 W CN2017074337 W CN 2017074337W WO 2017148316 A1 WO2017148316 A1 WO 2017148316A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
segments
data
header
original file
Prior art date
Application number
PCT/CN2017/074337
Other languages
English (en)
French (fr)
Inventor
柯伟彬
赖志勇
甄德聪
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to MYPI2018703086A priority Critical patent/MY196191A/en
Publication of WO2017148316A1 publication Critical patent/WO2017148316A1/zh
Priority to US16/121,033 priority patent/US11238165B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • 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/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/60Digital content management, e.g. content distribution

Definitions

  • the present application relates to the field of data security technologies, and in particular, to a file encryption method, a file decryption method, an electronic device, and a storage medium.
  • files need to be encrypted to protect them from being illegally obtained.
  • the streaming media file is stored locally in the user terminal, it is required to be encrypted, and the third-party application cannot obtain the content of the streaming media file, which is beneficial to copyright protection.
  • the current main method of file encryption is to perform full-text binary encryption on the file.
  • the corresponding decryption method is to perform full-text binary decryption on the encrypted file.
  • the encryption and decryption process consumes a large amount of time for the central processing unit, and the encryption and decryption time is high cost.
  • a file encryption method a file decryption method, an electronic device, and a storage medium are provided.
  • a file encryption method including:
  • the header data includes the original file Metadata
  • a file decryption method includes:
  • the header encrypted data includes metadata of the original file
  • Each of the segments is spliced with the header data according to the order to obtain an original file.
  • An electronic device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor such that the processor performs the following steps:
  • the header data includes the original file Metadata
  • One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
  • FIG. 1 is a schematic diagram showing the internal structure of an electronic device in an embodiment
  • FIG. 2 is a schematic flow chart of a file encryption method in an embodiment
  • FIG. 3 is a schematic flowchart of a step of encrypting header data of an original file to obtain header encrypted data and storing the first storage path corresponding to the file identifier of the original file to record header encrypted data;
  • FIG. 4 is a schematic flow chart of a file encryption method in another embodiment
  • FIG. 5 is a schematic flowchart of a file decryption method in an embodiment
  • FIG. 6 is a structural block diagram of an electronic device in an embodiment
  • FIG. 7 is a structural block diagram of an electronic device in another embodiment
  • FIG. 8 is a structural block diagram of an electronic device in an embodiment
  • FIG. 9 is a block diagram showing the structure of an electronic device in another embodiment.
  • an electronic device including through a system bus Connected processor, non-volatile storage media, internal memory, network interface, and audio output interface.
  • the processor has a computing function and a function of controlling the operation of the electronic device, the processor being configured to perform a file encryption method and a file decryption method.
  • Non-volatile storage media include magnetic storage media, optical storage media, and flash storage media.
  • the non-volatile storage medium stores an operating system and also stores computer readable instructions for implementing a file encryption method and/or a file decryption method.
  • the internal memory is used to provide a cache for the operating system and computer readable instructions.
  • the network interface is used to connect to the network, and the audio output interface is used to output the audio data obtained by the processor processing as an audio signal.
  • a file encryption method is provided. This embodiment is exemplified by the method applied to the electronic device in FIG. 1 described above. The method specifically includes the following steps:
  • Step 202 Acquire an original file to be encrypted.
  • the original file refers to an original file that has not been encrypted, and the original file may be a media file, a picture, a compressed package file, a text file, or a rich text file.
  • Media files include streaming media files and local media files, such as video files or audio files.
  • the electronic device can download the original file to be encrypted through the network, and obtain the original file to be encrypted locally.
  • Step 204 Encrypt the header data of the original file to obtain the header encrypted data and store the first storage path of the header encrypted data corresponding to the file identifier of the original file; the header data includes the metadata of the original file.
  • the header data is a part of the data located in the header of the original file, and the size of the header data may be set as needed, for example, 100 KB (KB, kilobytes), and the header data is required to cover the metadata of the original file.
  • Metadata refers to data describing the data content of the original file. For example, if the original file is a video stream file, the metadata may include a video format, video time information, a code rate, a file size, and a director, an actor, and a production unit. Wait.
  • the electronic device can encrypt the header data by using various binary encryption algorithms to obtain corresponding header encrypted data.
  • the electronic device encrypts the header data, and specifically uses a binary encryption algorithm such as an AES (Advanced Encryption Standard) algorithm or a DES (Data Encryption Standard) algorithm.
  • AES Advanced Encryption Standard
  • DES Data Encryption Standard
  • the electronic device stores the header encrypted data obtained by the encryption, and is identified by the file identifier of the original file.
  • the storage path of the header encrypted data is recorded in the cited record. To distinguish the storage path from other storage paths described below, the storage path of the header encrypted data is referred to as the first storage path.
  • the file identifier of the original file may uniquely identify the corresponding original file, and may include one or a combination of numbers, letters, punctuation marks, and characters such as Chinese characters.
  • Step 206 Split the file data of the original file except the header data into a plurality of segments.
  • the electronic device may divide the file data of the original file except the header data into a plurality of segments according to a preset single segment size. For example, if the preset single segment size is 1M (megabytes), the electronic device can remove the header data from the original file, and then segment the pieces of the size 1M one by one from the remaining file data, and finally less than 1M.
  • the file data is the last fragment that was split.
  • the electronic device may equally or randomly divide the file data of the original file except the header data into a preset number of segments. Specifically, after the electronic device can remove the header data from the original file, the remaining file data is divided into a preset number of segments.
  • segmentation an equal division method may be adopted, that is, each segment segmented is equal in size; or a random segmentation method may be adopted, that is, a size of each segment in a preset number of segments is randomly allocated.
  • the number of segments that are segmented may be controlled according to an encryption level and/or a response time level. Specifically, if the encryption level is higher, the number of segments to be segmented should be more, and the file is more difficult to be cracked after being encrypted; The lower the level, the smaller the number of divided pieces can be. If the response time level is higher, that is, the response time is required to be short, the number of divisions should be reduced; if the response time level is lower, the number of segments to be segmented can be increased.
  • step 208 the segmented segments are stored in an ambiguous segment order.
  • the electronic device stores each of the divided segments independently, and confuses the segment order at the time of storage, so that the respective segments are stored and the order of the respective segments in the original file cannot be distinguished from the storage path.
  • step 208 includes assigning each segment a random new file name and storing each segment in a fragment file named with a corresponding new file name in a specified file directory or a randomly created file directory.
  • the electronic device can generate a plurality of different random strings equal to the number of segments, each will Each random string is assigned to one of a plurality of segments, such that each segment has a corresponding random string as a new file name.
  • the electronic device stores each clip as a separate file, which is called a clip file, and names the stored clip file as the assigned new file name.
  • the clip file can be stored in a specified directory, such as creating a folder with a random folder name, so that the segmented clip files are stored under the created folder.
  • the electronic device can also randomly create a new file directory for each fragment file, so that each fragment file is stored in the corresponding file directory, and the file directory of each fragment file can be different.
  • Step 210 Record a second storage path of each segment corresponding to the file identifier and an order of the respective segments in the original file.
  • the electronic device may generate a record in a private database that implements the application of the file encryption method in the embodiment of the present application, where the record may be an index of the file identifier of the original file, and store the first storage path in the record.
  • the private database can be stored locally or on the network. Access to the private database needs to be authenticated to ensure security.
  • the second storage path refers to the storage path of the stored segments.
  • the order of recording the segments may be in the order of the respective segment file names in the order of the segments in the original file, or each segment may be assigned a unique and confusing sequence of segment numbers, thereby recording the segment numbers in the order of the segments in the original file. order of.
  • the electronic device can also record the file check value of the original file, such as MD5 (Message Digest Algorithm MD5), which is used to verify the integrity of the original file according to the file check value after decrypting the original file. Sex.
  • MD5 Message
  • the electronic device may also perform format masquerading on the file generated during the implementation of the file encryption method, such as modifying the extension of the generated file to an extension of another file format.
  • the generated file includes the file where the header encrypted data is located and the file where each fragment is located.
  • the formatted file is required to be restored during decryption.
  • the file encryption method when the original file is encrypted, only the header data of the original file is encrypted, and the amount of data calculated by the encryption is small, and the file data other than the header data in the original file is divided into a plurality of segments and then passed.
  • the method of confusing the sequence of segments is stored, and the amount of calculation for segmentation and confusing segment storage is small.
  • the file encryption method can significantly reduce the consumption of the central processing unit, and the encryption time is low. Record the first storage path, the second storage path, and the fragment The order is such that the file can be decrypted after being encrypted.
  • the metadata is used to describe the data content in the original file
  • the encrypted header data covers the metadata of the original file, which can prevent the malicious user from using the metadata to locate the encrypted file and obtain the pieces that are sequentially stored by obscuring the fragments. Encryption crack.
  • step 204 specifically includes the following steps:
  • Step 302 Generate a random encryption key, and encrypt the header data of the original file according to the encryption key to obtain header encrypted data.
  • the electronic device may generate a random first hash value by using a random hash algorithm, and use the random first hash value as an encryption key, so that the electronic device may convert the plaintext header data according to the encryption key. Encrypt data for the ciphertext header. Generating a random encryption key can be avoided by third parties.
  • Step 304 creating a new file with a randomly generated file name, and storing the header encrypted data in a new file.
  • the electronic device may generate a random second hash value by using a random hash algorithm, create a new file by using the random second hash value as a file name, and store the encrypted header encrypted data in the new file.
  • the electronic device can also generate a random file name as a random seed at the current time. Creating a new file with a random file name to store header encrypted data can further avoid being targeted and cracked by a third party.
  • Step 306 the file identification corresponding to the original file records the encryption key and the first storage path of the new file.
  • the electronic device may store, in the private database, the encryption key and the first storage path of the new file in the record indexed by the file identifier of the original file, so as to locate the header encrypted data according to the first storage path when decrypting.
  • a random encryption key is generated to encrypt the header data, which can prevent the encryption key from being guessed by a third party; and then generate a random file name to store the header encrypted data, thereby preventing the header encrypted data from being blocked. It is easily obtained, which further ensures the security of the file after it is encrypted.
  • the original file is a streaming media file downloaded by the streaming media application; the first storage path, each of the second storage paths, and the sequence corresponding to the file identifier are recorded in a private database corresponding to the streaming media application.
  • a file encryption method specifically includes the following steps:
  • Step 402 Download the streaming media file to be encrypted by using the streaming media application.
  • the electronic device can connect to the streaming media server through the streaming media application, thereby downloading the streaming media file from the streaming media server as the streaming media file to be encrypted.
  • the streaming media application refers to an application that has the ability to process streaming media, such as a streaming media playback application or a streaming media editing application.
  • Step 404 Encrypt header data of the streaming media file to obtain header encrypted data and store the header data, and the header data includes metadata of the streaming media file.
  • the electronic device may generate a random encryption key, and encrypt the header data of the original file according to the encryption key to obtain header encrypted data.
  • the electronic device can create a new file with a randomly generated file name and store the header encrypted data in a new file.
  • Step 406 dividing the file data of the streaming media file except the header data into a plurality of segments.
  • the electronic device may divide the file data of the original file except the header data into multiple segments according to a preset single segment size, and the electronic device may equally or randomly divide the file data of the original file except the header data. A preset number of multiple segments.
  • step 408 the segmented segments are stored in an ambiguous segment order.
  • Step 410 Record a first storage path of the header encrypted data, a second storage path of each segment, and an order of the respective segments in the streaming media file corresponding to the file identifier of the streaming media file.
  • the electronic device may create a record indexed by the file identifier in the private database corresponding to the streaming media application, where the encryption key, the first storage path, the second storage path, and each fragment in the streaming media file are stored in the record. The order in .
  • step 412 the streaming media file is deleted.
  • the electronic device deletes the streaming media file.
  • the electronic device can play the streaming media file after downloading the streaming media file, and perform the above steps 402 to 410, and delete the downloaded streaming media file after the playback is completed.
  • the file encryption method in the embodiment of the present application can improve the encryption efficiency while ensuring the encryption performance, and further improve the efficiency of processing the streaming media file.
  • a file decryption method is provided. This embodiment is exemplified by the method applied to the electronic device in FIG. 1 described above. The method specifically includes the following steps:
  • Step 502 Read a first storage path for storing header encrypted data corresponding to the file identifier to be decrypted.
  • the electronic device may implement the file decryption method of the embodiment to restore the original file when the original file needs to be used.
  • the electronic device specifically obtains the file identifier to be decrypted, searches for the record indexed by the file identifier from the private database of the application, and reads the first storage path and the encryption key from the found record.
  • the first storage path is a path for storing header encrypted data.
  • Step 504 Acquire header encryption data according to the first storage path.
  • the electronic device searches for a file in the corresponding file directory according to the first storage path, and further reads the header encrypted data from the found file.
  • Step 506 decrypting the header encrypted data to obtain header data; the header data includes metadata of the original file.
  • the electronic device can decrypt the header data from the header encrypted data according to the read encryption key.
  • a binary decryption algorithm may be used for decryption, and a binary decryption algorithm such as AES algorithm or DES algorithm may be used.
  • Step 508 Read the second storage path of each segment sequentially stored by the obfuscated segment corresponding to the file identifier and the order of each segment in the original file.
  • the electronic device when encrypting the original file, divides the file data of the original file except the header data into a plurality of segments, and stores the segmented segments in an ambiguous segment order, so that the segments are not stored after being stored.
  • the order of each segment in the original file is discriminated from the storage path, and the order of the second storage path and each segment in the original file is recorded and read at the time of decryption.
  • Step 510 Acquire each segment according to the second storage path.
  • the electronic device searches for a file in the corresponding file directory according to the read second storage path, and acquires each segment segmented from the original file in the found file.
  • each segment is spliced with the header data according to the order to obtain the original file.
  • the electronic device creates a temporary file, writes the header data in the temporary file, and writes each segment into the temporary file in order after the header data, thereby splicing the header data and each segment to obtain a complete Original file.
  • the electronic device may further read the file check value of the original file stored corresponding to the file identifier, so as to perform verification according to the read file check value, and if the check is passed, the decryption is completed; If it fails, it will issue a decryption error message.
  • the file check value of the original file obtained by the splicing can be calculated, and the calculated file check value is compared with the read file check value. If they are consistent, the check is passed, and if they are inconsistent, the check is performed. Did not pass.
  • the above file decryption method uses the first storage path of the record to locate the header encrypted data and decrypts it to obtain the header data, locates and acquires each segment by using the second storage path of the record, and then uses the recorded sequence to record the header data. Splicing with each segment to obtain the original file.
  • decrypting only the header encrypted data needs to be decrypted and calculated. The amount of decrypted data is small, and the time cost of fragment splicing is small.
  • the decryption method can significantly reduce the central processing unit. Consumption, the cost of decryption time is low.
  • the metadata is used to describe the data content in the original file
  • the encrypted header data covers the metadata of the original file, which can prevent the malicious user from using the metadata to locate the encrypted file and obtain the pieces that are sequentially stored by obscuring the fragments. Encryption crack.
  • the original file is a streaming media file; the first storage path, the second storage path, and the private database corresponding to the self-streaming media application are sequentially read.
  • the method further includes: playing the original file, and clearing the original file after the playing is completed.
  • the electronic device may decrypt according to the corresponding file identifier to obtain a streaming media file, and play the streaming media file.
  • the streaming media file is a temporary file, and the streaming media file is cleared after playing, and if it needs to be played again, the decrypted playback is performed again.
  • the file decryption method is applied to the decryption of the streaming media file, which can improve the decryption efficiency while ensuring the encryption performance, and perform the instant decryption when the streaming media file needs to be played, without affecting the first time of playing the streaming media file.
  • Response time and playback fluency can not only protect the streaming media files, but also greatly reduce the extra performance consumption caused by encryption and decryption, taking into account the security and performance, while protecting the rights of the copyright party and the user experience.
  • an electronic device 600 including:
  • the original file obtaining module 601 is configured to obtain an original file to be encrypted.
  • the header data encryption module 602 is configured to encrypt the header data of the original file to obtain header encryption data and store the header data, and the header data includes metadata of the original file.
  • the segmentation module 603 is configured to divide the file data of the original file except the header data into a plurality of segments.
  • the confusing segment sequence storage module 604 is configured to store the segmented segments in a confusing segment order.
  • the recording module 605 is configured to record a first storage path of the header encrypted data corresponding to the file identifier of the original file.
  • the second storage path of each segment is recorded corresponding to the file identification and the order of the respective segments in the original file.
  • the electronic device 600 When encrypting the original file, the electronic device 600 encrypts only the header data of the original file, and the amount of data calculated by the encryption is small, and the file data other than the header data in the original file is divided into a plurality of segments and then passed. The method of confusing the sequence of segments is stored, and the amount of calculation for segmentation and confusing segment storage is small. Compared with the current encryption method of full-text binary encryption, the consumption of the central processor can be significantly reduced by the electronic device, and the encryption time is low. Recording the order of the first storage path, the second storage path, and the fragments allows the file to be decrypted after being encrypted.
  • the metadata is used to describe the data content in the original file
  • the encrypted header data covers the metadata of the original file, which can prevent the malicious user from using the metadata to locate the encrypted file and obtain the pieces that are sequentially stored by obscuring the fragments. Encryption crack.
  • the header data encryption module 602 is specifically configured to generate a random encryption key, encrypt the header data of the original file according to the encryption key to obtain header encrypted data, and create a new file name with a randomly generated file name. File and store header encrypted data in a new file.
  • the recording module 605 is further configured to record an encryption key corresponding to the file identifier of the original file and a first storage path of the new file.
  • a random encryption key is generated to encrypt the header data, which can prevent the encryption key from being guessed by a third party; and then generate a random file name to store the header encrypted data, thereby preventing the header encrypted data from being blocked. It is easily obtained, which further ensures the security of the file after it is encrypted.
  • the segmentation module 603 is specifically configured to divide the file data of the original file except the header data into a plurality of segments according to a preset single segment size.
  • the segmentation module 603 is specifically configured to divide the file data of the original file except the header data into equal or random segments into a preset number of segments.
  • the obfuscated segment order storage module 604 is specifically configured to allocate a random new file name for each segment, and store each segment in a specified file directory or a randomly created file directory. In the clip file named with the corresponding new file name.
  • the original file is a streaming media file downloaded by the streaming media application; the first storage path, each of the second storage paths, and the sequence corresponding to the file identifier are recorded in a private database corresponding to the streaming media application.
  • the electronic device 600 further includes a file deletion module 606 for deleting the streaming media file.
  • the file encryption method in the embodiment of the present application can improve the encryption efficiency while ensuring the encryption performance, and further improve the efficiency of processing the streaming media file.
  • an electronic device 800 including a first reading module 801, a header encrypted data obtaining module 802, a header encrypted data decrypting module 803, and a second reading module 804. a segment acquisition module 805 and a file splicing module 806.
  • the first reading module 801 is configured to read a first storage path for storing header encrypted data corresponding to the file identifier to be decrypted.
  • the header encryption data obtaining module 802 is configured to acquire header encryption data according to the first storage path.
  • the header encrypted data decryption module 803 is configured to decrypt the header encrypted data to obtain header data; the header data includes metadata of the original file.
  • the second reading module 804 is configured to read a second storage path of each segment sequentially stored by the obfuscated segments corresponding to the file identifier, and an order of the respective segments in the original file.
  • the segment obtaining module 805 is configured to acquire each segment according to the second storage path.
  • the file splicing module 806 is configured to splicing each segment with the header data according to the order to obtain the original file.
  • the electronic device 800 obtains the header data by using the recorded first storage path to locate the header encrypted data and decrypting the data, and locates and acquires each segment by using the recorded second storage path, and then uses the recorded sequence to record the header data. Splicing with each segment to obtain the original file.
  • decrypting only the header encrypted data needs to be decrypted and calculated. The amount of data decrypted and calculated is small, and the time cost of fragment splicing is small. Compared with the current decryption mode of full-text binary decryption, the electronic device can significantly reduce the central processing unit. Consumption, decryption time cost is low.
  • the metadata is used to describe the data content in the original file
  • the encrypted header data covers the metadata of the original file, which can prevent the malicious user from using the metadata to locate the encrypted file and obtain the pieces that are sequentially stored by obscuring the fragments. Encryption crack.
  • the original file is a streaming media file; the first storage path, the second storage path, and the private database corresponding to the self-streaming media application are sequentially read.
  • the electronic device 800 further includes a play module 807 and a file clearing module 808.
  • the playing module 807 is configured to play the original file.
  • the file clearing module 808 is configured to clear the original file after the original file is played.
  • the file decryption method is applied to the decryption of the streaming media file, which can improve the decryption efficiency while ensuring the encryption performance, and perform the instant decryption when the streaming media file needs to be played, without affecting the first time of playing the streaming media file.
  • Response time and playback fluency can not only protect the streaming media files, but also greatly reduce the extra performance consumption caused by encryption and decryption, taking into account the security and performance, while protecting the rights of the copyright party and the user experience.
  • an electronic device comprising a memory and a processor, the memory storing computer readable instructions that, when executed by the processor, cause the processor to execute The following steps: obtaining an original file to be encrypted; encrypting header data of the original file to obtain header encryption data, and storing, corresponding to the file identifier of the original file, recording a first storage path of the header encrypted data;
  • the header data includes metadata of the original file; the file data of the original file except the header data is divided into a plurality of segments; and each of the segmented segments is stored in an ambiguous segment order; And a second storage path corresponding to each of the segments corresponding to the file identifier and an order of each of the segments in the original file.
  • the header data of the original file is encrypted to obtain header encrypted data and stored, and the first storage path of the header encrypted data is recorded corresponding to the file identifier of the original file, including: Generating a random encryption key, encrypting header data of the original file according to the encryption key to obtain header encrypted data; creating a new file with a randomly generated file name, and storing the header encrypted data And in the new file; and a file identifier corresponding to the original file records the encryption key and a first storage path of the new file.
  • the dividing the file data of the original file except the header data into a plurality of segments comprises: dividing the original file by the header data according to a preset single segment size.
  • the file data is divided into a plurality of segments; or the file data of the original file except the header data is equally or randomly divided into a preset number of segments.
  • each of the segments is stored in an ambiguous segment sequence, including: assigning each of the segments a random new file name, and in a specified file directory or a randomly created file directory.
  • Each of the segments is stored in a fragment file named with a corresponding new file name.
  • the original file is a streaming media file downloaded by the streaming media application; the first storage path, each of the second storage paths, and the order corresponding to the file identifier are recorded in the stream a media application corresponding to a private database; the computer readable instructions being executed by the processor, further causing the processor to perform the second storage path corresponding to each of the segments of the file identification record and each After the sequence of the fragments in the original file, the streaming media file is deleted.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the step of: reading a first one for storing header encrypted data corresponding to the file identifier to be decrypted a storage path; acquiring the header encrypted data according to the first storage path; decrypting the header encrypted data to obtain header data; the header data includes metadata of an original file; and reading and identifying the file identifier a second storage path of each segment sequentially stored by the corresponding obfuscated segment and an order of each of the segments in the original file; acquiring each of the segments according to the second storage path; and respectively, each of the segments and the The header data is spliced to obtain the original file.
  • the original file is a streaming media file
  • the first storage path, the second storage path, and the sequential reading are from a private database corresponding to the streaming application
  • the computer readable instructions are
  • the processor executes, the processor further causes the processor to splicing each of the segments and the header data according to the sequence to obtain the original file, and then play the original file, and after the playback is completed, Clear the original file.
  • the file encryption method can significantly reduce the consumption of the central processing unit, and the encryption time cost is low. Recording the order of the first storage path, the second storage path, and the fragments allows the file to be decrypted after being encrypted.
  • the metadata is used to describe the data content in the original file, and the encrypted header data covers the metadata of the original file, which prevents malicious users from using metadata to locate the encryption.
  • the file is encrypted and cracked by the pieces stored in the order of the confusing pieces.
  • one or more computer readable non-volatile storage media storing computer readable instructions are provided, the computer readable instructions being executed by one or more processors such that the one or The plurality of processors perform the following steps: acquiring an original file to be encrypted; encrypting header data of the original file to obtain header encrypted data and storing, and recording the header encrypted data corresponding to the file identifier of the original file a first storage path; the header data includes metadata of the original file; dividing file data of the original file except the header data into a plurality of segments; confusing each of the segmented segments And storing a segment sequence; and a second storage path corresponding to each of the segments corresponding to the file identifier and an order of each of the segments in the original file.
  • the header data of the original file is encrypted to obtain header encrypted data and stored, and the first storage path of the header encrypted data is recorded corresponding to the file identifier of the original file, including: Generating a random encryption key, encrypting header data of the original file according to the encryption key to obtain header encrypted data; creating a new file with a randomly generated file name, and storing the header encrypted data And in the new file; and a file identifier corresponding to the original file records the encryption key and a first storage path of the new file.
  • the dividing the file data of the original file except the header data into a plurality of segments comprises: dividing the original file by the header data according to a preset single segment size.
  • the file data is divided into a plurality of segments; or the file data of the original file except the header data is equally or randomly divided into a preset number of segments.
  • each of the segments is stored in an ambiguous segment sequence, including: assigning each of the segments a random new file name, and in a specified file directory or a randomly created file directory.
  • Each of the segments is stored in a fragment file named with a corresponding new file name.
  • the original file is a streaming media file downloaded by the streaming media application; the first storage path, each of the second storage paths, and the order corresponding to the file identifier are recorded in the stream a media application corresponding to a private database; the computer readable instructions being executed by the processor, further causing the processor to perform the second storage path corresponding to each of the segments of the file identification record and each After the sequence of the fragments in the original file, the streaming media file is deleted.
  • the processor when the computer readable instructions are executed by the processor, the processor further causes the processor to perform the step of: reading a first one for storing header encrypted data corresponding to the file identifier to be decrypted a storage path; acquiring the header encrypted data according to the first storage path; decrypting the header encrypted data to obtain header data; the header data includes metadata of an original file; and reading and identifying the file identifier a second storage path of each segment sequentially stored by the corresponding obfuscated segment and an order of each of the segments in the original file; acquiring each of the segments according to the second storage path; and respectively, each of the segments and the The header data is spliced to obtain the original file.
  • the computer readable non-volatile storage medium encrypts only the header data of the original file when encrypting the original file, and the amount of data calculated by the encryption is small, and the file data other than the header data in the original file is divided. After multiple segments are stored by obscuring the sequence of segments, the amount of computation for segmentation and confusing segment storage is small. Compared with the current encryption method for full-text binary encryption, the file encryption method can significantly reduce the consumption of the central processor. The encryption time is low. Recording the order of the first storage path, the second storage path, and the fragments allows the file to be decrypted after being encrypted.
  • the metadata is used to describe the data content in the original file
  • the encrypted header data covers the metadata of the original file, which can prevent the malicious user from using the metadata to locate the encrypted file and obtain the pieces that are sequentially stored by obscuring the fragments. Encryption crack.
  • the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

一种文件加密方法,包括:获取待加密的原文件;对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;将所述原文件中除所述头部数据的文件数据分割为多个片段;将分割出的各个所述片段进行混淆片段顺序的存储;对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。

Description

文件加密方法、文件解密方法、电子设备和存储介质
本申请要求于2016年3月3日提交中国专利局,申请号为201610126406.3,发明名称为“文件加密方法和装置、文件解密方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据安全技术领域,特别是涉及一种文件加密方法、文件解密方法、电子设备和存储介质。
背景技术
在一些应用场景中,需要对文件进行加密保护,以避免文件内容被非法获取。比如流媒体文件存储在用户终端本地时,被要求进行加密处理,第三方应用程序就无法获取到流媒体文件的内容,有利于版权保护。
然而,目前文件加密主要采用的方式是对文件进行全文二进制加密,相应的解密方式时则是对加密文件进行全文二进制解密,加密和解密过程对中央处理器消耗都非常大,加密和解密的时间成本高。
发明内容
根据本申请的各种实施例,提供一种文件加密方法、文件解密方法、电子设备和存储介质。
一种文件加密方法,包括:
获取待加密的原文件;
对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;
将所述原文件中除所述头部数据的文件数据分割为多个片段;
将分割出的各个所述片段进行混淆片段顺序的存储;及
对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
一种文件解密方法,包括:
读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;
根据所述第一存储路径获取所述头部加密数据;
解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;
读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;
根据所述第二存储路径获取各个所述片段;及
根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
一种电子设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
获取待加密的原文件;
对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;
将所述原文件中除所述头部数据的文件数据分割为多个片段;
将分割出的各个所述片段进行混淆片段顺序的存储;及
对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取待加密的原文件;
对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述 原文件的元数据;
将所述原文件中除所述头部数据的文件数据分割为多个片段;
将分割出的各个所述片段进行混淆片段顺序的存储;及
对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为一个实施例中电子设备的内部结构示意图;
图2为一个实施例中文件加密方法的流程示意图;
图3为一个实施例中对原文件的头部数据加密获得头部加密数据并存储,对应于原文件的文件标识记录头部加密数据的第一存储路径的步骤的流程示意图;
图4为另一个实施例中文件加密方法的流程示意图;
图5为一个实施例中文件解密方法的流程示意图;
图6为一个实施例中电子设备的结构框图;
图7为另一个实施例中电子设备的结构框图;
图8为一个实施例中电子设备的结构框图;
图9为另一个实施例中电子设备的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
如图1所示,在一个实施例中,提供了一种电子设备,包括通过系统总线 连接的处理器、非易失性存储介质、内存储器、网络接口和音频输出接口。其中处理器具有计算功能和控制电子设备工作的功能,该处理器被配置为执行一种文件加密方法和文件解密方法。非易失性存储介质包括磁存储介质、光存储介质以及闪存式存储介质。非易失性存储介质存储有操作系统,还存储有计算机可读指令,该计算机可读指令用于实现一种文件加密方法和/或一种文件解密方法。内存储器用于为操作系统和计算机可读指令提供高速缓存。网络接口用于连接到网络,音频输出接口用于将处理器处理获得的音频数据输出为音频信号。
如图2所示,在一个实施例中,提供了一种文件加密方法,本实施例以该方法应用于上述图1中的电子设备来举例说明。该方法具体包括如下步骤:
步骤202,获取待加密的原文件。
其中,原文件是指未经过加密的原始文件,原文件具体可以是媒体文件、图片、压缩包文件、文本文件或者富文本文件等。媒体文件包括流媒体文件和本地媒体文件,媒体文件具体比如视频文件或者音频文件等。电子设备具体可通过网络下载待加密的原文件,还可以从本地获取待加密的原文件。
步骤204,对原文件的头部数据加密获得头部加密数据并存储,对应于原文件的文件标识记录头部加密数据的第一存储路径;头部数据包括原文件的元数据。
其中,头部数据是位于原文件头部的一部分数据,可根据需要设置头部数据的大小,比如可取100KB(KB,千字节),且要求头部数据覆盖到原文件的元数据。元数据(metadata)是指描述该原文件的数据内容的数据,比如若原文件为视频流文件,则元数据可包括视频格式、视频时间信息、码率、文件大小、及导演、演员以及制作单位等。
电子设备可采用各种二进制加密算法对头部数据进行加密,获得相应的头部加密数据。电子设备加密头部数据,具体可采用AES(Advanced Encryption Standard,即高级加密标准)算法或者DES(Data Encryption Standard,即数据加密标准)算法等二进制加密算法。
电子设备存储加密所获得的头部加密数据,并在以原文件的文件标识为索 引的记录中记录该头部加密数据的存储路径。为将该存储路径与下述的其它存储路径相区分,称头部加密数据的存储路径为第一存储路径。原文件的文件标识可唯一标识出相应的原文件,可以包括数字、字母、标点符号以及汉字等字符中的一种或几种的组合。
步骤206,将原文件中除头部数据的文件数据分割为多个片段。
具体地,在一个实施例中,电子设备可按照预设的单个片段大小将原文件中除头部数据的文件数据分割为多个片段。比如预设的单个片段大小为1M(兆字节),则电子设备可从原文件中除去头部数据之后,再从剩余的文件数据逐个地分割出一个个大小为1M的片段,最后不足1M的文件数据则是分割出的最后一个片段。
在一个实施例中,电子设备可将原文件中除头部数据的文件数据等量或随机分割为预设数量的多个片段。具体地,电子设备可从原文件中除去头部数据之后,再将剩余的文件数据分割为预设数量的片段。分割时可采用等量分割方式,即分割出的每个片段的大小相等;也可以采用随机分割方式,即随机地分配预设数量的片段中每个片段的大小。
其中,分割出的片段的数量可根据加密等级和/或响应时间等级进行控制,具体若加密等级越高,则分割出的片段的数量应当更多,文件被加密后更难被破解;若加密等级越低,则分割出的片的数量可以减少。若响应时间等级越高,即要求响应时间短,则分割出的数量应当减少;若响应时间等级越低,则可增加分割出的片段的数量。
步骤208,将分割出的各个片段进行混淆片段顺序的存储。
具体地,电子设备将分割出的每个片段独立地存储,并且在存储时混淆片段顺序,从而使得各个片段被存储后无法从存储路径分辨出各个片段在原文件中的顺序。
在一个实施例中,步骤208包括:为每个片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个片段存储在以相应的新文件名命名的片段文件中。
具体地,电子设备可生成与片段数量相等的多个不同的随机字符串,将每 个随机字符串分别分配给多个片段中的其中一个,使得每个片段具有相应的随机字符串作为新文件名。电子设备将每个片段作为独立的文件进行存储,该文件称之为片段文件,并将存储的片段文件命名为分配的新文件名。
其中片段文件可存储在指定目录下,比如创建一个具有随机文件夹名称的文件夹,从而将分割出的片段文件均存储在该创建的文件夹下。电子设备也可以随机为每个片段文件创建新的文件目录,从而将每个片段文件存储在相应的文件目录下,每个片段文件的文件目录可以均不相同。
步骤210,对应于文件标识记录各个片段的第二存储路径以及各个片段在原文件中的顺序。
具体地,电子设备可在实施本申请实施例的文件加密方法的应用的私有数据库中生成一条记录,该条记录可以原文件的文件标识为索引,在该条记录中存储第一存储路径、第二存储路径以及各个片段在原文件中的顺序。其中私有数据库可存储于本地或者网络中,私有数据库的访问需要经过身份验证,可保证安全性。第二存储路径是指存储的片段的存储路径。记录片段的顺序具体可按照各片段在原文件中的顺序记录相应片段文件名的顺序,也可以为每个片段分配唯一且混淆顺序的片段序号,从而按照各片段在原文件中的顺序记录各片段序号的顺序。电子设备还可以记录原文件的文件校验值,比如MD5(Message Digest Algorithm MD5,即消息摘要算法第五版)值,用以在解密获得原文件后根据文件校验值校验原文件的完整性。
在一个实施例中,电子设备还可以将在实施上述文件加密方法过程中生成的文件进行格式伪装,比如将生成的文件的扩展名修改为另一种文件格式的扩展名。生成的文件包括头部加密数据所在的文件和各片段所在的文件。在解密时需要将经过格式伪装的文件进行格式还原。
上述文件加密方法,在对原文件进行加密时,仅加密原文件的头部数据,加密计算的数据量小,而原文件中除头部数据之外的文件数据则分割成多个片段后通过混淆片段顺序的方式进行存储,分割和混淆片段顺序存储的计算量小,相较于目前全文二进制加密的加密方式,通过该文件加密方法可显著减少对中央处理器的消耗,加密时间成本低。记录第一存储路径、第二存储路径和片段 的顺序则使得文件被加密后可被解密。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
如图3所示,在一个实施例中,步骤204具体包括以下步骤:
步骤302,生成随机的加密密钥,根据加密密钥对原文件的头部数据进行加密获得头部加密数据。
具体地,电子设备可采用随机哈希算法生成随机的第一哈希值,将该随机的第一哈希值作为加密密钥,进而电子设备可根据该加密密钥将明文的头部数据转化为密文的头部加密数据。生成随机的加密密钥可尽量避免被第三方猜解。
步骤304,创建具有随机生成的文件名的新文件,并将头部加密数据存储在新文件中。
具体地,电子设备可采用随机哈希算法生成随机的第二哈希值,将该随机的第二哈希值作为文件名创建新文件,进而将加密获得的头部加密数据存储在该新文件中。电子设备也可以当前时间作为随机种子来生成随机的文件名。创建具有随机文件名的新文件来存储头部加密数据,可进一步避免被第三方定位和破解。
步骤306,对应于原文件的文件标识记录加密密钥以及新文件的第一存储路径。
具体地,电子设备可在私有数据库中以原文件的文件标识为索引的记录中存储加密密钥以及新文件的第一存储路径,以便在解密时根据第一存储路径定位到头部加密数据所在的文件,并根据加密密钥对头部加密数据进行解密。
本实施例中,生成随机的加密密钥来对头部数据进行加密,可避免加密密钥被第三方猜解;进而生成随机的文件名来存储头部加密数据,可防止头部加密数据被轻易获取到,从而进一步保障文件被加密后的安全性。
在一个实施例中,原文件为流媒体应用所下载的流媒体文件;第一存储路径、各个第二存储路径以及顺序对应于文件标识记录在流媒体应用对应的私有数据库中。
如图4所示,在一个实施例中,一种文件加密方法,具体包括如下步骤:
步骤402,通过流媒体应用下载待加密的流媒体文件。
具体地,电子设备可通过流媒体应用连接到流媒体服务器,从而从流媒体服务器下载流媒体文件作为待加密的流媒体文件。其中流媒体应用是指具有处理流媒体能力的应用,比如流媒体播放应用或者流媒体编辑应用等。
步骤404,对流媒体文件的头部数据加密获得头部加密数据并存储;头部数据包括流媒体文件的元数据。
具体地,电子设备可生成随机的加密密钥,根据加密密钥对原文件的头部数据进行加密获得头部加密数据。电子设备可创建具有随机生成的文件名的新文件,并将头部加密数据存储在新文件中。
步骤406,将流媒体文件中除头部数据的文件数据分割为多个片段。
具体地,电子设备可按照预设的单个片段大小将原文件中除头部数据的文件数据分割为多个片段,电子设备也可以将原文件中除头部数据的文件数据等量或随机分割为预设数量的多个片段。
步骤408,将分割出的各个片段进行混淆片段顺序的存储。
步骤410,对应于流媒体文件的文件标识记录头部加密数据的第一存储路径、各个片段的第二存储路径以及各个片段在流媒体文件中的顺序。
具体地,电子设备可在流媒体应用对应的私有数据库中创建一条以文件标识为索引的记录,在该记录中存储加密密钥、第一存储路径、第二存储路径以及各片段在流媒体文件中的顺序。
步骤412,删除流媒体文件。
具体地,电子设备在完成对流媒体文件的加密后,删除流媒体文件。在一个实施例中,电子设备可在下载流媒体文件后播放流媒体文件,同时执行上述步骤402至步骤410,并在播放完毕后删除下载的流媒体文件。
本实施例中,针对流媒体文件版权保护的需求,采用本申请实施例的文件加密方法可在保证加密性能的同时提高加密效率,进而提高对流媒体文件进行处理的效率。
如图5所示,在一个实施例中,提供了一种文件解密方法,本实施例以该方法应用于上述图1中的电子设备来举例说明。该方法具体包括如下步骤:
步骤502,读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径。
具体地,电子设备可在实施上述文件加密方法后,再在需要使用原文件时实施本实施例的文件解密方法来还原出原文件。电子设备具体可获取待解密的文件标识,从应用的私有数据库中查找以该文件标识为索引的记录,并从查找到的记录中读取第一存储路径和加密密钥。第一存储路径是存储头部加密数据的路径。
步骤504,根据第一存储路径获取头部加密数据。
具体地,电子设备根据第一存储路径查找到相应文件目录下的文件,进而从查找到的文件中读取头部加密数据。
步骤506,解密头部加密数据,获得头部数据;头部数据包括原文件的元数据。
具体地,电子设备可根据读取的加密密钥从头部加密数据中解密出头部数据。解密时可采用二进制解密算法进行解密,具体可采用AES算法或者DES算法等二进制解密算法。
步骤508,读取与文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个片段在原文件中的顺序。
具体地,电子设备在加密原文件时,将原文件中除头部数据的文件数据分割为多个片段,并将分割出的各个片段进行混淆片段顺序的存储,从而使得各个片段被存储后无法从存储路径分辨出各个片段在原文件中的顺序,并将第二存储路径和各个片段在原文件中的顺序记录下来,在解密时读取。
步骤510,根据第二存储路径获取各个片段。
具体地,电子设备根据读取的第二存储路径查找到相应文件目录下的文件,并在查找到的文件中获取从原文件中分割出的各个片段。
步骤512,根据顺序将各个片段与头部数据拼接,获得原文件。
具体地,电子设备创建一个临时文件,在该临时文件中写入头部数据,并在头部数据之后按照顺序将各个片段写入临时文件,从而将头部数据和各个片段拼接,获得完整的原文件。
在一个实施例中,电子设备还可以读取与文件标识对应存储的原文件的文件校验值,从而根据读取的文件校验值进行校验,若校验通过则完成解密;若校验未通过则发出解密出错提示信息。具体在校验时可计算拼接获得的原文件的文件校验值,并将计算出的文件校验值与读取的文件校验值进行比较,若一致则校验通过,若不一致则校验未通过。
上述文件解密方法,利用记录的第一存储路径定位到头部加密数据并进行解密而获得头部数据,利用记录的第二存储路径定位并获取到各个片段,进而利用记录的顺序将头部数据和各片段进行拼接,获得原文件。解密时仅需对头部加密数据进行解密计算,解密计算的数据量小,片段拼接的时间成本少,相较于目前全文二进制解密的解密方式,通过该文件解密方法可显著减少对中央处理器的消耗,解密时间成本低。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
在一个实施例中,原文件为流媒体文件;第一存储路径、第二存储路径以及顺序读取自流媒体应用对应的私有数据库。步骤512之后,还包括:播放原文件,并在播放完毕后清除原文件。
具体地,电子设备可在需要播放流媒体文件时,根据相应的文件标识进行解密获得流媒体文件,并播放该流媒体文件。该流媒体文件为临时文件,在播放完毕后该流媒体文件被清除,若需要再次播放则重新进行解密播放。
本实施例中,将文件解密方法应用于流媒体文件的解密,可在保证加密性能的同时提高解密效率,在需要播放流媒体文件时进行即时地解密,不会影响到播放流媒体文件的初次响应时间和播放流畅度,既能起到保护流媒体文件的效果,又大大减少了加密解密带来的额外性能消耗,兼顾了安全性和性能,同时保障了版权方的权益和用户的体验。
如图6所示,在一个实施例中,提供了一种电子设备600,包括:
原文件获取模块601,用于获取待加密的原文件。
头部数据加密模块602,用于对原文件的头部数据加密获得头部加密数据并存储;头部数据包括原文件的元数据。
分割模块603,用于将原文件中除头部数据的文件数据分割为多个片段。
混淆片段顺序存储模块604,用于将分割出的各个片段进行混淆片段顺序的存储。
记录模块605,用于对应于原文件的文件标识记录头部加密数据的第一存储路径。对应于文件标识记录各个片段的第二存储路径以及各个片段在原文件中的顺序。
上述电子设备600,在对原文件进行加密时,仅加密原文件的头部数据,加密计算的数据量小,而原文件中除头部数据之外的文件数据则分割成多个片段后通过混淆片段顺序的方式进行存储,分割和混淆片段顺序存储的计算量小,相较于目前全文二进制加密的加密方式,通过该电子设备可显著减少对中央处理器的消耗,加密时间成本低。记录第一存储路径、第二存储路径和片段的顺序则使得文件被加密后可被解密。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
在一个实施例中,头部数据加密模块602具体用于生成随机的加密密钥,根据加密密钥对原文件的头部数据进行加密获得头部加密数据;创建具有随机生成的文件名的新文件,并将头部加密数据存储在新文件中。
记录模块605还用于对应于原文件的文件标识记录加密密钥以及新文件的第一存储路径。
本实施例中,生成随机的加密密钥来对头部数据进行加密,可避免加密密钥被第三方猜解;进而生成随机的文件名来存储头部加密数据,可防止头部加密数据被轻易获取到,从而进一步保障文件被加密后的安全性。
在一个实施例中,分割模块603具体用于按照预设的单个片段大小将原文件中除头部数据的文件数据分割为多个片段。
在一个实施例中,分割模块603具体用于将原文件中除头部数据的文件数据等量或随机分割为预设数量的多个片段。
在一个实施例中,混淆片段顺序存储模块604具体用于为每个片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个片段存储 在以相应的新文件名命名的片段文件中。
在一个实施例中,原文件为流媒体应用所下载的流媒体文件;第一存储路径、各个第二存储路径以及顺序对应于文件标识记录在流媒体应用对应的私有数据库中。如图7所示,电子设备600还包括文件删除模块606,用于删除流媒体文件。
本实施例中,针对流媒体文件版权保护的需求,采用本申请实施例的文件加密方法可在保证加密性能的同时提高加密效率,进而提高对流媒体文件进行处理的效率。
如图8所示,在一个实施例中,提供了一种电子设备800,包括第一读取模块801、头部加密数据获取模块802、头部加密数据解密模块803、第二读取模块804、片段获取模块805和文件拼接模块806。
第一读取模块801,用于读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径。
头部加密数据获取模块802,用于根据第一存储路径获取头部加密数据。
头部加密数据解密模块803,用于解密头部加密数据,获得头部数据;头部数据包括原文件的元数据。
第二读取模块804,用于读取与文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个片段在原文件中的顺序。
片段获取模块805,用于根据第二存储路径获取各个片段。
文件拼接模块806,用于根据顺序将各个片段与头部数据拼接,获得原文件。
上述电子设备800,利用记录的第一存储路径定位到头部加密数据并进行解密而获得头部数据,利用记录的第二存储路径定位并获取到各个片段,进而利用记录的顺序将头部数据和各片段进行拼接,获得原文件。解密时仅需对头部加密数据进行解密计算,解密计算的数据量小,片段拼接的时间成本少,相较于目前全文二进制解密的解密方式,通过该电子设备可显著减少对中央处理器的消耗,解密时间成本低。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
在一个实施例中,原文件为流媒体文件;第一存储路径、第二存储路径以及顺序读取自流媒体应用对应的私有数据库。如图9所示,电子设备800还包括:播放模块807和文件清除模块808。
播放模块807,用于播放原文件。
文件清除模块808,用于在播放原文件完毕后清除原文件。
本实施例中,将文件解密方法应用于流媒体文件的解密,可在保证加密性能的同时提高解密效率,在需要播放流媒体文件时进行即时地解密,不会影响到播放流媒体文件的初次响应时间和播放流畅度,既能起到保护流媒体文件的效果,又大大减少了加密解密带来的额外性能消耗,兼顾了安全性和性能,同时保障了版权方的权益和用户的体验。
在一个实施例中,提供了一种电子设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:获取待加密的原文件;对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;将所述原文件中除所述头部数据的文件数据分割为多个片段;将分割出的各个所述片段进行混淆片段顺序的存储;及对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
在一个实施例中,所述对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径,包括:生成随机的加密密钥,根据所述加密密钥对所述原文件的头部数据进行加密获得头部加密数据;创建具有随机生成的文件名的新文件,并将所述头部加密数据存储在所述新文件中;及对应于所述原文件的文件标识记录所述加密密钥以及所述新文件的第一存储路径。
在一个实施例中,所述将所述原文件中除所述头部数据的文件数据分割为多个片段,包括:按照预设的单个片段大小将所述原文件中除所述头部数据的文件数据分割为多个片段;或者,将所述原文件中除所述头部数据的文件数据等量或随机分割为预设数量的多个片段。
在一个实施例中,所述将分割出的各个所述片段进行混淆片段顺序的存储,包括:为每个所述片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个所述片段存储在以相应的新文件名命名的片段文件中。
在一个实施例中,所述原文件为流媒体应用所下载的流媒体文件;所述第一存储路径、各个所述第二存储路径以及所述顺序对应于所述文件标识记录在所述流媒体应用对应的私有数据库中;所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序之后,删除所述流媒体文件。
在一个实施例中,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;根据所述第一存储路径获取所述头部加密数据;解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;根据所述第二存储路径获取各个所述片段;及根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
在一个实施例中,所述原文件为流媒体文件;所述第一存储路径、第二存储路径以及所述顺序读取自所述流媒体应用对应的私有数据库;所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件之后,播放所述原文件,并在播放完毕后清除所述原文件。
上述电子设备,在对原文件进行加密时,仅加密原文件的头部数据,加密计算的数据量小,而原文件中除头部数据之外的文件数据则分割成多个片段后通过混淆片段顺序的方式进行存储,分割和混淆片段顺序存储的计算量小,相较于目前全文二进制加密的加密方式,通过该文件加密方法可显著减少对中央处理器的消耗,加密时间成本低。记录第一存储路径、第二存储路径和片段的顺序则使得文件被加密后可被解密。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密 的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
在一个实施例中,提供了一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取待加密的原文件;对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;将所述原文件中除所述头部数据的文件数据分割为多个片段;将分割出的各个所述片段进行混淆片段顺序的存储;及对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
在一个实施例中,所述对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径,包括:生成随机的加密密钥,根据所述加密密钥对所述原文件的头部数据进行加密获得头部加密数据;创建具有随机生成的文件名的新文件,并将所述头部加密数据存储在所述新文件中;及对应于所述原文件的文件标识记录所述加密密钥以及所述新文件的第一存储路径。
在一个实施例中,所述将所述原文件中除所述头部数据的文件数据分割为多个片段,包括:按照预设的单个片段大小将所述原文件中除所述头部数据的文件数据分割为多个片段;或者,将所述原文件中除所述头部数据的文件数据等量或随机分割为预设数量的多个片段。
在一个实施例中,所述将分割出的各个所述片段进行混淆片段顺序的存储,包括:为每个所述片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个所述片段存储在以相应的新文件名命名的片段文件中。
在一个实施例中,所述原文件为流媒体应用所下载的流媒体文件;所述第一存储路径、各个所述第二存储路径以及所述顺序对应于所述文件标识记录在所述流媒体应用对应的私有数据库中;所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序之后,删除所述流媒体文件。
在一个实施例中,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;根据所述第一存储路径获取所述头部加密数据;解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;根据所述第二存储路径获取各个所述片段;及根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
上述计算机可读非易失性存储介质,在对原文件进行加密时,仅加密原文件的头部数据,加密计算的数据量小,而原文件中除头部数据之外的文件数据则分割成多个片段后通过混淆片段顺序的方式进行存储,分割和混淆片段顺序存储的计算量小,相较于目前全文二进制加密的加密方式,通过该文件加密方法可显著减少对中央处理器的消耗,加密时间成本低。记录第一存储路径、第二存储路径和片段的顺序则使得文件被加密后可被解密。而且元数据用于描述原文件中的数据内容,加密的头部数据覆盖原文件的元数据,可防止恶意用户利用元数据定位到加密的文件以及获取到通过混淆片段顺序存储的各个片段来进行加密破解。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改 进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种文件加密方法,包括:
    获取待加密的原文件;
    对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;
    将所述原文件中除所述头部数据的文件数据分割为多个片段;
    将分割出的各个所述片段进行混淆片段顺序的存储;及
    对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
  2. 根据权利要求1所述的方法,其特征在于,所述对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径,包括:
    生成随机的加密密钥,根据所述加密密钥对所述原文件的头部数据进行加密获得头部加密数据;
    创建具有随机生成的文件名的新文件,并将所述头部加密数据存储在所述新文件中;及
    对应于所述原文件的文件标识记录所述加密密钥以及所述新文件的第一存储路径。
  3. 根据权利要求1所述的方法,其特征在于,所述将所述原文件中除所述头部数据的文件数据分割为多个片段,包括:
    按照预设的单个片段大小将所述原文件中除所述头部数据的文件数据分割为多个片段;或者,
    将所述原文件中除所述头部数据的文件数据等量或随机分割为预设数量的多个片段。
  4. 根据权利要求1所述的方法,其特征在于,所述将分割出的各个所述片段进行混淆片段顺序的存储,包括:
    为每个所述片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个所述片段存储在以相应的新文件名命名的片段文件中。
  5. 根据权利要求1所述的方法,其特征在于,所述原文件为流媒体应用所下载的流媒体文件;所述第一存储路径、各个所述第二存储路径以及所述顺序对应于所述文件标识记录在所述流媒体应用对应的私有数据库中;
    所述对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序之后,所述方法还包括:
    删除所述流媒体文件。
  6. 一种文件解密方法,包括:
    读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;
    根据所述第一存储路径获取所述头部加密数据;
    解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;
    读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;
    根据所述第二存储路径获取各个所述片段;及
    根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
  7. 根据权利要求6所述的方法,其特征在于,所述原文件为流媒体文件;所述第一存储路径、第二存储路径以及所述顺序读取自所述流媒体应用对应的私有数据库;
    所述根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件之后,所述方法还包括:
    播放所述原文件,并在播放完毕后清除所述原文件。
  8. 一种电子设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    获取待加密的原文件;
    对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;
    将所述原文件中除所述头部数据的文件数据分割为多个片段;
    将分割出的各个所述片段进行混淆片段顺序的存储;及
    对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
  9. 根据权利要求8所述的电子设备,其特征在于,所述对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径,包括:
    生成随机的加密密钥,根据所述加密密钥对所述原文件的头部数据进行加密获得头部加密数据;
    创建具有随机生成的文件名的新文件,并将所述头部加密数据存储在所述新文件中;及
    对应于所述原文件的文件标识记录所述加密密钥以及所述新文件的第一存储路径。
  10. 根据权利要求8所述的电子设备,其特征在于,所述将所述原文件中除所述头部数据的文件数据分割为多个片段,包括:
    按照预设的单个片段大小将所述原文件中除所述头部数据的文件数据分割为多个片段;或者,
    将所述原文件中除所述头部数据的文件数据等量或随机分割为预设数量的多个片段。
  11. 根据权利要求8所述的电子设备,其特征在于,所述将分割出的各个所述片段进行混淆片段顺序的存储,包括:
    为每个所述片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个所述片段存储在以相应的新文件名命名的片段文件中。
  12. 根据权利要求8所述的电子设备,其特征在于,所述原文件为流媒体应用所下载的流媒体文件;所述第一存储路径、各个所述第二存储路径以及所述顺序对应于所述文件标识记录在所述流媒体应用对应的私有数据库中;
    所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序之后,删除所述流媒体文件。
  13. 根据权利要求8所述的电子设备,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;
    根据所述第一存储路径获取所述头部加密数据;
    解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;
    读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;
    根据所述第二存储路径获取各个所述片段;及
    根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
  14. 根据权利要求13所述的电子设备,其特征在于,所述原文件为流媒体文件;所述第一存储路径、第二存储路径以及所述顺序读取自所述流媒体应用对应的私有数据库;
    所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件之后,播放所述原文件,并在播放完毕后清除所述原文件。
  15. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取待加密的原文件;
    对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径;所述头部数据包括所述原文件的元数据;
    将所述原文件中除所述头部数据的文件数据分割为多个片段;
    将分割出的各个所述片段进行混淆片段顺序的存储;及
    对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序。
  16. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述对所述原文件的头部数据加密获得头部加密数据并存储,对应于所述原文件的文件标识记录所述头部加密数据的第一存储路径,包括:
    生成随机的加密密钥,根据所述加密密钥对所述原文件的头部数据进行加密获得头部加密数据;
    创建具有随机生成的文件名的新文件,并将所述头部加密数据存储在所述新文件中;及
    对应于所述原文件的文件标识记录所述加密密钥以及所述新文件的第一存储路径。
  17. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述将所述原文件中除所述头部数据的文件数据分割为多个片段,包括:
    按照预设的单个片段大小将所述原文件中除所述头部数据的文件数据分割为多个片段;或者,
    将所述原文件中除所述头部数据的文件数据等量或随机分割为预设数量的多个片段。
  18. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述将分割出的各个所述片段进行混淆片段顺序的存储,包括:
    为每个所述片段分配随机的新文件名,并在指定文件目录或者随机创建的文件目录下将每个所述片段存储在以相应的新文件名命名的片段文件中。
  19. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述原文件为流媒体应用所下载的流媒体文件;所述第一存储路径、各个所述第二存储路径以及所述顺序对应于所述文件标识记录在所述流媒体应用对应的私有数据库中;
    所述计算机可读指令被所述处理器执行时,还使得所述处理器在执行所述对应于所述文件标识记录各个所述片段的第二存储路径以及各个所述片段在所述原文件中的顺序之后,删除所述流媒体文件。
  20. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    读取与待解密的文件标识对应的用于存储头部加密数据的第一存储路径;
    根据所述第一存储路径获取所述头部加密数据;
    解密所述头部加密数据,获得头部数据;所述头部数据包括原文件的元数据;
    读取与所述文件标识对应的混淆片段顺序存储的各个片段的第二存储路径和各个所述片段在原文件中的顺序;
    根据所述第二存储路径获取各个所述片段;及
    根据所述顺序将各个所述片段与所述头部数据拼接,获得原文件。
PCT/CN2017/074337 2016-03-03 2017-02-22 文件加密方法、文件解密方法、电子设备和存储介质 WO2017148316A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
MYPI2018703086A MY196191A (en) 2016-03-03 2017-02-22 File Encryption Method, File Decryption Method, Electronic Device, and Storage Medium
US16/121,033 US11238165B2 (en) 2016-03-03 2018-09-04 File encryption method, file decryption method, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610126406.3 2016-03-03
CN201610126406.3A CN107153794B (zh) 2016-03-03 2016-03-03 文件加密方法和装置、文件解密方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/121,033 Continuation US11238165B2 (en) 2016-03-03 2018-09-04 File encryption method, file decryption method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2017148316A1 true WO2017148316A1 (zh) 2017-09-08

Family

ID=59742521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/074337 WO2017148316A1 (zh) 2016-03-03 2017-02-22 文件加密方法、文件解密方法、电子设备和存储介质

Country Status (4)

Country Link
US (1) US11238165B2 (zh)
CN (1) CN107153794B (zh)
MY (1) MY196191A (zh)
WO (1) WO2017148316A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428209A (zh) * 2019-01-10 2020-07-17 腾讯科技(深圳)有限公司 一种应用程序的混淆方法、装置及存储介质

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10049228B2 (en) * 2015-01-20 2018-08-14 Microsoft Technology Licensing, Llc File encryption support for FAT file systems
CN107832625B (zh) * 2017-11-21 2020-05-22 江苏神州信源系统工程有限公司 一种文档的处理方法和装置
CN108536554A (zh) * 2018-04-26 2018-09-14 威海海洋职业学院 一种数据文件的备份方法
CN108769052A (zh) * 2018-06-12 2018-11-06 北斗巡星信息科技有限公司 腕带传输信息加密的方法及装置
CN109460667A (zh) * 2018-11-05 2019-03-12 国家电网有限公司 招投标过程中的文件处理方法、系统及终端设备
CN109740371A (zh) * 2018-12-12 2019-05-10 武汉掌游科技有限公司 一种用于安卓sdk资源简易的加密方法及装置
CN109889324A (zh) * 2018-12-27 2019-06-14 深圳市安云信息科技有限公司 加密存储方法、存储介质和装置
CN109871698B (zh) * 2019-01-14 2021-10-26 深圳市奥特尔软件技术有限公司 数据处理方法、装置、计算机设备和存储介质
CN111125645B (zh) * 2019-11-15 2023-05-16 至本医疗科技(上海)有限公司 执行程序处理方法、系统、装置、计算机设备和介质
CN111709038B (zh) * 2020-05-07 2024-04-12 北京中科凡语科技有限公司 文件加密解密方法、分布式存储系统、设备及存储介质
CN112416450B (zh) * 2020-06-05 2023-02-17 上海哔哩哔哩科技有限公司 资源加密及展示方法及系统
CN111914280B (zh) * 2020-08-17 2024-05-17 南京珥仁科技有限公司 一种文件自加密解密方法
CN112423103A (zh) * 2020-09-02 2021-02-26 一可科技有限公司 将音频文件与视频文件进行合并的方法、播放方法及装置
CN112738037B (zh) * 2020-12-17 2023-01-31 航天信息股份有限公司 一种数据加密通信方法
CN113053393B (zh) * 2021-03-30 2024-04-30 闽江学院 音频标注处理装置
CN113810363B (zh) * 2021-07-29 2023-06-20 蜂巢能源科技有限公司 报文加密、解密方法及电子设备
CN113515766A (zh) * 2021-07-30 2021-10-19 盛景智能科技(嘉兴)有限公司 文件传输方法及装置
CN113806785B (zh) * 2021-10-11 2023-12-08 北京晓航众芯科技有限公司 一种用于对电子文档进行安全保护的方法及其系统
CN113901503A (zh) * 2021-10-26 2022-01-07 北京云迹科技有限公司 一种加密方法、加密装置和解密方法、解密装置
CN115941708B (zh) * 2022-11-04 2023-07-21 深圳市行云数据技术有限公司 云端大数据存储管理方法、装置、电子设备及存储介质
CN116567353B (zh) * 2023-07-10 2023-09-12 湖南快乐阳光互动娱乐传媒有限公司 一种视频投放方法及装置、存储介质及电子设备

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726713A (zh) * 2002-12-16 2006-01-25 皇家飞利浦电子股份有限公司 对视频数据流加密的方法和设备
CN103279693A (zh) * 2013-05-30 2013-09-04 付弦 一种文件加密方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090006796A1 (en) * 2007-06-29 2009-01-01 Sandisk Corporation Media Content Processing System and Non-Volatile Memory That Utilizes A Header Portion of a File
US8099599B2 (en) * 2008-08-29 2012-01-17 Microsoft Corporation Controlling access to data streams
US8363831B2 (en) * 2009-09-23 2013-01-29 Intel Corporation Method and apparatus for allowing software access to navigational data in a decrypted media stream while protecting stream payloads
US8838954B2 (en) * 2010-02-02 2014-09-16 Futurewei Technologies, Inc. Media processing devices for adaptive delivery of on-demand media, and methods thereof
US9262643B2 (en) * 2010-02-22 2016-02-16 Sookasa Inc. Encrypting files within a cloud computing environment
US9582678B2 (en) * 2011-04-19 2017-02-28 Invenia As Method for secure storing of a data file via a computer communication network
CN102867153B (zh) * 2012-08-30 2014-04-09 腾讯科技(深圳)有限公司 一种加密、解密视频文件的方法、装置及移动终端
CN103294961A (zh) * 2013-06-07 2013-09-11 北京奇虎科技有限公司 一种文件加/解密方法以及文件加/解密装置
CN105279440A (zh) * 2015-07-06 2016-01-27 深圳市美贝壳科技有限公司 照片文件加密方法
US10089481B2 (en) * 2015-09-23 2018-10-02 International Business Machines Corporation Securing recorded data
CN105187204A (zh) * 2015-09-29 2015-12-23 北京元心科技有限公司 文件的加密、解密方法和加解密系统

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1726713A (zh) * 2002-12-16 2006-01-25 皇家飞利浦电子股份有限公司 对视频数据流加密的方法和设备
CN103279693A (zh) * 2013-05-30 2013-09-04 付弦 一种文件加密方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428209A (zh) * 2019-01-10 2020-07-17 腾讯科技(深圳)有限公司 一种应用程序的混淆方法、装置及存储介质
CN111428209B (zh) * 2019-01-10 2023-09-19 腾讯科技(深圳)有限公司 一种应用程序的混淆方法、装置及存储介质

Also Published As

Publication number Publication date
MY196191A (en) 2023-03-22
US11238165B2 (en) 2022-02-01
CN107153794A (zh) 2017-09-12
CN107153794B (zh) 2020-07-21
US20180365434A1 (en) 2018-12-20

Similar Documents

Publication Publication Date Title
WO2017148316A1 (zh) 文件加密方法、文件解密方法、电子设备和存储介质
KR101597930B1 (ko) 비디오 파일 암호화 및 복호화 방법, 디바이스 그리고 모바일 단말
US9350549B2 (en) Selective shredding in a deduplication system
CN1287249C (zh) 对数字内容的访问控制装置和方法及再现装置
JP4679851B2 (ja) デジタルコンテンツのためのアクセス制御
KR101405720B1 (ko) 암호화 속성을 이용하는 가속 크립토그래피
WO2018170963A1 (zh) 一种文件的加密、解密方法和装置
CN111698576B (zh) 信息加密方法、解密方法、服务器、客户端及介质
WO2017215148A1 (zh) 文件保护方法及装置
WO2019233259A1 (zh) 用于处理信息的方法和装置
JP2018142314A5 (zh)
CN103079105A (zh) 一种节目源的保护方法及装置
WO2020044095A1 (zh) 文件加密方法、装置、设备/终端/服务器及计算机可读存储介质
US10380353B2 (en) Document security in enterprise content management systems
US20120210128A1 (en) Information processing apparatus, information processing method and program
JP2011199812A (ja) デジタルコンテンツの配信プログラム,再生プログラム,配信装置及び再生装置
CN107330340B (zh) 文件加密方法、设备、文件解密方法、设备及存储介质
US20090089589A1 (en) Information processing apparatus for protected data files and information processing method thereof
JP5175494B2 (ja) 暗号化コンテンツ編集方法およびコンテンツ管理装置
WO2019184741A1 (zh) 应用程序信息的存储、处理方法及装置
US10929549B1 (en) System and method for protecting audio and video files
KR102186901B1 (ko) 데이터 변조를 통한 멀티미디어 컨텐츠 파일의 암호화 장치 및 방법
JP7412445B2 (ja) コンテンツ複製装置、アクセス制御装置およびアクセス制御プログラム
Jiang et al. An anti-forensic method based on rs coding and distributed storage
US20130036474A1 (en) Method and Apparatus for Secure Data Representation Allowing Efficient Collection, Search and Retrieval

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17759167

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17759167

Country of ref document: EP

Kind code of ref document: A1