WO2021013245A1 - 一种数据密钥保护方法、系统及电子设备和存储介质 - Google Patents

一种数据密钥保护方法、系统及电子设备和存储介质 Download PDF

Info

Publication number
WO2021013245A1
WO2021013245A1 PCT/CN2020/104463 CN2020104463W WO2021013245A1 WO 2021013245 A1 WO2021013245 A1 WO 2021013245A1 CN 2020104463 W CN2020104463 W CN 2020104463W WO 2021013245 A1 WO2021013245 A1 WO 2021013245A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
value
key
hash value
algorithm
Prior art date
Application number
PCT/CN2020/104463
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 WO2021013245A1 publication Critical patent/WO2021013245A1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself

Definitions

  • This application relates to the field of data security technology, and more specifically, to a data key protection method and system, an electronic device, and a computer-readable storage medium.
  • the method for protecting the data key is generally to use the encryption key to encrypt the data key, and the encryption key needs to be stored, and the security is not high.
  • the purpose of this application is to provide a data key protection method and system, an electronic device, and a computer-readable storage medium, which improve the security of data key protection.
  • this application provides a data key protection method, including:
  • the encryption key uses the encryption key to encrypt the data key using the first encryption algorithm to obtain the ciphertext and the first message authentication code corresponding to the data key; wherein, the first encryption algorithm includes the SM4-AE algorithm;
  • the preset rule includes: calculating a hash value corresponding to the input value using a target algorithm, and determining the output value according to the hash value.
  • the determining the output value according to the hash value includes:
  • the method further includes:
  • Data segmentation is performed on the hash value to obtain multiple data segments
  • the determining the output value according to the hash value includes:
  • the output value is determined according to the hash value.
  • data segmentation is performed on the hash value to obtain multiple data segments, including:
  • the hash value is divided into a plurality of data segments based on the division granularity.
  • the dividing the hash value into multiple data segments based on the dividing granularity includes:
  • Performing data dispersion on the multiple data segments to obtain the hash value corresponding to the hash value includes:
  • the second data segment is inverted bit by bit to obtain a third data segment, and the third data segment and the first data segment are spliced into the hash value.
  • the performing chain transformation on the hash value according to the salt value to obtain the output value includes:
  • the intermediate key to encrypt the transformation factor using a second encryption algorithm to obtain the output value; wherein the second encryption algorithm includes the SM4 algorithm.
  • the determining the intermediate key according to the transformed value includes:
  • the ciphertext is decrypted by using the decryption key and the decryption algorithm corresponding to the first encryption algorithm to obtain the data key.
  • said using the decryption key to decrypt the ciphertext using a decryption algorithm corresponding to the first encryption algorithm to obtain the data key includes:
  • the first message verification code is obtained, and the target original password is verified by comparing the first message verification code and the second message verification code.
  • this application provides a data key protection system, including:
  • the first obtaining module is configured to obtain the original password, use the original password as the input value of the calculation module and start the work flow of the calculation module;
  • the calculation module is configured to calculate the hash value corresponding to the input value by using the target algorithm, and determine the output value according to the hash value;
  • the encryption module is configured to use the output value of the calculation module to encrypt the data key using a first encryption algorithm to obtain the ciphertext and message authentication code corresponding to the data key; wherein, the first encryption algorithm includes SM4 -AE algorithm.
  • an electronic device including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the above data key protection method when executing the computer program.
  • the present application provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the foregoing data key protection method are implemented.
  • a data key protection method includes: obtaining an original password, using the original password as the input value of the preset rule to execute the preset rule, and combining the value of the preset rule The output value is used as the encryption key; the data key is encrypted by the first encryption algorithm by using the encryption key to obtain the ciphertext and the first message authentication code corresponding to the data key; wherein, the first encryption algorithm Including SM4-AE algorithm; wherein, the preset rule includes: using a target algorithm to calculate a hash value corresponding to an input value, and determining an output value according to the hash value.
  • the data key protection method provided by this application realizes the generation of the encryption key by transforming the original password, so that no specific function is needed to save the encryption key, and the security of the encryption key is improved.
  • This application does not need to save the plaintext of the data key, but saves the ciphertext of the data key, which fundamentally realizes the protection of the data key.
  • the plaintext of the data key is illegally obtained and the original password is obtained, the plaintext of the data key cannot be restored without the transformation of the original password, so that the real data protected by the data key cannot be restored, thus ensuring the authenticity of the real data. safety.
  • the application also discloses a data key protection system, an electronic device and a computer-readable storage medium, which can also achieve the above technical effects.
  • Fig. 1 is a flow chart showing a method for protecting a data key according to an exemplary embodiment
  • Fig. 2 is a flow chart showing another method for protecting data keys according to an exemplary embodiment
  • FIG. 3 is a flowchart of data key encryption
  • Fig. 4 is a flow chart showing another method for protecting data keys according to an exemplary embodiment
  • Fig. 5 is a structural diagram of a data key protection system according to an exemplary embodiment
  • Fig. 6 is a structural diagram of an electronic device according to an exemplary embodiment.
  • the embodiment of the application discloses a data key protection method, which improves the security of data key protection.
  • a flowchart of a method for protecting a data key according to an exemplary embodiment, as shown in Fig. 1, includes:
  • S101 Obtain an original password, execute the preset rule using the original password as the input value of the preset rule, and use the output value of the preset rule as an encryption key;
  • the original password input by the user is obtained, and the original password is transformed using preset rules to obtain an encryption key, which is used to encrypt the data key. Since the encryption key is transformed from the original password input by the user, it does not need to be stored, which ensures the security of the encryption key.
  • the preset rule here includes: calculating the hash value corresponding to the input value using the target algorithm, and determining the output value according to the hash value.
  • This embodiment does not specifically limit the target algorithm, and may include SM3 algorithm (domestic hash algorithm), MD5, SHA-1 and other algorithms.
  • the SM3 algorithm domestic hash algorithm
  • MD5 MD5
  • SHA-1 SHA-1
  • the SM3 algorithm domestic hash algorithm
  • the hash value is a 32-byte data segment. Then transform the generated hash value to get the output value.
  • the method further includes: performing data segmentation on the hash value to obtain multiple Data segments; performing data dispersion on the multiple data segments to obtain the hash value corresponding to the hash value.
  • the determining the output value according to the hash value includes: determining the output value according to the hash value.
  • the specific segmentation method is not limited here.
  • the segmentation granularity can be determined according to the grouping granularity of the subsequent first encryption algorithm, that is, data segmentation is performed on the hash value, and the step of obtaining multiple data segments may include: according to the first encryption algorithm.
  • the grouping granularity of an encryption algorithm determines the division granularity; wherein the grouping granularity is an integer multiple of the division granularity; and the hash value is divided into multiple data segments based on the division granularity.
  • the division granularity can also be 16 bytes.
  • the division method In order to divide the hash value into two equal parts, the data dispersion method at this time may be to change the order of the two data segments, and it is also possible to reverse one or both of them.
  • the division granularity can also be 4 bytes. If the hash value is a 32-byte data segment, the hash value is divided into 8 data segments, and data segments 1, 3, 5, and 7 can be taken to form the first 16 bytes.
  • the transformation method using the hash value is not limited.
  • chain transformation may be used, that is, this step may include: determining the number of chain transformations and the salt value of each chain transformation; according to the salt value Perform chain transformation on the hash value to obtain the encryption key.
  • the chain transformation can be specifically HMAC-SM3 (message authentication code algorithm based on SM3), the number of iterations of HMAC-SM3, that is, the number of chain transformations mentioned above can be flexibly set, and the salt of each chain transformation
  • the value can be randomly generated, which improves the security and randomness of the encryption key, and increases the difficulty of cracking without affecting the user experience. It is understandable that the salt value of each chain transformation needs to be stored, and the original password input by the user is subjected to the same transformation process during decryption to obtain the encryption key for decryption.
  • S102 Use the encryption key to encrypt the data key using the first encryption algorithm to obtain the ciphertext and the first message authentication code corresponding to the data key; wherein, the first encryption algorithm includes the SM4-AE algorithm .
  • the data key is encrypted with the encryption key obtained from the previous step to generate the cipher text of the data key and the message authentication code.
  • the first encryption algorithm used for encryption here may include the SM4-AE algorithm, and the encryption authentication mode of the SM4-AE algorithm may include GCM, CCM, KeyWrap, CBC-PKCS#5-padding and other modes.
  • the data key protection method provided by the embodiments of the present application realizes the generation of the encryption key by transforming the original password, so that no specific function is needed to save the encryption key, and the security of the encryption key is improved.
  • the embodiment of the present application does not need to save the plaintext of the data key, but saves the ciphertext of the data key, which fundamentally realizes the protection of the data key.
  • the plaintext of the data key is illegally obtained and the original password is obtained, the plaintext of the data key cannot be restored without the transformation of the original password, so that the real data protected by the data key cannot be restored, thus ensuring the authenticity of the real data. safety.
  • the embodiment of the application discloses a data key protection method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. specific:
  • FIG. 2 a flowchart of another data key protection method according to an exemplary embodiment, as shown in Fig. 2, includes:
  • S203 Invert the second data segment by bit to obtain a third data segment, and concatenate the third data segment and the first data segment into a hash value;
  • the hash value in order to increase the confidentiality and randomness of the encryption key, the hash value can be divided and distributed first to obtain a new hash value, and then the new hash value is used for chain HMAC-SM3 transformation in the subsequent steps.
  • the hash value of this embodiment is a 32-byte data segment calculated according to the SM3 algorithm, which is divided into two equal parts to obtain the first 16-byte data segment (first data segment) and the last 16-byte data segment (first data segment). Two data segment), the second data segment is reversed bit by bit to obtain the third data segment, and the first data segment is spliced to the back of the third data segment to obtain the hash value
  • the transformed value of the chain transformation can be directly used as the encryption key.
  • the transformation value of the chain transformation can also be transformed in order to increase the confidentiality and randomness of the encryption key.
  • the ECB mode of the SM4 algorithm can be used.
  • the transformation factor is determined, the transformation value is transformed to obtain an intermediate key, and the intermediate key is used to encrypt the transformation factor to obtain the final encryption key.
  • the specific transformation method for transforming the transformed value into the intermediate key is not limited here.
  • the step of determining the intermediate key according to the transformed value may include: dividing the transformed value into fourth data Segment and the fifth data segment; wherein the fourth data segment is the first 16 bytes of the transformation value, and the fifth data segment is the last 16 bytes of the transformation value; for the fourth data segment Perform an exclusive OR operation with the fifth data segment to obtain the intermediate key.
  • S207 Use the encryption key to encrypt the data key using the first encryption algorithm to obtain the ciphertext and the first message authentication code corresponding to the data key; wherein, the first encryption algorithm includes the SM4-AE algorithm .
  • a 32-byte hash value is calculated through the SM3 algorithm for the original password input by the user, and the 32-byte hash value is divided into the first 16 bytes and the last 16 bytes.
  • the first 16 bytes of data are moved to the last 16 bytes, and the last 16 bytes of data are inverted by bit and moved to the first 16 bytes to form a 32-byte U-hash-value.
  • Salt splicing counter Counter i i ⁇ [1,n], n is the number of chain transformations
  • n is the number of chain transformations
  • the value obtained by the exclusive OR of the first 16 bytes and the last 16 bytes of the 32-byte U-KEY is used as the key, and the T-Value is used as the plain text, and the encryption key is obtained by SM4-ECB encryption.
  • the encryption key is used as the SM4-AE key to protect the data key and realize the ciphertext storage of the data key.
  • FIG. 4 a flowchart of yet another data key protection method according to an exemplary embodiment, as shown in Fig. 4, includes:
  • S302 Execute the preset rule using the target original password as the input value of the preset rule, and use the output value of the preset rule as a decryption key;
  • S303 Use the decryption key to decrypt the ciphertext using the decryption algorithm corresponding to the first encryption algorithm to obtain the data key.
  • the same transformation process as when encrypting is used for the target original password input by the user that is, a preset rule is used to obtain the decryption key, and the ciphertext is decrypted by the decryption algorithm corresponding to the encryption algorithm to obtain the plaintext of the data key.
  • the correctness of the encryption key is judged by the success of the decryption, and then the correctness of the target original password entered by the user is judged, and password verification is realized. An incorrect password will cause the decryption to fail.
  • the message authentication code is authenticated, that is, using the decryption key and the decryption algorithm corresponding to the first encryption algorithm to decrypt the ciphertext
  • the step of obtaining the data key includes: using the The decryption key uses the decryption algorithm corresponding to the first encryption algorithm to decrypt the ciphertext to obtain the data key and the second message verification code; obtain the first message verification code, and verify by comparing the first message The code and the second message verification code verify the target original password.
  • the first message verification code and the second message verification code indicate that the decryption key is incorrect or the cipher text is incorrect, because the cipher text exists inside the chip, it is generally judged that the decryption key is incorrect, and it is derived The original target password is incorrect. At this time, if the algorithm does not output the plaintext of the data key, an error is reported.
  • the following describes a data key protection system provided by an embodiment of the present application.
  • the data key protection system described below and the data key protection method described above can be cross-referenced.
  • FIG. 5 a structural diagram of a data key protection system according to an exemplary embodiment, as shown in Fig. 5, includes:
  • the first obtaining module 501 is configured to obtain the original password, use the original password as the input value of the calculation module and start the work flow of the calculation module 502;
  • the calculation module 502 is configured to calculate the hash value corresponding to the input value by using the target algorithm, and determine the output value according to the hash value;
  • the encryption module 503 is configured to use the output value of the calculation module to encrypt the data key using the first encryption algorithm to obtain the ciphertext and the message authentication code corresponding to the data key; wherein, the first encryption algorithm includes SM4-AE algorithm.
  • the data key protection system realizes the generation of the encryption key by transforming the original password, so that no specific function is required to save the encryption key, and the security of the encryption key is improved.
  • the embodiment of the present application does not need to save the plaintext of the data key, but saves the ciphertext of the data key, which fundamentally realizes the protection of the data key.
  • the plaintext of the data key is illegally obtained and the original password is obtained, the plaintext of the data key cannot be restored without the transformation of the original password, so that the real data protected by the data key cannot be restored, thus ensuring the authenticity of the real data. safety.
  • the calculation module 502 includes:
  • the calculation unit is used to calculate the hash value corresponding to the input value by using the target algorithm
  • the determination unit is used to determine the number of chain transformations and the salt value of each chain transformation
  • the transformation unit is configured to perform chain transformation on the hash value according to the salt value to obtain the output value.
  • the calculation module 502 further includes:
  • a segmentation unit configured to perform data segmentation on the hash value to obtain multiple data segments
  • the dispersing unit is used to disperse the multiple data segments to obtain the hash value corresponding to the hash value.
  • the dividing unit includes:
  • the determining division granularity subunit is configured to determine the division granularity according to the grouping granularity of the first encryption algorithm; wherein the grouping granularity is an integer multiple of the division granularity;
  • the segmentation subunit is configured to segment the hash value into multiple data segments based on the segmentation granularity.
  • the segmentation subunit is specifically a subunit that halves the hash value to obtain a first data segment and a second data segment;
  • the dispersing unit is specifically a unit that inverts the second data segment by bit to obtain a third data segment, and splices the third data segment and the first data segment into the hash value.
  • the transformation unit includes:
  • a transformation subunit configured to perform chain transformation on the hash value according to the salt value to obtain a transformation value
  • the determining subunit is used to determine the intermediate key according to the transformation value and determine the transformation factor
  • the encryption subunit is configured to use the intermediate key to encrypt the transformation factor using a second encryption algorithm to obtain the output value; wherein, the second encryption algorithm includes the SM4 algorithm.
  • the determining subunit specifically divides the transformed value into two equal parts to obtain a fourth data segment and a fifth data segment, and compares the fourth data segment and the Perform an exclusive OR operation on the fifth data segment to obtain the intermediate key, and determine the subunit of the transformation factor.
  • the second obtaining module is configured to obtain the target original password in the decryption request when the decryption request is received;
  • a determining module configured to execute the preset rule using the target original password as the input value of the preset rule, and use the output value of the preset rule as a decryption key
  • the decryption module is configured to decrypt the ciphertext using the decryption key and the decryption algorithm corresponding to the first encryption algorithm to obtain the data key.
  • the decryption module includes:
  • a decryption unit configured to decrypt the ciphertext using the decryption key and the decryption algorithm corresponding to the first encryption algorithm to obtain the data key and the second message verification code;
  • the verification unit is configured to obtain the first message verification code, and verify the target original password by comparing the first message verification code and the second message verification code.
  • FIG. 6 a structural diagram of an electronic device 600 provided by an embodiment of the application, as shown in FIG. 6, may include a processor 11 and a memory 12.
  • the electronic device 600 may further include one or more of a multimedia component 13, an input/output (I/O) interface 14, and a communication component 15.
  • I/O input/output
  • the processor 11 is used to control the overall operation of the electronic device 600 to complete all or part of the steps in the data key protection method described above.
  • the memory 12 is used to store various types of data to support operations on the electronic device 600. These data may include, for example, instructions for any application or method to operate on the electronic device 600, and application-related data. For example, contact data, messages sent and received, pictures, audio, video, etc.
  • the memory 12 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, SRAM for short), electrically erasable programmable read-only memory ( Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-only Memory (Read-Only Memory, ROM for short), magnetic memory, flash memory, magnetic disk or optical disk.
  • the multimedia component 13 may include a screen and an audio component.
  • the screen may be a touch screen, for example, and the audio component is used to output and/or input audio signals.
  • the audio component may include a microphone, which is used to receive external audio signals.
  • the received audio signal may be further stored in the memory 12 or sent through the communication component 15.
  • the audio component also includes at least one speaker for outputting audio signals.
  • the I/O interface 14 provides an interface between the processor 11 and other interface modules.
  • the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons.
  • the communication component 15 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so the corresponding communication component 15 may include: Wi-Fi module, Bluetooth module, NFC module.
  • the electronic device 600 may be used by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), digital signal processor (Digital Signal Processor, DSP for short), and digital signal processing equipment (Digital Signal Processor) Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic components Implementation, used to implement the above data key protection method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processor
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • a computer-readable storage medium including program instructions that, when executed by a processor, implement the steps of the above data key protection method.
  • the computer-readable storage medium may be the foregoing memory 12 including program instructions, and the foregoing program instructions may be executed by the processor 11 of the electronic device 600 to complete the foregoing data key protection method.

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

