WO2016086787A1 - 数据安全加密的方法及装置 - Google Patents

数据安全加密的方法及装置 Download PDF

Info

Publication number
WO2016086787A1
WO2016086787A1 PCT/CN2015/095587 CN2015095587W WO2016086787A1 WO 2016086787 A1 WO2016086787 A1 WO 2016086787A1 CN 2015095587 W CN2015095587 W CN 2015095587W WO 2016086787 A1 WO2016086787 A1 WO 2016086787A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
target
encryption key
encrypted version
key
Prior art date
Application number
PCT/CN2015/095587
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 WO2016086787A1 publication Critical patent/WO2016086787A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of Internet data processing technologies, and in particular, to a method and apparatus for data security encryption.
  • the user's private data is encrypted according to a certain encryption method and then stored in the database.
  • the inventor found in the research process that after the existing technology is stored in the database after encrypting the data, if the encrypted data is maliciously acquired, even if the hacker cannot crack it within a certain period of time, it takes only enough time to perform Decryption, and finally the encrypted data can still be successfully decrypted. Therefore, the prior art encryption method for data has security risks, and therefore, the user's private data is at risk of being maliciously leaked.
  • the present application provides a data security encryption method for solving the problem of security risks of the user's private data in the prior art, and protecting the user's private data from malicious disclosure to the greatest extent.
  • the application also provides a device for data security encryption to ensure the implementation and application of the above method in practice.
  • a data security encryption method including:
  • the replacement key request is for requesting to replace the current encryption key of the target data with the target encryption Key
  • the original data is encrypted using the target encryption key.
  • the present application also discloses another method for data security encryption, including:
  • the data related to the service of the user is encrypted by using a target encryption key corresponding to the target encrypted version.
  • the present application discloses a method for obtaining data, including:
  • the server obtains the ciphertext corresponding to the ciphertext according to the data acquisition request, and decrypts the ciphertext by using the corresponding encryption key.
  • the application discloses a device for data security encryption, comprising:
  • Obtaining a target data module configured to acquire target data of a key to be replaced in response to the currently triggered replacement key request; wherein the replacement key request is used to request to replace the current encryption key of the target data with the target encryption key key;
  • a decryption module configured to decrypt the target data by using the current encryption key to obtain original data
  • a first encryption module configured to encrypt the original data by using the target encryption key.
  • the present application also discloses another device for data security encryption, including:
  • an encryption version module configured to obtain a current encrypted version and a target encrypted version represented by the replacement key request in response to the currently triggered replacement key request;
  • Executing a service module configured to execute a service operation requested by the user in response to a service operation request triggered by a user; wherein an encrypted version of the user's data is the current encrypted version this;
  • a second encryption module configured to encrypt data related to the service of the user by using a target encryption key corresponding to the target encrypted version after the execution of the service operation is completed.
  • the application also discloses an apparatus for acquiring data, the apparatus comprising:
  • a sending module configured to send the data acquisition request to a server in response to a data acquisition request triggered by a user
  • a receiving module configured to receive the target data returned by the server, where the target data is: the server queries the corresponding ciphertext according to the data obtaining request, and decrypts the ciphertext by using a corresponding encryption key. data.
  • the present application includes the following advantages:
  • the encryption key can be changed by encrypting the encrypted data, so that the encrypted data can be flexibly replaced, because the encryption key of the data is flexibly changed, so even if there is a hacker It took a long time to crack the original key, and it was impossible to successfully obtain the data encrypted by the new encrypted password.
  • the embodiment of the present application significantly improves the security of the data storage, and the privacy data of the user is protected from being leaked to the greatest extent.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for data security encryption of the present application
  • Embodiment 2 is a flowchart of Embodiment 2 of a method for data security encryption of the present application
  • Embodiment 3 is a structural block diagram of Embodiment 1 of a device for data security encryption according to the present application;
  • Embodiment 4 is a structural block diagram of Embodiment 2 of a device for data security encryption according to the present application;
  • FIG. 5 is a flow chart of an embodiment of a method for acquiring data of the present application.
  • FIG. 6 is a flow chart of an embodiment of an apparatus for acquiring data of the present application.
  • This application can be used in a variety of general purpose or special purpose computing device environments or configurations.
  • personal computer server computer, handheld or portable device, tablet type device, multi-processor device, distributed computing environment including any of the above devices or devices, and the like.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.
  • FIG. 1 a flowchart of an embodiment of a data security encryption method of the present application is shown.
  • the embodiment may include the following steps:
  • Step 101 Acquire target data of a key to be replaced in response to the currently triggered replacement key request; wherein the replacement key request is used to request to replace the current encrypted version of the target data with the target encrypted version.
  • the system administrator can trigger a replacement key request for key replacement of the data saved by the system.
  • the system administrator can also set a timer every fixed time (for example, one month, etc.).
  • the replacement key request is triggered.
  • how to trigger the replacement key request does not affect the implementation of the embodiment, as long as the replacement key request includes the current encrypted version and the target encrypted version of the data.
  • the system administrator triggers the replacement key request, which includes the current encrypted version of the data and the target encrypted version information. For example, the target data whose current encryption version is "1" is changed to the target encryption version "2" for encryption.
  • the buyer's input system's receiving address is: Huanglong Times, Xihu District, Hangzhou City, Zhejiang province
  • the shipping address is stored in the database, assuming advanced encryption standards (AES, Advanced Encryption Standard) ) Encryption
  • the corresponding encryption key is: dkusjjws.
  • Table 1 for the data of the receiving address, there is an "encrypted version" field corresponding to the system, and a field value of 1 indicates that the encrypted version of the receiving address is 1.
  • the field value of the keyword "encryptionVersion” indicates the encrypted version of the current system
  • the field value of the keyword “encryptionKey.1” indicates the encryption key corresponding to the encrypted version of the current system. If the key is to be replaced, The field value corresponding to the keyword “encryptionVersion” is changed to 2, indicating that the target encryption version is 2, and the field value of the keyword “encryptionKey.2" is the encryption key corresponding to the target encrypted version of the current system.
  • step 101 may include the following steps when specifically executed:
  • Step A1 Obtain the current encrypted version and the target encrypted version from the currently triggered replacement key request.
  • the current encrypted version and the target encrypted version information are obtained from the currently triggered replacement key request.
  • the current encryption version is 1 and the target encryption version is 2.
  • Step A2 Obtain target data of the encrypted version as the current encrypted version according to the correspondence between the pre-stored encrypted version and the data.
  • step 102 the target data is decrypted using the current encryption key corresponding to the current encrypted version to obtain original data.
  • the original data is a ciphertext obtained by a symmetric encryption algorithm, and therefore, it can be decrypted.
  • the step 102 may include:
  • Step B1 Obtain a current encryption key corresponding to the current encrypted version according to the correspondence between the pre-stored encrypted version and the encryption key.
  • Table 2 above can query the encryption key used by the encrypted version 1 data, for example, in Table 2, the encrypted version can be obtained as The current encryption key for 1 is .
  • Step B2 Decrypt the target data using the current encryption key to obtain unencrypted original data.
  • step 103 encrypting the original data with a target encryption key corresponding to the target encrypted version.
  • the original data is encrypted by the target encryption key "Abcdddtt" corresponding to the encrypted version 2, and the data encrypted by "Abcdddtt" is obtained.
  • the method may further include:
  • Step 104 Store the original data encrypted by the target encryption key.
  • the encryption key can be changed by encrypting the encrypted data, so that the encrypted data can be flexibly replaced, because the encryption key of the data is flexibly changed, so even Some hackers have spent a considerable amount of time cracking the original key, and it is unable to successfully obtain the data encrypted by the new encrypted password.
  • the embodiment of the present application significantly improves the security of the data storage, and the privacy data of the user is protected from being leaked to the greatest extent.
  • Embodiment 2 of a data security encryption method of the present application is shown.
  • the embodiment may include the following steps:
  • Step 200 Acquire a current encrypted version and a target encrypted version represented by the replacement key request in response to the currently triggered replacement key request.
  • the replacement key request is currently triggered, the replacement key request also includes the current encrypted version and the target encrypted version, and the current encrypted version and the target encrypted version are first obtained from the replacement key request.
  • the replacement key request refers to the description of Embodiment 1, and details are not described herein again.
  • Step 201 Perform a service operation requested by the user in response to a service operation request triggered by a user, where an encrypted version of the data of the user is the current encrypted version.
  • the target data cannot be encrypted immediately. Therefore, in this case, it is possible to wait for the user to trigger a corresponding business operation request, for example, a user-triggered login operation, or a payment operation or the like. After the user triggers the service operation request, the user initiates the login operation service or the payment operation service.
  • the process of executing the service is the same as the prior art, and will not be described here.
  • Embodiment 2 the relationship between the encrypted ciphertext and the encrypted version is described in Table 1 in Embodiment 1, and the user information field may also be set to indicate which encrypted version of the current user's data is used. This is encrypted and shows what the encrypted ciphertext is.
  • Step 202 After the execution of the service operation is completed, encrypt the data related to the current service of the user by using the target encryption key.
  • the embodiment is adapted to the case of encrypting data related to a certain service of a certain user.
  • the method may further include:
  • Step 203 Store data related to the service of the user encrypted by the target encryption key.
  • the data encrypted by using the new encryption key is re-stored in the database, and the encryption of the data involved in the service of the user is changed in Table 2.
  • the version is the target encrypted version.
  • the change of the user's encrypted data does not have any perception to the user.
  • the system re-encrypts the user's password, which is the key encryption or storage failure, and will not affect the user. Current user actions to ensure system availability.
  • the encryption key can be changed by encrypting the encrypted data, so that the encrypted data can be flexibly replaced, because the encryption key of the data is flexibly changed, so even if there is a hacker cost It took a long time to crack the original key, and it was unable to successfully obtain the data encrypted by the new encrypted password.
  • the embodiment of the present application significantly improves the security of the data storage, and the privacy data of the user is protected from being leaked to the greatest extent.
  • FIG. 3 a flowchart of an embodiment of a method for acquiring data according to the present application is shown.
  • the embodiment may include the following steps:
  • Step 301 Send the data acquisition request in response to a data acquisition request triggered by a user. Send to the server.
  • the method of this embodiment may be applied to a client.
  • the data acquisition request includes user information, such as a user name, and the like, which can identify the identity of the user; and request data. Identification information, for example, requesting all order information under a certain user name.
  • the server searches for corresponding data according to the identification information from the database, and verifies whether the user has the right to obtain the data according to the user information, and if so, uses the corresponding encryption key pair correspondingly.
  • the ciphertext is decrypted to obtain the target data.
  • the correspondence between the oil user information, the data ciphertext and the encryption key is stored.
  • Step 302 Receive the target data returned by the server, where the target data is: the server obtains data obtained by decrypting the ciphertext according to the data acquisition request, and decrypting the ciphertext by using a corresponding encryption key.
  • the client then receives the decrypted target data returned by the server, where the target data is: the server obtains the ciphertext according to the data acquisition request, and decrypts the ciphertext using the corresponding encryption key.
  • the server can replace the encryption key periodically or according to the user's needs for the data in the database, not only can save the data in the server database more securely, but also can obtain the relative information obtained by the client without the user. Secure data to enhance the user experience.
  • the present application further provides an apparatus embodiment 1 for data security encryption.
  • the apparatus may include :
  • Obtaining a target data module 401 configured to acquire target data of a key to be replaced in response to the currently triggered replacement key request; wherein the replacement key request is used to request to replace a current encryption key of the target data with a target encryption Key.
  • the acquiring target data module 401 may specifically include:
  • an encrypted version submodule configured to obtain a current encrypted version and a target encrypted version from the currently triggered replacement key request; and, acquiring a target data submodule, according to the correspondence between the pre-stored encrypted version and the data, Obtain the target data of the current encrypted version with the encrypted version.
  • the decryption module 402 is configured to decrypt the target data by using the current encryption key to obtain original data.
  • the decryption module 402 may specifically include:
  • an encryption key sub-module configured to acquire a current encryption key corresponding to the current encryption version according to a correspondence between the pre-stored encryption version and the encryption key; and, a decryption sub-module, configured to use the current encryption key pair
  • the target data is decrypted to obtain unencrypted raw data.
  • the first encryption module 403 is configured to encrypt the original data by using the target encryption key.
  • the first storage module 404 is configured to store the original data encrypted by using the target encryption key.
  • the encryption key can be changed by encrypting the encrypted data, so that the encrypted data can be flexibly replaced, because the encryption key of the data is flexibly changed, so even if there is a hacker cost It took a long time to crack the original key, and it was unable to successfully obtain the data encrypted by the new encrypted password.
  • the embodiment of the present application significantly improves the security of the data storage, and the privacy data of the user is protected from being leaked to the greatest extent.
  • the present application further provides an apparatus embodiment 2 for data security encryption.
  • the apparatus may include :
  • the encrypted version module 501 is configured to obtain the current encrypted version and the target encrypted version represented by the replacement key request in response to the currently triggered replacement key request.
  • the execution service module 502 is configured to execute the service operation requested by the user in response to the service operation request triggered by the user; wherein the encrypted version of the data of the user is the current encrypted version.
  • the second encryption module 503 is configured to encrypt data related to the service of the user by using the target encryption key after the execution of the service operation is completed.
  • the second storage module 504 is configured to store data related to the service of the user encrypted by the target encryption key.
  • the encryption key can be changed by encrypting the encrypted data, so that the encrypted data can be flexibly replaced, because the encryption key of the data is flexibly changed, so even if there is a hacker cost It took a long time to crack the original key, and it was unable to successfully obtain the data encrypted by the new encrypted password.
  • the embodiment of the present application significantly improves the security of the data storage, and the privacy data of the user is protected from being leaked to the greatest extent.
  • the present application further provides an apparatus for acquiring data.
  • the apparatus may include:
  • the sending module 601 is configured to send the data acquisition request to the server in response to the data acquisition request triggered by the user.
  • the receiving module 602 is configured to receive the target data returned by the server, where the target data is: the server queries the corresponding ciphertext according to the data obtaining request, and decrypts the ciphertext by using a corresponding encryption key.
  • the data is: the server queries the corresponding ciphertext according to the data obtaining request, and decrypts the ciphertext by using a corresponding encryption key.
  • the server can replace the encryption key periodically or according to the user's needs for the data in the database, not only can save the data in the server database more securely, but also can obtain the relative information obtained by the client without the user. Secure data to enhance the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

