WO2011157242A2 - 文件的保护方法及装置 - Google Patents

文件的保护方法及装置 Download PDF

Info

Publication number
WO2011157242A2
WO2011157242A2 PCT/CN2011/078428 CN2011078428W WO2011157242A2 WO 2011157242 A2 WO2011157242 A2 WO 2011157242A2 CN 2011078428 W CN2011078428 W CN 2011078428W WO 2011157242 A2 WO2011157242 A2 WO 2011157242A2
Authority
WO
WIPO (PCT)
Prior art keywords
file
header
file header
security
key
Prior art date
Application number
PCT/CN2011/078428
Other languages
English (en)
French (fr)
Other versions
WO2011157242A3 (zh
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 EP11795208.5A priority Critical patent/EP2696305B1/en
Priority to PCT/CN2011/078428 priority patent/WO2011157242A2/zh
Priority to CN201180001395.1A priority patent/CN102334124B/zh
Publication of WO2011157242A2 publication Critical patent/WO2011157242A2/zh
Publication of WO2011157242A3 publication Critical patent/WO2011157242A3/zh
Priority to US14/090,971 priority patent/US20140089684A1/en

Links

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/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
    • 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/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • 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/88Detecting or preventing theft or loss
    • 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/2153Using hardware token as a secondary aspect

Definitions

  • the present invention relates to the field of information security, and in particular, to a file protection method and apparatus.
  • multimedia functions of terminal devices are becoming more and more powerful, and it is convenient to record, photograph, video, and store.
  • the existing mobile phones basically have the functions of recording, taking pictures and taking video, and have strong storage capacity, and can conveniently store private information such as recordings, photos and videos in the memory card of the mobile phone, and through the mobile phone when needed. Play it.
  • the Linux-based open source operating system Android is popularized in smart phones, making the multimedia functions of smart phones more powerful.
  • the loss of the mobile phone or mobile phone memory card often occurs, and the lost multimedia files in the mobile phone or mobile phone memory card can be freely copied to other devices for use.
  • the Internet Since the Internet is very developed, it is easy to cause loss of the mobile phone or the mobile phone memory card.
  • the private information flows into the Internet, so that the privacy information of the parties is leaked, which seriously infringes on their personal privacy and adversely affects the work and life of the parties.
  • terminal devices such as mobile phones, but also other terminal devices are lost, and privacy information is also leaked.
  • the embodiment of the invention provides a method and a device for protecting a file, which can solve the problem that the multimedia file in the terminal device or its memory card cannot be restricted from being copied to another device, and the private information of the party is easily leaked.
  • An embodiment of the present invention provides a file protection method, where the method includes:
  • the embodiment of the invention further provides a file protection device, the device comprising:
  • the security file header processing unit is configured to generate a security file header
  • the replacement processing unit is configured to replace the security file header generated by the security file header generating unit with an original file header of a file to be protected, and convert the file to be protected into a security file; and secure the security file
  • the file header prevents other external devices from accessing the contents of the secure file.
  • the file to be protected is converted into a security file, so that the other file can be blocked by the security file header.
  • the device accesses the contents of the security file.
  • the method effectively limits the access operation of the file content by other external devices, such as illegal reading and writing, and can well protect the file content, and avoids the loss of the terminal device or its memory card, because it cannot limit the random access of other devices to the file content. , causing the leakage of personal privacy information.
  • the method protects the file content by replacing the original file header with only the security file header, and does not affect the operation efficiency of the native device for file access.
  • FIG. 1 is a flowchart of a method for protecting a file according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of a file protection read/write principle according to Embodiment 1 of the present invention.
  • FIG. 3 is a flow chart of converting a file to be protected into a security file in an android phone according to Embodiment 1 of the present invention
  • FIG. 4 is a schematic diagram of a file protection principle according to Embodiment 1 of the present invention.
  • FIG. 5 is a flowchart of decrypting a security file into an original file in an android mobile phone according to Embodiment 1 of the present invention
  • FIG. 6 is a schematic diagram of a file protection apparatus according to Embodiment 2 of the present invention
  • FIG. 7 is a schematic diagram of a decryption unit of a file protection apparatus according to Embodiment 2 of the present invention. Mode for carrying out the invention
  • the original file header of the file to be protected stored in the terminal device is compressed and encrypted to obtain an encrypted file header, and then the identification information is added to the encrypted file header to obtain a security file header, and the security file header is replaced with a security file header.
  • FIG. 1 is a flowchart of a method for protecting a file according to an embodiment of the present invention, and the method for protecting the file includes the following steps:
  • Step 1 Generate a security file header by using an original file header of the file to be protected, and the security file header can restrict access to the content of the file in which it is located when unauthorized;
  • the processing procedure of the foregoing step 1 is specifically: specifying a file to be protected in the terminal device, compressing the original file header of the file to be protected, encrypting the compressed file header content to obtain an encrypted file header, and then encrypting the file header.
  • the header is added with the identification information (the added identification information is information for identifying the file as a security file) to obtain a security file header;
  • Step 2 Replace the original file header of the file to be protected with the obtained security file header, and replace the original file header of the file by writing the security file header to the beginning of the file to be protected, and convert the protected file into a security file;
  • the security file converted in the above step 2 has a security file header, and when unauthorized (that is, the content of the original file header corresponding to the security file header cannot be read after being decrypted), the other file and the device can be restricted by the security file header. The device's access to the contents of the security file.
  • the file to be protected specified from the terminal device may be: an audio file (such as a song, a recording of a recorder of the terminal device, etc.), a picture file (such as a picture, a photo generated by taking a picture of the camera of the terminal device) Any one or any of video files (such as video, video generated by camera shooting of a terminal device, etc.), map data files, 3D model data files, CAD data files, and executable files. Due to the complicated coding structure of this kind of file, if the header part of the file is encrypted, if the content of the encrypted file header cannot be decrypted (such as the first 1024 bytes of the file), it cannot be solved. The content of the file.
  • an audio file such as a song, a recording of a recorder of the terminal device, etc.
  • a picture file such as a picture, a photo generated by taking a picture of the camera of the terminal device
  • Any one or any of video files such as video, video generated by camera shooting of a terminal device,
  • the original file header of the file to be protected may be compressed by a common compression method (for example, Z77 algorithm, Snappy algorithm, etc.). Compression can effectively reduce its size, and it is convenient to add the information used to identify the file as a secure file.
  • a common compression method for example, Z77 algorithm, Snappy algorithm, etc.
  • the compressed file header content may be encrypted by using a common encryption method (such as: MD5 encryption algorithm, Rijndael encryption algorithm, etc.); encryption may be performed by any of the following types of keys, including :
  • the password input by the user and the key used can be stored in the storage area of the local device where the file is to be protected.
  • the terminal device is a terminal device having a subscriber identity module (SIM card)
  • SIM card subscriber identity module
  • the user can input the user.
  • the password and the key used are stored in the subscriber identity module (SIM card) of the terminal device.
  • the identifier information may be added to the encrypted file header in the following manner (the identifier information is information for identifying the file as a security file): adding the identification information to the encrypted file header, and encrypting the file
  • the header constitutes a security file header, and the size of the security file header is the same as the original file header size of the file to be protected (for example, if the original file header is 1024 bytes, the security file header consisting of the identification information + the encrypted file header is also 1024 bytes. ).
  • the access file may be conveniently accessed by the security file to be protected.
  • the method may further include the following steps: the local device where the file is to be protected is When the content of the security file converted into a file is accessed, the security file header of the security file is processed and the content is read, and after the reading is successful, the content of the security file is allowed to be accessed (for example, reading and writing the file) Wait for the operation), otherwise the access to the contents of the security file is not allowed and the prompt information that does not allow the operation is returned.
  • the file header of the file is obtained first. If the file header includes the identification information, the identifier information can be confirmed as the security file, and the security file header (that is, the previously obtained file header) is obtained from the security file. Encrypted file header is obtained (since the security file header is composed of the identification information + the encrypted file header, after confirming the identification information, the encrypted file header can be obtained from the security file header);
  • a decryption algorithm corresponding to the encryption algorithm used by the original file header after encryption and compression may be used, such as: MD5 encryption algorithm, Rijndael encryption algorithm, etc.; and according to whether there is a user identification module (SIM) in the terminal device Card), can be divided into the following processing methods when decrypting the encrypted file header -
  • the key stored in the storage area of the terminal device can be directly read to decrypt the encrypted file header;
  • the terminal device has a subscriber identity module (SIM card), which can first determine whether the subscriber identity module (SIM card) in the terminal device is registered on the operation network, and if registered, read the subscriber identity module (SIM) Key stored in the card, decrypting the encrypted file header with the key; if not registered, returning the decryption failure prompt message.
  • SIM card subscriber identity module
  • the authentication mechanism of the terminal device and the operation network can be fully utilized to protect the key stored in the subscriber identity module (SIM card), even if the terminal device is lost, the user in the terminal device If the SIM card is lost at the operator, the SIM card in the terminal device cannot be registered on the operation network, so that the terminal device cannot read the key in the SIM card, and cannot decrypt the security file in the terminal device. , effectively protect the content of security documents, avoiding privacy leaks.
  • SIM card subscriber identity module
  • a decompression algorithm corresponding to the compression algorithm used to compress the original file header such as the Z77 algorithm, the Snappy algorithm, or the like, may be employed.
  • the original file header content of the security file obtained after the successful reading can be replaced with the security file header of the security file, and the original file that can access the file content in an ordinary manner can be obtained, so that the original file can be directly read and written. Wait for access operations.
  • the file protection method provided by the embodiment of the present invention achieves a good file content by compressing and encrypting the security file header without changing the file size. Protection, access to read and write of file contents is not allowed on other devices, which not only ensures that private information will not be illegally leaked, nor increases the complexity of the protected file being operated by this machine, nor does it affect the operation efficiency. .
  • the following takes the mobile phone running the Android operating system as an example to further explain the protection method of the above file.
  • the Android operating system is an open source mobile phone platform.
  • the file system can be easily modified in the Android system, so that the method provided by the embodiment of the present invention can run the Android operating system without increasing the complexity of the normal use of the mobile phone.
  • the contents of the files in the Android phone are protected, such as preventing the files on the mobile phone from being illegally copied to other machines (such as mobile phones, tablets, computers, etc.) for reading and writing.
  • the file is protected in the Android phone, and the specified file is converted into a security file, which can be achieved by the following steps:
  • Step 11 specify the file to be protected in the Android phone; if you want to specify the file to be protected in the file manager of the Android phone; Step 12: compress the specified file header of the file to be protected, and compress may use a common compression method (such as: Z77 algorithm, Snappy algorithm, etc.);
  • the file header of the file to be protected generally selects the first 1024-byte content of the file as the file header, so that the security after compression and encryption can be ensured, and the processing efficiency of the file during subsequent decryption and reading is not affected.
  • Step 13 encrypting the content after the compressed file header to obtain an encrypted file header
  • the encryption in the above step 13 may use a commonly used encryption algorithm (such as: MD5 encryption algorithm, Rijndael encryption algorithm, etc.); when encrypting, the key obtained by encrypting the machine unique code of the Android mobile phone by the password input by the user may be used (
  • the key (KeyO) obtained by encrypting the machine unique code (ID) by the password (PW0) input by the user for the first time is used as a key, and the key (KeyO) is stored in the SIM card of the Android mobile phone (such as storage) In the Key file on the SIM card); in use, if the user changes the password, the original password (PW0) is encrypted by the changed password (PWN) to obtain the KeyN, and the KeyN is also stored in the Key of the KeyO stored on the SIM card.
  • the specific structure of the Key file can be as shown in the following table:
  • the method of storing the encryption key in the SIM card can effectively improve the security of the file protection. Even if the mobile phone is lost, the operator can issue a function message to delete the key file stored in the SIM card and store the key. If the mobile phone replaces the SIM card, the Key file will not be read, thus preventing others from opening the stored security file on the picked mobile phone, which can better protect the privacy information of the party.
  • the key used to encrypt the file header can be set in the following way:
  • the user When the user first uses the recorder or camera of the Android mobile phone, the user is prompted to enter a password (PW0), and the prompt message can be "Please input a 6- to 16-digit password for protecting the recording, photo or video file, in decrypting These passwords are required when entering these files.”
  • the machine unique code (ID) is encrypted by a user-entered password (PTO), and the key (KeyO) of the encrypted multimedia file is obtained and stored in the Key file, and the Key file is stored in the SIM card of the mobile phone.
  • PTO user-entered password
  • KeyO key of the encrypted multimedia file
  • the key can also be any of the following: (1) the password entered by the user; (2) the machine unique code of the Android phone; (3) the password entered by the user and the machine unique code of the Android phone.
  • the key can also be stored in the secure storage area of the Android phone.
  • Step 14 The security file header is obtained by adding the identifier information identifying the file as the security file to the encrypted file header obtained by encrypting in step 13.
  • the size of the security file header is consistent with the original file header size (for example, the original file header size is 1024). Byte, the size of the security file header is also 1024), at the beginning of the file to be protected, the security file header consisting of the identification information and the encrypted file header is written to replace the original file header, and the file to be protected is converted into Security documents.
  • the security file obtained after the above conversion has a security file header, if the security file header cannot be decrypted and decompressed to read the contents of the original file header, the content of the security file cannot be obtained, even if the file is copied. The contents of the security file cannot be obtained on other devices, and the purpose of protecting the contents of the file is achieved.
  • Step 201 When the file is read, the security file header of the security file is read first;
  • Step 202 Obtain an encrypted file header from the security file header (since the security file header is composed of the identification information + the encrypted file header, the encrypted file header can be obtained from the security file header after confirming the identification information); 203: Decrypt the obtained encrypted file header; decrypt the encrypted file header by: determining whether the user identification module (SIM card) in the Android mobile phone is registered on the operating network, and if it is already registered, reading The key stored in the subscriber identity module (SIM card), decrypts the encrypted file header with the read key, proceeds to step 24; if not, returns the decryption failure prompt message, and ends the reading operation on the file .
  • SIM card user identification module
  • SIM card subscriber identity module
  • the key is not stored in the user identification module (SIM card) and stored in the secure storage area of the Android mobile phone, when the encrypted file header is decrypted, the key pair stored in the secure storage area can be directly read and encrypted. The file header is decrypted.
  • Step 204 Decompress the decrypted file header content to obtain the original file header, and read the content thereof (specifically, the decrypted file header content may be decompressed into the Android mobile phone memory, and then the content thereof is read), according to the original file header.
  • the content reads the contents of the security file.
  • the opened file is converted into a security file by using the above steps 11 to 14, and then the writing operation is performed. That is, in the Android mobile phone, the method of steps 11 to 14 above can be used to re-implement the file security write operation of the Android mobile phone. Correct
  • the menu for setting the security password can be added.
  • the user needs to input the old password (PW0) and the new password (PW1), and the old password (PW0) to decrypt Key0, if the decrypted ID' and the machine unique code The same, the old password (PW0) is correct, the password is successfully modified; and the old password (PW0) is encrypted with the new password (PW1) to obtain Keyl. Save both KeyO and Keyl in the Key file. KeyO is still encrypted and decrypted using KeyO.
  • an Android phone with the above secure read and write functions is connected to the computer, and the security files in the mobile phone are copied to other devices (eg, tablet, computer), although the security files can be copied normally, but Since there is no secure read/write function on other devices, and there is no key for decryption, the content of the secure file header (generally 1024 bytes) cannot be read, so that valid information of the secure file cannot be obtained.
  • the user can decrypt the security file in the mobile phone into a common file by decrypting, and then copy it to other devices (such as tablet, computer) to read and write.
  • the implementation can be set to "decrypt copy to" on the phone.
  • a mobile phone memory card is lost or stolen without authorization. When used on other mobile phones or computers, it is also impossible to obtain valid information about secure files. If the mobile phone is lost, you can report the loss in time. The operator sends a function SMS to delete the key file of the saved key on the SIM card, so as to prevent unauthorized viewing of the security file content on the mobile phone. After the mobile phone is lost, even if there is no loss reporting, the user who gets the mobile phone can only view the security file on the local machine, and because it does not have the user password for decryption, the security file cannot be decrypted and copied to the computer or network for use and dissemination. , also effectively limits the leakage of personal privacy caused by the loss of mobile phones.
  • multimedia files can not only protect multimedia files (various audio, video files and picture files) in mobile phones, such as recording files (usually AMR format), image files (usually JPG format), video files (usually 3GP format), etc.
  • recording files usually AMR format
  • image files usually JPG format
  • video files usually 3GP format
  • any data file with complex structure including but not limited to map data, 3D model data, CAD data, and so on. Since these files have a more complicated structure and lack of header information, it is difficult to recover the valid content of the file.
  • files such as Txt and Bmp can obtain useful information without file headers, the security effect is not obvious, and since there is not enough space for the files with too small file size to be added to the security file header after compression, security protection cannot be performed. .
  • a terminal device such as an Android mobile phone reads and writes a stored security file
  • a corresponding key such as a machine unique code of the mobile phone and/or a password input by the user, etc.
  • the security file can only be read and written normally on the mobile phone, but not on other machines (mobile phones, tablets, computers, etc.) but not on the other machines (mobile phones, tablets, computers, etc.), even if copied to other machines, the security files cannot be opened.
  • the content plays a very good role in protecting the contents of the security file and avoiding the disclosure of personal privacy information after the loss of the terminal device such as the mobile phone.
  • the file can be protected by the method provided by the embodiment of the present invention; the implementation manner is basically the same as that in the Android mobile phone, and is not repeated here.
  • the method can also be used to implement file protection in various operating systems running on the computer (for example, the H00K file read/write function can be used to implement read and write operations of the security file), so that the protected security file is limited to the local machine. Use, and cannot be used on other devices or on the Internet.
  • the method of the embodiment When the method of the embodiment is applied in the android mobile phone, it can realize: (1) automatically encrypting the recording, photo, and image taken by the mobile phone, thereby effectively preventing leakage of private multimedia information; (2) even if the mobile phone is lost, It is safe to process private multimedia information; (3) Since the specified protected file is converted to a secure file, only the file header (such as 1024 bytes of content at the beginning of the file) can be processed, and the file operation performance is very fast. , does not affect the efficiency of operation; (4) The size of all encrypted security files does not change, transparent to all applications read and write files, no other impact.
  • Embodiment 2 Embodiment 2
  • FIG. 6 is a schematic structural diagram of a file protection apparatus according to an embodiment of the present invention. As shown in FIG. 4, the file protection apparatus includes: a security file header processing unit 21 and a replacement processing unit 22;
  • the security file header processing unit 21 is configured to generate a security file header
  • the replacement processing unit 22 is configured to replace the security file header generated by the security file header generating unit 21 with an original file header of a file to be protected, and convert the file to be protected into a security file; Document security The full file header prevents other external devices from accessing the contents of the secure file.
  • the security file header processing unit in the above device includes: a compression unit 211, an encryption unit 212, and an identification information adding unit 213;
  • the compression unit 211 is configured to compress an original file header of a file to be protected
  • the encryption unit 212 is configured to encrypt the compressed file header content of the compression unit to obtain an encrypted file header.
  • the identification information adding unit 213 is configured to add a security file header obtained by the identification information to the encrypted file header encrypted by the encryption unit.
  • the security file header processing unit in the above apparatus may further include: a key processing unit 214, configured to encrypt the machine-entered code of the local device where the file to be protected is located, and obtain a key.
  • a key processing unit 214 configured to encrypt the machine-entered code of the local device where the file to be protected is located, and obtain a key.
  • the security file header processing unit in the above apparatus may further include: a decryption unit 215 and a decompression unit 216;
  • the decrypting unit 215 is configured to decrypt the encrypted file header in the security file header of the security file; the decompressing unit 216 is configured to decompress the decrypted file header content to obtain the original file header. .
  • the decryption unit 215 in the above apparatus may be constituted by the module shown in FIG. 7, and includes: a judgment processing module 2151 and a key reading module 2152;
  • the determining processing module is configured to: when the key for decryption is obtained, if the key is stored in the user identification module of the local device where the security file is located, determine whether the user identification module of the local device is on the operating network Registering, if registered, issuing an instruction to allow the key to be read to the key reading module, and if not registered, returning a prompt message that the decryption key cannot be obtained, and issuing an instruction to stop subsequent processing;
  • the key reading module is configured to read the stored key from the user identification module of the local device after receiving the instruction that the determining processing module allows the key to be read.
  • the file protection device of the embodiment can be installed in various devices such as a mobile phone and a computer, and the files therein are processed to protect the files.
  • the method of the embodiment of the present invention can effectively protect files such as multimedia in a terminal device or a computer such as an Android mobile phone without affecting the normal use of the user, and is not allowed to be opened on other machines.
  • the content of protected security files on the mobile phone to avoid the leakage of private information and protect personal privacy.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)
  • Telephone Function (AREA)

