WO2015184834A1 - 一种嵌入式存储设备文件的加解密方法、装置及终端 - Google Patents

一种嵌入式存储设备文件的加解密方法、装置及终端 Download PDF

Info

Publication number
WO2015184834A1
WO2015184834A1 PCT/CN2015/071571 CN2015071571W WO2015184834A1 WO 2015184834 A1 WO2015184834 A1 WO 2015184834A1 CN 2015071571 W CN2015071571 W CN 2015071571W WO 2015184834 A1 WO2015184834 A1 WO 2015184834A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
feature information
encrypted
key
encryption
Prior art date
Application number
PCT/CN2015/071571
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 中兴通讯股份有限公司
Publication of WO2015184834A1 publication Critical patent/WO2015184834A1/zh

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

Definitions

  • the present invention relates to the field of data security technologies, and in particular, to an encryption and decryption method, device, and terminal for an embedded storage device file.
  • MMC Multimedia Card
  • EMMC embedded Multi Media Card
  • SDCARD Secure Digital Memory Card
  • An existing encryption scheme usually performs a simple AES (Advanced Encryption Standard) encryption on a storage device through a weak password, and then decrypts the storage device before the file system is mounted. After the decryption succeeds, the decryption succeeds. Mount the decrypted data to a directory; there are some schemes, usually the file content is encrypted, but the file name sensitive information is not secured, so the target of the crack is very easy to obtain.
  • AES Advanced Encryption Standard
  • Encryption is carried out for the entire storage device.
  • the granularity is too large.
  • the embedded flash (flash memory) capacity is very large, and some can reach tens of G or even hundreds of G. If the entire storage device or partition is encrypted, It is bound to waste a lot of time, and the data of the entire flash space may not all be sensitive data that needs to be protected. This scheme is very inflexible because the granularity of the encrypted data is too large, and the encryption takes too long, which seriously affects the entire system. Efficiency and power consumption.
  • the input system and the authentication system are carried out in a non-secure environment of the terminal.
  • the professional can intercept the data in the input system.
  • the data in the password input box can be intercepted, so that the entire architecture loses security.
  • the exposed kernel usually calls the application layer controls to complete the data input.
  • the user can modify the kernel module to intercept the data passed to the kernel by the application layer data, and then obtain the password, so that the security data is obtained.
  • the technical problem to be solved by the present invention is to provide an encryption and decryption method, device and terminal for an embedded storage device file, which are used to solve the problem that the existing file encryption and decryption method in the embedded storage device is simple, and the data security level is low. It is easy to cause user data leakage problems.
  • an embodiment of the present invention provides an encryption method for an embedded storage device file, including:
  • the operating environment of the terminal that triggers the embedded storage device is switched to a secure environment.
  • the step of acquiring the first feature information input by the user includes:
  • step of performing encryption processing on the original file according to the first key to generate an encrypted file includes:
  • the step of encrypting the parent directory path by using the first encryption algorithm to generate the file name of the parent directory file encrypted by the original file according to the first key includes:
  • the step of dividing the content of the original file into a plurality of file slices and generating a file name of each file slice includes:
  • a file name with a uniform identifier is generated for each slice in order.
  • the file name of each file slice is separately encrypted by using a second encryption algorithm, and a step package for generating an encrypted file name corresponding to each file slice is generated.
  • the step of performing encryption processing on the data in each file slice by using a third encryption algorithm according to the first key to generate encrypted data corresponding to each file piece includes:
  • the third data is encrypted by using a fourth encryption algorithm to generate encrypted data corresponding to each file slice.
  • the encryption method further includes:
  • the first feature information is character information, fingerprint information or short-range wireless communication information input by a user.
  • the second feature information is a pre-stored unique identifier of the terminal where the embedded storage device is located.
  • An embodiment of the present invention provides an encryption device for an embedded storage device file, including:
  • a first obtaining module configured to acquire an original file to be encrypted in the embedded storage device
  • a second acquiring module configured to acquire first feature information input by the user
  • the comparison module is configured to compare the first feature information with pre-stored user identification feature information
  • a third acquiring module configured to acquire second feature information when the comparison is passed
  • a key generation module configured to process the first feature information and the second feature information according to a first preset rule to generate a first key
  • the encryption module is configured to perform encryption processing on the original file according to the first key to generate an encrypted file.
  • An embodiment of the present invention provides a method for decrypting an embedded storage device file, including:
  • the second key is the same key as the key for generating the encrypted file.
  • An embodiment of the present invention provides a device for decrypting an embedded storage device file, including:
  • a first obtaining unit configured to acquire an encrypted file in the embedded storage device
  • a second acquiring unit configured to acquire first feature information input by the user
  • Aligning unit configured to compare the first feature information with a pre-stored user identification feature
  • a third acquiring unit configured to acquire second feature information when the comparison is passed
  • a key generating unit configured to process the first feature information and the second feature information to generate a second key
  • Decrypting unit configured to decrypt the encrypted file according to the second key, and if the decryption is successful, obtain an original file corresponding to the encrypted file;
  • the second key is the same key as the key for generating the encrypted file.
  • the embodiment of the present invention further provides a terminal, including: an encryption device and a decryption device; wherein
  • the encryption device is set to:
  • the decryption device is configured to:
  • the second key and the first key are the same key.
  • the above solution realizes the encryption and decryption operation of the file by utilizing the user characteristic information and the terminal characteristic information of the embedded storage device, thereby enhancing the security of the user information and ensuring the personal interests of the user.
  • FIG. 2 is a schematic diagram of file segmentation and encryption according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of an encryption device according to an embodiment of the present invention.
  • FIG. 4 is a general flowchart of a decryption method according to an embodiment of the present invention.
  • FIG. 5 is a block diagram of a decryption apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic block diagram of a terminal according to an embodiment of the present invention.
  • FIG. 7 is a flowchart showing an encryption implementation of a terminal having an encryption and decryption function according to an embodiment of the present invention.
  • the method for encrypting and decrypting files in an embedded storage device is simple, and the data security level is low, which is easy to cause user data leakage.
  • the embodiment of the invention provides an encryption method for an embedded storage device file, including:
  • Step 101 Acquire an original file to be encrypted in the embedded storage device.
  • Step 102 Acquire first feature information input by a user
  • Step 103 Compare the first feature information with pre-stored user identification feature information.
  • Step 104 If the comparison is passed, acquiring the second feature information
  • Step 105 Process the first feature information and the second feature information according to a first preset rule to generate a first key.
  • Step 106 Perform encryption processing on the original file according to the first key to generate an encrypted file.
  • the first feature information may be character information input by a user (ie, weak password information), fingerprint information, or Near Field Communication (NFC) information.
  • weak password it can greatly reduce the security of the ciphertext.
  • the password does not represent the unique identity of the user in a certain sense, anyone can use the mobile terminal if the password is obtained.
  • the input module enters the password and completes the ciphertext decryption process. Therefore, the first feature information in the embodiment of the present invention is preferably fingerprint information, NFC information, or other information that uniquely identifies a user identity; the second feature information may be fixed character information or the embedded storage stored in advance. The unique identifier of the terminal where the device is located.
  • the second feature information in the present invention is preferably unique identification information of the terminal where the embedded storage device is located.
  • the above solution cannot decrypt the ciphertext by relying on the feature information uniquely characterizing the user and the identification information uniquely characterizing the portable mobile terminal without relying on the embedded storage device, the user feature information or any change of the portable mobile terminal. Therefore, the decryption of the ciphertext requires a specific user to complete on a specific terminal, which greatly improves the security of the ciphertext.
  • the encryption method can also implement encryption of the input data. It should be noted that when encrypting the input data, the input number is first created in the embedded storage device. The file path and file name.
  • the method further includes:
  • the operating environment of the terminal that triggers the embedded storage device is switched to a secure environment.
  • the security environment is a special operation mode of the portable mobile terminal, and is used for completing a series of functions such as key and authentication, and has a very high security level unlike the normal operating environment.
  • the step 102 includes:
  • the first feature information is fingerprint information
  • performing DSP digital signal processing
  • fingerprint sampling and fingerprint feature value extraction the fingerprint is obtained.
  • Feature information Feature information
  • step 105 can be implemented by various prior art means well known to those skilled in the art, and will not be described in detail herein.
  • the step 106 includes:
  • the data in each of the file slices is separately encrypted by using a third encryption algorithm to generate encrypted data corresponding to each file slice;
  • the step b may include:
  • the step c may include:
  • the content of the original file is divided into a plurality of files of equal size
  • the file is divided into several equal files.
  • the file size can be divided according to the encryption algorithm used.
  • the step d may include:
  • the file name of each file slice is separately encrypted by using a second encryption algorithm, and the encrypted second data is obtained;
  • the step e may include:
  • an encryption process of a file is:
  • the original file 100 is divided into equal-sized segments_1 (111), segments_2 (112), segments _3...fragments _n, and each file segment is named according to a certain format (for example, filename_S0001, filename_S0002, etc.) );
  • fragment_1 is first encrypted by AES256 symmetric encryption algorithm, after encryption
  • the result is encrypted by using a HMAC (Hash-based Message Authentication Code) algorithm, and the result is written into the corresponding encrypted segment_1 (113);
  • HMAC Hash-based Message Authentication Code
  • the encryption algorithm and encoding method are not limited to the HMAC algorithm, the AES256 algorithm, and the BASE64 encoding method described above.
  • the encrypted file needs to be placed under the folder of the independent path.
  • the encryption method further includes:
  • an embodiment of the present invention provides an encryption device for an embedded storage device file, including:
  • the first obtaining module 110 is configured to acquire an original file to be encrypted in the embedded storage device.
  • the second obtaining module 120 is configured to acquire first feature information input by the user
  • the comparison module 130 is configured to compare the first feature information with pre-stored user identification feature information
  • the third obtaining module 140 is configured to acquire the second feature information when the comparison is passed;
  • the key generation module 150 is configured to process the first feature information and the second feature information according to a first preset rule to generate a first key
  • the encryption module 160 is configured to perform encryption processing on the original file according to the first key to generate an encrypted file.
  • the encryption device further includes:
  • the triggering module is configured to switch the operating environment of the terminal where the embedded storage device is located to a secure environment.
  • the encryption module 160 includes:
  • a first generation submodule configured to use the first encryption algorithm to perform the The parent directory path is encrypted, and the encrypted file name of the parent directory file of the original file is generated;
  • the second generation sub-module is configured to perform encryption processing on the file names of each of the file slices by using a second encryption algorithm according to the first key, to generate an encrypted file name corresponding to each file slice;
  • the third generation sub-module is configured to perform encryption processing on the data in each of the file slices by using a third encryption algorithm according to the first key, to generate encrypted data corresponding to each file slice;
  • the encryption device further includes:
  • a transmission module configured to transmit the encrypted file to the embedded storage device such that the encrypted file is saved in the embedded storage device.
  • an embodiment of the present invention provides a method for decrypting an embedded storage device file, including:
  • Step 201 Acquire an encrypted file in the embedded storage device.
  • Step 202 Acquire first feature information input by a user
  • Step 203 Compare the first feature information with a pre-stored user identification feature.
  • Step 204 If the comparison is passed, acquiring the second feature information
  • Step 205 Process the first feature information and the second feature information to generate a second key.
  • Step 206 Perform decryption processing on the encrypted file according to the second key, and if the decryption is successful, the original file corresponding to the encrypted file is obtained;
  • the second key is the same key as the key for generating the encrypted file.
  • an embodiment of the present invention provides a decryption apparatus for an embedded storage device file, including:
  • the first obtaining unit 210 is configured to acquire an encrypted file in the embedded storage device.
  • the second obtaining unit 220 is configured to acquire first feature information input by the user
  • the matching unit 230 is configured to set the first feature information with a pre-stored user identification feature Make comparisons
  • the third obtaining unit 240 is configured to acquire the second feature information when the comparison is passed;
  • the key generation unit 250 is configured to process the first feature information and the second feature information to generate a second key
  • the decrypting unit 260 is configured to perform decryption processing on the encrypted file according to the second key, and if the decryption is successful, the original file corresponding to the encrypted file is obtained;
  • the second key is the same key as the key for generating the encrypted file.
  • the decryption process of the encrypted file is specifically:
  • Step a1 parsing the parent folder through the file path, using BASE64 to decode the parent folder name, and then using the AES256 algorithm to perform the decryption operation, and obtaining the decrypted result is the folder name corresponding to the parent folder of the original file;
  • Step a2 performing BASE64 decoding on the file name of the encrypted segment_1 (113) in the ciphertext folder, and then performing AES256 decryption to obtain the file name of the original file segment_1 (111);
  • Step a3 decrypting the data in the encrypted segment_1 using the HMAC algorithm to obtain the information value, and then decrypting using the AES256 algorithm to obtain the original text of the segment_1;
  • Step a4 repeating step a2 and step a3, decrypting the data of all the encrypted segments until all the ciphertext segments are decrypted;
  • step a5 the original file 100 is restored by combining the restored file segment_1, segment_2 etcment_n according to the naming rule.
  • the embodiment of the present invention further provides a terminal, including: an encryption device and a decryption device; wherein
  • the encryption device is set to:
  • the decryption device is configured to:
  • the second key and the first key are the same key.
  • the encryption device and the decryption device on the terminal are usually integrated to implement encryption and decryption of files.
  • the terminal includes an input module 301, a data collection processing module 302, an identity authentication module 303, an encryption and decryption module 304, and a transmission module 305, where:
  • the input module 301 is configured to input the feature information of the user, which is limited by the configuration status of the portable mobile terminal, and is used for receiving the identity information of the user, initiated by the normal running environment, and switched to the security environment to adjust the input module, suggesting The user-identified identity information is characterized by the security information.
  • a device that characterizes a user such as NFC may be employed as an input module. If the terminal has a fingerprint system, the fingerprint system may be used as an input module to characterize user identity authentication information.
  • the purpose of the input module 301 is to receive information from the user identity authentication, including but not limited to weak/strong password input, NFC, fingerprint, and any simple or complicated device capable of characterizing the user can be replaced and portable.
  • the input module of the mobile terminal is configured to input the feature information of the user, which is limited by the configuration status of the portable mobile terminal, and is used for receiving the identity information of the user, initiated by the normal running environment, and switched to the security environment to adjust the input module, suggesting The user-identified identity information is
  • the data collection module 302 is configured to perform centralized processing on the data input by the input module 301, and the processed data directly serves as an input of the identity authentication module 303.
  • the function of the data acquisition module is very simple, only the data input by the input module is collected.
  • the data acquisition module completes the DSP processing of the user fingerprint image, including fingerprint sampling and fingerprint feature values.
  • the function of the data collection module 302 is to extract feature information representing the unique identity of the user through the information data provided by the input module 301.
  • the identity authentication module 303 is configured to complete the user information registration and the authentication user identity information.
  • the identity authentication module 303 can receive the input information from the data collection module 302, and authenticate the user identity. After the authentication succeeds, the next step can be performed. Encryption and decryption operation, if the authentication fails, then the knot The entire encryption and decryption process.
  • the identity authentication module 303 can complete the registration of the user identity by receiving different input parameters, and the user identity registration can be expressed in different forms.
  • the first solution stores the user registration information in a local secure storage area of the portable mobile terminal
  • the local secure storage area may be a storage area on the EMMC or a QFPROM integrated in the terminal (the QFPROM indicates once) Programming memory, similar to One Time Programmable Read Only Memory.
  • the definition of a locally secure storage area is not limited to the above two types, and can also be accomplished by software encryption.
  • the user registration information is securely stored by the remote network server, and the user authentication module 303 can encrypt and store the user registration information to the remote server through an asymmetric encryption algorithm to complete the registration of the user identity information.
  • the purpose of the identity authentication module 303 is to store user information and authentication user feature information.
  • the processing of storage and authentication includes but is not limited to the above two solutions, and may be replaced by other means.
  • the encryption and decryption module 304 functions to complete the encryption and decryption function of the file data, and transmits the encrypted data to the embedded storage device through the transmission module 305.
  • the encryption and decryption module 304 is fully operational in a secure environment.
  • the security environment is another mode in which portable mobile terminals operate. Portable mobile terminals can be freely switched between in a secure environment and in a normal environment.
  • the encryption and decryption module 304 should include at least a key generator, an encryption and decryption algorithm, such as HMAC, AES256, and a commonly used array signature algorithm, such as MD5 (Message-Digest Algorithm 5), SHA256 (SHA256 algorithm).
  • the hash value is 256 bits), and supports common functions such as BASE64 codec, but it is not limited to these functions.
  • the identity authentication module 303 passes the user identity feature information data to the encryption and decryption module 304.
  • the encryption and decryption module 304 uses the user identity feature information data as the first parameter input quantity, and uses the hardware unique code (for example, the chip serial number, etc.) of the portable mobile terminal as The second parameter input is passed to the key generator for operation, and a set of unique keys is output. When the input parameters change, the key of the output changes. That is, different user identity information or different portable mobile terminals as input will get different keys, which are used to encrypt the file fragments.
  • the transmission module 305 may encrypt or decrypt the file in the manner of a file slice, or may perform unified transmission after obtaining a complete encrypted or decrypted file.
  • the overall process of encryption or decryption is: when the system switches to a secure environment, the input module 301 is invoked, and the user inputs characteristic information (such as weak/strong password, fingerprint, NFC, etc.) that characterizes the user, through
  • the data collection processing module 302 processes and obtains user feature information, and transmits the user feature information to the identity authentication module 303.
  • the identity authentication module 303 verifies the user identity, and passes the user identity feature information to the encryption and decryption module 304 after the verification is passed, and encrypts and decrypts.
  • the module 304 uses the identity information and the unique identifier of the portable mobile terminal as input factors to generate a one-to-one key group, and uses the key group to encrypt the encrypted file and transmit it to the embedded storage device for storage or ciphertext. Decrypt the assembly to restore the original text.
  • step S102 it is determined whether the file encryption operation is to be performed, if yes, proceed to step S103, otherwise, return to step S101;
  • the security control is adjusted in the security mode, and the feature information is input by the user;
  • S105 Collect feature information of the processing user.
  • step S106 performing user identity verification, if the identity is legal, proceeding to step S107, if the identity is not legal, proceeding to step S109, switching from the security mode to the normal mode, and entering the idle state;
  • step S109 After the ciphertext is stored, the state is switched to step S109, and the mode is switched from the safe mode to the normal operation mode. Then, the process proceeds to step S101, the system is in the normal mode idle state, and other operations are received.
  • the present invention can implement encryption and storage of private information of multiple users on the same storage device without interfering with each other. For example, multiple users share the same embedded storage device, and each user can store their private information in a shared embedded storage device, and encrypt and store the private information using its own identity and a specific mobile terminal. Other users cannot decrypt ciphertext that is not self-encrypted.
  • the invention can perform encryption and decryption operations on the file system level on the files in the embedded storage device in the portable mobile terminal, and realize the encryption of the original text and the restoration of the ciphertext, and the encryption and decryption depend on the identification of the user identity authentication module and the portable mobile terminal.
  • the encryption and decryption operations are performed in a secure environment of the portable mobile terminal.
  • the feature value of the user identity authentication information can be used as an encryption input factor.
  • the encryption process uses a special segmentation method to hide the ciphertext file name and file length to achieve data security protection.
  • the encrypted data cannot be cracked. Only when the three parts of data are completely acquired, can the pair be Encrypted data for complete decryption to restore ciphertext, with a very high level of security.
  • the above solution solves the problem of file storage security in the embedded storage device, and can encrypt the original text and decrypt the ciphertext on the data in the series storage devices such as the EMMC card and the SD card.
  • the encryption of the data depends on the user identity authentication feature information and the unique identification information of the portable mobile terminal, and the encryption and decryption operation of the file is completed by the encryption and decryption module in a secure environment.
  • the result of file encryption realizes the hiding of the original file name and file length, and improves the security of ciphertext from three aspects: user identity, portable mobile terminal and file encryption method, effectively preventing users from being stored on the embedded storage device under unexpected circumstances.
  • the sensitive data is cracked by the third party, and can effectively prevent the malicious damage caused by the user after cracking the sensitive data, greatly improving the decryption difficulty of the attacker, enhancing the security of the user information, and ensuring the personal interests of the user.
  • the file encryption process of the present invention is an encryption built on the file system level, so the disadvantages of excessive encryption, time-consuming encryption process, system performance, etc. in the encryption scheme of the entire embedded storage device are overcome. Any file in the storage device can be arbitrarily encrypted without having to consider the overhead of encrypting the entire storage device due to the need to encrypt a single file.
  • the present invention can also implement the encryption protection function of different users in the same portable mobile terminal for each private information, and if it is classified according to the user grouping manner, it can also be extended to a user group to the file. Encryption and decryption operations.
  • the above solution realizes the encryption and decryption operation of the file by utilizing the user characteristic information and the terminal characteristic information of the embedded storage device, thereby enhancing the security of the user information and ensuring the personal interests of the user.