本申请公开了一种数据密钥保护方法、系统及一种电子设备和计算机可读存储介质,该方法包括:获取原始口令,将所述原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为加密密钥;利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法;其中,所述预设规则包括:利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值。本申请提供的数据密钥保护方法,提高了数据密钥保护的安全性。

Description

一种数据密钥保护方法、系统及电子设备和存储介质 技术领域
本申请涉及数据安全技术领域,更具体地说,涉及一种数据密钥保护方法、系统及一种电子设备和一种计算机可读存储介质。
背景技术
在相关技术中,对于数据密钥的保护方法一般为利用加密密钥对数据密钥进行加密处理,需要对加密密钥进行存储,安全性不高。
因此,如何提高数据密钥保护的安全性是本领域技术人员需要解决的技术问题。
发明内容
本申请的目的在于提供一种数据密钥保护方法、系统及一种电子设备和一种计算机可读存储介质,提高了数据密钥保护的安全性。
为实现上述目的,本申请提供了一种数据密钥保护方法,包括:
获取原始口令,将所述原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为加密密钥;
利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法;
其中,所述预设规则包括:利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值。
其中,所述根据所述杂凑值确定输出值,包括:
确定链式变换次数和每次链式变换的盐值;
根据所述盐值对所述杂凑值进行链式变换,得到所述输出值。
其中,利用目标算法计算所述输入值对应的杂凑值之后,还包括:
对所述杂凑值进行数据分割,得到多个数据段;
对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值;
所述根据所述杂凑值确定输出值包括:
根据所述哈希值确定所述输出值。
其中,对所述杂凑值进行数据分割,得到多个数据段,包括:
根据所述第一加密算法的分组粒度确定分割粒度;其中,所述分组粒度为所述分割粒度的整数倍;
基于所述分割粒度将所述杂凑值分割为多个数据段。
其中,所述基于所述分割粒度将所述杂凑值分割为多个数据段,包括:
将所述杂凑值进行二等分得到第一数据段和第二数据段;
对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值,包括:
将所述第二数据段按位取反得到第三数据段,并将所述第三数据段和所述第一数据段拼接为所述哈希值。
其中,所述根据所述盐值对所述杂凑值进行链式变换,得到所述输出值,包括:
根据所述盐值对所述杂凑值进行链式变换,得到变换值;
根据所述变换值确定中间密钥,并确定变换因子;
利用所述中间密钥对所述变换因子采用第二加密算法进行加密得到所述输出值;其中,所述第二加密算法包括SM4算法。
其中,所述根据所述变换值确定中间密钥,包括:
将所述变换值二等分得到第四数据段和第五数据段;
对所述第四数据段和所述第五数据段进行异或操作得到所述中间密钥。
其中,还包括:
当接收到解密请求时,获取所述解密请求中的目标原始口令;
将所述目标原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为解密密钥;
利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥。
其中,所述利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥,包括:
利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥和第二消息验证码;
获取所述第一消息验证码,通过对比所述第一消息验证码和所述第二消息验证码对所述目标原始口令进行验证。
为实现上述目的,本申请提供了一种数据密钥保护系统,包括:
第一获取模块,用于获取原始口令,将所述原始口令作为计算模块的输入值并启动所述计算模块的工作流程;
所述计算模块,用于利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值;
加密模块,用于利用所述计算模块的输出值对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和消息认证码;其中,所述第一加密算法包括SM4-AE算法。
为实现上述目的,本申请提供了一种电子设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述计算机程序时实现如上述数据密钥保护方法的步骤。
为实现上述目的,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述数据密钥保护方法的步骤。
通过以上方案可知,本申请提供的一种数据密钥保护方法,包括:获取原始口令,将所述原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为加密密钥;利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法;其中,所述预设规则包括:利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值。
本申请提供的数据密钥保护方法,通过对原始口令的变换实现加密密钥的生成,从而不需要特定的功能来保存加密密钥,提高了加密密钥的安全性。本申请不需要保存数据密钥的明文,而保存数据密钥的密文,从根本上实现了对数据密钥的保护。当非法获取数据密钥的密文,并获取原始口令时,不经过对原始口令的变换,同样无法还原数据密钥明文,从而无法还原受数据 密钥保护的真实数据,进而保证了真实数据的安全性。本申请还公开了一种数据密钥保护系统及一种电子设备和一种计算机可读存储介质,同样能实现上述技术效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:
图1为根据一示例性实施例示出的一种数据密钥保护方法的流程图;
图2为根据一示例性实施例示出的另一种数据密钥保护方法的流程图;
图3为数据密钥加密的流程图;
图4为根据一示例性实施例示出的又一种数据密钥保护方法的流程图;
图5为根据一示例性实施例示出的一种数据密钥保护系统的结构图;
图6为根据一示例性实施例示出的一种电子设备的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例公开了一种数据密钥保护方法,提高了数据密钥保护的安全性。
参见图1,根据一示例性实施例示出的一种数据密钥保护方法的流程图,如图1所示,包括:
S101:获取原始口令,将所述原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为加密密钥;
在本步骤中,获取用户输入的原始口令,并利用预设规则对原始口令进行变换得到加密密钥,该加密密钥用于对数据密钥进行加密。由于该加密密钥是由用户输入的原始口令变换得到的,因此不需要对其进行存储,保证了加密密钥的安全性。
此处的预设规则包括:利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值。本实施例不对目标算法进行具体限定,可以包括SM3算法(国产哈希算法)、MD5、SHA-1等算法。在预设规则中,首先利用SM3算法(国产哈希算法)计算输入值的杂凑值,若目标算法为SM3算法,则该杂凑值为32字节的数据段。然后对生成的杂凑值进行变换得到输出值。
为了增加加密密钥的保密性和随机性,优选的,在上述预设规则中,利用目标算法计算所述输入值对应的杂凑值之后,还包括:对所述杂凑值进行数据分割,得到多个数据段;对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值。相应的,所述根据所述杂凑值确定输出值包括:根据所述哈希值确定所述输出值。
此处不对具体的分割方式进行限定,分割粒度可以根据后续的第一加密算法的分组粒度进行确定,即对所述杂凑值进行数据分割,得到多个数据段的步骤可以包括:根据所述第一加密算法的分组粒度确定分割粒度;其中,所述分组粒度为所述分割粒度的整数倍;基于所述分割粒度将所述杂凑值分割为多个数据段。
例如,当第一加密算法为SM4算法时,其分组粒度为16字节,那么此处的分割粒度也可以为16字节,若杂凑值为32字节的数据段,则此处的分割方式为对该杂凑值进行二等分,此时的数据分散方式可以为变换两个数据段的顺序,还可以对其中的一者或两者进行取反操作。当然分割粒度也可以为4字节,若杂凑值为32字节的数据段,则将杂凑值分割为8个数据段,可以取数据段1、3、5、7组成第一个16字节的数据段,取数据段2、4、6、8组成第二个16字节的数据段,然后对两个16字节的数据段进行上述数据分散操作。总之,基于第一加密算法的分组粒度为分割粒度的整数倍的数据分割方式均在本实施例的保护范围内。
在预设规则中,不对利用杂凑值的变换方式进行限定,例如,可以采用链式变换,即本步骤可以包括:确定链式变换次数和每次链式变换的盐值;根据所述盐值对所述杂凑值进行链式变换,得到所述加密密钥。在具体实施中,链式变换可以具体为HMAC-SM3(基于SM3的消息认证码算法),HMAC-SM3的迭代次数,即上述的链式变换次数可以灵活设定,每次链式变换的盐值可以随机生成,提高了加密密钥的安全性和随机性,在不影响用户体验的前提下,加大了破解难度。可以理解的是,每次链式变换的盐值需要进行存储,在解密时对用户输入的原始口令进行相同的变换过程,以得到加密密钥进行解密。
S102:利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法。
在本步骤中,利用上一步骤变换得到的加密密钥对数据密钥进行加密,生成数据密钥的密文和消息认证码。不需要保存数据密钥的明文,而保存数据密钥的密文,从根本上实现了对数据密钥的保护。此处用于加密的第一加密算法可以包括SM4-AE算法,SM4-AE算法的加密认证模式可以包括GCM、CCM、KeyWrap、CBC-PKCS#5-padding等模式。
可以理解的是,根据SM4-AE算法的特性,对数据加密的同时,还会对数据进行完整性保护。在本步骤中,对数据密钥进行加密生成密文的同时,还会生成消息验证码,即本步骤中的第一消息验证码。解密时,算法在得到明文的同时会计算消息验证码与此处的第一消息验证码进行对比,以此来验证数据密钥的完整性。
本申请实施例提供的数据密钥保护方法,通过对原始口令的变换实现加密密钥的生成,从而不需要特定的功能来保存加密密钥,提高了加密密钥的安全性。本申请实施例不需要保存数据密钥的明文,而保存数据密钥的密文,从根本上实现了对数据密钥的保护。当非法获取数据密钥的密文,并获取原始口令时,不经过对原始口令的变换,同样无法还原数据密钥明文,从而无法还原受数据密钥保护的真实数据,进而保证了真实数据的安全性。
本申请实施例公开了一种数据密钥保护方法,相对于上一实施例,本实 施例对技术方案作了进一步的说明和优化。具体的:
参见图2,根据一示例性实施例示出的另一种数据密钥保护方法的流程图,如图2所示,包括:
S201:获取原始口令,利用SM3算法计算所述原始口令对应的杂凑值;
S202:将所述杂凑值进行二等分得到第一数据段和第二数据段;
S203:将所述第二数据段按位取反得到第三数据段,并将所述第三数据段和所述第一数据段拼接为哈希值;
在本实施例中,为了增加加密密钥的保密性和随机性,可以首先对杂凑值进行数据分割和数据分散,得到新的杂凑值,后续步骤利用新的杂凑值进行链式HMAC-SM3变换。本实施例的杂凑值为根据SM3算法计算得到的32字节的数据段,将其进行二等分得到前16字节的数据段(第一数据段)和后16字节的数据段(第二数据段),将第二数据段按位取反得到第三数据段,并将第一数据段拼接至第三数据段后面得到哈希值
S204:根据所述盐值对所述新的杂凑值进行链式HMAC-SM3变换,得到变换值;
S205:根据所述变换值确定中间密钥,并确定变换因子;
S206:利用所述中间密钥对所述变换因子采用第二加密算法进行加密得到所述加密密钥;
在具体实施中,可以将链式变换的变换值直接作为加密密钥,当然也可以为了增加加密密钥的保密性和随机性,对链式变换的变换值进行变换。优选的,可以采用SM4算法的ECB模式,首先确定变换因子,对变换值进行变换得到中间密钥,利用该中间密钥对变换因子进行加密得到最终的加密密钥。此处不对变换值变换为中间密钥的具体变换方式进行限定,作为一种优选实施方式,所述根据所述变换值确定中间密钥的步骤可以包括:将所述变换值分割为第四数据段和第五数据段;其中,所述第四数据段为所述变换值的前16字节,所述第五数据段为所述变换值的后16字节;对所述第四数据段和所述第五数据段进行异或操作得到所述中间密钥。
S207:利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法。
对于本实施例的方案,如图3所示,对用户输入的原始口令通过SM3算法计算出32字节的杂凑值,将32字节的杂凑值分为前16字节和后16字节。将前16字节数据移动至后16字节,同时将后16字节数据按位取反后移动至前16字节形成32字节的U-hash-value。将U-hash-value作为输入,Salt拼接计数器Counter i(i∈[1,n],n为链式变换次数)作为密钥进行链式HMAC-SM3变换,增强随机性,最终计算结果记为U-KEY。将32字节的U-KEY前16字节和后16字节异或得到的值作为密钥,T-Value作为明文,采用SM4-ECB加密得到加密密钥。将加密密钥作为SM4-AE的密钥,用于保护数据密钥,实现数据密钥的密文保存。
下面对密文的解密方式进行介绍,具体的:
参见图4,根据一示例性实施例示出的又一种数据密钥保护方法的流程图,如图4所示,包括:
S301:当接收到解密请求时,获取所述解密请求中的目标原始口令;
S302:将所述目标原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为解密密钥;
S303:利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥。
在解密时,对于用户输入的目标原始口令采用加密时相同的变换过程,即预设规则得到解密密钥,利用加密算法相应的解密算法对密文进行解密得到数据密钥的明文。在具体实施中,通过解密的成功与否来判断加密密钥的正确性,进而判断用户输入的目标原始口令的正确性,实现口令验证,错误口令会造成解密的失败。
在解密明文的同时,对消息认证码进行认证,即利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥的步骤包括:利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥和第二消息验证码;获取所述第一消息验证码,通过对比所述第一消息验证码和所述第二消息验证码对所述目标原始口令进行验证。在具体实施中,若第一消息验证码与第二消息验证码则说明解密密钥不正确或密文不正确,由于密文存在芯片内部,因此一般判定为解密密钥 不正确,从而推导出目标原始口令有误。此时算法不会输出数据密钥的明文的,进行报错。
下面对本申请实施例提供的一种数据密钥保护系统进行介绍,下文描述的一种数据密钥保护系统与上文描述的一种数据密钥保护方法可以相互参照。
参见图5,根据一示例性实施例示出的一种数据密钥保护系统的结构图,如图5所示,包括:
第一获取模块501,用于获取原始口令,将所述原始口令作为计算模块的输入值并启动所述计算模块502的工作流程;
所述计算模块502,用于利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值;
加密模块503,用于利用所述计算模块的输出值对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和消息认证码;其中,所述第一加密算法包括SM4-AE算法。
本申请实施例提供的数据密钥保护系统,通过对原始口令的变换实现加密密钥的生成,从而不需要特定的功能来保存加密密钥,提高了加密密钥的安全性。本申请实施例不需要保存数据密钥的明文,而保存数据密钥的密文,从根本上实现了对数据密钥的保护。当非法获取数据密钥的密文,并获取原始口令时,不经过对原始口令的变换,同样无法还原数据密钥明文,从而无法还原受数据密钥保护的真实数据,进而保证了真实数据的安全性。
在上述实施例的基础上,作为一种优选实施方式,所述计算模块502包括:
计算单元,用于利用目标算法计算输入值对应的杂凑值;
确定单元,用于确定链式变换次数和每次链式变换的盐值;
变换单元,用于根据所述盐值对所述杂凑值进行链式变换,得到所述输出值。
在上述实施例的基础上,作为一种优选实施方式,所述计算模块502还包括:
分割单元,用于对所述杂凑值进行数据分割,得到多个数据段;
分散单元,用于对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值。
在上述实施例的基础上,作为一种优选实施方式,所述分割单元包括:
确定分割粒度子单元,用于根据所述第一加密算法的分组粒度确定分割粒度;其中,所述分组粒度为所述分割粒度的整数倍;
分割子单元,用于基于所述分割粒度将所述杂凑值分割为多个数据段。
在上述实施例的基础上,作为一种优选实施方式,所述分割子单元具体为将所述杂凑值进行二等分得到第一数据段和第二数据段的子单元;
所述分散单元具体为将所述第二数据段按位取反得到第三数据段,并将所述第三数据段和所述第一数据段拼接为所述哈希值的单元。
在上述实施例的基础上,作为一种优选实施方式,所述变换单元包括:
变换子单元,用于根据所述盐值对所述杂凑值进行链式变换,得到变换值;
确定子单元,用于根据所述变换值确定中间密钥,并确定变换因子;
加密子单元,用于利用所述中间密钥对所述变换因子采用第二加密算法进行加密得到所述输出值;其中,所述第二加密算法包括SM4算法。
在上述实施例的基础上,作为一种优选实施方式,所述确定子单元具体为将所述变换值二等分得到第四数据段和第五数据段,对所述第四数据段和所述第五数据段进行异或操作得到所述中间密钥,并确定变换因子的子单元。
在上述实施例的基础上,作为一种优选实施方式,还包括:
第二获取模块,用于当接收到解密请求时,获取所述解密请求中的目标原始口令;
确定模块,用于将所述目标原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为解密密钥;
解密模块,用于利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥。
在上述实施例的基础上,作为一种优选实施方式,所述解密模块包括:
解密单元,用于利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥和第二消息验证码;
验证单元,用于获取所述第一消息验证码,通过对比所述第一消息验证码和所述第二消息验证码对所述目标原始口令进行验证。
关于上述实施例中的系统,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本申请还提供了一种电子设备,参见图6,本申请实施例提供的一种电子设备600的结构图,如图6所示,可以包括处理器11和存储器12。该电子设备600还可以包括多媒体组件13,输入/输出(I/O)接口14,以及通信组件15中的一者或多者。
其中,处理器11用于控制该电子设备600的整体操作,以完成上述的数据密钥保护方法中的全部或部分步骤。存储器12用于存储各种类型的数据以支持在该电子设备600的操作,这些数据例如可以包括用于在该电子设备600上操作的任何应用程序或方法的指令,以及应用程序相关的数据,例如联系人数据、收发的消息、图片、音频、视频等等。该存储器12可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,例如静态随机存取存储器(Static Random Access Memory,简称SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),只读存储器(Read-Only Memory,简称ROM),磁存储器,快闪存储器,磁盘或光盘。多媒体组件13可以包括屏幕和音频组件。其中屏幕例如可以是触摸屏,音频组件用于输出和/或输入音频信号。例如,音频组件可以包括一个麦克风,麦克风用于接收外部音频信号。所接收的音频信号可以被进一步存储在存储器12或通过通信组件15发送。音频组件还包括至少一个扬声器,用于输出音频信号。I/O接口14为处理器11和其他接口模块之间提供接口,上述其他接口模块可以是键盘,鼠标,按钮等。这些按钮可以是虚拟按钮或者实体按钮。通信组件15用于该电子设备600与其他设备之间进行有线或无线通信。无线通信,例如Wi-Fi,蓝牙,近场通信(Near Field Communication,简称NFC),2G、3G或4G,或它们中的一种或几种的组合,因此相应的该通信组件15可以包括:Wi-Fi模块,蓝牙模块,NFC模块。
在一示例性实施例中,电子设备600可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,简称ASIC)、数字信号处理器(Digital Signal Processor,简称DSP)、数字信号处理设备(Digital Signal Processing Device,简称DSPD)、可编程逻辑器件(Programmable Logic Device,简称PLD)、现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述的数据密钥保护方法。
在另一示例性实施例中,还提供了一种包括程序指令的计算机可读存储介质,该程序指令被处理器执行时实现上述数据密钥保护方法的步骤。例如,该计算机可读存储介质可以为上述包括程序指令的存储器12,上述程序指令可由电子设备600的处理器11执行以完成上述的数据密钥保护方法。
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (12)

  1. 一种数据密钥保护方法,其特征在于,包括:
    获取原始口令,将所述原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为加密密钥;
    利用所述加密密钥对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和第一消息认证码;其中,所述第一加密算法包括SM4-AE算法;
    其中,所述预设规则包括:利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值。
  2. 根据权利要求1所述数据密钥保护方法,其特征在于,所述根据所述杂凑值确定输出值,包括:
    确定链式变换次数和每次链式变换的盐值;
    根据所述盐值对所述杂凑值进行链式变换,得到所述输出值。
  3. 根据权利要求1所述数据密钥保护方法,其特征在于,利用目标算法计算所述输入值对应的杂凑值之后,还包括:
    对所述杂凑值进行数据分割,得到多个数据段;
    对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值;
    所述根据所述杂凑值确定输出值包括:
    根据所述哈希值确定所述输出值。
  4. 根据权利要求3所述数据密钥保护方法,其特征在于,对所述杂凑值进行数据分割,得到多个数据段,包括:
    根据所述第一加密算法的分组粒度确定分割粒度;其中,所述分组粒度为所述分割粒度的整数倍;
    基于所述分割粒度将所述杂凑值分割为多个数据段。
  5. 根据权利要求4所述数据密钥保护方法,其特征在于,所述基于所述分割粒度将所述杂凑值分割为多个数据段,包括:
    将所述杂凑值进行二等分得到第一数据段和第二数据段;
    对所述多个数据段进行数据分散,得到所述杂凑值对应的哈希值,包括:
    将所述第二数据段按位取反得到第三数据段,并将所述第三数据段和所述第一数据段拼接为所述哈希值。
  6. 根据权利要求2所述数据密钥保护方法,其特征在于,所述根据所述盐值对所述杂凑值进行链式变换,得到所述输出值,包括:
    根据所述盐值对所述杂凑值进行链式变换,得到变换值;
    根据所述变换值确定中间密钥,并确定变换因子;
    利用所述中间密钥对所述变换因子采用第二加密算法进行加密得到所述输出值;其中,所述第二加密算法包括SM4算法。
  7. 根据权利要求6所述数据密钥保护方法,其特征在于,所述根据所述变换值确定中间密钥,包括:
    将所述变换值二等分得到第四数据段和第五数据段;
    对所述第四数据段和所述第五数据段进行异或操作得到所述中间密钥。
  8. 根据权利要求1至7中任一项所述数据密钥保护方法,其特征在于,还包括:
    当接收到解密请求时,获取所述解密请求中的目标原始口令;
    将所述目标原始口令作为预设规则的输入值执行所述预设规则,并将所述预设规则的输出值作为解密密钥;
    利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥。
  9. 根据权利要求8所述数据密钥保护方法,其特征在于,所述利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥,包括:
    利用所述解密密钥采用第一加密算法对应的解密算法对所述密文进行解密,得到所述数据密钥和第二消息验证码;
    获取所述第一消息验证码,通过对比所述第一消息验证码和所述第二消息验证码对所述目标原始口令进行验证。
  10. 一种数据密钥保护系统,其特征在于,包括:
    获取模块,用于获取原始口令,将所述原始口令作为计算模块的输入值并启动所述计算模块的工作流程;
    所述计算模块,用于利用目标算法计算输入值对应的杂凑值,并根据所述杂凑值确定输出值;
    加密模块,用于利用所述计算模块的输出值对数据密钥采用第一加密算法进行加密,得到所述数据密钥对应的密文和消息认证码;其中,所述第一加密算法包括SM4-AE算法。
  11. 一种电子设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至9任一项所述数据密钥保护方法的步骤。
  12. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至9任一项所述数据密钥保护方法的步骤。