Description

文件的保护方法及装置
技术领域
本发明涉及信息安全领域, 尤其涉及一种文件的保护方法及装置。
发明背景
目前终端设备 (如手机、 平板电脑、 媒体播放器、 游戏机、 掌上电脑以及笔记本电 脑等)的多媒体功能越来越强大, 可以方便的录音、照相、拍视频并存储。 以手机为例, 现有的手机基本都具有录音、 拍照和拍视频等功能, 并且存储能力很强, 可方便的将录 音、 照片和视频等私人信息存在手机的存储卡中, 需要时通过手机进行播放。 尤其是以 Linux为核心的开源操作系统 Android在智能手机中的推广普及, 使智能手机的多媒体 功能更加强大。
目前手机或手机存储卡丢失的事常有发生, 而丟失的手机或手机存储卡内的多媒体 文件可被随意拷贝至其它设备上使用, 由于互联网非常发达, 很容易造成丟失手机或手 机存储卡内的私人信息流入到互联网中, 从而使当事人的隐私信息泄漏, 严重侵犯其个 人隐私, 给当事人的工作、 生活造成不良影响。 不仅手机等终端设备, 并且其它终端设 备丢失后也存在隐私信息泄漏的问题。 而目前没有一种方法可以限制终端设备(特别是 智能型终端设备)或其存储卡内的多媒体文件被拷贝到其它设备上使用, 无法解决丟失 的手机或手机存储卡内的多媒体文件被非法拷贝到其它设备上使用,造成个人隐私信息 泄漏的问题。 发明内容
本发明实施方式提供一种文件的保护方法及装置, 可以解决目前无法限制终端设备 或其存储卡内的多媒体文件被拷贝到其它设备上打开使用, 易造成当事人的私人信息被 非法泄漏的问题。
实现上述目的的技术方案为:
本发明实施方式提供一种文件的保护方法, 该方法包括:
对要保护文件用安全文件头替换其原文件头, 将所述要保护文件转换成安全文件; 由转换得到的所述安全文件的安全文件头阻止其它外部设备对该安全文件内容进 行的访问操作。
本发明实施方式还提供一种文件的保护装置, 该装置包括:
安全文件头处理单元和替换处理单元; 其中, 所述安全文件头处理单元, 用于生成安全文件头;
所述替换处理单元, 用于将所述安全文件头生成单元生成的所述安全文件头替换要 保护文件的原文件头, 使所述要保护文件转换成安全文件; 由所述安全文件的安全文件 头阻止其它外部设备对该安全文件内容进行的访问操作。
由上述本发明实施方式提供的技术方案可以看出,本发明实施方式中通过用安全文 件头替换要保护文件的原文件头, 将要保护文件转换成安全文件, 从而可以由安全文件 头阻止其它外部设备对该安全文件内容进行的访问操作。该方法有效限制了文件内容被 其它外部设备进行非法读写等访问操作, 可以很好的保护文件内容, 避免了终端设备或 其存储卡丢失后因无法限制其它设备对其上文件内容的随意访问,造成个人隐私信息泄 漏的问题。 并且该方法由于只用安全文件头替换原文件头的方式保护文件内容, 也并不 会影响本机设备对文件访问的操作效率。 附图简要说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有 技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他附图。
图 1为本发明实施例一提供的文件的保护方法的流程图;
图 2为本发明实施例一提供的文件保护读写原理示意图;
图 3为本发明实施例一提供的 android手机中将要保护文件转换为安全文件的流程 图;
图 4为本发明实施例一提供的文件保护原理示意图;
图 5为本发明实施例一提供的 android手机中将安全文件解密为原文件的流程图; 图 6为本发明实施例二提供的文件的保护装置的示意图;
图 7为本发明实施例二提供的文件的保护装置的解密单元的示意图。 实施本发明的方式
为便于理解, 下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部 的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下 所获得的所有其他实施例, 都属于本发明保护的范围。 本发明实施例中, 将终端设备中存储的要保护文件的原文件头经压缩、加密后得到 加密文件头, 再向所述加密文件头加入标识信息得到安全文件头, 用安全文件头替换要 保护文件的原文件头, 将要保护文件转换成安全文件, 从而可以通过该安全文件的安全 文件头阻止其它外部设备对该安全文件内容进行的读写等访问操作,使得该安全文件即 使被拷贝到其它外部设备上, 也因无法解密该安全文件的安全文件头内容, 而阻止访问 该安全文件的内容, 实现保护文件内容的目的, 避免了终端设备或其存储卡丢失后因无 法阻止其它设备对其上文件内容的随意访问, 造成个人隐私信息泄漏的问题。 并且该方 法由于只用安全文件头替换原文件头的方式保护文件内容, 也并不会影响本机设备对文 件访问的操作效率。 实施例一
图 1所示为本发明实施例的文件的保护方法流程图, 该文件的保护方法包括以下步 骤:
歩骤 1, 利用要保护文件的原文件头生成安全文件头, 所述安全文件头能在未授权 时限制对其所在文件内容的访问;
上述步骤 1的处理过程具体为: 指定终端设备中的要保护文件, 对要保护文件的原 文件头进行压缩, 对压缩后的文件头内容进行加密后得到加密文件头, 再向所述加密文 件头加入标识信息(所加入的标识信息是用于标识该文件为安全文件的信息)得到安全 文件头;
步骤 2, 用得到的安全文件头替换要保护文件的原文件头, 可将安全文件头写入要 保护文件的起始位置替换该文件的原文件头, 将要保护文件转换成安全文件;
上述步骤 2转换后的安全文件, 由于具有安全文件头, 在未授权时 (即无法解密后 读取该安全文件头对应的原文件头的内容) , 通过该安全文件头可限制其它设备以及本 机设备对该安全文件内容的访问。
上述方法步骤 1中, 从终端设备中指定的要保护文件可以是: 音频文件 (如歌曲、 终端设备的录音机的录音等) 、 图片文件 (如图片、 终端设备的照像机拍照所生成的照 片等)、 视频文件(如视频、 终端设备的摄像机拍摄所生成的视频等)、地图数据文件、 3D模型数据文件、 CAD数据文件、 可执行文件中的任一种或任意几种。 这类文件由于编 码结构较复杂,若对其文件头部分进行加密限制后,在不能解密读取加密文件头内容(如 文件起始的 1024个字节内容) 的情况下, 则无法破解得出文件的内容。 上述方法步骤 1中, 对要保护文件的原文件头进行压缩可采用常用的压缩方法(如: Z77算法、 Snappy算法等) 。 压缩可有效减小其大小, 方便加入用于标识文件为安全文 件的标信息。
上述方法步骤 1中, 对压缩后的文件头内容进行加密可采用常用的加密方法 (如: MD5加密算法、 Rijndael加密算法等) ; 加密可采用下述几种密钥中的任一种, 包括:
( 1 ) 由用户输入的密码对要保护文件所在的本机设备的机器唯一码加密后得到的 密钥;
(2 ) 用户输入的密码;
( 3 ) 要保护文件所在的本机设备的机器唯一码;
(4) 用户输入的密码和要保护文件所在的本机设备的机器唯一码。
可将用户输入的密码及所采用的密钥均存储在要保护文件所在的本机设备的存储 区中, 如该终端设备为具有用户识别模块 (SIM卡) 的终端设备, 则可将用户输入的密 码及所采用的密钥均存储在该终端设备的用户识别模块 (SIM卡) 中。
上述方法步骤 1中, 可采用以下方式在加密后的文件头中加入标识信息 (该标识信 息是用于标识该文件为安全文件的信息) : 将标识信息加入到加密文件头之前, 与加密 文件头组成安全文件头, 该安全文件头的大小与要保护文件的原文件头大小一致(如原 文件头为 1024字节, 则由标识信息 +加密文件头组成的安全文件头也为 1024字节) 。
为便于存储要保护文件的终端设备,可以对该要保护文件转换成的安全文件方便的 进行访问操作, 可在上述方法基础上, 进一步包括以下步骤- 在要保护文件所在的本机设备对该文件转换成的安全文件内容进行访问操作时,对 该安全文件的安全文件头处理后读取其内容,在读取成功后则允许对该安全文件内容进 行访问操作 (如对文件进行读、 写等操作) , 否则不允许对该安全文件内容进行访问操 作并返回不允许操作的提示信息。
上述处理步骤中, 具体是先获取该文件的文件头, 若判断文件头包含标识信息, 则 由标识信息可确认该文件为安全文件, 从该安全文件的安全文件头(即之前获取的文件 头) 中得到加密文件头 (由于安全文件头是由标识信息 +加密文件头构成, 因此确认标 识信息后, 即可从该安全文件头中获得加密文件头) ;
对得到的加密文件头进行解密、 解压缩后得到原文件头;
其中,解密时,可采用与加密压缩后该原文件头所用的加密算法相对应的解密算法, 如: MD5加密算法、 Rijndael加密算法等;并且根据终端设备中是否有用户识别模块(SIM 卡) , 在对加密文件头进行解密时可分为以下几种处理方式-
( 1 )终端设备中没有用户识别模块(SIM卡) , 则可以直接读取该终端设备存储区 中存储的密钥对加密文件头进行解密;
(2)终端设备中有用户识别模块(SIM卡) , 可先判断该终端设备中的用户识别模 块 (SIM卡) 是否在运营网络上注册, 若已注册, 则读取在用户识别模块(SIM卡) 中存 储的密钥, 用所述密钥对加密文件头进行解密; 若未注册, 则返回解密失败提示信息。
上述第 (2) 种方式, 可以充分利用终端设备与运营网络的认证机制, 来保护用户 识别模块 (SIM卡) 中存储的密钥, 即使在终端设备丟失后, 用户若将该终端设备中的 SIM卡在运营商处挂失, 则该终端设备中的 SIM卡便不能在运营网络上注册, 从而该终端 设备也无法读取其 SIM卡中的密钥, 而无法解密该终端设备中的安全文件, 有效保护了 安全文件的内容, 避免了隐私泄漏。
上述解压缩时, 可采用与压缩该原文件头所用的压缩算法相对应的解压缩算法,如 Z77算法、 Snappy算法等。
可将读取成功后得到的该安全文件的原文件头内容替换该安全文件的安全文件头, 得到可按普通方式对文件内容进行访问的原文件, 从而可以直接对该原文件进行读、 写 等访问操作。
本实施例方法的具体操作示意如图 2所示,通过本发明实施例提供的文件的保护方 法, 在不改变文件大小的情况下, 通过压缩并加密后的安全文件头对文件内容实现很好 的保护, 在其它设备上不允许对文件内容进行读写等访问操作, 既保证了隐私信息不会 被非法泄漏, 也不增加本机操作受保护安全文件的复杂度, 也并不影响操作效率。 下面以运行 Android操作系统的手机为例, 对上述文件的保护方法作进一步说明。
Android操作系统是一个开源的手机平台, 在 Android系统中可以很方便地修改文 件系统, 从而利用本发明实施例提供的方法, 在不增加手机正常使用复杂度的前提下, 对运行 Android操作系统的 Android手机中的文件内容进行安全保护,如防止手机上的 文件被非法拷贝到其它机器 (如手机、 平板电脑、 计算机等) 上进行读、 写等操作。
如图 3所示, 在 Android手机中对文件进行安全保护, 即将指定文件转换为安全文 件, 可通过以下步骤实现:
歩骤 11, 在 Android手机中指定要保护文件; 如可在 Android手机的文件管理器 中指定要保护文件; 步骤 12, 对指定后的要保护文件的文件头进行压缩, 压缩可采用常用的压缩方法 (如: Z77算法、 Snappy算法等);
其中, 要保护文件的文件头一般可选取该文件起始的 1024字节内容作为文件头, 这样既可保证压缩、 加密后的安全性, 也不影响后续解密读取时对文件的处理效率, 当 然也可以从该文件起始处选取任意长度的文件内容作为文件头, 只要不影响后续本机对 该文件转换后的安全文件的读、 写处理效率即可;
步骤 13, 对压缩文件头后的内容进行加密得到加密文件头;
上述步骤 13中的加密可采用常用的加密算法 (如: MD5加密算法、 Rijndael加密 算法等); 加密时, 可采用由用户输入的密码对该 Android手机的机器唯一码加密后得 到的密钥(由用户第一次输入的密码(PW0)对机器唯一码(ID)加密得到的密钥(KeyO) 作为密钥), 并将该密钥 (KeyO) 存储在 Android手机的 SIM卡中 (如存储在 SIM卡上 的 Key文件中);使用中,若用户更改密码后,则由更改后的密码(PWN)对原始密码(PW0) 加密得到 KeyN, KeyN也保存在 SIM卡上的存储 KeyO的 Key文件中。 Key文件具体结构 可如下表所示:
Figure imgf000008_0001
这种将加密密钥存储在 SIM卡中的方式,可有效提高对文件保护的安全性, 即使手 机丟失, 也可以通过运营商下发功能短信删除存储在 SIM卡中储存密钥的 Key文件, 若 手机更换 SIM卡, Key文件也会读取不到, 从而防止他人在拾得的手机上打开其存储的 安全文件, 可以更好的保护了当事人的隐私信息。
在 Android手机中具体可通过以下方式设置对文件头加密用的密钥:
当用户第一次使用 Android手机的录音机或照像机时, 提示用户输入密码 (PW0), 提示信息可为 "请输入 6到 16位密码, 用于保护录音、 像片或视频文件, 在解密这些 文件时需要输入该密码"。 利用用户输入的密码 (PTO)对机器唯一码 (ID)加密, 获得 加密多媒体文件的密钥 (KeyO), 并保存在 Key文件中, 并将 Key文件存储在该手机的 SIM卡中。 这样在使用 Android手机的录音机或照像机程序保存文件时, 可直接将准备 保护的音频或视频文件转换成安全文件, 所有通过手机录制的音频文件、 视频文件和拍 下的照片都可以得到安全保护。 密钥也可采用下述中的任一种: (1 )用户输入的密码; (2 ) Android手机的机器唯 一码; (3 )用户输入的密码和 Android手机的机器唯一码。 密钥也可存储在 Android手 机的安全存储区中。
步骤 14, 将标识该文件为安全文件的标识信息加入到步骤 13加密后得到的加密文 件头之前得到安全文件头, 该安全文件头的大小与原文件头大小一致(如原文件头大小 为 1024字节,则安全文件头的大小也为 1024),在该要保护文件的起始位置写入由标识 信息和加密文件头组成的安全文件头替换掉原文件头, 将该要保护文件转换为安全文 件。
如图 4所示, 上述转换后得到的安全文件由于具有安全文件头,若不能对安全文件 头进行解密、 解压缩读取原文件头的内容, 则无法获取安全文件的内容, 即使将文件拷 贝到其它设备上也无法获取安全文件的内容, 实现保护文件内容的目的。
为使该 Android手机对其内存储的安全文件方便的进行读操作, 如图 5所示,可采 用以下步骤进行处理:
歩骤 201, 当对文件进行读操作时, 先读取该安全文件的安全文件头;
步骤 202, 从安全文件头中取得加密文件头 (由于安全文件头是由标识信息 +加密 文件头构成, 因此可先确认标识信息后, 即可从该安全文件头中取得加密文件头); 步骤 203,对取得的加密文件头进行解密;可采用以下方式对加密文件头进行解密: 先判断该 Android手机中的用户识别模块(SIM卡) 是否在运营网络上注册, 若已 注册, 则读取在用户识别模块 (SIM卡) 中存储的密钥, 用读取的密钥对加密文件头进 行解密,进行步骤 24;若未注册,则返回解密失败提示信息,并结束对该文件的读操作。
若密钥未存储在用户识别模块 (SIM卡), 而存储在该 Android手机的安全存储区 中, 则在对加密文件头进行解密时, 可以直接读取安全存储区中存储的密钥对加密文件 头进行解密。
步骤 204, 对解密后文件头内容进行解压缩得到原文件头, 并读取其内容(具体可 将解密后文件头内容解压缩到 Android手机内存中, 再读取其内容), 根据原文件头内 容读取该安全文件的内容。
将上述步骤 201〜204的方法应用在 Android手机, 即实现了 Android手机的文件 安全读操作, 可方便的直接读取安全文件的内容, 不需要用户进行其它的额外操作。
为使该 Android手机对打开的安全文件方便的进行写操作,可在对打开的安全文件 进行写操作时, 采用上述步骤 11〜14将打开的文件转换为安全文件后, 再进行写操作。 即在 Android手机中可用上述步骤 11〜14的方法重新实现该 Android手机的文件安全 写操作。 对
在 Android手机中对安全文件的复制、 剪切、 删除等操作, 可不做任何处理, 而采 用原有的复制、 剪切、 删除等文件操作方式。
利用上述方法在 Android手机对文件进行保护时,在手机的右键菜单(如在 Android 手机的文件管理器程序的右键菜单中) 中增加加密和解密操作菜单, 对选中加密操作时 将文件转换成安全文件, 选中解密操作时, 将安全文件转换为普通文件, 解密时需要输 入用户密码。
若在 Android手机上更改用户密码, 可通过下述操作歩骤实现:
在 Android 手机的设置项内可增加设置安全密码的菜单, 用户需要输入旧密码 (PW0) 和新密码 (PW1 ), 用旧密码 (PW0) 来解密 Key0, 若解密出来的 ID' 与机器唯 一码相同,则旧密码(PW0)正确,密码修改成功; 并用新密码(PW1 )加密旧密码(PW0), 得到 Keyl。 把 KeyO和 Keyl同时保存在 Key文件中。 仍然使用 KeyO加密和解密安全文 件。
再次修改密码时, 就需要输入 PW1和 PW2, 用 PW1去解密 Keyl得到 PW0' , 再用 PW0' 去解密 KeyO得到 ID' , 若 ID' 与机器唯一码相同, 则 PW1正确, 密码修改成功。 用 PW2去加密 PW0, 得到 Key2, 把 KeyO和 Key2保存在 Key文件中, Keyl丢弃。
在非授权情况下, 具有上述安全读、 写功能的 Android手机连接到电脑, 将手机中 的安全文件拷贝到其它设备(如: 平板电脑、 计算机) 中, 虽然安全文件可以正常拷贝 出来, 但在其它设备上因没有安全读、 写功能, 也没有解密用的密钥, 因此会由于无法 解读安全文件头的内容(一般长度为 1024个字节),从而无法获得安全文件的有效信息。
在授权情况下,用户可以通过解密操作,将手机中的安全文件先解密转换成普通文 件后, 再拷贝到其它设备 (如: 平板电脑、 计算机) 上, 即可正常读写。 实现时可在手 机上将操作设置为 "解密拷贝到…" 即可。
手机存储卡丢失或在非授权情况下被窃取,在其它手机或电脑上使用时,也一样无 法获取安全文件的有效信息。 若手机丢失后, 可以及时挂失, 通过运营商下发功能短信 删除 SIM卡上保存密钥的 Key文件, 从而可以阻止非授权査看手机上的安全文件内容。 手机丢失后, 即使没有挂失, 得到手机的用户也只能在本机上査看安全文件, 而因其没 有解密用的用户密码, 则不能将安全文件解密后拷贝到电脑或网络上使用与传播, 也有 效限制了因手机丢失造成的个人隐私泄露。 利用上述方法不仅可以保护手机中的多媒体文件(各种音、视频文件和图片文件), 如 Android手机的录音文件 (一般为 AMR格式) , 图像文件 (一般为 JPG格式) , 视频文 件 (一般为 3GP格式) 等, 也可以保护任何有复杂结构的数据文件, 包含但不限于地图 数据、 3D模型数据、 CAD数据等。 由于这些文件均具有较复杂的结构, 缺少了文件头信 息, 则很难恢复出文件的有效内容。 但由于 Txt、 Bmp等文件无文件头也能获得有用信息 的文件, 保密作用不明显, 并且由于对文件尺寸太小的文件, 压缩后没有足够的空间加 入安全文件头, 因此不能进行安全保护处理。
利用本发明实施例的方法, 使得 Android 手机等终端设备对存储的安全文件进行 读、 写操作时, 要依赖于对应的密钥 (如手机的机器唯一码和 /或用户输入的密码等), 使得安全文件只可以在该手机被正常读写, 而未解密时在其它机器 (手机、 平板电脑、 计算机等)上却无法 JH常读写,即使拷贝到其它机器上也无法打开获得安全文件的内容, 起到了很好保护安全文件内容, 避免手机等终端设备丢失后个人隐私信息泄露的目的。
可以知道,在运行其它操作系统的手机或终端设备上, 也可以通过本发明实施例提 供的方法, 对文件进行保护; 其实现方式与 Android手机中的实现方式基本相同, 在此 不再重复。 并且, 也可以在计算机运行的各种操作系统中利用该方法实现文件保护 (如 可通过 H00K文件读写函数来实现安全文件的读写操作), 使得受保护的安全文件只限于 在本机上使用, 而无法在其它设备或传到互联网上使用。
在 android手机中应用本实施例方法时, 可实现: (1 )对用手机拍摄的录音、 照片、 影像自动进行加密, 从而有效防止私人多媒体信息泄漏; (2 ) 即使手机丢失的情况下, 也可以安全地处理私人多媒体信息; (3) 由于将指定的要保护文件转换成安全文件时, 只处理文件头 (如可以是文件起始处的 1024字节的内容) , 文件操作的性能非常快, 不 影响操作效率; (4) 所有加密过的安全文件的尺寸没有变化, 对所有应用读写文件透 明, 不会产生其它影响。 实施例二
图 6为本发明实施例提供的文件的保护装置的结构示意图, 如图 4所示, 该文件的保 护装置包括: 安全文件头处理单元 21和替换处理单元 22; 其中,
所述安全文件头处理单元 21, 用于生成安全文件头;
所述替换处理单元 22,用于将所述安全文件头生成单元 21生成的所述安全文件头替 换要保护文件的原文件头, 使要保护的所述文件转换成安全文件; 由所述安全文件的安 全文件头阻止其它外部设备对该安全文件内容进行的访问操作。
上述装置中的安全文件头处理单元包括: 压缩单元 211、加密单元 212和标识信息加 入单元 213; 其中,
所述压缩单元 211, 用于对要保护文件的原文件头进行压缩;
所述加密单元 212, 用于对所述压缩单元压缩后的文件头内容进行加密得到加密文 件头;
所述标识信息加入单元 213, 用于向所述加密单元加密得到的加密文件头加入标识 信息得到的安全文件头。
上述装置中的所述安全文件头处理单元还可以包括: 密钥处理单元 214, 用于将用 户输入的密码对要保护的文件所在的本机设备的机器唯一码加密后得到密钥。
上述装置中的所述安全文件头处理单元还可以包括: 解密单元 215和解压缩单元 216; 其中,
所述解密单元 215, 用于对安全文件的安全文件头中的加密文件头进行解密; 所述解压缩单元 216, 用于对所述解密单元解密后的文件头内容进行解压缩得到原 文件头。
上述装置中的解密单元 215, 可由图 7所示的模块构成, 包括: 判断处理模块 2151和 密钥读取模块 2152; 其中,
所述判断处理模块, 用于在获取解密用的密钥时, 若密钥存储在安全文件所在的本 机设备的用户识别模块内, 判断所述本机设备的用户识别模块在运营网络上是否注册, 若注册, 则向所述密钥读取模块发出允许读取密钥的指令, 若未注册则返回无法获取解 密密钥的提示信息, 并发出停止后续处理的指令;
所述密钥读取模块,用于在收到所述判断处理模块允许读取密钥的指令后,从所述 本机设备的用户识别模块内读取存储的密钥。
本实施例的文件的保护装置, 可以设置在手机、 计算机等各种设备中, 对其中的文 件进行处理, 起到保护文件的作用。
综上所述, 利用本发明实施例的方法, 可以在 Android手机等终端设备或计算机中 可在不影响用户正常使用的情况下, 实现对多媒体等文件进行有效保护, 不允许在其它 机器上打开手机上受保护的安全文件的内容, 达到避免私密信息泄漏, 保护个人隐私的 目的。
以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到的变化或替 W 换, 都应涵盖在本发明的保护范围之内。 因此' 本发明的保护范围应该以权利要求的保 护范围为准。

