WO2019120038A1 - 数据加密存储 - Google Patents

数据加密存储 Download PDF

Info

Publication number
WO2019120038A1
WO2019120038A1 PCT/CN2018/117234 CN2018117234W WO2019120038A1 WO 2019120038 A1 WO2019120038 A1 WO 2019120038A1 CN 2018117234 W CN2018117234 W CN 2018117234W WO 2019120038 A1 WO2019120038 A1 WO 2019120038A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
control level
encryption key
wind control
encrypted data
Prior art date
Application number
PCT/CN2018/117234
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
Priority claimed from CN201711366203.2A external-priority patent/CN109933994B/zh
Priority claimed from CN201711366204.7A external-priority patent/CN109936546B/zh
Application filed by 北京三快在线科技有限公司 filed Critical 北京三快在线科技有限公司
Priority to US16/955,129 priority Critical patent/US11321471B2/en
Priority to CA3086236A priority patent/CA3086236A1/en
Publication of WO2019120038A1 publication Critical patent/WO2019120038A1/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
    • G06F21/602Providing cryptographic facilities or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms

Definitions

  • the present disclosure relates to the field of Internet technologies, and in particular, to a data storage method and apparatus, and a computing device.
  • the local data storage methods adopted by a large number of APPs on the market can be roughly divided into the following two types.
  • the first is that the client stores sensitive data locally in plaintext, that is, directly stores user sensitive information locally on the client without any processing. Obviously, there is a huge security hole.
  • the second is that the client encrypts and stores the local sensitive data, that is, the client encrypts the sensitive data after using the encryption key generated based on the preset code; since the used encryption key and the generated encrypted data are stored in There is a risk of being brute-forced in a single local medium.
  • the same type of data is always stored in one way, and dynamic level updates cannot be achieved.
  • the present disclosure provides a data encryption storage method and apparatus, and a computing device, thereby at least to some extent overcoming one or more problems due to limitations and disadvantages of the related art.
  • a data encryption storage method is provided, which is applied to a client installed with an application APP, the method comprising: generating an encryption key based on a preset algorithm; Divided into m parts and respectively stored in m storage media of the client, where m is a natural number greater than 1; the target data is encrypted using the encryption key to obtain encrypted data; and the encrypted data is stored.
  • another data encryption storage method is provided, which is applied to a client installed with an application APP, the method comprising: using the first wind control level corresponding to the target field, using the first Encrypting a key to encrypt data of the target field to obtain first encrypted data; and dividing the first encrypted data into n 1 portions and respectively stored in n 1 media of the client, where n 1 is A natural number greater than 1.
  • a data encryption storage device for use in a client installed with an application APP, the device comprising: a generating module configured to generate an encryption key based on a preset algorithm; a module configured to divide the encryption key into m parts and respectively stored in m media of the client, wherein m is a natural number greater than 1; and an encryption module configured to use the encryption key pair target data Encryption is performed to obtain encrypted data, and the encrypted data is stored.
  • another data encryption storage device which is applied to a client installed with an application APP, the device comprising: an encryption module, configured to correspond to a first wind control according to a target field Level, encrypting data of the target field using the first encryption key to obtain first encrypted data; and dividing the module, configured to divide the first encrypted data into n 1 parts and respectively save the n 1 of the client Of the media, where n 1 is a natural number greater than one.
  • a storage medium storing a computer program, the computer program, when executed by a processor of a client, causing the client to perform the method as described in any of the above embodiments .
  • a computing device comprising: a processor; a storage medium storing instructions executable by the processor; wherein the processor is configured to perform any of the above embodiments Said method.
  • the security of data storage is enhanced by splitting the encryption key and/or the obtained encrypted data used in data storage and performing multi-media segmentation storage accordingly.
  • FIG. 1 is a flowchart of a data encryption storage method according to an embodiment of the present disclosure.
  • FIG. 2 is a flow chart of a data encryption storage method according to another embodiment of the present disclosure.
  • FIG. 3A is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure.
  • FIG. 3B is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure.
  • FIG. 3C is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure.
  • FIG. 4 is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure.
  • FIG. 5 is a schematic block diagram of a data encryption storage device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic block diagram of a data encryption storage device according to another embodiment of the present disclosure.
  • FIG. 7 is a schematic block diagram of a data encryption storage device in accordance with still another embodiment of the present disclosure.
  • FIG. 8 is a schematic block diagram of a computing device in accordance with an embodiment of the present disclosure.
  • embodiments of the present disclosure may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of full hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
  • a data storage method and apparatus and a medium and a computing device are proposed.
  • FIG. 1 is a flowchart of a data encryption storage method according to an embodiment of the present disclosure. As shown in FIG. 1, the method of this embodiment includes the following steps S101-S103. In one embodiment, the method of the present embodiment may be performed by a client (e.g., a cell phone) on which the application APP is installed.
  • a client e.g., a cell phone
  • step S101 an encryption key is generated based on a preset algorithm.
  • the client may generate a unique encryption key based on a preset algorithm when the user first launches the APP.
  • the key data that the APP needs to store locally on the client can then be encrypted using the encryption key.
  • the AES-256 symmetric encryption key is generated by the HMAC (SHA-256) algorithm by using the UUID (Universally Unique Identifier) of the client, the current timestamp, and the local preset key.
  • the embodiments of the present disclosure are not limited thereto.
  • the APP may separately generate different encryption keys based on a plurality of preset algorithms, and details are not described herein again.
  • step S102 the encryption key is divided into m parts and respectively stored in m storage media of the client, where m is a natural number greater than 1.
  • the encryption key is stored in a single storage medium.
  • the generated encryption key is segmentally stored by using multiple storage media, thereby reducing the risk of cracking.
  • the generated encryption key may be processed based on a segmentation algorithm, such as a Base 64 operation, to intercept the generation of a 32-bit Base 64 string.
  • a segmentation algorithm such as a Base 64 operation
  • the m storage media include different storage media on the client, or different storage locations on the same storage media, or both.
  • the m storage media may be selected from any combination of the storage media indicated by the following identifiers: KeyChain, File, and UserDefaults. ), but the disclosure is not limited to this.
  • the keychain is a relatively independent space corresponding to the APP on the client storage medium.
  • the information stored in the keychain is not deleted when the APP is upgraded. Generally, the information is stored in the user's confidential information.
  • UserDefaults is generally used to store the corresponding information of the APP.
  • User profile, File is used to store non-confidential files that users download or generate during the use of the app.
  • step S103 the target data is encrypted using an encryption key to obtain encrypted data and stored.
  • the client When the APP currently needs to perform local storage of key data, the client first extracts each part of the encryption key from the m storage media of the client based on the reverse operation of step S102 and assembles and generates an encryption key, thereby using the encryption key.
  • the key data is encrypted and the encrypted data is stored.
  • the security of data storage is enhanced by splitting the encryption key used in data storage and correspondingly performing multi-media segmentation storage.
  • FIG. 2 is a flowchart of a data encryption storage method according to another embodiment of the present disclosure. As shown in the figure, the method of this embodiment includes the following steps S201-S204.
  • step S201 an encryption key is generated based on a preset algorithm.
  • step S202 the encryption key is divided into m parts and respectively stored in m storage media of the client, where m is a natural number greater than 1.
  • step S203 the target data is encrypted using an encryption key.
  • steps S201-S203 respectively correspond to steps S101-S103 of the previous embodiment, and details are not described herein again.
  • step S204 the encrypted data obtained by the encryption is divided into n parts and respectively stored in n storage media of the client, where n is a natural number greater than 1.
  • the concept of multi-media segmentation storage of the encryption key is used in the previous embodiment.
  • the encrypted data obtained by the encryption is further subjected to multi-media segmentation storage, thereby further reducing the risk of cracking.
  • the n storage media in step S204 and the m storage media in step S202 may include a plurality of storage media that are identical, or may select different storage media ranges, for example, Any combination of storage media selected from the following identifications: KeyChain, File, and UserDefaults.
  • the security of data storage is enhanced by splitting the encryption key used in data storage and the encrypted data obtained by splitting, and performing multi-media segmentation storage accordingly.
  • FIG. 3A is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure. As shown in the figure, the method of this embodiment includes the following steps S301-S302.
  • step S301 the data of the target field is encrypted using the first encryption key according to the first wind control level corresponding to the target field to obtain the first encrypted data.
  • step S302 the first encrypted data is divided into n 1 portions and respectively stored in n 1 media of the client, where n 1 is a natural number greater than 1.
  • the first encryption key may be generated based on a preset algorithm, and the first encryption key may be divided into m 1 parts and respectively stored in the m 1 media of the client, where m 1 is A natural number greater than 1.
  • FIG. 3B is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure. As shown in the figure, the method of this embodiment includes the following steps S301-S305.
  • steps S301-S302 respectively correspond to steps S301-S302 of the embodiment shown in FIG. 3A, and details are not described herein again.
  • step S303 a first wind control level corresponding to the target field is acquired.
  • the level of risk control corresponding to each target data may be pre-set and stored in the APP (ie, client local).
  • the risk level corresponding to a certain target data may also be fed back in real time by the server communicating with the client, thereby facilitating more flexible level setting and updating.
  • the server communicates with the server, and the server returns a risk control level corresponding to the key segment data.
  • the server may carry the corresponding risk control level while returning the key segment data.
  • step S304 the first encrypted data is divided into n 1 portions according to the first wind control level.
  • step S305 the first encrypted data of the n 1 portions are respectively stored in n 1 storage media of the client.
  • FIG. 3C is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure. As shown in the figure, the method of this embodiment includes the following steps S301-S308.
  • steps S301-S305 respectively correspond to steps S301-S305 of the embodiment shown in FIG. 3B, and details are not described herein again.
  • step S306 the second wind control level sent by the server is obtained, wherein the second wind control level is different from the first wind control level.
  • the data for a certain field is always processed by the same encryption method (for example, the storage is always encrypted or the plaintext is always stored).
  • the wind of a certain field may be determined according to a preset trigger condition.
  • the level of control is dynamically updated.
  • the server communicating with the client can send an updated risk control level to the client, and the updated wind control level can be referred to as the second wind control level.
  • the trigger condition for triggering the server to update the wind control level may include the APP locally detecting the preset event (for example, detecting a suspected attack event such as a password multiple input error), or the server may update based on the global setting (for example, maintenance) Personnel temporarily increase the level of risk control when discovering software vulnerabilities. This disclosure does not limit this, and will not be described here.
  • the APP obtains the second wind control level after the update of the target field is set based on the trigger of the client local or the server. For example, when the APP obtains a notification from the server that the risk level is lowered for the username field, it is modified from the default wind control level (the first wind control level, for example, the second highest) to a lower in the local system table entry.
  • the level of risk control (second level of wind control, for example, the lowest).
  • step S307 according to the acquired second wind control level, the data of the target field is encrypted using the second encryption key to obtain the second encrypted data.
  • step S308 the second encrypted data is divided into n 2 parts, and the second encrypted data of the n 2 parts are respectively stored in n 2 media of the client; wherein n 2 is a natural number, When the first wind control level is higher than the second wind control level, n 1 >n 2 , when the first wind control level is lower than the second wind control level, n 1 ⁇ n 2 .
  • the second encryption key used in step S307 may be generated based on a preset algorithm, and the second encryption key may be divided into m 2 parts and respectively saved in m 2 media of the client, wherein m 2 is a natural number greater than one.
  • the first wind control level is the second highest and the second wind control level is the lowest.
  • the APP divides the first encrypted data into two parts, and saves the two pieces of the first encrypted data in the two media of the client respectively; and in step S308, the APP does not segment the second encrypted data, and directly completes The second encrypted data is saved in a medium on the client.
  • the flexible data security level is flexibly adjusted and dynamically updated; at the same time, according to the risk control level
  • the encrypted data obtained by encrypting the local data of the client is divided into multiple media segment storage, which enhances the security of the client data storage.
  • the APP modifies the risk level of the system table entry for the target field, and then performs new encrypted storage on the data of the target field based on the updated second wind control level.
  • the APP may, for example, recover the data of the target field from the first encrypted data using the first encryption key; and then recover using the second encryption key pair according to the second wind control level.
  • the data of the out target field is encrypted to obtain the second encrypted data; and the first encrypted data is deleted.
  • the APP may directly delete the original first encrypted data, and then perform new encrypted storage on the updated data based on the second wind control level. For example, when the server sends an updated security certificate when notifying the risk control level of a security certificate, the APP can delete the original first encrypted storage security certificate and the new security certificate when receiving the above notification. Perform a second encrypted storage.
  • the data of the same target field is re-encrypted and stored by acquiring the updated wind control level, thereby realizing flexible and dynamic updating of the sensitive data security level.
  • this embodiment provides different numbers of encrypted data segments and storage media.
  • the encrypted data can be divided into three sections and stored in the storage medium indicated by KeyChain, File, and UserDefaults.
  • the encrypted data can be stored in two segments.
  • the storage medium indicated by KeyChain and File; for the lowest level of encryption requirements, the encrypted data can be stored in the storage medium indicated by UserDefaults without segmentation (which can be understood as being divided into segments).
  • the multi-media segmentation storage is performed correspondingly by splitting the encryption key used in data storage and the obtained encrypted data, and the design of the wind control level is introduced to realize key data for different types. Different levels of encryption enhance the security and flexibility of data storage.
  • FIG. 4 is a flowchart of a data encryption storage method according to still another embodiment of the present disclosure. This embodiment relates to a decryption process corresponding to the encryption process of the embodiment of FIG. 3. As shown, the method of this embodiment includes the following steps S401-S404.
  • step S401 a data acquisition request for the target field is received.
  • step S402 a risk control level corresponding to the target field is acquired based on the data acquisition request.
  • the APP When the APP needs to decrypt the key data stored locally, it needs to complete the reverse operation corresponding to the encryption process.
  • different levels of encryption are performed for different types of key data. Therefore, when decrypting the key data in this embodiment, the corresponding risk control level needs to be acquired first.
  • the wind control level is stored locally on the client, for example, in the form of a mapping entry with the field name of the key data.
  • the APP can obtain the corresponding risk control level by querying the field names “user name” and “password” in the above mapping entry.
  • the data acquisition request of step S401 may be generated by the APP based on local requirements (such as the above-mentioned user name and password check), or may be from a server that communicates with the client.
  • local requirements such as the above-mentioned user name and password check
  • the server needs to communicate with the corresponding bank server for verification, and the above data acquisition request can be generated by the server and sent to the client.
  • step S403 the encrypted data is taken out from the n storage media of the client according to the risk control level.
  • This step can be regarded as the reverse process of step S306 of the previous embodiment. For example, based on the different wind control levels acquired in step S402, the following operations are performed: when the highest level is acquired, each part of the encrypted data may be separately extracted from the storage medium indicated by KeyChain, File, and UserDefaults and assembled to generate complete encrypted data; When the next highest level is obtained, each part of the encrypted data may be separately extracted from the storage medium indicated by KeyChain and File and assembled to generate complete encrypted data; when the lowest level is obtained, it may be directly from the storage medium indicated by UserDefaults. Take out the complete encrypted data.
  • step S404 the respective portions of the encryption key are taken out from the m storage media and an encryption key is generated.
  • the respective portions of the encryption key may be separately extracted from the storage medium indicated by KeyChain, File, and UserDefaults and assembled to generate a complete encryption key.
  • step S405 the encrypted data is decrypted using the encryption key to obtain the target data; or the encrypted data and the encryption key are returned to the server that transmitted the data acquisition request.
  • step S405 includes two different implementations.
  • this step directly decrypts the encrypted data obtained in step S403 using the encryption key obtained in step S404, thereby obtaining target data.
  • the decryption process is not performed in this step, but the encrypted data obtained in step S404 is sent to the server in step S403.
  • the encryption key and the encrypted data obtained in the foregoing steps may be re-encrypted.
  • the encryption key and the encrypted data are encrypted by using AES (Advanced Encryption Standard) and Post RSA (Rivest-Shamir-Adleman), and the generated two values (corresponding to the encryption key and encryption respectively)
  • the data is sent to the server, which is decrypted by the server to obtain the target data.
  • a data encryption storage device is further provided in the exemplary embodiment.
  • FIG. 5 is a schematic block diagram of a data encryption storage device according to an embodiment of the present disclosure.
  • the apparatus of this embodiment is applied to a client installed with an application APP.
  • the apparatus includes a generation module 51, a division module 52, and an encryption module 53.
  • the generating module 51 is configured to generate an encryption key based on a preset algorithm; the dividing module 52 is configured to divide the above-mentioned encryption key into m parts and respectively save them in m storage media of the client, where m is greater than The natural number of 1; the encryption module 53 is arranged to encrypt the target data using the above-described encryption key to obtain encrypted data and store the encrypted data.
  • the m storage media include different storage media on the client, or different storage locations on the same storage media, or both.
  • the m storage media may be selected from any combination of the storage media indicated by the following identifiers: KeyChain, File, and UserDefaults, but the disclosure is not limited thereto.
  • the security of data storage is enhanced by splitting the encryption key used in data storage and performing multi-media segmentation storage accordingly.
  • FIG. 6 is a schematic block diagram of a data encryption storage device according to another embodiment of the present disclosure.
  • the apparatus of this embodiment is applied to a client in which an application APP is installed.
  • the apparatus includes an encryption module 61 and a division module 62.
  • the encryption module 61 is configured to encrypt the data of the target field to obtain the first encrypted data according to the first wind control level corresponding to the target field
  • the dividing module 62 is configured to An encrypted data is divided into n 1 portions and stored in n 1 storage media of the client, respectively, where n 1 is a natural number greater than 1.
  • the above n 1 storage media include different storage media on the client, or different storage locations on the same storage media, or both.
  • the n 1 media may be selected from any combination of the storage media indicated by the following identifiers: KeyChain, File, and UserDefaults, but the disclosure is not limited thereto.
  • the security of the data storage is enhanced by splitting the encrypted data obtained when the data is stored and correspondingly performing multi-media segmentation storage.
  • FIG. 7 is a schematic block diagram of a data encryption storage device in accordance with still another embodiment of the present disclosure.
  • the apparatus of this embodiment is applied to a client installed with an application APP.
  • the apparatus includes a generating module 71, a first dividing module 72, an encryption module 73, and a second dividing module 74.
  • the generating module 71 is configured to generate an encryption key based on a preset algorithm; the first dividing module 72 is configured to divide the encryption key into m parts and store them in m storage media of the client respectively, where m a natural number greater than 1; the encryption module 73 is configured to encrypt the target data using the above-described encryption key to obtain encrypted data; the second dividing module 74 is configured to divide the encrypted data into n parts and respectively save the n at the client Of the storage media, where n is a natural number greater than one.
  • the m storage media include different storage media on the client, or different storage locations on the same storage media, or both.
  • the m storage media may be selected from any combination of the storage media indicated by the following identifiers: KeyChain, File, and UserDefaults, but the disclosure is not limited thereto.
  • the n storage media and the m storage media may include a plurality of storage media, or may select different storage media ranges, for example, any combination of the storage media indicated by the following identifiers: KeyChain, File, and UserDefaults.
  • the security of data storage is enhanced by splitting the encryption key used in data storage and the obtained encrypted data, and performing multi-media segmentation storage accordingly.
  • modules or units of equipment for action execution are mentioned in the detailed description above, such division is not mandatory. Indeed, in accordance with embodiments of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one of the modules or units described above may be further divided into multiple modules or units.
  • the components displayed as modules or units may or may not be physical units, ie may be located in one place or may be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the wood disclosure scheme. Those of ordinary skill in the art can understand and implement without any creative effort.
  • a machine readable storage medium having stored thereon a machine readable program, the program being executable by a processor to implement the steps of the method described in any one of the above embodiments.
  • the machine readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a computing device which may be a mobile terminal such as a mobile phone or a tablet computer, or may be a terminal device such as a desktop computer or a server, which is not limited in this embodiment.
  • FIG. 8 shows a schematic diagram of a computing device 80 in accordance with an example embodiment of the present disclosure.
  • device 80 can be provided as a mobile terminal.
  • device 80 includes a processing component 81 that further includes one or more processors, and storage resources represented by storage medium 82 for storing instructions executable by processing component 81, such as an application.
  • An application stored in storage medium 82 may include one or more modules each corresponding to a set of instructions.
  • the processing component 81 is configured to execute instructions to perform the data encryption storage method described above. For the steps of the method, reference may be made to the detailed description in the foregoing method embodiments, and details are not described herein again.
  • Device 80 may also include a power component 83 configured to perform power management of device 80, a wired or wireless network interface 84 configured to connect device 80 to the network, and an input/output (I/O) interface 85.
  • Device 80 can operate based on an operating system stored on storage medium 82, such as Android, IOS, or the like.