Landscapes

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

Abstract

一种嵌入式存储设备文件的加解密方法、装置及终端。其中,加密方法包括:获取嵌入式存储设备中待加密的原始文件;获取用户输入的第一特征信息;将所述第一特征信息与预先存储的用户标识特征信息进行比对;若比对通过,则获取第二特征信息;根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。上述方案,通过利用用户特征信息以及嵌入式存储设备所在的终端的特征信息,实现对文件的加密,增强了用户信息的安全性,同时保证了用户的人身利益。

Description

一种嵌入式存储设备文件的加解密方法、装置及终端 技术领域
本发明涉及数据安全技术领域,特别涉及一种嵌入式存储设备文件的加解密方法、装置及终端。
背景技术
随着科技的发展,如今各类便携设备不断涌现,对嵌入式存储设备性能的需求也越来越高。MMC(Multimedia Card,多媒体卡)、EMMC(Embedded Multi Media Card,它是针对手机或平板电脑等产品的内嵌式存储器标准规格)、SDCARD(Secure Digital Memory Card,安全数码卡)等嵌入式存储设备的技术也在不断的提高,其特点是容量增大,读写速度高,携带方便。用户对容量不断提升的需求原因是大量的用户数据需要存储,例如电影、图片、文件和其它一些重要和不用的数据。
有时用户会将一些非常重要的信息数据存入到嵌入式存储设备中,这些数据必须具备极高的安全性,信息内容不能被其它任何人获取。例如存入支付宝密码、用户身份、重要的联系人信息、银行密码等。这些信息对用户来说必须具备最高的安全级别,即使将数据直接损坏,也不能被第三方获取。因为一旦这些数据丢失,他人极有可能利用这些信息做出一些不法行为,对失主造成极大的人身威胁和损害。
现有加密方案,通常是对通过一个弱密码对存储设备进行简单的AES (Advanced Encryption Standard,高级加密标准)加密,然后在挂载文件系统前,对存储设备进行解密运算,解密成功后,再将解密后的数据挂载到某个目录;还有一些方案,通常是对文件内容进行了加密操作,但是文件名敏感信息并未得到安全保护,这样破解的目标就非常容易获得。
上述方案主要存在以下缺点:
1)通过弱密码保护数据,非常不安全,很容易泄露密码,没有身份认证环节,丧失加密数据的身份认证属性,导致密文脱离与使用者的关联。
2)加密是针对整个存储设备进行,颗粒过大,现在的嵌入式flash(闪存)容量都很大,有的可达到几十G,甚至几百G,如果对整个存储设备或者分区进行加密,势必浪费很多时间,而整个flash空间的数据不一定全都是需要保护的敏感数据,这种方案很不灵活,原因在于加密数据的颗粒过大,而且加密的耗时过长,严重影响整个系统的效率和功耗。
3)输入体系和认证体系在终端非安全环境下进行,专业人员可以截获输入系统里面数据,比如说可以对密码输入框中的数据进行截获,使得整个架构丧失安全能力。例如,公开的内核通常调用应用层的控件来完成数据输入,此时用户可以通过修改自己的内核模块,截取应用层数据传递到内核的数据,进而获取密码,致使安全数据被获取。
4)传统的文件加密方法直接对文件数据进行加密,文件名是直接暴露给用户的,这就导致敏感文件的目标明显,容易让攻击者锁定目标,降低了攻击者的难度。
发明内容
本发明要解决的技术问题是提供一种嵌入式存储设备文件的加解密方法、装置及终端,用以解决现有的对嵌入式存储设备中的文件加解密方式简单,使得数据安全级别较低,容易造成用户数据泄露的问题。
为了解决上述技术问题,本发明实施例提供一种嵌入式存储设备文件的加密方法,包括:
获取嵌入式存储设备中待加密的原始文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征信息进行比对;
若比对通过,则获取第二特征信息;
根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
进一步地,在所述获取嵌入式存储设备中待加密的原始文件的步骤之后, 还包括:
触发所述嵌入式存储设备所在的终端的操作环境切换为安全环境。
进一步地,所述获取用户输入的第一特征信息的步骤包括:
获取用户输入的标识信息;
对所述标识信息进行处理,获取得到第一特征信息。
进一步地,所述根据所述第一密钥对所述原始文件进行加密处理,生成加密文件的步骤包括:
获取所述原始文件的父目录路径;
根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名;
将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名;
根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名;
根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,生成每个文件片对应的加密数据;
在分别对所述多个文件片处理完成后,便生成了加密文件。
进一步地,所述根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名的步骤具体包括:
根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,获取加密后的第一数据;
对所述第一数据进行数据处理,生成所述原始文件的父目录文件加密后的文件名。
进一步地,所述将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名的步骤包括:
根据第二预设规则,将所述原始文件的内容分为多个大小相等的文件片;
按顺序为每个文件片生成具有统一标识的文件名。
进一步地,所述根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名的步骤包 括:
根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密,获取加密后的第二数据;
对所述第二数据进行数据处理,生成所述文件片对应的加密文件名。
进一步地,所述根据所述第一密钥,利用第三加密算法分别对所述每个文件片中数据进行加密处理,生成每个文件片对应的加密数据的步骤包括:
根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,获取得到加密后的第三数据;
利用第四加密算法对所述第三数据进行加密处理,生成每个文件片对应的加密数据。
进一步地,所述加密方法,还包括:
传输所述加密文件到嵌入式存储设备,使得所述加密文件保存在所述嵌入式存储设备中。
进一步地,所述第一特征信息为用户输入的字符信息、指纹信息或近距离无线通信信息。
进一步地,所述第二特征信息为预先存储的所述嵌入式存储设备所在的终端的唯一标识。
本发明实施例提供一种嵌入式存储设备文件的加密装置,包括:
第一获取模块,设置为获取嵌入式存储设备中待加密的原始文件;
第二获取模块,设置为获取用户输入的第一特征信息;
比对模块,设置为将所述第一特征信息与预先存储的用户标识特征信息进行比对;
第三获取模块,设置为在所述比对通过时,获取第二特征信息;
密钥生成模块,设置为根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
加密模块,设置为根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
本发明实施例提供一种嵌入式存储设备文件的解密方法,包括:
获取嵌入式存储设备中的加密文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征进行比对;
若比对通过,则获取第二特征信息;
将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
根据所述第二密钥对所述加密文件进行解密处理,若解密成功,则得到了所述加密文件对应的原始文件;
其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
本发明实施例提供一种嵌入式存储设备文件的解密装置,包括:
第一获取单元,设置为获取嵌入式存储设备中的加密文件;
第二获取单元,设置为获取用户输入的第一特征信息;
比对单元,设置为将所述第一特征信息与预先存储的用户标识特征进行比对;
第三获取单元,设置为在所述比对通过时,获取第二特征信息;
密钥生成单元,设置为将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
解密单元,设置为根据所述第二密钥对所述加密文件进行解密处理,若解密成功,则得到了所述加密文件对应的原始文件;
其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
本发明实施例还提供一种终端,包括:加密装置和解密装置;其中,
所述加密装置,设置为:
获取嵌入式存储设备中待加密的原始文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征信息进行比对;
若比对通过,则获取第二特征信息;
根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
根据所述第一密钥对所述原始文件进行加密处理,生成加密文件;
所述解密装置,设置为:
获取嵌入式存储设备中的加密文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征进行比对;
若比对通过,则获取第二特征信息;
将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
根据所述第二密钥对所述加密文件进行解密处理,若解密成功,则得到了加密文件对应的原始文件;
其中,所述第二密钥与第一密钥为相同的密钥。
本发明的有益效果是:
上述方案,通过利用用户特征信息以及嵌入式存储设备所在的终端特征信息,实现文件的加解密操作,增强了用户信息的安全性,同时保证了用户的人身利益。
附图概述
图1为根据本发明实施例的加密方法的总体流程图;
图2为根据本发明实施例的文件分割与加密示意图;
图3为根据本发明实施例的加密装置的模块示意图;
图4为根据本发明实施例的解密方法的总体流程图;
图5为根据本发明实施例的解密装置的模块示意图;
图6为根据本发明实施例的终端的模块示意图;
图7为根据本发明实施例的具有加解密功能的终端的加密实现流程图。
本发明的较佳实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明进行详细描述。
针对现有的对嵌入式存储设备中的文件加解密方式简单,使得数据安全级别较低,容易造成用户数据泄露的问题,本发明实施例提供一种嵌入式存储设备文件的加密方法,包括:
步骤101,获取嵌入式存储设备中待加密的原始文件;
步骤102,获取用户输入的第一特征信息;
步骤103,将所述第一特征信息与预先存储的用户标识特征信息进行比对;
步骤104,若比对通过,则获取第二特征信息;
步骤105,根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
步骤106,根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
应当说明的是,在本发明实施例中所述第一特征信息可以为用户输入的字符信息(即弱密码信息)、指纹信息或近距离无线通信(NFC)信息。但是,弱密码作为表征用户特征身份信息,会大大降低密文的安全性,因为密码在某种意义上并不能表征用户唯一身份,任何人都可以在获得密码的情况下,使用该移动终端的输入模块将密码输入,并完成密文解密过程。所以,本发明实施例中所述第一特征信息优选为指纹信息、NFC信息或其它唯一表征用户身份的信息;所述第二特征信息可以为固定的字符信息或者预先存储的所述嵌入式存储设备所在的终端的唯一标识。这里,虽然使用某一个固定的字符信息作为生成密钥的输入因子,同样可以达到对预期文件加密的结果,依然可以保证用户身份特征信息、便携移动终端,密文三者的完整依赖性,可以对密文进行解密,但是,存储在嵌入式存储设备中的加密文件可以在相同软件版本同型号的便携移动终端中由同一个用户完成整个密文的解密过程,这样实质上是将对单个移动终端的依赖,扩大到同型号的移动终端,同样降低了密文的安全性。因此,本发明中所述第二特征信息优选为所述嵌入式存储设备所在的终端的唯一标识信息。
上述方案,依赖于唯一表征用户身份的特征信息和唯一表征便携移动终端的标识信息,而不依赖于嵌入式存储设备,用户特征信息或者便携移动终端任何一方发生变化,都无法对密文进行解密,所以密文的解密需要特定用户在特定的终端上才能完成,极大的提高了密文的安全性。
应当说明的是,所述加密方法还可以实现对输入数据的加密,要注意的是,在进行输入数据的加密时,首先要在嵌入式存储设备中创建所述输入数 据的文件路径及文件名。
为了保证整个加密过程的安全,在所述步骤101之后,可选地,还包括:
触发所述嵌入式存储设备所在的终端的操作环境切换为安全环境。
应当说明的是,所述安全环境是便携移动终端的一种特殊的运作模式,用于完成密钥和认证等一系列功能,区别于正常操作环境,具有极高的安全级别。
在所述第一特征信息不为弱密码时,可选地,所述步骤102包括:
获取用户输入的标识信息;
对所述标识信息进行处理,获取得到第一特征信息。
例如,当所述第一特征信息为指纹信息时,对获取的用户输入的指纹图片进行DSP(digital signal processing,数字信号处理),包括指纹采样和指纹特征值提取,处理完成后,便得到指纹特征信息。
应当说明的是,所述步骤105可以采用本领域技术人员所熟知的各种现有技术手段实现,在此不再进行详细的说明。
为了较好的隐藏用户的加密文件,可选地,所述步骤106包括:
a.获取所述原始文件的父目录路径;
b.根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名;
c.将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名;
d.根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名;
e.根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,生成每个文件片对应的加密数据;
在分别对所述多个文件片处理完成后,便生成了加密文件。
具体地,所述步骤b可以包括:
b1.根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,获取加密后的第一数据;
b2.对所述第一数据进行数据处理,生成所述原始文件的父目录文件加密后的文件名。
具体地,所述步骤c可以包括:
c1.根据第二预设规则,将所述原始文件的内容分为多个大小相等的文件片;
c2.按顺序为每个文件片生成具有统一标识的文件名。
通常将文件分为若干相等的文件片,在实际应用中也可以根据所用的加密算法对文件长度的要求进行文件片的划分。
具体地,所述步骤d可以包括:
d1.根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密,获取加密后的第二数据;
d2.对所述第二数据进行数据处理,生成所述文件片对应的加密文件名。
具体地,所述步骤e可以包括:
e1.根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,获取得到加密后的第三数据;
e2.利用第四加密算法对所述第三数据进行加密处理,生成每个文件片对应的加密数据。
如图2所示,根据本发明实施例的一种文件的加密流程为:
1)将原始文件100分割为大小相等的片段_1(111),片段_2(112),片段_3…片段_n,每个文件片段分别按照某种格式进行命名(例如filename_S0001,filename_S0002等);
2)从文件路径名中获取原始文件100的父文件夹路径,使用AES256(密钥长度为256位的高级加密标准)算法对文件夹进行加密获得信息A,再用BASE64(BASE64是网络上最常见的用于传输8Bit字节代码的编码方式之一)编码处理方式对信息A进行编码处理(因在利用加密算法进行加密后,获得的信息A中可能包含有不能作为文件名的非法字符,所以在此需要对信息A进行编码处理),加密后的数据作为加密后新文件夹的名字;
3)对片段_1的文件名filename_S0001使用AES256算法加密生成密文A1,再用BASE64编码对A1进行编码处理得到文件片段_1对应的密文的文件名;
4)将片段_1的内容数据先通过AES256对称加密算法进行加密,加密后 的结果再使用HMAC(Hash-based Message Authentication Code,密钥相关的哈希运算消息认证码)算法进行加密,将结果写入对应加密片段_1(113)中;
应当说明的是,使用双层加密技术,可以加强文件片中内容的安全性;
5)重复步骤3和步骤4,直到目标文件夹下面所有文件片段全部处理完成,便得到了完整的加密文件。
所述加密算法和编码方法并不局限于上述的HMAC算法、AES256算法以及BASE64编码方法。
应当说明的是,为了达到防止攻击范围暴露的目的,本发明实施例中加密文件需要放入独立路径的文件夹下面。
可选地,所述加密方法,还包括:
传输所述加密文件到嵌入式存储设备,使得所述加密文件保存在所述嵌入式存储设备中。
如图3所示,对应于上述加密方法,本发明实施例提供一种嵌入式存储设备文件的加密装置,包括:
第一获取模块110,设置为获取嵌入式存储设备中待加密的原始文件;
第二获取模块120,设置为获取用户输入的第一特征信息;
比对模块130,设置为将所述第一特征信息与预先存储的用户标识特征信息进行比对;
第三获取模块140,设置为在所述比对通过时,获取第二特征信息;
密钥生成模块150,设置为根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
加密模块160,设置为根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
可选的,所述加密装置,还包括:
触发模块,设置为触发所述嵌入式存储设备所在的终端的操作环境切换为安全环境。
可选地,所述加密模块160,包括:
获取子模块,设置为获取所述原始文件的父目录路径;
第一生成子模块,设置为根据所述第一密钥,利用第一加密算法对所述 父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名;
拆分子模块,设置为将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名;
第二生成子模块,设置为根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名;
第三生成子模块,设置为根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,生成每个文件片对应的加密数据;
在分别对所述多个文件片处理完成后,便生成了加密文件。
可选的,所述加密装置,还包括:
传输模块,设置为传输所述加密文件到嵌入式存储设备,使得所述加密文件保存在所述嵌入式存储设备中。
如图4所示,对应于上述的加密方法,本发明实施例提供一种嵌入式存储设备文件的解密方法,包括:
步骤201,获取嵌入式存储设备中的加密文件;
步骤202,获取用户输入的第一特征信息;
步骤203,将所述第一特征信息与预先存储的用户标识特征进行比对;
步骤204,若比对通过,则获取第二特征信息;
步骤205,将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
步骤206,根据所述第二密钥对所述加密文件进行解密处理,解密成功,便得到了所述加密文件对应的原始文件;
其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
只有在获取到与加密密钥相同的解密密钥后,才可以实现对加密文件的解密,保证了用户数据的安全。
如图5所示,本发明实施例提供一种嵌入式存储设备文件的解密装置,包括:
第一获取单元210,设置为获取嵌入式存储设备中的加密文件;
第二获取单元220,设置为获取用户输入的第一特征信息;
比对单元230,设置为将所述第一特征信息与预先存储的用户标识特征 进行比对;
第三获取单元240,设置为在所述比对通过时,获取第二特征信息;
密钥生成单元250,设置为将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
解密单元260,设置为根据所述第二密钥对所述加密文件进行解密处理,解密成功,便得到了所述加密文件对应的原始文件;
其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
在得到的所述解密密钥与所述加密密钥相同的情况下,如上述图2所示,所述对加密文件的解密过程具体为:
步骤a1,通过文件路径解析父文件夹,利用BASE64对父文件夹名称进行解码,然后利用AES256算法进行解密运算,获取得到的解密结果即为原文件的父文件夹对应的文件夹名;
步骤a2,将密文文件夹中加密片段_1(113)的文件名进行BASE64解码,然后再进行AES256解密,获得原文文件片段_1(111)的文件名;
步骤a3,对加密片段_1中的数据,使用HMAC算法进行解密,获得信息值,然后再使用AES256算法进行解密,获取到片段_1的原文;
步骤a4,重复步骤a2和步骤a3,将所有加密片段的数据进行解密,直到所有密文片段解密完成;
步骤a5,按照命名规则,将已经还原的文件片段_1、片段_2.....片段_n进行组合复原原始文件100。
本发明实施例还提供一种终端,包括:加密装置和解密装置;其中,
所述加密装置,设置为:
获取嵌入式存储设备中待加密的原始文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征信息进行比对;
若比对通过,则获取第二特征信息;
根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
根据所述第一密钥对所述原始文件进行加密处理,生成加密文件;
所述解密装置,设置为:
获取嵌入式存储设备中的加密文件;
获取用户输入的第一特征信息;
将所述第一特征信息与预先存储的用户标识特征进行比对;
若比对通过,则获取第二特征信息;
将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
根据所述第二密钥对所述加密文件进行解密处理,解密成功,便得到了加密文件对应的原始文件;
其中,所述第二密钥与第一密钥为相同的密钥。
在实际应用中,终端上的加密装置和解密装置通常集成在一起,实现对文件的加解密。如图6所示,所述终端上包含输入模块301,数据采集处理模块302,身份认证模块303,加解密模块304,传输模块305,其中:
输入模块301,设置为输入用户的特征信息,受限于便携移动终端的配置状况,其作用是用来接收用户的身份特征信息,由普通运行环境发起,切换到安全环境调起输入模块,建议采用安全性强的信息表征用户特征身份信息。例如,可以采用NFC等表征用户身份的装置来作为输入模块,如果终端具有指纹系统,则可以使用指纹系统作为输入模块来表征用户身份认证信息。输入模块301的目的是接收来自用户身份认证的信息,包括但不限于弱/强密码输入、NFC、指纹这三种输入模块,任何能表征用户身份的简单或复杂的装置都可以替代并作为便携移动终端的输入模块。
数据采集模块302,设置为对输入模块301输入的数据进行集中处理,处理后的数据直接作为身份认证模块303的输入。对于简单的输入模块而言,数据采集模块的作用很简单,只是采集输入模块输入的数据,对于复杂的指纹系统而言,数据采集模块完成用户指纹图片的DSP处理,包括指纹采样和指纹特征值提取,数据采集模块302的作用就是通过输入模块301提供的信息数据,提取表征用户唯一身份的特征信息。
身份认证模块303,作用是完成用户信息登记和鉴权用户身份信息,身份认证模块303可以接收来自数据采集模块302的输入信息,对用户身份进行鉴权,当鉴权成功后,可进行下一步的加解密操作,如果鉴权失败,则结 束整个加解密流程。身份认证模块303,可以通过接收不同输入参数,完成用户身份的登记,用户身份登记可以使用不同的形式表现。第一种方案,本地安全存储,将用户登记信息存储到便携移动终端的本地安全存储区,本地安全存储区可以是EMMC上的一段存储区域,也可以是终端内部集成的QFPROM(QFPROM表示一次可编程内存,与One Time Programmable Read Only Memory即一次编程只读内存相似)区域。本地安全的存储区域的定义也不局限于上面两种,还可以通过软件加密的方式来完成。第二种方案,通过远程网络服务器来完成用户登记信息的安全存储,用户认证模块303可以将用户登记信息通过非对称加密算法加密存储到远程服务器端,完成用户身份信息登记。身份认证模块303的目的就是存储用户信息和鉴权用户特征信息,存储和鉴权的处理包括但不限于上面两种方案,可以通过其它方式替代。
加解密模块304,作用是完成文件数据的加解密功能,并把加密的数据通过传输模块305传输给嵌入式存储设备。为了加密更加安全,加解密模块304是完全运作在安全环境下。安全环境是便携移动终端运行的另一种模式,便携移动终端可以在安全环境和普通环境下自由切换。加解密模块304内部应该至少包括密钥生成器、加解密算法,例如HMAC、AES256,常用的数组签名算法,例如MD5(Message-Digest Algorithm 5,信息-摘要算法5)、SHA256(SHA256算法的哈希值大小为256位),支持BASE64编解码等常用功能,但并不局限于这几个功能。
身份认证模块303将用户身份特征信息数据传递到加解密模块304,加解密模块304将用户身份特征信息数据作为第一参数输入量,将便携移动终端的硬件唯一编码(例如芯片序列号等)作为第二参数输入,传递给密钥生成器进行运算,输出一组唯一的密钥。当输入参数发生变化时,输出的密钥随之变化。即不同的用户身份特征信息或者不同的便携移动终端作为输入将会得到不同密钥,该密钥用来对文件碎片进行加密。
应当说明的是,所述传输模块305可以按文件片的方式进行加密或解密文件的传输,也可以在获取得到完整的加密或解密文件后统一进行传输。
加密或解密的总体流程为:当系统切换到安全环境下,调起输入模块301,用户输入表征用户身份的特征信息(例如弱/强密码、指纹、NFC等),通过 数据采集处理模块302处理并获得用户特征信息,将用户特征信息传递给身份认证模块303,身份认证模块303对用户身份进行验证,验证通过后将用户身份特征信息传入加解密模块304,加解密模块304将身份信息和便携移动终端的唯一标识作为输入因子,产生一对一的密钥组,使用该密钥组对待加密文件进行加密并传输到嵌入式存储设备中进行存储或者对密文进行解密组装还原原文。
如图7所示,所述加密的具体流程为:
S101,系统处于普通运行模式的空闲状态;
S102,判断是否要进行文件加密操作,如果是,则进入步骤S103,反之,退到步骤S101;
S103,系统由普通模式切换到安全模式;
S104,安全模式下调起安全控件,由用户输入特征信息;
S105,采集处理用户的特征信息;
S106,进行用户身份验证,如果身份合法,则进入步骤S107,如果身份不合法,则进入步骤S109,由安全模式切换到普通模式,进入空闲状态;
S107,由加密模块对待加密文件进行加密;
S108,对加密后的密文进行存储;
密文存储后,进行状态切换到步骤S109,从安全模式切换到普通运行模式,之后进入步骤S101,系统处于普通模式空闲状态,接收其它操作。
应当说明的是,本发明可以实现多个用户在同一个存储设备上的私有信息加密保存,且不互相干扰。例如,多个用户共享同一个嵌入式存储设备,每个用户都可以将自己的私有信息存放到共享的嵌入式存储设备中,使用自己的身份和特定的移动终端对私有信息进行加密存储。其它用户都无法解密非自身加密的密文。
本发明可以对便携移动终端中嵌入式存储设备中的文件进行文件系统层次上的加解密操作,实现原文的加密和密文的还原,加密和解密依赖于用户身份认证模块和便携移动终端的标识,加密和解密操作在便携移动终端的安全环境下进行。用户身份认证信息的特征值可被用作加密输入因子,协同便 携移动终端硬件加密功能,在安全环境下对待加密文件进行加密。加密过程采用一种特殊的分割方式,实现密文文件名和文件长度的隐藏,从而达到数据安全保护的目的。无论第三者获取到便携移动终端,或者嵌入式flash(如SD卡等)、或者获取到永固身份认证信息中任何一个数据都无法破解加密数据,只有将三部分数据完全获取到,才能对加密数据进行完整的解密来还原密文,具有极高的安全级别。
本发明上述方案解决了嵌入式存储设备中文件的存储安全问题,可以对嵌入式存储设备,如EMMC卡、SD卡等系列存储设备中的数据进行原文的加密和密文的解密。对数据的加密依赖于用户身份认证特征信息和便携移动终端的唯一标识信息,在安全环境下由加解密模块完成文件的加解密运算。文件加密的结果实现了原文文件名和文件长度的隐藏,从用户身份、便携移动终端、文件加密方法三个方面提高了密文的安全性,有效的防止意外情况下用户存储在嵌入式存储设备上的敏感数据被第三方破解,并可有效防止破解敏感数据后对用户带来的恶意伤害,极大地提高了攻击者的解密难度,增强了用户信息的安全性,保证了用户的人身利益。同时本发明的文件加密过程是建立在文件系统层次之上的加密,所以克服了对整个嵌入式存储设备进行加密方案中加密颗粒过大的、加密耗时过程、影响系统性能等缺点,同时用户可以随意对存储设备中任何文件进行加密保护,而不必考虑因需要对单个文件加密而最终对整个存储设备进行加密带来的开销。且由于身份特征信息对密文的依赖,本发明同样可以实现同一个便携移动终端中不同用户对各自私有信息的加密保护功能,若按照用户分组方式分类,也可以扩展为一个用户组对文件的加解密操作。
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。
工业实用性
上述方案,通过利用用户特征信息以及嵌入式存储设备所在的终端特征信息,实现文件的加解密操作,增强了用户信息的安全性,同时保证了用户的人身利益。