Claims

权利要求
1、 一种文件的保护方法, 其特征在于, 该方法包括:
利用要保护文件的原文件头生成安全文件头,所述安全文件头能在未授权时限制对 其所在文件内容的访问;
用所述安全文件头替换所述要保护文件的原文件头,将所述要保护文件转换成安全 文件。
2、 根据权利要求 1所述的文件的保护方法, 其特征在于, 所述利用要保护文件的原 文件头生成安全文件头为:利用要保护文件的原文件头经压缩、加密后得到加密文件头, 再向所述加密文件头加入标识信息得到安全文件头。
3、 根据权利要求 2所述的文件的保护方法, 其特征在于, 所述加密是对压缩后的文 件头内容进行加密。
4、 根据权利要求 2或 3所述的文件的保护方法, 其特征在于, 所述加密采用的密钥 为- 由用户输入的密码对要保护文件所在的本机设备的机器唯一码加密后得到的密钥; 或者, 用户输入的密码和 /或要保护文件所在的本机设备的机器唯一码。
5、 根据权利要求 4所述的终端存储文件的保护方法, 其特征在于, 所述用户输入的 密码以及加密后得到的密钥均存储在所述要保护文件所在的本机设备的用户识别模块 中。
6、 根据权利要求 4所述的文件的保护方法, 其特征在于, 所述方法中, 采用以下方 式由用户输入的密码对要保护文件所在的本机设备的机器唯一码加密后得到密钥; 当用户第一次使用所述本机设备的录音机或照像机时, 提示用户输入密码; 利用用户输入的密码对所述本机设备的机器唯一码加密后得到加密用的密钥。
7、 根据权利要求 2至 6任一项所述的文件的保护方法, 其特征在于, 采用以下方式 向所述加密文件头加入标识信息:
将标识该文件为安全文件的标识信息加入到所述加密文件头之前,与所述加密文件 头组成安全文件头, 所述安全文件头的大小与所述要保护文件的原文件头大小一致。
8、 根据权利要求 1至 7任一项所述的文件的保护方法, 其特征在于, 所述用安全文 件头替换所述要保护文件的原文件头为:将所述安全文件头写入所述要保护文件的起始 位置替换该文件的原文件头。
9、 根据权利要求 1所述的文件的保护方法, 其特征在于, 所述要保护文件包括: 音 频文件、 图片文件、 视频文件、 地图数据文件、 3D模型数据文件、 CAD数据文件、 可执 行文件中的任一种或任意几种。
10、 根据权利要求 2至 7任一项所述的文件的保护方法, 其特征在于, 当所述要保护 文件所在的本机设备对该文件转换成的安全文件内容进行访问操作时,所述方法进一步 包括:
获取安全文件的安全文件头, 从所述安全文件头中获取加密文件头;
对加密文件头进行解密、 解压缩后得到原文件头的内容;
根据得到的所述原文件头内容取得所述安全文件的内容后再允许进行相应的访问 操作。
11、 根据权利要求 10所述的文件的保护方法, 其特征在于, 所述对加密文件头进行 解密包括:
获取解密用的密钥,所述密钥为对压缩后的原文件头进行加密得到加密文件头时所 用的密钥,
利用获取的所述密钥采用与加密算法相同或对应的解密算法对所述加密文件头进 行解密, 得到压缩的原文件头。
12、 根据权利要求 11所述的文件的保护方法, 其特征在于, 所述在获取解密用的密 钥时, 若密钥存储在安全文件所在的本机设备的用户识别模块内, 则判断所述本机设备 中的用户识别模块在运营网络上是否注册, 若注册, 则从用户识别模块内读取存储的密 钥; 若未注册, 则返回无法获取解密密钥的提示信息, 并停止后续的处理。
13、 一种文件的保护装置, 其特征在于, 该装置包括:
安全文件头处理单元和替换处理单元; 其中,
所述安全文件头处理单元, 用于利用要保护文件的原文件头生成安全文件头, 所述 安全文件头能在未授权时限制对其所在文件内容的访问;
所述替换处理单元, 用于用所述安全文件头替换所述要保护文件的原文件头, 将所 述要保护文件转换成安全文件。
14、 根据权利要求 13所述的文件的保护装置, 其特征在于, 所述安全文件头处理单 元包括:
压缩单元、 加密单元和标识信息加入单元; 其中,
所述压缩单元, 用于对要保护文件的原文件头进行压缩;
所述加密单元, 用于对所述压缩单元压縮后的文件头内容进行加密得到加密文件 头; 所述标识信息加入单元,用于向所述加密单元加密得到的加密文件头加入标识信息 得到安全文件头。
15、 根据权利要求 14所述的文件的保护装置, 其特征在于, 所述安全文件头处理单 元还包括:
密钥处理单元,用于将用户输入的密码对要保护文件所在的本机设备的机器唯一码 加密后得到密钥。
16、 根据权利要求 14或 15所述的文件的保护装置, 其特征在于, 所述安全文件头处 理单元还包括:
解密单元和解压缩单元; 其中,
所述解密单元, 用于对安全文件的安全文件头中的加密文件头进行解密; 所述解压缩单元,用于对所述解密单元解密后的文件头内容进行解压缩得到原文件 头。
17、 根据权利要求 16所述的文件的保护装置, 其特征在于, 所述解密单元包括: 判断处理模块和密钥读取模块; 其中,
所述判断处理模块, 用于在获取解密用的密钥时, 若密钥存储在安全文件所在的本 机设备的用户识别模块内, 判断所述本机设备的用户识别模块在运营网络上是否注册, 若注册, 则向所述密钥读取模块发出允许读取密钥的指令, 若未注册则返回无法获取解 密密钥的提示信息, 并发出停止后续处理的指令;
所述密钥读取模块, 用于在收到所述判断处理模块允许读取密钥的指令后, 从所述 本机设备的用户识别模块内读取存储的密钥。
PCT/CN2011/078428 2011-08-15 2011-08-15 文件的保护方法及装置 WO2011157242A2 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP11795208.5A EP2696305B1 (en) 2011-08-15 2011-08-15 Method and device for file protection
PCT/CN2011/078428 WO2011157242A2 (zh) 2011-08-15 2011-08-15 文件的保护方法及装置
CN201180001395.1A CN102334124B (zh) 2011-08-15 2011-08-15 文件的保护方法及装置
US14/090,971 US20140089684A1 (en) 2011-08-15 2013-11-26 Method and apparatus for protecting file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/078428 WO2011157242A2 (zh) 2011-08-15 2011-08-15 文件的保护方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/090,971 Continuation US20140089684A1 (en) 2011-08-15 2013-11-26 Method and apparatus for protecting file