本申请提供了数据安全加密的方法及装置,其中一种方法包括:响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密密钥;使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据;将所述原始数据采用所述目标加密密钥进行加密。在本申请实施例中,可以提升用户数据的安全性,最大限度上保护用户的隐私数据不被恶意泄露。

Description

数据安全加密的方法及装置 技术领域
本申请涉及互联网数据处理技术领域,特别涉及数据安全加密的方法及装置。
背景技术
随着互联网的发展,越来越多的用户在互联网上进行信息交互、产品交易等在线业务,也因此,用户在互联网上注册或者保存的个人信息越来越重要,例如自己在某些网站上设置的登录名和登录密码、收货地址、联系人和联系方式等一系列的隐私信息。这些隐私信息一旦泄漏对于用户来说可能会造成非常大的损失。
现有技术中,有的网站或者平台在存储用户的隐私数据的时候,都将用户的隐私数据按照某种加密方式加密之后再存储到数据库中。
发明内容
但是发明人在研究过程中发现,现有技术在将数据加密之后存储到数据库中之后,如果加密的数据被恶意获取到,那么即便黑客在一段时间之内破解不了,只要花上足够的时间进行解密,最后加密数据还是能被成功解密的,因此现有技术的这种对数据的加密方式就存在安全隐患,也因此,用户的隐私数据存在被恶意泄露的风险。
针对上述技术问题,本申请提供一种数据安全加密的方法,用以尽量解决现有技术中用户的隐私数据存在安全隐患的问题,最大程度上保护用户的隐私数据不被恶意泄露。
本申请还提供了一种数据安全加密的装置,用以保证上述方法在实际中的实现及应用。
为了解决上述问题,本申请公开了一种数据安全加密的方法,包括:
响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密 密钥;
使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据;
将所述原始数据采用所述目标加密密钥进行加密。
本申请还公开了另一种数据安全加密的方法,包括:
响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本;
响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版本;
待所述业务操作执行完毕之后,使用所述目标加密版本对应的目标加密密钥对所述用户的业务涉及的数据进行加密。
本申请公开了一种获取数据的方法,包括:
响应于用户触发的数据获取请求,将所述数据获取请求发送至服务器;
接收服务器返回的所述目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
本申请公开了一种数据安全加密的装置,包括:
获取目标数据模块,用于响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密密钥;
解密模块,用于使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据;
第一加密模块,用于将所述原始数据采用所述目标加密密钥进行加密。
本申请还公开了另一种数据安全加密的装置,包括:
获取加密版本模块,用于响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本;
执行业务模块,用于响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版 本;
第二加密模块,用于待所述业务操作执行完毕之后,使用所述目标加密版本对应的目标加密密钥对所述用户的业务涉及的数据进行加密。
本申请还公开了一种获取数据的装置,该装置包括:
发送模块,用于响应于用户触发的数据获取请求,将所述数据获取请求发送至服务器;
接收模块,用于接收服务器返回的所述目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
与现有技术相比,本申请包括以下优点:
在本申请实施例中,可以通过对加密数据进行加密密钥的更改,从而使得已经加密保存的数据能够灵活的更换加密密钥,因为数据的加密密钥是灵活变换的,因此,即便有黑客花费了相当长的时间破解了原有密钥,也是无法成功获取采用新加密密码进行加密存储的数据。与现有技术相比,本申请实施例显著提高了数据存储的安全性,最大程度上保护了用户的隐私数据不被泄露。
当然,实施本申请的任一产品并不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请的数据安全加密的方法实施例1的流程图;
图2是本申请的数据安全加密的方法实施例2的流程图;
图3是本申请的数据安全加密的装置实施例1的结构框图;
图4为本申请的数据安全加密的装置实施例2的结构框图;
图5是本申请的获取数据的方法实施例的流程图;
图6是本申请的获取数据的装置实施例的流程图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请可用于众多通用或专用的计算装置环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器装置、包括以上任何装置或设备的分布式计算环境等等。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
参考图1,示出了本申请一种数据安全加密的方法实施例的流程图,本实施例可以包括以下步骤:
步骤101:响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密版本更换为目标加密版本。
在本实施例中,可以由系统管理员触发对系统保存的数据进行密钥更换的更换密钥请求,当然,也可以由系统管理员设置一个定时器,每隔固定时间(例如一个月等)就触发更换密钥请求。当然,在本申请实施例中,如何触发更换密钥请求都不影响本实施例的实现,只要该更换密钥请求中包括有数据的当前加密版本和目标加密版本即可。以系统管理员触发了更换密钥请求为例,该更换密钥请求中包括了数据的当前加密版本以及目标加密版本信息。例如,将当前加密版本为“1”的目标数据改为目标加密版本“2”进行加密。
因此,在实际应用中,需要针对系统保存的数据多设计一个加密版本位,用来表示对应的数据采用了哪个加密版本进行加密。例如,在第三方交易系统中,买方用户输入系统的收货地址为:浙江省杭州市西湖区黄龙时代,那么将该收货地址存入到数据库中假设使用高级加密标准(AES,Advanced Encryption Standard)加密,对应的加密密钥为:dkusjjws。那么参考表1所示,针对该收货地址的数据,在系统中会有一个“加密版本”的字段与其相对应,字段值为1表示收货地址的加密版本为1。
表1
Figure PCTCN2015095587-appb-000001
而针对系统中的海量数据,还需要设置如表2所示的密钥管理配置表,来维护加密版本与加密密钥之间的关系。
表2
Key Value
encryptionVersion 1
encryptionKey.1 dkusjjws
encryptionKey.2 Abcdddtt
在表2中,关键字“encryptionVersion”的字段值表示当前系统的加密版本,关键字“encryptionKey.1”的字段值表示当前系统的加密版本所对应的加密密钥,如果要更换密钥,则关键字“encryptionVersion”对应的字段值就更换为2,表示目标加密版本为2,而关键字“encryptionKey.2”的字段值则是当前系统的目标加密版本所对应的加密密钥。
基于上述表1和表2,步骤101在具体执行时可以包括以下步骤:
步骤A1:从当前触发的更换密钥请求中获取当前加密版本和目标加密版本。
首先,从当前触发的更换密钥请求中获取到当前加密版本和目标加密版本信息。例如,当前加密版本为1,而目标加密版本为2。
步骤A2:依据预先存储的加密版本和数据之间的对应关系,获取加密版本为当前加密版本的目标数据。
依据如前述表1的相关信息,获取到所有的加密版本为1的那些数据作为目标数据。
接着返回图1,进入步骤102:使用所述当前加密版本对应的当前加密密钥对所述目标数据进行解密,以得到原始数据。
在本实施例中,原始数据是采用对称加密算法得到的密文,因此,是可以进行解密的。具体的,步骤102在具体实施时可以包括:
步骤B1:依据预先存储的加密版本和加密密钥的对应关系,获取当前加密版本对应的当前加密密钥。
在查找到所有加密版本为1的目标数据之后,例如前述的表2可以查询到加密版本为1的数据在加密时使用的加密密钥是什么,例如在表2中,可以获取到加密版本为1的当前加密密钥为。
步骤B2:使用所述当前加密密钥对所述目标数据进行解密,以得到未加密的原始数据。
例如,使用“dkusjjws”密钥对目标数据进行解密,可以得到未加密的原始数据。
接着进入步骤103:将所述原始数据采用所述目标加密版本对应的目标加密密钥进行加密。
再将原始数据采用加密版本2对应的目标加密密钥“Abcdddtt”进行加密,得到使用“Abcdddtt”加密后的数据。
可选的,在不同的实施例中,在步骤103之后还可以包括:
步骤104:将采用目标加密密钥加密后的原始数据进行存储。
最后可以将采用“Abcdddtt”加密后的数据存储至系统的数据库中, 同时,在表1中更新目标数据的当前加密版本为2。
可见,在本申请实施例中,可以通过对加密数据进行加密密钥的更改,从而使得已经加密保存的数据能够灵活的更换加密密钥,因为数据的加密密钥是灵活变换的,因此,即便有黑客花费了相当长的时间破解了原有密钥,也是无法成功获取采用新加密密码进行加密存储的数据。与现有技术相比,本申请实施例显著提高了数据存储的安全性,最大程度上保护了用户的隐私数据不被泄露。
参考图2,示出了本申请一种数据安全加密的方法实施例2的流程图,本实施例可以包括以下步骤:
步骤200:响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本。
在实际应用中,还有一类数据采用了非对称加密算法进行加密,那么其在系统的数据库中保存形式就是密文,而且系统无法获取对应密文的加密密钥是什么,所以无法对这一类的数据进行解密。针对这种情况,如果当前触发了更换密钥请求,该更换密钥请求中同样包括当前加密版本和目标加密版本,首先从更换密钥请求中获取到当前加密版本和目标加密版本。其中,触发更换密钥请求的方式可以参考实施例1的介绍,在此不再赘述。
步骤201:响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版本。
可以理解的是,因为数据是无法解密的,所以即便当前触发了更换密钥请求,也是无法即时为目标数据进行加密的。因此,在这种情况下,就可以等待用户触发相应的业务操作请求,例如,用户触发的登录操作,或者付款操作等等。待用户触发业务操作请求之后,首先执行用户触发的登录操作业务或者付款操作业务。执行业务的过程与现有技术相同,在此不再赘述。
在实施例2中,形如实施例1中表1记载加密密文和加密版本的关系,还可以设置用户信息字段,以表示出当前用户的数据采用了哪个加密版 本进行加密,以及表示出加密后的密文是什么。
步骤202:待所述业务操作执行完毕之后,使用所述目标加密密钥对所述用户的当前业务涉及的数据进行加密。
待用户触发的业务执行完毕之后,根据用户登录时发送的原始数据,例如用户登录名及登录密码信息,使用目标加密版本所对应的目标加密密钥来对该用户的所有数据进行加密。其中,仍然可以根据实施例1中表2的记载查询出用户当前的加密版本所对应的加密密钥。
需要说明的是,本实施例适应于针对某个用户的某个业务所涉及的数据进行加密的情况。
可选的,在步骤202之后,还可以包括:
步骤203:将采用目标加密密钥加密后的用户的业务涉及的数据进行存储。
可选的,在对用户的业务所涉及的数据进行加密之后,将采用新的加密密钥进行加密的数据重新存储至数据库中,同时在表2中更改该用户的业务所涉及的数据的加密版本为目标加密版本。
用户的加密数据的更改,对于用户来说没有任何感知,用户在触发相关的业务操作的时候,系统对用户的密码重新做了加密操作,既是本次密钥加密或者存储失败,也不会影响当前的用户操作,这样可以保证系统的可用性。
在本实施例中,可以通过对加密数据进行加密密钥的更改,从而使得已经加密保存的数据能够灵活的更换加密密钥,因为数据的加密密钥是灵活变换的,因此,即便有黑客花费了相当长的时间破解了原有密钥,也是无法成功获取采用新加密密码进行加密存储的数据。与现有技术相比,本申请实施例显著提高了数据存储的安全性,最大程度上保护了用户的隐私数据不被泄露。
参考图3,示出了本申请一种获取数据的方法实施例的流程图,本实施例可以包括以下步骤:
步骤301:响应于用户触发的数据获取请求,将所述数据获取请求发 送至服务器。
本实施例的方法可以应用于客户端,当用户在客户端上触发了从服务器获取数据的请求,该数据获取请求中包括用户信息,例如用户名等能够标识自己身份的信息;以及,请求数据的标识信息,例如,请求某个用户名下的所有订单信息。那么服务器在接收到数据获取请求之后,就从数据库中根据标识信息查找对应的数据,并根据用户信息校验该用户是否有权限获取这些数据,如果有,则采用对应的加密密钥对相应的密文进行解密,从而得到目标数据。在服务器的数据库中,存储油用户信息、数据密文和加密密钥之间的对应关系。
步骤302:接收服务器返回的所述目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
客户端再接收服务器返回的解密之后目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
在本实施例中,服务器对于数据库中的数据可以定期或者根据用户需求更换加密密钥,不仅可以更安全的保存服务器的数据库中的数据,也能使用户毫无感知的通过客户端获取到相对安全的数据,提升用户的使用体验。
对于前述的方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
与上述本申请一种数据安全加密的方法实施例所提供的方法相对应,参见图4,本申请还提供了一种数据安全加密的装置实施例1,在本实施例中,该装置可以包括:
获取目标数据模块401,用于响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密密钥。
其中,所述获取目标数据模块401具体可以包括:
获取加密版本子模块,用于从当前触发的更换密钥请求中获取当前加密版本和目标加密版本;和,获取目标数据子模块,用于依据预先存储的加密版本和数据之间的对应关系,获取加密版本为当前加密版本的目标数据。
解密模块402,用于使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据。
其中,所述解密模块402具体可以包括:
获取加密密钥子模块,用于依据预先存储的加密版本和加密密钥的对应关系,获取当前加密版本对应的当前加密密钥;和,解密子模块,用于使用所述当前加密密钥对所述目标数据进行解密,以得到未加密的原始数据。
第一加密模块403,用于将所述原始数据采用所述目标加密密钥进行加密。
第一存储模块404,用于将采用目标加密密钥加密后的原始数据进行存储。
在本实施例中,可以通过对加密数据进行加密密钥的更改,从而使得已经加密保存的数据能够灵活的更换加密密钥,因为数据的加密密钥是灵活变换的,因此,即便有黑客花费了相当长的时间破解了原有密钥,也是无法成功获取采用新加密密码进行加密存储的数据。与现有技术相比,本申请实施例显著提高了数据存储的安全性,最大程度上保护了用户的隐私数据不被泄露。
与上述本申请一种数据安全加密的方法实施例所提供的方法相对应,参见图5,本申请还提供了一种数据安全加密的装置实施例2,在本实施例中,该装置可以包括:
获取加密版本模块501,用于响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本。
执行业务模块502,用于响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版本。
第二加密模块503,用于待所述业务操作执行完毕之后,使用所述目标加密密钥对所述用户的业务涉及的数据进行加密。
第二存储模块504,用于将采用目标加密密钥加密后的用户的业务涉及的数据进行存储。
在本实施例中,可以通过对加密数据进行加密密钥的更改,从而使得已经加密保存的数据能够灵活的更换加密密钥,因为数据的加密密钥是灵活变换的,因此,即便有黑客花费了相当长的时间破解了原有密钥,也是无法成功获取采用新加密密码进行加密存储的数据。与现有技术相比,本申请实施例显著提高了数据存储的安全性,最大程度上保护了用户的隐私数据不被泄露。
与上述本申请一种获取的方法实施例所提供的方法相对应,参见图6,本申请还提供了一种获取数据的装置实施例,在本实施例中,该装置可以包括:
发送模块601,用于响应于用户触发的数据获取请求,将所述数据获取请求发送至服务器。
接收模块602,用于接收服务器返回的所述目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
在本实施例中,服务器对于数据库中的数据可以定期或者根据用户需求更换加密密钥,不仅可以更安全的保存服务器的数据库中的数据,也能使用户毫无感知的通过客户端获取到相对安全的数据,提升用户的使用体验。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本申请所提供的数据安全加密的方法及装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (14)

  1. 一种数据安全加密的方法,其特征在于,该方法包括:
    响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密密钥;
    使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据;
    将所述原始数据采用所述目标加密密钥进行加密。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    将采用目标加密密钥加密后的原始数据进行存储。
  3. 根据权利要求1所述的方法,其特征在于,所述响应于当前触发的更换密钥请求,获取待更换密钥的目标数据,包括:
    从当前触发的更换密钥请求中获取当前加密版本和目标加密版本;
    依据预先存储的加密版本和数据之间的对应关系,获取加密版本为当前加密版本的目标数据。
  4. 根据权利要求1所述的方法,其特征在于,所述使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据,包括:
    依据预先存储的加密版本和加密密钥的对应关系,获取当前加密版本对应的当前加密密钥;
    使用所述当前加密密钥对所述目标数据进行解密,以得到未加密的原始数据。
  5. 一种数据安全加密的方法,其特征在于,响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本,该方法包括:
    响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版本;
    待所述业务操作执行完毕之后,使用所述目标加密版本对应的目标加密密钥对所述用户的业务涉及的数据进行加密。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    将采用目标加密密钥加密后的用户的业务所涉及的数据进行存储。
  7. 一种获取数据的方法,其特征在于,该方法应用于客户端,包括:
    响应于用户触发的数据获取请求,将所述数据获取请求发送至服务器;
    接收服务器返回的所述目标数据,该目标数据为服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
  8. 一种数据安全加密的装置,其特征在于,包括:
    获取目标数据模块,用于响应于当前触发的更换密钥请求,获取待更换密钥的目标数据;其中,所述更换密钥请求用于请求将目标数据的当前加密密钥更换为目标加密密钥;
    解密模块,用于使用所述当前加密密钥对所述目标数据进行解密,以得到原始数据;
    第一加密模块,用于将所述原始数据采用所述目标加密密钥进行加密。
  9. 根据权利要求8所述的装置,其特征在于,还包括:
    第一存储模块,用于将采用目标加密密钥加密后的原始数据进行存储。
  10. 根据权利要求8所述的装置,其特征在于,所述获取目标数据模块包括:
    获取加密版本子模块,用于从当前触发的更换密钥请求中获取当前加密版本和目标加密版本;
    获取目标数据子模块,用于依据预先存储的加密版本和数据之间的对应关系,获取加密版本为当前加密版本的目标数据。
  11. 根据权利要求8所述的装置,其特征在于,所述解密模块包括:
    获取加密密钥子模块,用于依据预先存储的加密版本和加密密钥的对应关系,获取当前加密版本对应的当前加密密钥;
    解密子模块,用于使用所述当前加密密钥对所述目标数据进行解密,以得到未加密的原始数据。
  12. 一种数据安全加密的装置,其特征在于,包括:
    获取加密版本模块,用于响应于当前触发的更换密钥请求,获取所述更换密钥请求所表示的当前加密版本和目标加密版本;
    执行业务模块,用于响应于用户触发的业务操作请求,执行所述用户请求的业务操作;其中,所述用户的数据的加密版本为所述当前加密版本;
    第二加密模块,用于待所述业务操作执行完毕之后,使用所述目标加密版本对应的目标加密密钥对所述用户的业务涉及的数据进行加密。
  13. 根据权利要求12所述的装置,其特征在于,还包括:
    第二存储模块,用于将采用目标加密密钥加密后的用户的业务涉及的数据进行存储。
  14. 一种获取数据的装置,其特征在于,该装置包括:
    发送模块,用于响应于用户触发的数据获取请求,将所述数据获取请求发送至服务器;
    接收模块,用于接收服务器返回的所述目标数据,该目标数据为:所述服务器依据所述数据获取请求查询对应的密文,并使用对应的加密密钥对所述密文进行解密得到的数据。