Claims (15)

  1. 一种嵌入式存储设备文件的加密方法,包括:
    获取嵌入式存储设备中待加密的原始文件;
    获取用户输入的第一特征信息;
    将所述第一特征信息与预先存储的用户标识特征信息进行比对;
    若比对通过,则获取第二特征信息;
    根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
    根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
  2. 根据权利要求1所述的加密方法,其中,在所述获取嵌入式存储设备中待加密的原始文件的步骤之后,还包括:
    触发所述嵌入式存储设备所在的终端的操作环境切换为安全环境。
  3. 根据权利要求1所述的加密方法,其中,所述获取用户输入的第一特征信息的步骤包括:
    获取用户输入的标识信息;
    对所述标识信息进行处理,获取得到第一特征信息。
  4. 根据权利要求1所述的加密方法,其中,所述根据所述第一密钥对所述原始文件进行加密处理,生成加密文件的步骤包括:
    获取所述原始文件的父目录路径;
    根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名;
    将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名;
    根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名;
    根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,生成每个文件片对应的加密数据;
    在分别对所述多个文件片处理完成后,便生成了加密文件。
  5. 根据权利要求4所述的加密方法,其中,所述根据所述第一密钥,利 用第一加密算法对所述父目录路径进行加密,生成所述原始文件的父目录文件加密后的文件名的步骤具体包括:
    根据所述第一密钥,利用第一加密算法对所述父目录路径进行加密,获取加密后的第一数据;
    对所述第一数据进行数据处理,生成所述原始文件的父目录文件加密后的文件名。
  6. 根据权利要求4所述的加密方法,其中,所述将所述原始文件的内容分为多个文件片,并生成每个文件片的文件名的步骤包括:
    根据第二预设规则,将所述原始文件的内容分为多个大小相等的文件片;
    按顺序为每个文件片生成具有统一标识的文件名。
  7. 根据权利要求4所述的加密方法,其中,所述根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密处理,生成每个文件片对应的加密文件名的步骤包括:
    根据所述第一密钥,利用第二加密算法分别对所述每个文件片的文件名进行加密,获取加密后的第二数据;
    对所述第二数据进行数据处理,生成所述文件片对应的加密文件名。
  8. 根据权利要求4所述的加密方法,其中,所述根据所述第一密钥,利用第三加密算法分别对所述每个文件片中数据进行加密处理,生成每个文件片对应的加密数据的步骤包括:
    根据所述第一密钥,利用第三加密算法分别对所述每个文件片中的数据进行加密处理,获取得到加密后的第三数据;
    利用第四加密算法对所述第三数据进行加密处理,生成每个文件片对应的加密数据。
  9. 根据权利要求1所述的加密方法,还包括:
    传输所述加密文件到嵌入式存储设备,使得所述加密文件保存在所述嵌入式存储设备中。
  10. 根据权利要求1所述的加密方法,其中,所述第一特征信息为用户输入的字符信息、指纹信息或近距离无线通信信息。
  11. 根据权利要求1所述的加密方法,其中,所述第二特征信息为预先 存储的所述嵌入式存储设备所在的终端的唯一标识。
  12. 一种嵌入式存储设备文件的加密装置,包括:
    第一获取模块,设置为获取嵌入式存储设备中待加密的原始文件;
    第二获取模块,设置为获取用户输入的第一特征信息;
    比对模块,设置为将所述第一特征信息与预先存储的用户标识特征信息进行比对;
    第三获取模块,设置为在所述比对通过时,获取第二特征信息;
    密钥生成模块,设置为根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
    加密模块,设置为根据所述第一密钥对所述原始文件进行加密处理,生成加密文件。
  13. 一种嵌入式存储设备文件的解密方法,包括:
    获取嵌入式存储设备中的加密文件;
    获取用户输入的第一特征信息;
    将所述第一特征信息与预先存储的用户标识特征进行比对;
    若比对通过,则获取第二特征信息;
    将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
    根据所述第二密钥对所述加密文件进行解密处理,若解密成功,则得到了所述加密文件对应的原始文件;
    其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
  14. 一种嵌入式存储设备文件的解密装置,包括:
    第一获取单元,设置为获取嵌入式存储设备中的加密文件;
    第二获取单元,设置为获取用户输入的第一特征信息;
    比对单元,设置为将所述第一特征信息与预先存储的用户标识特征进行比对;
    第三获取单元,设置为在所述比对通过时,获取第二特征信息;
    密钥生成单元,设置为将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
    解密单元,设置为根据所述第二密钥对所述加密文件进行解密处理,若 解密成功,则得到了所述加密文件对应的原始文件;
    其中,所述第二密钥与生成所述加密文件的密钥为相同的密钥。
  15. 一种终端,包括:加密装置和解密装置;其中,
    所述加密装置,设置为:
    获取嵌入式存储设备中待加密的原始文件;
    获取用户输入的第一特征信息;
    将所述第一特征信息与预先存储的用户标识特征信息进行比对;
    若比对通过,则获取第二特征信息;
    根据第一预设规则对所述第一特征信息和所述第二特征信息进行处理,生成第一密钥;
    根据所述第一密钥对所述原始文件进行加密处理,生成加密文件;
    所述解密装置,设置为:
    获取嵌入式存储设备中的加密文件;
    获取用户输入的第一特征信息;
    将所述第一特征信息与预先存储的用户标识特征进行比对;
    若比对通过,则获取第二特征信息;
    将所述第一特征信息和所述第二特征信息进行处理,生成第二密钥;
    根据所述第二密钥对所述加密文件进行解密处理,若解密成功,则得到了加密文件对应的原始文件;
    其中,所述第二密钥与第一密钥为相同的密钥。