PCT/CN2020/104463 2019-07-25 2020-07-24 一种数据密钥保护方法、系统及电子设备和存储介质 WO2021013245A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910676453.9 2019-07-25
CN201910676453.9A CN110378139B (zh) 2019-07-25 2019-07-25 一种数据密钥保护方法、系统及电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021013245A1 true WO2021013245A1 (zh) 2021-01-28

Family

ID=68255836

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/104463 WO2021013245A1 (zh) 2019-07-25 2020-07-24 一种数据密钥保护方法、系统及电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN110378139B (zh)
WO (1) WO2021013245A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110378139B (zh) * 2019-07-25 2021-07-30 江苏芯盛智能科技有限公司 一种数据密钥保护方法、系统及电子设备和存储介质
CN111222148A (zh) * 2019-12-26 2020-06-02 河南芯盾网安科技发展有限公司 密钥生成方法、加密方法、解密方法及装置
CN111555859A (zh) * 2020-03-31 2020-08-18 杭州熠芯科技有限公司 Sm4-gcm算法及在网络安全协议中的应用
CN111597575B (zh) * 2020-05-25 2023-04-07 成都卫士通信息产业股份有限公司 一种数据存储方法、装置、设备及存储介质
CN111698086B (zh) * 2020-06-12 2023-12-12 阿波罗智联(北京)科技有限公司 用于数据传输的方法和装置
CN111475832B (zh) * 2020-06-24 2021-01-12 腾讯科技(深圳)有限公司 一种数据管理的方法以及相关装置
CN112019514A (zh) * 2020-07-30 2020-12-01 苏州浪潮智能科技有限公司 一种信号加密方法、信号加密系统及相关装置
CN112019327B (zh) * 2020-08-26 2023-05-23 成都卫士通信息产业股份有限公司 一种白盒实现方法、装置、电子设备及计算机存储介质
CN112153046B (zh) * 2020-09-24 2023-04-07 施耐德电气(中国)有限公司 数据加密和数据解密的方法、相关设备以及存储介质
CN112507326B (zh) * 2020-12-16 2023-11-28 平安国际智慧城市科技股份有限公司 基于sm3杂凑算法的密码信息加密方法、装置以及计算机设备
CN112788005B (zh) * 2020-12-29 2023-05-23 福建正孚软件有限公司 一种软硬件结合的提高安全性的跨境传输方法和系统
CN113014396B (zh) * 2021-03-01 2022-07-22 重庆邮电大学 一种适用于wban数据实时加密传输的超轻量级加密方法
CN113517981B (zh) * 2021-04-28 2023-05-23 河南中烟工业有限责任公司 一种密钥管理方法、代码版本的管理方法及装置
CN113259901B (zh) * 2021-06-17 2021-12-28 深圳奥联信息安全技术有限公司 用于车联网的消息保护方法及装置
CN113452688B (zh) * 2021-06-24 2022-07-08 山东三未信安信息科技有限公司 一种基于sm4与sm2算法的图像加密与解密方法及装置
CN114785495A (zh) * 2022-04-01 2022-07-22 安天科技集团股份有限公司 密钥派生方法、数据加密方法、服务器、电子设备及存储介质
CN115664646B (zh) * 2022-09-28 2023-09-15 成都海泰方圆科技有限公司 一种数据备份方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105100115A (zh) * 2015-08-27 2015-11-25 中国科学院信息工程研究所 一种基于加密口令及数据拆分的隐私保护的数据存储方法
CN105721390A (zh) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 一种加密存储方法和装置
CN106506159A (zh) * 2016-11-18 2017-03-15 上海艾讯云计算有限公司 用于密钥安全的加密方法和设备
CN106911639A (zh) * 2015-12-23 2017-06-30 中国电信股份有限公司 加密方法和装置、解密方法和装置及终端
CN108959978A (zh) * 2018-06-28 2018-12-07 北京海泰方圆科技股份有限公司 设备中密钥的生成与获取方法及装置
US10187207B2 (en) * 2014-10-03 2019-01-22 Kabushiki Kaisha Toshiba Re-encryption key generator, re-encryption apparatus, encryption apparatus, decryption apparatus, and storage medium
CN110378139A (zh) * 2019-07-25 2019-10-25 江苏芯盛智能科技有限公司 一种数据密钥保护方法、系统及电子设备和存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040202326A1 (en) * 2003-04-10 2004-10-14 Guanrong Chen System and methods for real-time encryption of digital images based on 2D and 3D multi-parametric chaotic maps
CN101939946B (zh) * 2008-01-07 2013-04-24 安全第一公司 使用多因素或密钥式分散对数据进行保护的系统和方法
CN103678959A (zh) * 2013-11-12 2014-03-26 杭州晟元芯片技术有限公司 一种基于移动存储设备的数据保护方法
CN103746805B (zh) * 2013-12-05 2018-01-30 数安时代科技股份有限公司 外部认证密钥的生成方法和系统
CN104639332A (zh) * 2015-02-25 2015-05-20 山东超越数控电子有限公司 一种固态硬盘加密密钥的保护方法
CN106778294A (zh) * 2016-11-25 2017-05-31 努比亚技术有限公司 信息保护方法及装置
CN108197478A (zh) * 2017-08-08 2018-06-22 鸿秦(北京)科技有限公司 一种采用随机盐值的NandFlash加密文件系统
CN109428720B (zh) * 2017-08-24 2021-09-21 上海复旦微电子集团股份有限公司 一种数据加密方法、解密方法、加密系统及解密系统
CN107623570B (zh) * 2017-11-03 2020-12-04 北京无字天书科技有限公司 一种基于加法密钥分割的sm2签名方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10187207B2 (en) * 2014-10-03 2019-01-22 Kabushiki Kaisha Toshiba Re-encryption key generator, re-encryption apparatus, encryption apparatus, decryption apparatus, and storage medium
CN105721390A (zh) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 一种加密存储方法和装置
CN105100115A (zh) * 2015-08-27 2015-11-25 中国科学院信息工程研究所 一种基于加密口令及数据拆分的隐私保护的数据存储方法
CN106911639A (zh) * 2015-12-23 2017-06-30 中国电信股份有限公司 加密方法和装置、解密方法和装置及终端
CN106506159A (zh) * 2016-11-18 2017-03-15 上海艾讯云计算有限公司 用于密钥安全的加密方法和设备
CN108959978A (zh) * 2018-06-28 2018-12-07 北京海泰方圆科技股份有限公司 设备中密钥的生成与获取方法及装置
CN110378139A (zh) * 2019-07-25 2019-10-25 江苏芯盛智能科技有限公司 一种数据密钥保护方法、系统及电子设备和存储介质

Also Published As

Publication number Publication date
CN110378139B (zh) 2021-07-30
CN110378139A (zh) 2019-10-25

Similar Documents

Publication Publication Date Title
WO2021013245A1 (zh) 一种数据密钥保护方法、系统及电子设备和存储介质
CN108809646B (zh) 安全共享密钥共享系统
US10142107B2 (en) Token binding using trust module protected keys
WO2019214070A1 (zh) 区块链上用户通信加密方法、装置、终端设备及存储介质
US11184164B2 (en) Secure crypto system attributes
US7373509B2 (en) Multi-authentication for a computing device connecting to a network
KR102239711B1 (ko) 보안 파라미터들에 기초한 작업 보안 키의 생성
EP2711859B1 (en) Secured computing system with asynchronous authentication
US10880100B2 (en) Apparatus and method for certificate enrollment
KR20140099126A (ko) 소프트웨어를 보안하기 위하여 해시 함수를 이용한 소프트웨어 처리 방법, 그 장치 및 그 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체
TW202036347A (zh) 資料儲存、驗證方法及裝置
TW201502847A (zh) 運用一電腦處理器使用一安全非揮發儲存器之系統、方法及裝置
CN108696518B (zh) 区块链上用户通信加密方法、装置、终端设备及存储介质
CN111294203B (zh) 信息传输方法
WO2022134812A1 (zh) 基于联盟链的多机构数据处理方法、装置及相关设备
WO2020000491A1 (zh) 一种文件存储方法、装置及存储介质
WO2021098152A1 (zh) 基于区块链的数据处理方法、装置及计算机设备
US10785193B2 (en) Security key hopping
CN111181944B (zh) 通信系统及信息发布方法、装置、介质、设备
WO2022052665A1 (zh) 无线终端及无线终端在Uboot模式下的接口访问鉴权方法
US20210266175A1 (en) Device for data encryption and integrity
US11216571B2 (en) Credentialed encryption
KR102282788B1 (ko) 트랜잭션에 포함된 평문 데이터의 변경을 지원하는 블록체인 시스템
CN114553557B (zh) 密钥调用方法、装置、计算机设备和存储介质
WO2022199796A1 (en) Method and computer-based system for key management

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

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20844626

Country of ref document: EP

Kind code of ref document: A1