PCT/CN2015/095587 2014-12-02 2015-11-26 数据安全加密的方法及装置 WO2016086787A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410722942.0 2014-12-02
CN201410722942.0A CN105721393A (zh) 2014-12-02 2014-12-02 数据安全加密的方法及装置

Publications (1)

Publication Number Publication Date
WO2016086787A1 true WO2016086787A1 (zh) 2016-06-09

Family

ID=56090996

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095587 WO2016086787A1 (zh) 2014-12-02 2015-11-26 数据安全加密的方法及装置

Country Status (2)

Country Link
CN (1) CN105721393A (zh)
WO (1) WO2016086787A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234112A (zh) * 2016-12-14 2018-06-29 中国移动通信集团安徽有限公司 数据加密和解密方法及系统
CN107918739B (zh) * 2017-12-29 2020-05-12 咪咕文化科技有限公司 一种数据的保护方法、装置及存储介质
CN111666558B (zh) * 2020-04-30 2023-08-01 平安科技(深圳)有限公司 密钥轮换方法、装置、计算机设备及存储介质
CN111698088B (zh) * 2020-05-28 2022-10-18 平安科技(深圳)有限公司 密钥轮换方法、装置、电子设备及介质
CN113162763A (zh) * 2021-04-20 2021-07-23 平安消费金融有限公司 数据加密及存储方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818920A (zh) * 2005-02-07 2006-08-16 微软公司 管理用于文件加密和解密的多个密钥的系统和方法
CN101056171A (zh) * 2006-06-20 2007-10-17 华为技术有限公司 一种加密通信方法和装置
CN101488969A (zh) * 2008-01-15 2009-07-22 中国移动通信集团公司 一种更换消费子密钥的方法、装置及系统
CN101853679A (zh) * 2009-02-04 2010-10-06 索尼光领公司 信息处理设备、信息处理方法和程序

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4843531B2 (ja) * 2006-09-29 2011-12-21 富士通株式会社 暗号変換装置、暗号変換方法および暗号変換プログラム
CN101183419A (zh) * 2007-12-07 2008-05-21 武汉达梦数据库有限公司 基于会话的数据库存储加密方法
CN102236766B (zh) * 2011-05-10 2014-04-09 桂林电子科技大学 安全的数据项级数据库加密方法
CN103259651B (zh) * 2013-05-30 2016-06-08 成都欣知科技有限公司 一种对终端数据加解密的方法及系统
CN103560892A (zh) * 2013-11-21 2014-02-05 深圳中兴网信科技有限公司 密钥生成方法和密钥生成装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1818920A (zh) * 2005-02-07 2006-08-16 微软公司 管理用于文件加密和解密的多个密钥的系统和方法
CN101056171A (zh) * 2006-06-20 2007-10-17 华为技术有限公司 一种加密通信方法和装置
CN101488969A (zh) * 2008-01-15 2009-07-22 中国移动通信集团公司 一种更换消费子密钥的方法、装置及系统
CN101853679A (zh) * 2009-02-04 2010-10-06 索尼光领公司 信息处理设备、信息处理方法和程序