Publications (2)

Publication Number Publication Date
WO2011157242A2 true WO2011157242A2 (zh) 2011-12-22
WO2011157242A3 WO2011157242A3 (zh) 2012-06-21

Family

ID=45348649

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/078428 WO2011157242A2 (zh) 2011-08-15 2011-08-15 文件的保护方法及装置

Country Status (4)

Country Link
US (1) US20140089684A1 (zh)
EP (1) EP2696305B1 (zh)
CN (1) CN102334124B (zh)
WO (1) WO2011157242A2 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567690A (zh) * 2011-12-27 2012-07-11 四川长虹电器股份有限公司 一种对flv文件进行加密的方法
CN103294968A (zh) * 2013-05-27 2013-09-11 苏州奇可思信息科技有限公司 一种档案安全管理系统
EP2890169A4 (en) * 2012-09-27 2015-09-02 Zte Corp METHOD AND DEVICE FOR PROTECTING CONFIDENTIAL DATA OF A MOBILE TERMINAL USER
EP2992478B1 (en) * 2013-05-03 2019-06-12 Citrix Systems, Inc. Disrupting password attack using compression

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930217B (zh) * 2012-09-26 2016-05-04 东莞宇龙通信科技有限公司 一种数据保密方法及装置
TW201441825A (zh) * 2013-04-23 2014-11-01 Hon Hai Prec Ind Co Ltd Usb重定向系統及方法
CN104134042B (zh) * 2013-07-18 2016-01-06 腾讯科技(深圳)有限公司 一种隐私文件加密方法及装置
CN103400064B (zh) * 2013-08-20 2016-08-24 北京网秦天下科技有限公司 用于文件加密和解密的方法和设备
US9424438B2 (en) 2014-03-31 2016-08-23 Sap Se Privacy leakage protection
US20150319147A1 (en) * 2014-05-01 2015-11-05 Sunix Co., Ltd System and method for file encrypting and decrypting
US10049228B2 (en) * 2015-01-20 2018-08-14 Microsoft Technology Licensing, Llc File encryption support for FAT file systems
CN104680083A (zh) * 2015-03-19 2015-06-03 福州瑞芯微电子有限公司 一种图片管理方法及装置
CN105117661B (zh) * 2015-08-04 2018-05-08 北京金山安全软件有限公司 一种文件保护方法及装置
CN105357206A (zh) * 2015-11-19 2016-02-24 杭州铭师堂教育科技发展有限公司 一种视频安全传输方法
CN105893864A (zh) * 2015-12-10 2016-08-24 乐视网信息技术(北京)股份有限公司 一种数据文件混淆方法、系统及客户端
US9590956B1 (en) 2015-12-18 2017-03-07 Wickr Inc. Decentralized authoritative messaging
CN105825143A (zh) * 2016-03-07 2016-08-03 乐视移动智能信息技术(北京)有限公司 一种应用程序写入和读取数据的方法及装置
CN108229203A (zh) * 2017-12-29 2018-06-29 北京安云世纪科技有限公司 一种终端中的文件保护方法及装置
CN108875403B (zh) * 2018-05-04 2020-09-25 北京明朝万达科技股份有限公司 一种文件管理方法及装置
CN111385656A (zh) * 2020-03-04 2020-07-07 四川长虹电器股份有限公司 户外电子广告机导入节目文件的权限管控方法
CN112214462B (zh) * 2020-10-22 2023-04-28 新华三信息安全技术有限公司 压缩文件的多层解压缩方法、电子设备及存储介质
CN113792319B (zh) * 2021-09-18 2024-06-18 深圳须弥云图空间科技有限公司 文件加密方法、装置、存储介质与电子设备

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IE914474A1 (en) * 1991-12-20 1993-06-30 Uken Res And Dev Ltd Security of stored data
US20030191938A1 (en) * 2002-04-09 2003-10-09 Solarsoft Ltd. Computer security system and method
CN100340938C (zh) * 2004-11-04 2007-10-03 华为技术有限公司 一种文件安全检测方法
WO2007045257A1 (en) * 2005-10-18 2007-04-26 Telecom Italia S.P.A. A method for controlling access to file systems, related system, sim card and computer program product for use therein
EP2113856A1 (en) * 2008-04-29 2009-11-04 Tiny Industries ApS Secure storage of user data in UICC and Smart Card enabled devices
CN100580684C (zh) * 2008-08-12 2010-01-13 无敌科技(西安)有限公司 嵌入式多媒体文件加密及解密的方法
US8533466B2 (en) * 2008-12-23 2013-09-10 Nbcuniversal Media, Llc Electronic file access control system and method
CN101694724A (zh) * 2009-10-21 2010-04-14 重庆大学 在数码相机jpeg图像中嵌入gps信息并确保图像安全的方法
GB201000288D0 (en) * 2010-01-11 2010-02-24 Scentrics Information Security System and method of enforcing a computer policy
US8499359B1 (en) * 2010-12-14 2013-07-30 Symantec Corporation Data loss prevention using an ephemeral key
CN102129540A (zh) * 2011-05-03 2011-07-20 北京思创银联科技股份有限公司 文件动态透明加密解密方法
US8892072B2 (en) * 2011-09-23 2014-11-18 Lg Electronics Inc. Mobile terminal and method of providing security thereto

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of EP2696305A4 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567690A (zh) * 2011-12-27 2012-07-11 四川长虹电器股份有限公司 一种对flv文件进行加密的方法
EP2890169A4 (en) * 2012-09-27 2015-09-02 Zte Corp METHOD AND DEVICE FOR PROTECTING CONFIDENTIAL DATA OF A MOBILE TERMINAL USER
US9426647B2 (en) 2012-09-27 2016-08-23 Zte Corporation Method and device for protecting privacy data of mobile terminal user
EP2992478B1 (en) * 2013-05-03 2019-06-12 Citrix Systems, Inc. Disrupting password attack using compression
CN103294968A (zh) * 2013-05-27 2013-09-11 苏州奇可思信息科技有限公司 一种档案安全管理系统