Abstract

本公开是关于一种数据加密存储方法,应用于安装有应用程序APP的客户端中,所述方法包括:基于预设算法生成加密密钥;将所述加密密钥分成m个部分并分别保存在所述客户端的m个介质中,其中m为大于1的自然数;以及使用所述加密密钥对目标数据进行加密。

Description

数据加密存储
相关申请的交叉引用
本专利申请要求于2017年12月18日提交的、申请号为201711366204.7、发明名称为“数据加密存储方法和装置以及计算设备”的中国专利申请以及申请号为201711366203.2、发明名称为“数据分级存储方法和装置以及计算设备”的优先权,以上所述申请的全文以引用的方式并入本文中。
技术领域
本公开涉及互联网技术领域,尤其涉及一种数据存储方法和装置以及计算设备。
背景技术
随着互联网特别是移动网络的普及,越来越多的产品和服务提供商都选择使用应用程序(APP)作为与消费者交互的渠道之一。人们获取信息的方式由此也从传统的个人计算机(PC)端转移到了APP端。不同于PC上通过网页来获取信息时可将重要数据放在服务器,APP需要存放部分敏感数据在客户端本地,这样就有可能会遭到黑客的攻击,从而泄漏本地存储的用户敏感信息。近来频繁发生的移动端安全事件,也可以说明对于客户端本地数据存储加密的安全越来越重要。
目前市场上大量APP采用的本地数据存储方式大致可以分为以下两种。第一种是客户端以明文在本地存储敏感数据,也即不经过任何处理直接将用户敏感信息存储在客户端本地,其显然存在极大的安全漏洞。第二种是客户端对本地敏感数据进行加密存储,也即客户端使用基于预设代码生成的加密密钥对敏感数据加密后进行存储;由于使用的加密密钥和产生的加密数据都保存在本地的单一介质中,存在被暴力破解的风险。而且,无论是哪种方式,针对同一种类的数据始终都采用一种方式进行存储,无法实现安全级别的动态更新。
发明内容
本公开提供一种数据加密存储方法和装置以及计算设备,进而至少在一定程度上克服由于相关技术的限制和缺陷而导致的一个或者多个问题。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开实施例的第一方面,提供一种数据加密存储方法,应用于安装有应用程序APP的客户端中,所述方法包括:基于预设算法生成加密密钥;将所述加密密钥分成m个部分并分别保存在所述客户端的m个存储介质中,其中m为大于1的自然数;使用所述加密密钥对目标数据进行加密以得到加密数据;以及存储加密数据。
根据本公开实施例的第二方面,提供另一种数据加密存储方法,应用于安装有应用程序APP的客户端中,所述方法包括:根据目标字段对应的第一风控级别、使用第一加密密钥对所述目标字段的数据进行加密以得到第一加密数据;以及将所述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个介质中,其中n 1为大于1的自然数。
根据本公开实施例的第三方面,提供一种数据加密存储装置,应用于安装有应用程序APP的客户端中,所述装置包括:生成模块,设置为基于预设算法生成加密密钥;划分模块,设置为将所述加密密钥分成m个部分并分别保存在所述客户端的m个介质中,其中m为大于1的自然数;以及加密模块,设置为使用所述加密密钥对目标数据进行加密以得到加密数据,并存储所述加密数据。
根据本公开实施例的第四方面,提供另一种数据加密存储装置,应用于安装有应用程序APP的客户端中,所述装置包括:加密模块,设置为根据目标字段对应的第一风控级别,使用第一加密密钥对目标字段的数据进行加密以得到第一加密数据;以及划分模块,设置为将所述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个介质中,其中n 1为大于1的自然数。
根据本公开实施例的第五方面,提供一种存储有计算机程序的存储介质,所述计算机程序在由客户端的处理器运行时,使所述客户端执行如以上任一实施例所述的方法。
根据本公开实施例的第六方面,提供一种计算设备,包括:处理器;存储介质,存储有可由所述处理器执行的指令;其中所述处理器被配置为执行如以上任一实施例所述的方法。
根据本公开实施例的数据加密存储方案,通过拆分数据存储时使用的加密密钥和/或得到的加密数据,并相应进行多介质分段存储,增强了数据存储的安全性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
图1为根据本公开一实施例的数据加密存储方法流程图。
图2为根据本公开另一实施例的数据加密存储方法流程图。
图3A为根据本公开再一实施例的数据加密存储方法流程图。
图3B为根据本公开再一实施例的数据加密存储方法流程图。
图3C为根据本公开又一实施例的数据加密存储方法流程图。
图4为根据本公开又一实施例的数据加密存储方法流程图。
图5为根据本公开一实施例的数据加密存储装置示意框图。
图6为根据本公开另一实施例的数据加密存储装置示意框图。
图7为根据本公开再一实施例的数据加密存储装置示意框图。
图8为根据本公开一实施例的计算设备示意框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
下面将参考若干示例性实施方式来描述本公开的原理和精神。应当理解,给出这些实施方式仅仅是为了使本领域技术人员能够更好地理解进而实现本发明,而并非以任何方式限制本公开的范围。相反,提供这些实施方式是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。
本领域技术人员知道,本公开的实施方式可以实现为一种系统、装置、设备、方法或计算机程序产品。因此,本公开可以具体实现为以下形式,即:完全的硬件、完全的软件(包括固件、驻留软件、微代码等),或者硬件和软件结合的形式。
根据本公开的实施方式,提出了一种数据存储方法和装置以及介质和计算设备。
图1为根据本公开一实施例的数据加密存储方法的流程图,如图1所示,本实施例 的方法包括以下步骤S101-S103。在一个实施例中,本实施例的方法可由安装有应用程序APP的客户端(例如手机)来执行。
在步骤S101中,基于预设算法生成加密密钥。
在一个实施例中,当APP安装于客户端后,客户端可以在用户首次启动APP时基于预设算法生成唯一的加密密钥。之后对于该APP需要在客户端本地进行存储的关键数据,都可使用该加密密钥进行加密。例如,使用客户端的UUID(Universally Unique Identifier,通用唯一识别码)、当前时间戳和本地预置密钥,通过HMAC(SHA-256)算法生成AES-256的对称加密密钥。
然而,本公开的实施例并不仅限于此,针对不同类型的关键数据,上述APP还可以基于预设的多种算法分别生成不同的加密密钥,此处不再赘述。
在步骤S102中,将加密密钥分成m个部分并分别保存在客户端的m个存储介质中,其中m为大于1的自然数。
与传统方式中加密密钥仅存储于单一存储介质不同,本实施例中使用多个存储介质对生成的加密密钥进行分段存储,从而降低破解风险。在一个实施例中,可基于分段算法,例如Base 64操作,对上述生成的加密密钥进行处理,从而截取生成32位Base 64字符串。这样,上述生成的加密密钥被分成多个部分分别保存在客户端设备的不同存储介质中。
在一个实施例中,所述m个存储介质包括客户端上的不同存储介质,或者同一存储介质上的不同存储位置,或者二者兼有。例如,对于客户端上安装的某个APP而言,所述m个存储介质可选自以下标识指示的存储介质的任意组合:KeyChain(密钥串)、File(文件夹)和UserDefaults(用户默认),但本公开并不仅限于此。上述Keychain是客户端存储介质上与APP对应的相对独立空间,即使在APP升级时Keychain中保存的信息也不会删除,一般用于保存用户的机密信息;UserDefaults一般用于存储与该APP对应的用户配置文件,File则用于存储用户在使用该APP期间下载或生成的非机密文件。
在步骤S103中,使用加密密钥对目标数据进行加密以得到加密数据并进行存储。
在APP当前需要进行关键数据的本地存储时,客户端首先基于步骤S102的反向操作从客户端的m个存储介质中取出加密密钥的各个部分并组装生成加密密钥,进而使用该加密密钥对上述关键数据进行加密操作,得到加密后的数据进行存储。
根据上述实施例的数据加密存储方法,通过拆分数据存储时使用的加密密钥,并相 应进行多介质分段存储,增强了数据存储的安全性。
图2为根据本公开另一实施例的数据加密存储方法流程图,如图所示,本实施例的方法包括以下步骤S201-S204。
在步骤S201中,基于预设算法生成加密密钥。
在步骤S202中,将加密密钥分成m个部分并分别保存在客户端的m个存储介质中,其中m为大于1的自然数。
在步骤S203中,使用加密密钥对目标数据进行加密。
上述步骤S201-S203分别对应前一实施例的步骤S101-S103,此处不再赘述。
在步骤S204中,将加密后得到的加密数据分成n个部分并分别保存在客户端的n个存储介质中,其中n为大于1的自然数。
沿用前一实施例对加密密钥进行多介质分段存储的构思,本实施例中进一步对加密得到的加密数据同样进行多介质分段存储,从而进一步降低破解风险。在一个实施例中,步骤S204中所述的n个存储介质与步骤S202中所述的m个存储介质可以包括完全相同的多个存储介质,也可以选择各自不同的存储介质范围,例如均可选自以下标识指示的存储介质的任意组合:KeyChain、File和UserDefaults。
根据上述实施例的数据加密存储方法,通过拆分数据存储时使用的加密密钥以及拆分得到的加密数据,并相应进行多介质分段存储,增强了数据存储的安全性。
图3A为根据本公开再一实施例的数据加密存储方法的流程图,如图所示,本实施例的方法包括以下步骤S301-S302。
在步骤S301中,根据目标字段对应的第一风控级别、使用第一加密密钥对所述目标字段的数据进行加密以得到第一加密数据。
在步骤S302中,将所述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个介质中,其中n 1为大于1的自然数。
在步骤S301中,该第一加密密钥可以基于预设算法来被生成,并且该第一加密密钥可以被分成m 1个部分并分别保存在客户端的m 1个介质中,其中m 1为大于1的自然数。
图3B为根据本公开再一实施例的数据加密存储方法的流程图,如图所示,本实施例的方法包括以下步骤S301-S305。
上述步骤S301-S302分别对应图3A所示实施例的步骤S301-S302,此处不再赘述。
在步骤S303中,获取与目标字段对应的第一风控级别。
对于需要在客户端本地保存的关键数据,可能因为数据性质的不同存在不同的加密需求。例如,对于常规的用户名和密码等数据,需要一般级别的加密;而对于银行账户、信用卡号和支付密码等数据,则需要更高级别的加密。本实施例中通过引入风控级别的设计来实现针对不同种类的关键数据进行不同级别的加密。
在一个实施例中,每种目标数据对应的风控级别可以预先设置并存储在APP(也即客户端本地)中。在另一实施例中,还可以由与客户端通信的服务器实时反馈某一目标数据对应的风控级别,从而便于更加灵活的级别设置和更新。例如,当APP通过客户端收到用户输入的某个关键字段需要在本地进行存储时,其与服务器进行通信,由服务器返回与该关键字段数据对应的风控级别。又例如,当APP需要从服务器获取某个关键字段在本地进行存储时,服务器可以在返回关键字段数据的同时携带相应的风控级别。
在步骤S304中,根据第一风控级别将第一加密数据分成n 1个部分。
在步骤S305中,将n 1个部分的第一加密数据分别保存在客户端的n 1个存储介质中。
图3C为根据本公开再一实施例的数据加密存储方法的流程图,如图所示,本实施例的方法包括以下步骤S301-S308。
上述步骤S301-S305分别对应图3B所示实施例的步骤S301-S305,此处不再赘述。
在步骤S306中,获取服务器发送的第二风控级别,其中,该第二风控级别不同于第一风控级别。
与现有技术中针对某个字段的数据始终采用同一种加密方式进行处理(例如要么始终加密存储,要么始终明文存储)不同,本实施例中可根据预设的触发条件对某个字段的风控级别进行动态更新。与客户端通信的服务器可发送更新的风控级别至客户端,该更新的风控级别可称为第二风控级别。这里触发服务器更新风控级别的触发条件既可以包括APP在本地基于检测到的预设事件(例如检测到密码多次输入错误等疑似攻击事件),也可以包括服务器基于全局设置进行更新(例如维护人员在发现软件漏洞时临时提高风控级别),本公开对此不作限制,此处也不加以赘述。
本步骤中APP基于客户端本地或服务器的触发而获取到针对目标字段进行更新设 置后的第二风控级别。例如,当APP从服务器获取到针对用户名字段降低风控级别的通知时,在本地的系统表项中将其由默认风控级别(第一风控级别,例如为次高)修改为更低的风控级别(第二风控级别,例如为最低)。
在步骤S307中,根据获取的第二风控级别,使用第二加密密钥对目标字段的数据进行加密以得到第二加密数据。
在步骤S308中,将所述第二加密数据分成n 2个部分,并将所述n 2个部分的第二加密数据分别保存在所述客户端的n 2个介质中;其中n 2为自然数,当第一风控级别高于第二风控级别时n 1>n 2,当第一风控级别低于第二风控级别时n 1<n 2
在一个实施例中,步骤S307中使用的第二加密密钥可以基于预设算法生成,并且该第二加密密钥可以被分成m 2个部分并分别保存在客户端的m 2个介质中,其中m 2为大于1的自然数。
以前一实施例中第一风控级别为次高、第二风控级别为最低为例。假设根据第一风控级别将第一加密数据分为2段(n 1=2),根据第二风控级别不对第二加密数据进行分段(n 2=1),则在步骤S302中,APP将第一加密数据分成2个部分,并将2个部分的第一加密数据分别保存在客户端的2个介质中;而在步骤S308中,APP不对第二加密数据进行分段,直接将完整的第二加密数据保存在客户端的一个介质中。
通过获取针对目标字段的更新的风控级别并根据更新的风控级别对该目标字段的数据重新进行加密存储,实现了敏感数据安全级别的灵活调整和动态更新;同时,通过根据风控级别拆分对客户端本地数据进行加密得到的加密数据,并相应进行多介质分段存储,增强了客户端数据存储的安全性。
在一个实施例中,APP对系统表项针对目标字段存储的风控级别进行修改后,接着基于更新后的第二风控级别对目标字段的数据进行新的加密存储。
这里,如果目标字段的数据本身没有发生变更,则APP例如可以使用第一加密密钥从第一加密数据恢复出目标字段的数据;然后根据第二风控级别、使用第二加密密钥对恢复出的目标字段的数据进行加密以得到第二加密数据;以及将第一加密数据删除。
在另一实施例中,如果目标字段的数据本身也产生更新,则APP可以直接删除原第一加密数据,接着基于第二风控级别对更新后的数据进行新的加密存储。例如,服务器在通知提高某安全证书的风控级别时,还发送了更新的安全证书,则APP在收到上述通知时即可删除原来的第一加密存储的安全证书,同时对新的安全证书进行第二加密存 储。
根据上述实施例的分级方式的数据加密存储方法,通过获取更新的风控级别对同一目标字段的数据进行相应级别的重新加密存储,实现了敏感数据安全级别的灵活和动态更新。
与不同风控级别的加密需求相对应的,本实施例提供不同数目的加密数据分段和存储介质。例如,对于级别最高的加密需求,可将加密数据分为三段分别保存在KeyChain、File和UserDefaults指示的存储介质中;对于级别次高的加密需求,可将加密数据分为两段分别保存在KeyChain和File指示的存储介质;对于级别最低的加密需求,可将加密数据不分段地(可理解为分为一段)保存在UserDefaults指示的存储介质中。
根据上述实施例的数据加密存储方法,通过拆分数据存储时使用的加密密钥和得到的加密数据,相应进行多介质分段存储,并引入风控级别的设计来实现针对不同种类的关键数据进行不同级别的加密,增强了数据存储的安全性和灵活性。
图4为根据本公开又一实施例的数据加密存储方法流程图,本实施例涉及与图3实施例加密流程相对应的解密流程。如图所示,本实施例的方法包括以下步骤S401-S404。
在步骤S401中,接收针对目标字段的数据获取请求。
在步骤S402中,基于数据获取请求获取与目标字段对应的风控级别。
在APP需要对本地存储的关键数据进行解密时,需要完成与加密过程对应的反向操作。由于图3A-图3C实施例中涉及针对不同种类的关键数据进行不同级别的加密,因此本实施例中在解密该关键数据时,需要先获取与其对应的风控级别。
在一个实施例中,风控级别例如是以映射表项的形式与关键数据的字段名存储在客户端本地。例如,APP在需要获取本地存储的用户名和密码对当前用户的输入数据进行校验时,通过在上述映射表项中查询字段名“用户名”和“密码”即可获取相应的风控级别。
另外,步骤S401的数据获取请求既可以是APP基于本地需求(例如上述的用户名和密码校验)而生成的,也可以是来自与客户端通信的服务器。例如,对于银行账号和支付密码,除了APP需要在本地进行校验之外,还需要通过服务器与相应的银行服务器通信进行校验,此时便可由服务器产生上述数据获取请求并发送至客户端。
在步骤S403中,根据风控级别从客户端的n个存储介质中取出加密数据。
本步骤可视为前一实施例步骤S306的逆过程。例如,基于步骤S402获取的不同风控级别执行如下操作:当获取到最高级别时,可从KeyChain、File和UserDefaults指示的存储介质中分别取出加密数据的各个部分并经过组装生成完整的加密数据;当获取到次高级别时,可从KeyChain和File指示的存储介质中分别取出加密数据的各个部分并经过组装生成完整的加密数据;当获取到最低级别时,可直接从UserDefaults指示的存储介质中取出完整的加密数据。
在步骤S404中,从m个存储介质中取出加密密钥的各个部分并生成加密密钥。
例如,当APP基于预设规则确定加密密钥是分成三段时,则可从KeyChain、File和UserDefaults指示的存储介质中分别取出加密密钥的各个部分并经过组装生成完整的加密密钥。
在步骤S405中,使用加密密钥对加密数据进行解密得到目标数据;或者将加密数据和加密密钥回复至发送数据获取请求的服务器。
对应于数据获取请求的不同来源,步骤S405包括两种不同的实施方式。
在一个实施例中,当数据获取请求是APP本地产生时,本步骤直接使用步骤S404得到的加密密钥对步骤S403得到的加密数据进行解密处理,从而得到目标数据。
在另一实施例中,当数据获取请求是来自服务器时,本步骤不进行解密处理,而是将步骤S404得到的加密密钥对步骤S403得到的加密数据发送至上述服务器。进一步,在发送至服务器之前,还可以对前述步骤得到的加密密钥和加密数据进行再次加密处理。例如,使用先AES(Advanced Encryption Standard,高级加密标准)、后RSA(Rivest-Shamir-Adleman)的方式对加密密钥和加密数据进行加密,将生成的两个值(分别对应加密密钥和加密数据)发送至服务器,由服务器通过逆向操作进行解密从而最终得到目标数据。
需要说明的是,尽管在附图中以特定顺序描述了本公开中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。另外,也易于理解的是,这些步骤可以是例如在多个模块/进程/线程中同步或异步执行。
本示例实施方式中进一步提供了一种数据加密存储装置。
图5为根据本公开一实施例的数据加密存储装置示意框图。本实施例的装置应用于 安装有应用程序APP的客户端中,如图所示,该装置包括生成模块51、划分模块52和加密模块53。
在一个实施例中,生成模块51设置为基于预设算法生成加密密钥;划分模块52设置为将上述加密密钥分成m个部分并分别保存在客户端的m个存储介质中,其中m为大于1的自然数;加密模块53设置为使用上述加密密钥对目标数据进行加密以得到加密数据并存储该加密数据。
在一个实施例中,上述m个存储介质包括客户端上的不同存储介质,或者同一存储介质上的不同存储位置,或者二者兼有。例如,对于客户端上安装的某个APP而言,所述m个存储介质可选自以下标识指示的存储介质的任意组合:KeyChain、File和UserDefaults,但本公开并不仅限于此。
根据上述实施例的数据加密存储装置,通过拆分数据存储时使用的加密密钥,并相应进行多介质分段存储,增强了数据存储的安全性。
图6为根据本公开另一实施例的数据加密存储装置示意框图。本实施例的装置应用于安装有应用程序APP的客户端中,如图所示,该装置包括加密模块61和划分模块62。
在一个实施例中,加密模块61设置为根据目标字段对应的第一风控级别,使用第一加密密钥对目标字段的数据进行加密以得到第一加密数据;划分模块62设置为将上述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个存储介质中,其中n 1为大于1的自然数。
在一个实施例中,上述n 1个存储介质包括客户端上的不同存储介质,或者同一存储介质上的不同存储位置,或者二者兼有。例如,对于客户端上安装的某个APP而言,所述n 1种介质可选自以下标识指示的存储介质的任意组合:KeyChain、File和UserDefaults,但本公开并不仅限于此。
根据上述实施例的数据加密存储装置,通过拆分数据存储时得到的加密数据,并相应进行多介质分段存储,增强了数据存储的安全性。
图7为根据本公开再一实施例的数据加密存储装置示意框图。本实施例的装置应用于安装有应用程序APP的客户端中,如图所示,该装置包括生成模块71、第一划分模块72、加密模块73和第二划分模块74。
在一个实施例中,生成模块71设置为基于预设算法生成加密密钥;第一划分模块72设置为将上述加密密钥分成m个部分并分别保存在客户端的m个存储介质中,其中 m为大于1的自然数;加密模块73设置为使用上述加密密钥对目标数据进行加密以得到加密数据;第二划分模块74设置为将上述加密数据分成n个部分并分别保存在所述客户端的n个存储介质中,其中n为大于1的自然数。
在一个实施例中,上述m个存储介质包括客户端上的不同存储介质,或者同一存储介质上的不同存储位置,或者二者兼有。例如,对于客户端上安装的某个APP而言,所述m个存储介质可选自以下标识指示的存储介质的任意组合:KeyChain、File和UserDefaults,但本公开并不仅限于此。上述n个存储介质与上述m个存储介质可以包括完全相同的多个存储介质,也可以选择各自不同的存储介质范围,例如均可选自以下标识指示的存储介质的任意组合:KeyChain、File和UserDefaults。
根据上述实施例的数据加密存储装置,通过拆分数据存储时使用的加密密钥和得到的加密数据,并相应进行多介质分段存储,增强了数据存储的安全性。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。作为模块或单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现木公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
通过以上实施方式的描述,本领域的技术人员易于理解,上文描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。
例如,在一个示例实施方式中,还提供一种机器可读存储介质,其上存储有机器可读程序,该程序被处理器执行时可以实现上述任意一个实施例中所述方法的步骤。所述方法的具体步骤可参考前述实施例中的详细描述,此处不再赘述。所述机器可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在另一个示例实施方式中,还提供一种计算设备,该设备可以是手机、平板电 脑等移动终端,也可以是台式计算机、服务器等终端设备,本示例实施方式中对此不作限制。图8示出根据本公开示例实施方式中一种计算设备80的示意图。例如,设备80可以被提供为一移动终端。参照图8,设备80包括处理组件81,其进一步包括一个或多个处理器,以及由存储介质82所代表的存储资源,用于存储可由处理组件81的执行的指令,例如应用程序。存储介质82中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件81被配置为执行指令,以执行上述数据加密存储方法。该方法的步骤可参考前述方法实施例中的详细描述,此处不再赘述。
设备80还可以包括一个电源组件83被配置为执行设备80的电源管理,一个有线或无线网络接口84被配置为将设备80连接到网络,和一个输入输出(I/O)接口85。设备80可以操作基于存储在存储介质82的操作系统,例如Android、IOS或类似。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由所附的权利要求指出。
虽然已参照几个典型实施例描述了本公开,但应当理解,所用的术语是说明和示例性、而非限制性的术语。由于本公开能够以多种形式具体实施而不脱离申请的精神或实质,所以应当理解,上述实施例不限于任何前述的细节,而应在随附权利要求所限定的精神和范围内广泛地解释,因此落入权利要求或其等效范围内的全部变化和改型都应为随附权利要求所涵盖。