Also Published As

Publication number Publication date
CN105721393A (zh) 2016-06-29

Similar Documents

Publication Publication Date Title
US20230275884A1 (en) Blockchain systems and methods for user authentication
US10152603B2 (en) Systems and methods for detecting sensitive information leakage while preserving privacy
CN107209787B (zh) 提高专用加密数据的搜索能力
US8966287B2 (en) Systems and methods for secure third-party data storage
WO2016086787A1 (zh) 数据安全加密的方法及装置
US11379606B2 (en) Provision of risk information associated with compromised accounts
CN108667605B (zh) 一种数据加密、解密方法和装置
US10425388B2 (en) Protecting sensitive data security
US9740877B2 (en) Systems and methods for data loss prevention while preserving privacy
US10142100B2 (en) Managing user-controlled security keys in cloud-based scenarios
US8867743B1 (en) Encryption of large amounts of data using secure encryption methods
US10284535B2 (en) Secure database
EP2942899B1 (en) Information processing method, trust server and cloud server
Bhukya et al. Data security in cloud computing and outsourced databases
CA3025848C (en) Data interaction processing method, device and system
US20240089105A1 (en) Systems and methods for user control and exclusion of cryptographic tokenized data
US20240086549A1 (en) Systems and methods for user characteristic determination through cryptographic tokenized data
Pavithra et al. Enhanced Secure Big Data in Distributed Mobile Cloud Computing Using Fuzzy Encryption Model
Nguyen-Vu et al. Privacy enhancement for data outsourcing
LAKSHMI et al. Analysis of Privacy Preserving Methods for Storage in Cloud
Kindervag Killing Data
CA3025830A1 (en) Data interaction processing method, device and system
CA3024715A1 (en) Data exchange processing method and system for buyer terminal matching
CA3026388A1 (en) Data interaction processing method, device and system

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

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

Country of ref document: EP

Kind code of ref document: A1