PCT/CN2015/071571 2014-12-18 2015-01-26 一种嵌入式存储设备文件的加解密方法、装置及终端 WO2015184834A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410795994.0A CN105760764B (zh) 2014-12-18 2014-12-18 一种嵌入式存储设备文件的加解密方法、装置及终端
CN201410795994.0 2014-12-18

Publications (1)

Publication Number Publication Date
WO2015184834A1 true WO2015184834A1 (zh) 2015-12-10

Family

ID=54766067

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071571 WO2015184834A1 (zh) 2014-12-18 2015-01-26 一种嵌入式存储设备文件的加解密方法、装置及终端

Country Status (2)

Country Link
CN (1) CN105760764B (zh)
WO (1) WO2015184834A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666580A (zh) * 2020-06-24 2020-09-15 北京航天数据股份有限公司 文件的加密方法、解密方法和装置
CN111950002A (zh) * 2020-08-04 2020-11-17 珠海市鸿瑞信息技术股份有限公司 基于配电网络的加密终端管理系统
CN112149140A (zh) * 2019-06-28 2020-12-29 北京百度网讯科技有限公司 预测方法、装置、设备及存储介质
CN112231717A (zh) * 2019-07-15 2021-01-15 珠海金山办公软件有限公司 加密文件文件名的处理方法、装置、电子设备及存储介质
CN113139199A (zh) * 2021-05-10 2021-07-20 广州欢网科技有限责任公司 实现java和android交互时进行加解密的方法和设备
CN113761546A (zh) * 2020-06-04 2021-12-07 中车株洲电力机车研究所有限公司 一种用于自动下载列车通信数据记录文件的方法及系统
CN114861191A (zh) * 2022-04-27 2022-08-05 北京计算机技术及应用研究所 一种嵌入式设备安全启动架构及方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355109A (zh) * 2016-09-29 2017-01-25 维沃移动通信有限公司 一种文件加密方法及移动终端
CN106557708B (zh) * 2016-11-21 2020-03-17 武汉斗鱼网络科技有限公司 一种安全保护方法和系统
CN107659632B (zh) * 2017-09-19 2021-02-05 咪咕数字传媒有限公司 一种文件加解密方法、装置及计算机可读存储介质
CN107633178B (zh) * 2017-09-29 2020-12-04 厦门天锐科技股份有限公司 一种基于Android设备的文件保护系统及方法
CN108038383B (zh) * 2017-11-24 2020-08-11 北京顶象技术有限公司 文件加密方法、文件解密方法及装置
CN108133155A (zh) * 2017-12-29 2018-06-08 北京联想核芯科技有限公司 数据加密存储方法及装置
CN108460288B (zh) * 2018-04-02 2022-02-08 惠州学院 大数据安全加密方法、装置、存储介质及移动终端
CN111382447B (zh) * 2018-12-28 2023-08-29 广州市百果园信息技术有限公司 安装包的加密方法、存储介质及计算机设备
CN111709038B (zh) * 2020-05-07 2024-04-12 北京中科凡语科技有限公司 文件加密解密方法、分布式存储系统、设备及存储介质
CN111859433A (zh) * 2020-07-28 2020-10-30 江西金格科技股份有限公司 基于多个智能密钥存储设备的联动加密与解密应用方式
CN115828289B (zh) * 2023-02-16 2023-05-30 中信天津金融科技服务有限公司 一种数字化档案的加密方法和系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340279A (zh) * 2008-07-09 2009-01-07 深圳市金蝶移动互联技术有限公司 数据加密及解密方法、系统及设备
CN201707674U (zh) * 2010-03-05 2011-01-12 金鹏科技有限公司 安全装置、电子阅读器及电子书籍安全服务系统
CN102388386A (zh) * 2009-04-10 2012-03-21 皇家飞利浦电子股份有限公司 设备和用户认证
CN102724215A (zh) * 2012-07-07 2012-10-10 成都国腾实业集团有限公司 基于用户登录密码安全存放用户密钥并提高云平台数据安全的方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100520671C (zh) * 2005-07-27 2009-07-29 深圳市亚略特生物识别科技有限公司 计算机中的电子文档的指纹加密及解密方法
CN101227275A (zh) * 2008-02-13 2008-07-23 刘海云 随机加密和穷举法解密相结合的加密方法
CN102355350B (zh) * 2011-06-30 2015-09-02 北京邮电大学 一种用于移动智能终端的文件加密方法和系统
CN103368736B (zh) * 2012-04-06 2016-04-20 汉王科技股份有限公司 业务信息加密、解密方法及装置
CN103152157A (zh) * 2013-02-04 2013-06-12 快车科技有限公司 一种安全密保方法及相关装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340279A (zh) * 2008-07-09 2009-01-07 深圳市金蝶移动互联技术有限公司 数据加密及解密方法、系统及设备
CN102388386A (zh) * 2009-04-10 2012-03-21 皇家飞利浦电子股份有限公司 设备和用户认证
CN201707674U (zh) * 2010-03-05 2011-01-12 金鹏科技有限公司 安全装置、电子阅读器及电子书籍安全服务系统
CN102724215A (zh) * 2012-07-07 2012-10-10 成都国腾实业集团有限公司 基于用户登录密码安全存放用户密钥并提高云平台数据安全的方法

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149140A (zh) * 2019-06-28 2020-12-29 北京百度网讯科技有限公司 预测方法、装置、设备及存储介质
CN112149140B (zh) * 2019-06-28 2023-06-27 北京百度网讯科技有限公司 预测方法、装置、设备及存储介质
CN112231717A (zh) * 2019-07-15 2021-01-15 珠海金山办公软件有限公司 加密文件文件名的处理方法、装置、电子设备及存储介质
CN113761546A (zh) * 2020-06-04 2021-12-07 中车株洲电力机车研究所有限公司 一种用于自动下载列车通信数据记录文件的方法及系统
CN113761546B (zh) * 2020-06-04 2024-05-14 中车株洲电力机车研究所有限公司 一种用于自动下载列车通信数据记录文件的方法及系统
CN111666580A (zh) * 2020-06-24 2020-09-15 北京航天数据股份有限公司 文件的加密方法、解密方法和装置
CN111950002A (zh) * 2020-08-04 2020-11-17 珠海市鸿瑞信息技术股份有限公司 基于配电网络的加密终端管理系统
CN111950002B (zh) * 2020-08-04 2022-08-09 珠海市鸿瑞信息技术股份有限公司 基于配电网络的加密终端管理系统
CN113139199A (zh) * 2021-05-10 2021-07-20 广州欢网科技有限责任公司 实现java和android交互时进行加解密的方法和设备
CN114861191A (zh) * 2022-04-27 2022-08-05 北京计算机技术及应用研究所 一种嵌入式设备安全启动架构及方法
CN114861191B (zh) * 2022-04-27 2024-04-05 北京计算机技术及应用研究所 一种嵌入式设备安全启动架构及方法

Also Published As

Publication number Publication date
CN105760764A (zh) 2016-07-13
CN105760764B (zh) 2020-03-17

Similar Documents

Publication Publication Date Title
WO2015184834A1 (zh) 一种嵌入式存储设备文件的加解密方法、装置及终端
CN110324143B (zh) 数据传输方法、电子设备及存储介质
JP6306077B2 (ja) 暗号化データのコミュニティベース重複排除
CN108809646B (zh) 安全共享密钥共享系统
KR101888903B1 (ko) 키를 이전시키기 위한 방법 및 장치
JP7277270B2 (ja) 埋め込まれたルートオブトラストシークレットで生成される集積回路の個人化
WO2016058487A1 (zh) 一种信息处理方法及装置
US11308241B2 (en) Security data generation based upon software unreadable registers
JP2015504222A (ja) データ保護方法及びシステム
US10482036B2 (en) Securely binding between memory chip and host
EP2798777A1 (en) Method and system for distributed off-line logon using one-time passwords
CN111917540B (zh) 一种数据加解密方法、装置、移动终端和存储介质
CN112469036B (zh) 一种消息加解密方法、装置、移动终端和存储介质
US20230325516A1 (en) Method for file encryption, terminal, electronic device and computer-readable storage medium
US8953786B2 (en) User input based data encryption
CN111008094B (zh) 一种数据恢复方法、设备和系统
CN111401901B (zh) 生物支付设备的认证方法、装置、计算机设备和存储介质
CN102761870A (zh) 一种终端身份验证和服务鉴权的方法、系统和终端
JP2019506789A (ja) パスコード検証のためのフォワードセキュア型暗号技術を使用した方法、システム、及び装置。
CN103559453A (zh) 一种手机数据硬件加密保护方法和系统
CN103745164A (zh) 一种基于环境认证的文件安全存储方法与系统
WO2012075764A1 (zh) 关键参数的存储方法及终端设备
CN111818087B (zh) 区块链的节点接入方法、装置、设备及可读存储介质
WO2020044095A1 (zh) 文件加密方法、装置、设备/终端/服务器及计算机可读存储介质
CN109891823B (zh) 用于凭证加密的方法、系统以及非暂态计算机可读介质

Legal Events

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

Ref document number: 15803223

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15803223

Country of ref document: EP

Kind code of ref document: A1