Claims (16)

  1. 一种数据加密存储方法,应用于安装有应用程序APP的客户端中,所述方法包括:
    根据目标字段对应的第一风控级别、使用第一加密密钥对所述目标字段的数据进行加密以得到第一加密数据;以及
    将所述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个介质中,其中n 1为大于1的自然数。
  2. 如权利要求1所述的方法,其中,所述方法还包括:
    基于预设算法生成所述第一加密密钥;以及
    将所述第一加密密钥分成m 1个部分并分别保存在所述客户端的m 1个介质中,其中m 1为大于1的自然数。
  3. 如权利要求1所述的方法,其中,根据所述目标字段对应的第一风控级别、将所述第一加密数据分成n 1个部分并分别保存在所述n 1个介质中包括:
    获取与所述目标字段对应的第一风控级别;
    根据所述第一风控级别将所述第一加密数据分成n 1个部分;以及
    将所述n 1个部分的第一加密数据分别保存在所述n 1个介质中。
  4. 如权利要求1所述的方法,其中,所述方法还包括:
    获取服务器发送的第二风控级别,其中,所述第二风控级别不同于所述第一风控级别;
    根据获取的所述第二风控级别,使用第二加密密钥对所述目标字段的数据进行加密以得到第二加密数据;
    将所述第二加密数据分成n 2个部分,并
    将所述n 2个部分的第二加密数据分别保存在所述客户端的n 2个介质中;
    其中n 2为自然数,当所述第一风控级别高于所述第二风控级别时n 1>n 2,当所述第一风控级别低于所述第二风控级别时n 1<n 2
  5. 如权利要求4所述的方法,其中,所述方法还包括:
    基于预设算法生成所述第二加密密钥;以及
    将所述第二加密密钥分成m 2个部分并分别保存在所述客户端的m 2个介质中,其中m 2为大于1的自然数。
  6. 如权利要求5所述的方法,其中,根据获取的所述第二风控级别,使用所述第二加密密钥对所述目标字段的数据进行加密以得到所述第二加密数据,包括:
    使用所述第一加密密钥从所述第一加密数据恢复出所述目标字段的数据;
    根据所述第二风控级别,使用所述第二加密密钥对恢复出的所述目标字段的数据进行加密以得到所述第二加密数据;以及
    将所述第一加密数据删除。
  7. 如权利要求5所述的方法,其中,所述方法还包括:
    接收针对所述目标字段的数据获取请求;
    基于所述数据获取请求获取与所述目标字段对应的所述第二风控级别;
    根据所述第二风控级别从所述客户端的介质中取出所述第二加密数据;
    从所述客户端中取出所述第二加密密钥;以及
    使用所述第二加密密钥对所述第二加密数据进行解密得到所述目标数据;或者将所述第二加密数据和所述第二加密密钥回复至发送所述数据获取请求的服务器。
  8. 如权利要求7所述的方法,其中,根据所述第二风控级别从所述客户端的介质中取出所述第二加密数据,包括:
    根据所述第二风控级别,从所述客户端的n 2个介质中分别读取所述第二加密数据的n 2个部分;
    将所述n 2个部分组装成完整的所述第二加密数据。
  9. 如权利要求7所述的方法,其中,根据所述第二风控级别从所述客户端的介质中取出所述第二加密密钥,包括:
    根据所述第二风控级别,从所述m 2个介质中分别读取所述第二加密密钥的m 2个部分;并
    将所述m 2个部分组装成完整的所述第二加密密钥。
  10. 如权利要求1所述的方法,其中,所述方法还包括:
    获取服务器发送的针对所述目标字段的更新数据;
    基于所述更新数据确定不同于所述第一风控级别的第二风控级别;
    根据所述第二风控级别、使用第二加密密钥对所述更新数据进行加密,以得到第二加密数据;
    将所述第二加密数据分成n 2个部分,并
    将所述n 2个部分的第二加密数据分别保存在所述客户端的n 2个介质中;
    其中n 2为自然数,当所述第一风控级别高于所述第二风控级别时n 1>n 2,当所述第一风控级别低于所述第二风控级别时n 1<n 2
  11. 如权利要求1所述的方法,其中,所述n 1个介质选自以下标识指示的介质的任 意组合:密钥串KeyChain、文件夹File和用户默认User De faults。
  12. 一种数据加密存储方法,应用于安装有应用程序APP的客户端中,所述方法包括:
    基于预设算法生成加密密钥;
    将所述加密密钥分成m个部分并分别保存在所述客户端的m个介质中,其中m为大于1的自然数;
    使用所述加密密钥对目标数据进行加密以得到加密数据;以及
    存储所述加密数据。
  13. 一种数据加密存储装置,应用于安装有应用程序APP的客户端中,所述装置包括:
    生成模块,设置为基于预设算法生成加密密钥;
    划分模块,设置为将所述加密密钥分成m个部分并分别保存在所述客户端的m个介质中,其中m为大于1的自然数;以及
    加密模块,设置为使用所述加密密钥对目标数据进行加密以得到加密数据,并存储所述加密数据。
  14. 一种数据加密存储装置,应用于安装有应用程序APP的客户端中,所述装置包括:
    加密模块,设置为根据目标字段对应的第一风控级别,使用第一加密密钥对所述目标字段的数据进行加密以得到第一加密数据;以及
    划分模块,设置为将所述第一加密数据分成n 1个部分并分别保存在所述客户端的n 1个介质中,其中n 1为大于1的自然数。
  15. 一种存储有计算机程序的存储介质,所述计算机程序在由客户端的处理器运行时,使所述客户端执行如权利要求1-12中任一项所述的方法。
  16. 一种计算设备,包括:
    处理器;
    存储介质,存储有可由所述处理器执行的指令;
    其中所述处理器被配置为执行如权利要求1-12中任一项所述的方法。
PCT/CN2018/117234 2017-12-18 2018-11-23 数据加密存储 WO2019120038A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/955,129 US11321471B2 (en) 2017-12-18 2018-11-23 Encrypted storage of data
CA3086236A CA3086236A1 (en) 2017-12-18 2018-11-23 Encrypted storage of data

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201711366203.2A CN109933994B (zh) 2017-12-18 2017-12-18 数据分级存储方法和装置以及计算设备
CN201711366204.7 2017-12-18
CN201711366203.2 2017-12-18
CN201711366204.7A CN109936546B (zh) 2017-12-18 2017-12-18 数据加密存储方法和装置以及计算设备

Publications (1)

Publication Number Publication Date
WO2019120038A1 true WO2019120038A1 (zh) 2019-06-27

Family

ID=66993040

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/117234 WO2019120038A1 (zh) 2017-12-18 2018-11-23 数据加密存储

Country Status (3)

Country Link
US (1) US11321471B2 (zh)
CA (1) CA3086236A1 (zh)
WO (1) WO2019120038A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11693967B2 (en) * 2020-05-06 2023-07-04 Saudi Arabian Oil Company Machine learning-based method and system for detecting plaintext passwords
CN114584300B (zh) * 2022-03-02 2024-02-02 中国科学院国家授时中心 一种用于双向授时的加解密方法及系统
CN114629643A (zh) * 2022-03-25 2022-06-14 山东云海国创云计算装备产业创新中心有限公司 一种密钥处理方法、装置、介质
CN116055144A (zh) * 2022-12-29 2023-05-02 电子科技大学 基于物联网的数据安全性分析方法、装置、设备及存储

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198529A1 (en) * 2004-03-05 2005-09-08 Satoshi Kitani Information processing apparatus, authentication processing method, and computer program
US20100172501A1 (en) * 2009-01-06 2010-07-08 Tian Weicheng Secure key system
CN102891876A (zh) * 2011-07-22 2013-01-23 中兴通讯股份有限公司 云计算环境下分布式数据加密方法及系统
CN103283177A (zh) * 2010-12-23 2013-09-04 莫雷加系统股份有限公司 与分段密钥一起使用的密码学模块及其使用方法
CN105809066A (zh) * 2014-12-29 2016-07-27 深圳Tcl数字技术有限公司 加密数据的存储方法及终端

Family Cites Families (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI242965B (en) 2003-12-26 2005-11-01 Phison Electronics Corp Method for forming encrypted file and its storage system
CN101719205B (zh) 2009-12-25 2012-05-23 国家广播电影电视总局电影数字节目管理中心 一种数字版权管理方法及系统
US8705730B2 (en) 2010-12-23 2014-04-22 Morega Systems Inc. Elliptic curve cryptography with fragmented key processing and methods for use therewith
WO2013041394A1 (en) 2011-09-23 2013-03-28 Koninklijke Kpn N.V. Secure distribution of content
US8677154B2 (en) 2011-10-31 2014-03-18 International Business Machines Corporation Protecting sensitive data in a transmission
US8812877B2 (en) 2011-11-11 2014-08-19 Nec Corporation Database encryption system, method, and program
US10102390B2 (en) * 2012-06-28 2018-10-16 Honeywell International Inc. Memory authentication with redundant encryption
CN103455764B (zh) 2013-08-27 2016-09-14 无锡华御信息技术有限公司 一种基于文件分割合并技术的文件加密以及解密系统
CN104601325B (zh) 2013-10-31 2018-03-16 华为技术有限公司 数据加密方法、数据解密方法、装置、设备及系统
CN103716148A (zh) 2013-12-11 2014-04-09 中国电子科技集团公司第三十研究所 一种具有密钥隔离性质的签密方法
US9521122B2 (en) 2014-05-09 2016-12-13 International Business Machines Corporation Intelligent security analysis and enforcement for data transfer
US10127244B2 (en) 2014-06-04 2018-11-13 Harris Corporation Systems and methods for dynamic data storage
CN105337722B (zh) 2014-06-19 2019-06-28 阿里巴巴集团控股有限公司 数据加密方法及装置
SG11201808317XA (en) 2014-09-23 2018-10-30 Fhoosh Inc Secure high speed data storage, access, recovery, and transmission
CN104579627B (zh) 2014-12-06 2018-06-05 上海移远通信技术股份有限公司 一种数据加密方法及系统
US10013363B2 (en) * 2015-02-09 2018-07-03 Honeywell International Inc. Encryption using entropy-based key derivation
CN105100115A (zh) 2015-08-27 2015-11-25 中国科学院信息工程研究所 一种基于加密口令及数据拆分的隐私保护的数据存储方法
US10432641B2 (en) * 2015-09-25 2019-10-01 T-Mobile Usa, Inc. Secure data corridors
US10043021B2 (en) 2016-04-07 2018-08-07 Blackberry Limited Controlling access to application data
CN106326768B (zh) 2016-08-23 2019-05-07 Oppo广东移动通信有限公司 一种信息管理方法、装置及智能终端
CN106372519A (zh) 2016-08-30 2017-02-01 江苏博智软件科技有限公司 一种信息加密方法及装置
CN106411515B (zh) 2016-12-07 2019-06-18 北京信任度科技有限公司 利用密码机对密钥进行分割提升密钥安全的方法及系统
CN106874743B (zh) 2016-12-29 2020-07-10 上海雷塔智能科技有限公司 一种智能卡密码保存及提取的方法及系统
CN106909851A (zh) 2017-02-27 2017-06-30 努比亚技术有限公司 一种数据安全存储方法及装置
CN106850208A (zh) 2017-02-28 2017-06-13 北京信安世纪科技有限公司 一种秘密数据分割的方法及装置
EP3619637B1 (en) * 2017-12-12 2021-03-03 Google LLC Oblivious access with differential privacy
US11580234B2 (en) * 2019-06-29 2023-02-14 Intel Corporation Implicit integrity for cryptographic computing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198529A1 (en) * 2004-03-05 2005-09-08 Satoshi Kitani Information processing apparatus, authentication processing method, and computer program
US20100172501A1 (en) * 2009-01-06 2010-07-08 Tian Weicheng Secure key system
CN103283177A (zh) * 2010-12-23 2013-09-04 莫雷加系统股份有限公司 与分段密钥一起使用的密码学模块及其使用方法
CN102891876A (zh) * 2011-07-22 2013-01-23 中兴通讯股份有限公司 云计算环境下分布式数据加密方法及系统
CN105809066A (zh) * 2014-12-29 2016-07-27 深圳Tcl数字技术有限公司 加密数据的存储方法及终端

Also Published As

Publication number Publication date
US20200342121A1 (en) 2020-10-29
US11321471B2 (en) 2022-05-03
CA3086236A1 (en) 2019-06-27

Similar Documents

Publication Publication Date Title
EP3319292B1 (en) Methods, client and server for checking security based on biometric features
US9413754B2 (en) Authenticator device facilitating file security
US10469253B2 (en) Methods and apparatus for migrating keys
US9621524B2 (en) Cloud-based key management
WO2019120038A1 (zh) 数据加密存储
US11546321B2 (en) Non-custodial tool for building decentralized computer applications
EP3472970A1 (en) Blockchain systems and methods for user authentication
EP3299990A1 (en) Electronic device server and method for communicating with server
CN109936546B (zh) 数据加密存储方法和装置以及计算设备
CN111884986B (zh) 一种数据加密处理方法、装置及存储介质
CN110445840B (zh) 一种基于区块链技术的文件存储和读取的方法
US9524394B2 (en) Method and apparatus for providing provably secure user input/output
CN111740824B (zh) 可信应用管理方法及装置
WO2023051337A1 (zh) 数据处理方法、装置、设备及存储介质
CA2891610C (en) Agent for providing security cloud service and security token device for security cloud service
US10635826B2 (en) System and method for securing data in a storage medium
CN117240625B (zh) 一种涉及防篡改的数据处理方法、装置及电子设备
US20220353092A1 (en) System and Method for Secure Internet Communications
JP2007060581A (ja) 情報管理システム及び方法
CN109933994B (zh) 数据分级存储方法和装置以及计算设备
CN115361198A (zh) 解密方法、加密方法、装置、计算机设备和存储介质
JP2015065615A (ja) データ暗号化装置、データ暗号化プログラム及びデータ暗号化方法
CN116647413B (zh) 应用登录方法、装置、计算机设备和存储介质
JP2013179473A (ja) アカウント生成管理システム、アカウント生成管理サーバ、アカウント生成管理方法及びアカウント生成管理プログラム
US20240064131A1 (en) Secure synchronization of data

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: 18891021

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3086236

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18891021

Country of ref document: EP

Kind code of ref document: A1