Also Published As

Publication number Publication date
CN102334124A (zh) 2012-01-25
CN102334124B (zh) 2014-08-20
EP2696305A4 (en) 2014-04-02
EP2696305A2 (en) 2014-02-12
WO2011157242A3 (zh) 2012-06-21
EP2696305B1 (en) 2018-03-21
US20140089684A1 (en) 2014-03-27

Similar Documents

Publication Publication Date Title
WO2011157242A2 (zh) 文件的保护方法及装置
US10148625B2 (en) Secure transfer and tracking of data using removable nonvolatile memory devices
JP4687703B2 (ja) 記録システム、情報処理装置、記憶装置、記録方法及びプログラム
TW514844B (en) Data processing system, storage device, data processing method and program providing media
US8233624B2 (en) Method and apparatus for securing data in a memory device
CN101971186B (zh) 信息泄露防止装置和方法及其程序
US9405925B2 (en) Content item encryption on mobile devices
JP2006178930A (ja) 権利情報管理方法および権利情報管理装置
JPWO2003034651A1 (ja) コンテンツ処理装置およびコンテンツ保護プログラム
WO2017215148A1 (zh) 文件保护方法及装置
JP4084971B2 (ja) 電子データ交換システムにおけるデータ保護装置及びデータ保護方法並びにそれに用いるプログラム
WO2013155800A1 (zh) 一种移动终端信息安全管理的方法、装置和移动终端
CN100364002C (zh) 读或写用户数据的设备和方法
US20050071662A1 (en) Method of managing file structure in memory card and its related technology
JP2006172351A (ja) リムーバブルメディア利用によるコンテンツの使用期限管理方法及びシステム
CN113806785B (zh) 一种用于对电子文档进行安全保护的方法及其系统
CN115033900A (zh) 一种基于区块链的电子数据取证方法及系统
CN1898625A (zh) 许可信息管理设备和许可信息管理方法
JP2003122643A (ja) コンテンツ読出装置
JP7086163B1 (ja) データ処理システム
JP2008506168A (ja) 移動型格納装置においてオブジェクトの位置情報を用いて権利オブジェクトを検索する方法および装置
JP4979601B2 (ja) 電子データ原本管理システムおよび電子データ原本管理システム用プログラム
US8094820B2 (en) Information recording/reproducing device
CN114741722A (zh) 一种数据存储装置及其信息安全处理方法
JP2011035494A (ja) 映像音声管理装置、再生装置、及び映像音声管理システム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180001395.1

Country of ref document: CN

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

Ref document number: 11795208

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE