WO2021114850A1 - 消息的加解密、读写方法、装置、计算机设备和存储介质 - Google Patents

消息的加解密、读写方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021114850A1
WO2021114850A1 PCT/CN2020/120578 CN2020120578W WO2021114850A1 WO 2021114850 A1 WO2021114850 A1 WO 2021114850A1 CN 2020120578 W CN2020120578 W CN 2020120578W WO 2021114850 A1 WO2021114850 A1 WO 2021114850A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
mask
seed
original message
generate
Prior art date
Application number
PCT/CN2020/120578
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 百果园技术(新加坡)有限公司
Priority to EP20899533.2A priority Critical patent/EP4075716A4/en
Priority to US17/782,939 priority patent/US20230027142A1/en
Publication of WO2021114850A1 publication Critical patent/WO2021114850A1/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/002Countermeasures against attacks on cryptographic mechanisms
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/16Obfuscation or hiding, e.g. involving white box

Definitions

  • the present disclosure relates to the field of security technology, for example, to a method, device, computer equipment, and storage medium for encrypting, decrypting, reading and writing messages.
  • Data protection technology in computer equipment is closely related to cryptography. In terms of packing, anti-debugging, data storage, etc., it is often necessary to hide sensitive data through encryption, and the hidden sensitive data will face black box, Gray box, white box, etc. attacks.
  • White box means that the attacker has completely controlled the entire operation process and is completely visible. The attacker can freely observe the dynamic password operation process, and the detailed content of the internal algorithm is completely visible and can be changed at will.
  • the attacker can run the program through the debugger and observe the process of the software running, and all the code involved in the decryption part will be seen at a glance.
  • white-box encryption algorithms In order to ensure data security, some white-box encryption algorithms have been released, such as Advanced Encryption Standard (AES) encryption.
  • AES Advanced Encryption Standard
  • developers A semantically insecure or inefficient mode may be used to implement the white box encryption algorithm.
  • the white box encryption algorithm in the ECB mode encrypts the same block into the same ciphertext, which easily exposes the plaintext mode.
  • Cipher Block Chaining (CBC) mode has error propagation problems for unauthenticated encryption. Reusing the initialization vector (Initialization Vector, IV) will leak the information of the first block of the plaintext. It is impractical to generate, hide and remember every dynamic IV of the client-side white box encryption algorithm.
  • Initialization Vector, IV Initialization Vector
  • the white box encryption algorithm is used in the stream cipher. Reusing the IV will completely destroy security, and the protection provided by white box encryption will be bypassed.
  • the white box encryption algorithm encrypts a single block, and the message generally contains multiple blocks, and the semantics of the entire message under a chosen-plaintext attack (CPA) is risky.
  • CPA chosen-plaintext attack
  • the present disclosure provides a message encryption, decryption, reading and writing method, device, computer equipment, and storage medium to solve the problem of white-box encryption of the message, which is risky in the CPA mode.
  • a message encryption method including:
  • a method for decrypting messages including:
  • a method for reading messages including:
  • a message encryption device including:
  • the original message determination module is set to determine the original message
  • Seed generation module set to generate seeds
  • a mask generation module configured to generate a mask according to the seed
  • a mask adding module configured to use the mask to add a mask to the original message to generate a mask message
  • the white box encryption module is configured to perform white box encryption on the concealed message to obtain the target message;
  • the ciphertext disclosure module is configured to disclose the target message and the seed.
  • a message decryption device including:
  • the ciphertext determination module is set to determine the target message and seed
  • the white box decryption module is configured to perform white box decryption on the target message to obtain a concealed message
  • a mask generation module configured to generate a mask according to the seed
  • the mask removal module is configured to use the mask to remove the mask from the masked message to obtain the original message.
  • a message writing device including:
  • the seed generation module is set to generate a seed when the original message generated by the application is received;
  • a mask generation module configured to generate a mask according to the seed
  • a mask adding module configured to use the mask to add a mask to the original message to generate a mask message
  • the white box encryption module is configured to perform white box encryption on the concealed message to obtain the target message;
  • the ciphertext storage module is configured to store the target message and the seed corresponding to the original message.
  • a message reading device including:
  • the ciphertext determination module is configured to determine the target message and seed corresponding to the original message when the read operation of the original message by the application is received;
  • the white box decryption module is configured to perform white box decryption on the target message to obtain a concealed message
  • a mask generation module configured to generate a mask according to the seed
  • a mask removal module configured to use the mask to remove the mask from the masked message to obtain the original message
  • the original message sending module is configured to send the original message to the application.
  • a computer device is also provided, and the computer device includes:
  • One or more processors are One or more processors;
  • Memory set to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned message encryption method, or the above-mentioned message decryption method, or the above-mentioned message writing Method, or the above-mentioned message reading method.
  • a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned message encryption method, or the above-mentioned message decryption method, or the above-mentioned message writing method, Or the reading method of the above message.
  • FIG. 1 is a flowchart of a method for encrypting a message according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of a white box encryption API provided by an embodiment of the present invention.
  • FIG. 3A is an example diagram of generating a mask provided by an embodiment of the present invention.
  • FIG. 3B is a diagram of another example of generating a mask provided by an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for decrypting a message according to the second embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a white box decryption API provided by an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for writing a message according to Embodiment 3 of the present invention.
  • FIG. 7 is a flowchart of a method for reading a message according to the fourth embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a message encryption device provided by Embodiment 5 of the present invention.
  • FIG. 9 is a schematic structural diagram of a message decryption device provided by Embodiment 6 of the present invention.
  • FIG. 10 is a schematic structural diagram of a message writing device provided by Embodiment 7 of the present invention.
  • FIG. 11 is a schematic structural diagram of a message reading device provided by Embodiment 8 of the present invention.
  • FIG. 12 is a schematic structural diagram of a computer device according to Embodiment 9 of the present invention.
  • FIG. 1 is a flowchart of a message encryption method provided by Embodiment 1 of the present invention.
  • This embodiment provides a CPA-resistant white box encryption scheme by adding a mask generation function (MGF), To generate different ciphertexts for different blocks in the message, MGF merges with the white box encryption algorithm in the White Box Encryption Application Programming Interface (API).
  • MGF mask generation function
  • API White Box Encryption Application Programming Interface
  • This method can be executed by the encryption device of the message.
  • the encryption of the message The device can be implemented by software and/or hardware, and can be configured in a computer device, for example, a mobile terminal (such as a mobile phone, a tablet computer, a smart wearable device (such as a smart watch, smart glasses, etc.), etc.), a personal computer, a server, etc.
  • a mobile terminal such as a mobile phone, a tablet computer, a smart wearable device (such as a smart watch, smart glasses, etc.), etc.
  • white box encryption can be implemented in the form of application built-in modules, plug-ins, etc.
  • white box encryption can be implemented in the form of a software development kit (SDK).
  • SDK software development kit
  • the user first selects a key, and then uses it to initialize white box encryption through the server. After initialization, the key will be generated in a non-plaintext format and stored in the cloud, and the application (client) should access the key through the cloud API.
  • the white box encryption implemented on the server eliminates the risk of reverse engineering on the local device, and the application (client) communicates with the server to complete the encryption operation (for example, retrieve the key).
  • the method includes the following steps:
  • the original message (message) is provided to the white box encryption API as input, waiting for encryption.
  • the original message is plaintext and can contain one or more blocks.
  • the form of the original message is different.
  • the original message in a local device such as a mobile terminal, can be a key. That is, the key is embedded in the white box encryption method in this embodiment, which greatly reduces Risk of reverse engineering on local equipment.
  • the specified data can be filled in the original message, such as Public Key Cryptography Standards#7 (PKCS#7), and the filled original message is provided to the white box encryption API as input.
  • PCS#7 Public Key Cryptography Standards#7
  • the original message can also be directly provided to the white box encryption API as input, which is not limited in this embodiment.
  • the white box encryption API can generate a seed (seed) after receiving the input original message, where the seed is unique and not reused, and can be at least one of numbers, strings, and characters , Can be published as the output of white box encryption API.
  • the length of the seed is generally greater than or equal to 128 bits, for example, 256 bits.
  • the probability of repeatedly generating the same seed is extremely low, that is, the probability of using the same seed for two identical plaintexts is extremely low and approaches 0, which is negligible. Therefore, a value can be randomly generated as a seed, and the length of the value is greater than or equal to 128 bits, for example, 256 bits.
  • the method of randomly generating values can be pseudo-random number generation (PRNG), srand in the C language implementation uses time as a source of randomness, and so on.
  • the seed generation process does not require external hardware equipment, nor does it require the seed to reach the level of True Random Number Generation (TRNG), and the operation is simple.
  • TRNG True Random Number Generation
  • the attacker can only passively observe the value of the seed, but cannot modify it.
  • the seed generation function is incorporated into the white-box encryption API and applied together with code obfuscation, which increases the difficulty of code modification.
  • MGF uses a seed as an input to generate a mask. There is a fixed transformation relationship between the seed and the mask. Since the seed is unique, the mask is also unique.
  • an external hash function can be used to generate the mask.
  • the length of the original message can be determined, hash functions (hash functions) can be determined, and the seed can be input into the hash function for calculation to generate a mask of the length.
  • Hash function also known as hash function, can transform an input of any length (also called pre-image, pre-image) into a fixed-length output through a hash algorithm, and the output is the hash value.
  • This conversion is a compression mapping, so that the hash value space is usually much smaller than the input space, that is, the hash function is a function that compresses messages of any length into a fixed-length message digest.
  • the hash function includes a SHAKE function, such as SHAKE-128, SHAKE-256, and so on.
  • the SHAKE function can produce output of any desired length.
  • the seed can be input to the SHAKE function for operation to output a mask of this length
  • the processing method can be expressed as:
  • F() is the SHAKE function
  • s is the seed
  • N is the length of the output (D)
  • N is equal to the length L of the original message
  • D is the mask.
  • the value of L and N should be at least 128 bits to prevent brute force attacks and rainbow table attacks. If hash collision is also considered, the value of L should be at least 256 bits.
  • the hash function includes Secure Hash Algorithm (SHA) functions, such as SHA-1, SHA-2, and SHA-3.
  • SHA Secure Hash Algorithm
  • the idea of the SHA function is to receive a piece of plaintext and convert it into a piece of (usually smaller) ciphertext in an irreversible way. It can also be simply understood as taking a string of input codes (called pre-mapping or information), and converting They are transformed into a short output sequence with a fixed number of bits (160-512), that is, a process of hash value (also known as information digest or information authentication code).
  • the hash function value can be said to be a kind of "fingerprint” or "digest" of the plaintext, so the digital signature of the hash value can be regarded as the digital signature of the plaintext.
  • the SHAKE function is an expandable output hash function in the SHA-3 series.
  • SHA-3 means SHA3-224, SHA3-256, SHA3-384, SHA3-512, and does not include the SHAKE function.
  • multiple new seeds are generated on the basis of seeds, and all seeds are input into the SHA function to perform operations to output multiple summary information, combine multiple summary information, and obtain the first data set. Extract data of this length from a data set and use it as a mask.
  • the external function is not used, and the white-box encryption function is repeatedly used to generate the mask.
  • the length of the original message can be determined, and the seed can be white-box encrypted to generate a mask of that length.
  • multiple new seeds can be generated on the basis of seeds, and all seeds can be encrypted separately in white box to generate multiple ciphertexts, and combine multiple ciphertexts to obtain a second data set. Extract data of this length as a mask.
  • white box encryption (E_wb) generates a 128-bit ciphertext. If the length of the original message is N bits, a total of (N/128+1) ciphertexts will be generated.
  • n seed, seed+1, seed+2,..., seed+n
  • the length of the mask remains the same as the length of the original message, which can facilitate subsequent operations such as XORing the original message and the mask.
  • the length of the mask can also be greater than the plaintext.
  • the above method of generating a mask is just an example.
  • other methods of generating a mask can be set according to the actual situation.
  • the hash function can be any standard secure one-way hash function, including but not limited to the SHAKE function. , SHA function, this embodiment does not impose restrictions on this.
  • other methods of generating a mask may also be adopted according to actual needs, and this embodiment does not impose a limitation on this.
  • the mask is applied to the plaintext (original message), the original message is transformed, and its original content is concealed to obtain the transformed concealed message.
  • the original message and the mask can be XORed to obtain the masked message, which is expressed as follows:
  • m is the original message
  • D is the mask
  • m' is the masked message
  • the above-mentioned method of generating a concealed message using the exclusive OR operation is just an example.
  • other methods of generating a concealed message can be set according to the actual situation.
  • the mask is used for interpolation on the basis of the original message to obtain the concealed message.
  • the OR operation is not limited in this embodiment.
  • other methods of generating the concealed message may also be adopted according to actual needs, which is not limited in this embodiment.
  • a white-box encryption algorithm can be used to white-box the masked message to generate a ciphertext as the target message.
  • the target message also has one or more blocks.
  • White box encryption belongs to symmetric encryption, which refers to a special encryption method that can resist attacks in a white box environment.
  • white box encryption The idea of white box encryption is confusion.
  • the function of confusion is to disrupt information. It is to make information exist in a completely incomprehensible form. How the result is obtained), but does not affect the function of the information itself (an encrypted program cannot be executed before the source code is decrypted, but the obfuscated program can be executed correctly).
  • White box encryption closely binds the algorithm and the key together.
  • An encryption table and a decryption table are generated from the algorithm and the key. Then the encryption table can be used to look up the encryption table for encryption, and the decryption table can be used for decryption without relying on the original encryption. Decryption algorithm and key.
  • the advanced encryption standard (Advanced Encryption Standard, AES) can be implemented in white box encryption through some customized engineering work, and the symmetric key information is stored in the obfuscated look-up table.
  • AES Advanced Encryption Standard
  • the generation of the white-box encryption algorithm look-up table follows the same method and components-the combined T-box and Ty table, and the XOR table.
  • the white box encryption algorithm does not give a mandatory table structure.
  • the tables can use the customized structure of this embodiment, and add additional masks to each table to increase the difficulty of reverse engineering.
  • internal/external coding and mixed bijection are also applied to all lookup tables.
  • a binary file with a size of hundreds of KB is used to store the key information.
  • the white box encryption API will read the binary file to load the key. If the key is changed, the binary file can be easily replaced.
  • the target message and the seed can be disclosed.
  • White box decryption belongs to symmetric decryption, which refers to a special encryption method that can resist attacks in a white box environment.
  • the original message is determined, a seed is generated, a mask is generated according to the seed, and the mask is used to add a mask to the original message to generate a masked message, and the masked message is white-box encrypted to obtain the target message, and the target message and the seed are disclosed
  • This embodiment accommodates other white-box encryption algorithms, and takes up less resources and has a faster computing speed. It can be applied to a mobile environment, fills the gap between academic design and industrial needs, and improves academic design into practical industrial solutions. Program.
  • the mask generation function can be inserted into other white box encryption algorithms without changing its main logic. Different seeds can generate different masks, and the same block can be encrypted into different ciphertexts. Therefore, semantic security under CPA can be added Features. With the mask as a shielding layer protection to increase the difficulty of reverse engineering, encryption tasks can be safely run in ECB mode. Compared with other non-parallel modes, the efficiency of white box encryption in ECB mode is higher.
  • Seeds can be considered as dynamic initialization vectors, but they do not need to be as secret as IVs. Due to the different seeds and different masks, the same plaintext block can be encrypted into different ciphertext blocks, which protects the semantic security of multi-block encryption under CPA. Therefore, seeds help the spread of white-box encryption, and attackers with seed knowledge will not gain additional advantages to obtain useful plaintext.
  • the following table shows 3 blocks of plaintext, which have passed the semantically insecure white box encryption under CPA (line 2) and the semantically secure white box encryption under CPA (line 3) in this embodiment using the same
  • the AES-128 symmetric key is encrypted.
  • the last block in line 3 is the seed, and the 128-bit seed is appended to the end of the ciphertext to recover the mask value.
  • the semantically secure white box encryption algorithm under CPA uses different seeds to generate different masks to encrypt the plaintext, and the encryption is different ciphertext, and the ciphertext in each block has an independent value.
  • semantically secure white box encryption (AES-128) under CPA is implemented in a C++ project and tested in a mobile environment.
  • OLVM Obfuscator-Low Level Virtual Machine
  • the lookup table requires approximately 350KB of additional storage space.
  • a single encryption operation takes an average of 2.9 milliseconds.
  • FIG. 4 is a flowchart of a message decryption method provided in the second embodiment of the present invention.
  • This embodiment provides a CPA-resistant white box decryption scheme.
  • MGF mask generation function
  • This method can be executed by the message decryption device, which can be implemented by software and/or hardware, and can be configured in computer equipment In, for example, mobile terminals (such as mobile phones, tablet computers, smart wearable devices (such as smart watches, smart glasses, etc.), etc.), personal computers, servers, etc.
  • white box decryption can be implemented in the form of application built-in modules, plug-ins, etc.
  • white box decryption can be implemented in the form of SDK.
  • the user first selects a key, and then uses it to initialize white box decryption through the server. After initialization, the key will be generated in a non-plaintext format and stored in the cloud, and the application (client) should access the key through the cloud API.
  • the white box decryption implemented on the server eliminates the risk of reverse engineering on the local device, and the application (client) communicates with the server to complete the decryption operation (for example, retrieve the key).
  • the method includes the following steps:
  • the target message is the ciphertext after the white box encryption API uses the seed to encrypt the original message.
  • the target message and the seed are disclosed together.
  • the target message and seed can be obtained through public channels, and the target message And the seed is provided to the white box decryption API as input, waiting for decryption.
  • the seed is unique, not repeated, and can be at least one of numbers, character strings, and characters.
  • the form of the original message is different.
  • the original message in a local device such as a mobile terminal, can be a key. That is, the key is embedded in the white box decryption method in this embodiment, which greatly reduces Risk of reverse engineering on local equipment.
  • S402 Perform white box decryption on the target message to obtain a concealed message.
  • the white box decryption algorithm can be used to white box decrypt the target message and restore the concealed message.
  • the white box decryption algorithm of the white box decryption algorithm for the target message and the white box decryption algorithm for the target message White box encryption is paired with white box encryption algorithms.
  • AES can be implemented in white box decryption through some customized engineering work.
  • S403 Generate a mask according to the seed.
  • MGF uses a seed as an input to generate a mask. There is a fixed transformation relationship between the seed and the mask. Since the seed is unique, the mask is also unique.
  • an external hash function can be used to generate the mask.
  • the length of the original message can be determined, the hash function is determined, and the seed is input into the hash function for calculation to generate a mask of that length.
  • the hash function includes a SHAKE function, such as SHAKE-128, SHAKE-256, and so on.
  • the SHAKE function can produce output of any desired length.
  • the seed can be used as input to the SHAKE function to perform operations to output a mask of this length
  • the hash function includes SHA functions, such as SHA-1, SHA-2, SHA-3.
  • multiple new seeds are generated on the basis of seeds, and all seeds are input into the SHA function to perform operations to output multiple summary information, combine multiple summary information, and obtain the first data set. Extract data of this length from a data set and use it as a mask.
  • the external function is not used, and the white-box encryption function is repeatedly used to generate the mask.
  • the length of the original message can be determined, and the seed can be white-box encrypted to generate a mask of that length.
  • multiple new seeds can be generated on the basis of seeds, and all seeds can be encrypted separately in white box to generate multiple ciphertexts, and combine multiple ciphertexts to obtain a second data set. Extract data of this length as a mask.
  • the above method of generating a mask is just an example.
  • other methods of generating a mask can be set according to the actual situation.
  • the hash function can be any standard secure one-way hash function, including but not limited to the SHAKE function. , SHA function, this embodiment does not impose restrictions on this.
  • other methods of generating a mask may also be adopted according to actual needs, and this embodiment does not impose a limitation on this.
  • the mask generation method is basically similar to the mask generation method in the first embodiment, the description is relatively simple. For related parts, please refer to the part of the description in the first embodiment. Be detailed.
  • the mask is applied to the concealed message, the concealed message is transformed, and its original content is restored, and the transformed plaintext (original message) is obtained.
  • the method of using a mask in the white-box decryption API to add concealment to the original message is paired with the method of using a mask to remove the concealment of the concealed message in the white-box decryption API.
  • the masked message and the mask can be XORed to obtain the original message, which is expressed as follows:
  • m is the original message
  • D is the mask
  • m’ is the masked message
  • the above method of using the exclusive OR operation to restore the original message is just an example.
  • other methods of restoring the original message can be set according to the actual situation. For example, if the original message is used for interpolation and generation based on the original message.
  • the original message may be filled with specified data, such as PKCS#7, before being provided to the white box encryption API.
  • the previously filled data can be removed from the original message.
  • the original message is directly provided to the white box encryption API as input, and there is no need to remove the previously filled data from the original message, which is not limited in this embodiment.
  • the target message and seed are determined, the target message is white-box decrypted to obtain the masked message, the mask is generated according to the seed, and the mask is used to remove the mask from the masked message to obtain the original message.
  • This embodiment accommodates other The white-box decryption algorithm, which occupies less resources and has faster calculation speed, can be applied to mobile environments, filling the gap between academic design and industrial requirements, and improving academic design into practical industrial solutions.
  • the mask generation function can be inserted into other white box decryption algorithms without changing its main logic. Different seeds can generate different masks, and the same block can be encrypted into different ciphertexts. Therefore, semantic security under CPA can be added Features. With the mask as a shielding layer protection to increase the difficulty of reverse engineering, decryption tasks can be safely run in ECB mode. Compared with other non-parallel modes, the efficiency of white box decryption in ECB mode is higher.
  • Seeds can be considered as dynamic initialization vectors, but they do not need to be as secret as IVs. Due to the different seeds and different masks, the same plaintext block can be encrypted into different ciphertext blocks, which protects the semantic security of multi-block encryption under CPA. Therefore, seeds help the spread of white box decryption, and an attacker with seed knowledge will not gain additional advantages to obtain useful plaintext.
  • Fig. 6 is a flowchart of a method for writing a message provided in the third embodiment of the present invention.
  • This embodiment provides a CPA-resistant white-box encryption scheme.
  • MGF mask generation function
  • different blocks in the message are Generate different ciphertexts for storage.
  • MGF merges with the white box encryption algorithm in the white box encryption API (Application Programming Interface).
  • This method can be executed by the message writing device, and the message writing device can be software And/or hardware implementation, it can be configured in computer equipment, for example, mobile terminals (such as mobile phones, tablet computers, smart wearable devices (such as smart watches, smart glasses, etc.), etc.), personal computers, servers, etc.
  • white box encryption can be implemented in the form of application built-in modules, plug-ins, etc.
  • white box encryption can be implemented in the form of SDK (Software Development Kit). The user first selects a key, and then uses it to initialize white box encryption through the server. After initialization, the key will be generated in a non-plaintext format and stored in the cloud, and the application (client) should access the key through the cloud API.
  • the white box encryption implemented on the server eliminates the risk of reverse engineering on the local device, and the application (client) communicates with the server to complete the encryption operation (for example, retrieve the key).
  • the method includes the following steps:
  • S601 Generate a seed when receiving the original message generated by the application.
  • the application may include a browser, e-mail, notepad, address book, etc.
  • the application will generate data of different security levels during its operation.
  • part of the data with a higher security level can be used as the original message and provided to the white box encryption API as input, waiting for encryption.
  • the original message is plaintext and can contain one or more blocks.
  • the form of the original message is different.
  • the original message in a local device such as a mobile terminal, can be a key. That is, the key is embedded in the white box encryption method in this embodiment, which greatly reduces Risk of reverse engineering on local equipment.
  • the address book in the mobile terminal can generate data such as contact information, such as name, mobile phone number, avatar, etc.
  • contact information such as name, mobile phone number, avatar, etc.
  • the user can browse the contact information after unlocking the mobile terminal, and other applications can read the contact information under authorization.
  • the user can request the address book to check the contact information. Encryption improves its security. After unlocking the mobile terminal, the user cannot directly browse the contact information, other applications cannot read the contact information, and can browse the contact information after decrypting the contact information.
  • the white box encryption API can generate a seed (seed) after receiving the input original message, where the seed is unique and not reused, and can be at least one of numbers, strings, and characters , Can be published as the output of white box encryption API.
  • S602 Generate a mask according to the seed.
  • MGF uses a seed as an input to generate a mask. There is a fixed transformation relationship between the seed and the mask. Since the seed is unique, the mask is also unique.
  • an external hash function can be used to generate the mask.
  • the length of the original message can be determined, hash functions (hash functions) can be determined, and the seed can be input into the hash function for calculation to generate a mask of the length.
  • the hash function includes a SHAKE function, such as SHAKE-128, SHAKE-256, and so on.
  • the SHAKE function can produce output of any desired length.
  • the hash function includes SHA functions, such as SHA-1, SHA-2, SHA-3.
  • multiple new seeds are generated on the basis of seeds, and all seeds are input into the SHA function to perform operations to output multiple summary information, combine multiple summary information, and obtain the first data set. Extract data of this length from a data set and use it as a mask.
  • the external function is not used, and the white-box encryption function is repeatedly used to generate the mask.
  • the length of the original message can be determined, and the seed can be white-box encrypted to generate a mask of that length.
  • multiple new seeds can be generated on the basis of seeds, and all seeds can be encrypted separately in white box to generate multiple ciphertexts, and combine multiple ciphertexts to obtain a second data set. Extract data of this length as a mask.
  • the above method of generating a mask is just an example.
  • other methods of generating a mask can be set according to the actual situation.
  • the hash function can be any standard secure one-way hash function, including but not limited to the SHAKE function. , SHA function, this embodiment does not impose restrictions on this.
  • other methods of generating a mask may also be adopted according to actual needs, and this embodiment does not impose a limitation on this.
  • the mask is applied to the plaintext (original message), the original message is transformed, and its original content is concealed to obtain the transformed concealed message.
  • the original message and the mask can be XORed to obtain the masked message.
  • the above-mentioned method of generating a concealed message using the exclusive OR operation is just an example.
  • other methods of generating a concealed message can be set according to the actual situation.
  • the mask is used for interpolation on the basis of the original message to obtain the concealed message.
  • the OR operation is not limited in this embodiment.
  • other methods of generating the concealed message may also be adopted according to actual needs, which is not limited in this embodiment.
  • a white-box encryption algorithm can be used to white-box the masked message to generate a ciphertext as the target message.
  • the target message also has one or more blocks.
  • S605 Store the target message and the seed corresponding to the original message.
  • the target message and the seed can be stored together in a storage space such as a database, and the target message, the seed, and the original message can be established in the storage space such as the database.
  • a storage space such as a database
  • the target message, the seed, and the original message can be established in the storage space such as the database.
  • the encryption method is basically similar to the application of the encryption method in the first embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the description in the first embodiment, and this embodiment will not be described in detail here.
  • this embodiment when the original message generated by the application is received, a seed is generated, a mask is generated according to the seed, and the mask is used to add a mask to the original message to generate a masked message, and the masked message is white-box encrypted to obtain the target message
  • this embodiment accommodates other white box encryption algorithms, and takes up less resources and has a faster calculation speed. It can be applied to a mobile environment and fills the gap between academic design and industrial requirements. Improve academic design into practical industrial solutions.
  • the mask generation function can be inserted into other white box encryption algorithms without changing its main logic. Different seeds can generate different masks, and the same block can be encrypted into different ciphertexts. Therefore, CPA security functions can be added. With the mask as a shielding layer protection to increase the difficulty of reverse engineering, encryption tasks can be safely run in ECB mode. Compared with other non-parallel modes, the efficiency of white box encryption in ECB mode is higher.
  • Seeds can be considered as dynamic initialization vectors, but they do not need to be as secret as IVs. Due to the different seeds and different masks, the same plaintext block can be encrypted into different ciphertext blocks, which protects the semantic security of multi-block encryption under CPA. Therefore, seeds help the spread of white-box encryption, and an attacker with seed knowledge will not gain additional advantages to obtain useful plaintext.
  • FIG. 7 is a flowchart of a method for reading a message according to Embodiment 4 of the present invention.
  • This embodiment provides a CPA-resistant white box decryption scheme.
  • MGF mask generation function
  • This method can be executed by a message reading device, which can be implemented by software and/or hardware, and can be configured in a computer device
  • a message reading device which can be implemented by software and/or hardware, and can be configured in a computer device
  • mobile terminals such as mobile phones, tablet computers, smart wearable devices (such as smart watches, smart glasses, etc.), etc.
  • personal computers servers, etc.
  • white box decryption can be implemented in the form of application built-in modules, plug-ins, etc.
  • white box decryption can be implemented in the form of SDK.
  • the user first selects a key, and then uses it to initialize white box decryption through the server. After initialization, the key will be generated in a non-plaintext format and stored in the cloud, and the application (client) should access the key through the cloud API.
  • the white box decryption implemented on the server eliminates the risk of reverse engineering on the local device, and the application (client) communicates with the server to complete the decryption operation (for example, retrieve the key).
  • the method includes the following steps:
  • the target message is the ciphertext of the original message encrypted by the white box encryption API using the seed (seed).
  • the target message and the seed are stored together in a storage space such as a database, and the target message, seed, and other storage space are stored in the storage space.
  • the mapping relationship between the original messages is the ciphertext of the original message encrypted by the white box encryption API using the seed (seed).
  • the application executes the degree of operation as required to read the original message.
  • the target message and seed can be found in the storage space through the mapping relationship, and the target message and seed are provided to the white box decryption API as input, waiting for decryption.
  • the seed is unique, not repeated, and can be at least one of numbers, character strings, and characters.
  • S702 Perform white box decryption on the target message to obtain a concealed message.
  • the white box decryption algorithm can be used to white box decrypt the target message and restore the concealed message.
  • the white box decryption algorithm of the white box decryption algorithm for the target message and the white box decryption algorithm for the target message White box encryption is paired with white box encryption algorithms.
  • S703 Generate a mask according to the seed.
  • MGF uses a seed as an input to generate a mask. There is a fixed transformation relationship between the seed and the mask. Since the seed is unique, the mask is also unique.
  • an external hash function can be used to generate the mask.
  • the length of the original message can be determined, the hash function is determined, and the seed is input into the hash function for calculation to generate a mask of that length.
  • the hash function includes a SHAKE function, such as SHAKE-128, SHAKE-256, and so on.
  • the SHAKE function can produce output of any desired length.
  • the hash function includes SHA functions, such as SHA-1, SHA-2, SHA-3.
  • multiple new seeds are generated on the basis of seeds, and all seeds are input into the SHA function to perform operations to output multiple summary information, combine multiple summary information, and obtain the first data set. Extract data of this length from a data set and use it as a mask.
  • the external function is not used, and the white-box encryption function is repeatedly used to generate the mask.
  • the length of the original message can be determined, and the seed can be white-box encrypted to generate a mask of that length.
  • multiple new seeds can be generated on the basis of seeds, and all seeds can be encrypted separately in white box to generate multiple ciphertexts, and combine multiple ciphertexts to obtain a second data set. Extract data of this length as a mask.
  • the above method of generating a mask is just an example.
  • other methods of generating a mask can be set according to the actual situation.
  • the hash function can be any standard secure one-way hash function, including but not limited to the SHAKE function. , SHA function, this embodiment does not impose restrictions on this.
  • other methods of generating a mask may also be adopted according to actual needs, and this embodiment does not impose a limitation on this.
  • the mask is applied to the concealed message, the concealed message is transformed, and its original content is restored to obtain the transformed plaintext (original message).
  • the method of using a mask in the white box decryption API to add a mask to the original message is paired with the method of using a mask in the white box decryption API to remove a mask from a masked message.
  • the masked message and the mask can be XORed to obtain the original message.
  • the above method of using the exclusive OR operation to restore the original message is just an example.
  • other methods of restoring the original message can be set according to the actual situation. For example, if the original message is used for interpolation and generation based on the original message.
  • the original message may be filled with specified data, such as PKCS#7, before being provided to the white box encryption API.
  • the previously filled data can be removed from the original message.
  • the original message is directly provided to the white box encryption API as input, and there is no need to remove the previously filled data from the original message, which is not limited in this embodiment.
  • the original message After the original message is parsed, the original message can be returned to the application to implement the read operation of the original message.
  • the decryption method is basically similar to the decryption method application of the second embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the description of the second embodiment, and this embodiment will not be described in detail here.
  • the target message and seed corresponding to the original message are determined, the target message is white-box decrypted, and the masked message is obtained.
  • the mask is generated according to the seed, and the mask is used to pair The masking message removes the masking to obtain the original message and send the original message to the application.
  • the mask generation function can be inserted into other white box decryption algorithms without changing its main logic. Different seeds can generate different masks, and the same block can be encrypted into different ciphertexts. Therefore, semantic security under CPA can be added Features. With the mask as a shielding layer protection to increase the difficulty of reverse engineering, encryption tasks can be safely run in ECB mode. Compared with other non-parallel modes, the efficiency of white box encryption in ECB mode is higher.
  • Seeds can be considered as dynamic initialization vectors, but they do not need to be as secret as IVs. Due to the different seeds and different masks, the same plaintext block can be encrypted into different ciphertext blocks, which protects the semantic security of multi-block encryption under CPA. Therefore, seeds help the spread of white-box encryption, and an attacker with seed knowledge will not gain additional advantages to obtain useful plaintext.
  • FIG. 8 is a schematic structural diagram of a message encryption device provided in Embodiment 5 of the present invention.
  • the device may include the following modules:
  • the original message determining module 801 is set to determine the original message; the seed generation module 802 is set to generate a seed; the mask generation module 803 is set to generate a mask according to the seed; the mask adding module 804 is set to use the mask Add a mask to the original message to generate a masked message; the white-box encryption module 805 is configured to perform white-box encryption on the masked message to obtain the target message; the ciphertext disclosure module 806 is configured to disclose the target message and the target message. ⁇ Seeds.
  • FIG. 9 is a schematic structural diagram of a message decryption device provided by Embodiment 6 of the present invention.
  • the device may include the following modules:
  • the ciphertext determination module 901 is set to determine the target message and the seed; the white box decryption module 902 is set to perform white box decryption on the target message to obtain the masked message; the mask generation module 903 is set to generate a mask according to the seed.
  • the mask removal module 904 is configured to use the mask to remove the mask from the masked message to obtain the original message.
  • FIG. 10 is a schematic structural diagram of a message writing apparatus provided by Embodiment 7 of the present invention.
  • the apparatus may include the following modules:
  • the seed generation module 1001 is set to generate a seed when the original message generated by the application is received; the mask generation module 1002 is set to generate a mask according to the seed; the mask adding module 1003 is set to use the mask for all The original message adds a mask to generate a masked message; the white box encryption module 1004 is configured to perform white box encryption on the masked message to obtain the target message; the ciphertext storage module 1005 is configured to store the target corresponding to the original message Message and the seed.
  • FIG. 11 is a schematic structural diagram of a message reading apparatus provided by Embodiment 8 of the present invention.
  • the apparatus may include the following modules:
  • the ciphertext determination module 1101 is configured to determine the target message and seed corresponding to the original message when the read operation of the original message by the application is received; the white box decryption module 1102 is configured to perform white box decryption on the target message, Obtain a masked message; a mask generation module 1103, configured to generate a mask according to the seed; a mask removal module 1104, configured to use the mask to remove masks from the masked message to obtain the original message; original message sending module 1005 , Set to send the original message to the application.
  • FIG. 12 is a schematic structural diagram of a computer device according to Embodiment 9 of the present invention. As shown in FIG. 12, the computer device includes a processor 1200, a memory 1201, a communication module 1202, an input device 1203, and an output device 1204.
  • the computer device includes a processor 1200, a memory 1201, a communication module 1202, an input device 1203, and an output device 1204.
  • the memory 1201 can be configured to store software programs, computer-executable programs, and modules, such as the module corresponding to the message encryption method in this embodiment (for example, the message encryption method shown in FIG. 8
  • Modules for example, the ciphertext determination module 901, the white box decryption module 902, the mask generation module 903, and the mask removal module 904 in the message decryption device shown in FIG.
  • Corresponding modules for example, the seed generation module 1001, mask generation module 1002, mask addition module 1003, white box encryption module 1004, and ciphertext storage module 1005 in the message writing device shown in FIG. 10
  • the module corresponding to the writing method of the message for example, the ciphertext determination module 1101 in the message writing device shown in FIG. 11, the white box decryption module 1102, the mask generation module 1103, the mask removal module 1104, and the original message sending Module 1105).
  • the processor 1200 runs the software programs, instructions, and modules stored in the memory 1201 to execute various functional applications and data processing of the computer equipment, that is, to implement the above-mentioned message encryption method, or message decryption method, or message writing Method, or reading method of the message.
  • the tenth embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored.
  • the above-mentioned message encryption method, message decryption method, message writing method, and message processing are implemented. At least one of the reading methods.

Landscapes

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

Abstract

本申请公开了一种消息的加解密和读写方法、装置、计算机设备和存储介质。该消息的加密方法包括:生成种子;根据所述种子生成掩码;使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;对所述遮掩消息进行白盒加密,获得目标消息;公开所述目标消息与所述种子。

Description

消息的加解密、读写方法、装置、计算机设备和存储介质
本申请要求在2019年12月09日提交中国专利局、申请号为201911250793.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本公开涉及安全技术领域,例如涉及一种消息的加解密、读写方法、装置、计算机设备和存储介质。
背景技术
计算机设备中的数据保护技术和密码学有着紧密的联系,在加壳、反调试、数据存储等方面,往往都需要通过加密将敏感数据隐藏起来,而隐藏起来的敏感数据,将面临黑盒、灰盒、白盒等攻击。
白盒是指攻击者已经完全控制了整个操作过程且对此完全可见,攻击者可以自如地观察动态密码运行过程,并且内部算法的详细内容完全可见,可随意更改。
举例而言,软件是在本地运行的,攻击者可以通过调试器运行程序,并观察软件运行的过程,所有涉及解密部分的代码也就一览无余了。
为了保证数据的安全性,已发布了一些白盒加密算法,如白盒高级加密标准(Advanced Encryption Standard,AES)加密,将白盒加密算法部署到在开放设备上执行的应用中时,开发人员可能使用语义上不安全或效率低下的模式来实现白盒加密算法。例如:
电子密码簿(Electronic Code Book,ECB)模式,ECB模式下的白盒加密算法将相同的块加密为相同的密文,容易暴露明文模式。
密码块链接(Cipher Block Chaining,CBC)模式,对于未经身份验证的加密存在错误传播问题。重新使用初始化向量(Initialization Vector,IV)将泄漏明文的第一个块的信息。生成,隐藏和记住客户端白盒加密算法的每个动态IV都是不切实际的。
计数器(Countter,CTR)模式,在流密码中利用白盒加密算法。重用IV将完全破坏安全性,白盒加密提供的保护将被绕过。
在实际应用环境中,白盒加密算法是对单个块进行加密,而消息一般含有多个块,整个消息在选择明文攻击(chosen-plaintext attack,CPA)下的语义是 具有风险的。
发明内容
本公开提供一种消息的加解密、读写方法、装置、计算机设备和存储介质,以解决对消息进行白盒加密,在CPA模式下具有风险的问题。
提供了一种消息的加密方法,包括:
生成种子;
根据所述种子生成掩码;
使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
对所述遮掩消息进行白盒加密,获得目标消息;
公开所述目标消息与所述种子。
还提供了一种消息的解密方法,包括:
确定目标消息和种子;
对所述目标消息进行白盒解密,获得遮掩消息;
根据所述种子生成掩码;
使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
还提供了一种消息的写方法,包括:
当接收到应用生成的原消息时,生成种子;
根据所述种子生成掩码;
使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
对所述遮掩消息进行白盒加密,获得目标消息;
对应所述原消息存储所述目标消息和所述种子。
还提供了一种消息的读方法,包括:
当接收到应用对原消息的读操作时,确定所述原消息对应的目标消息和种子;
对所述目标消息进行白盒解密,获得遮掩消息;
根据所述种子生成掩码;
使用所述掩码对所述遮掩消息去除遮掩,以获得原消息;
将所述原消息发送至所述应用。
还提供了一种消息的加密装置,包括:
原消息确定模块,设置为确定原消息;
种子生成模块,设置为生成种子;
掩码生成模块,设置为根据所述种子生成掩码;
遮掩添加模块,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
白盒加密模块,设置为对所述遮掩消息进行白盒加密,获得目标消息;
密文公开模块,设置为公开所述目标消息与所述种子。
还提供了一种消息的解密装置,包括:
密文确定模块,设置为确定目标消息和种子;
白盒解密模块,设置为对所述目标消息进行白盒解密,获得遮掩消息;
掩码生成模块,设置为根据所述种子生成掩码;
遮掩去除模块,设置为使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
还提供了一种消息的写装置,包括:
种子生成模块,设置为当接收到应用生成的原消息时,生成种子;
掩码生成模块,设置为根据所述种子生成掩码;
遮掩添加模块,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
白盒加密模块,设置为对所述遮掩消息进行白盒加密,获得目标消息;
密文存储模块,设置为对应所述原消息存储所述目标消息和所述种子。
还提供了一种消息的读装置,包括:
密文确定模块,设置为当接收到应用对原消息的读操作时,确定所述原消息对应的目标消息和种子;
白盒解密模块,设置为对所述目标消息进行白盒解密,获得遮掩消息;
掩码生成模块,设置为根据所述种子生成掩码;
遮掩去除模块,设置为使用所述掩码对所述遮掩消息去除遮掩,以获得原消息;
原消息发送模块,设置为将所述原消息发送至所述应用。
还提供了一种计算机设备,所述计算机设备包括:
一个或多个处理器;
存储器,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述的消息的加密方法、或者上述的消息的解密方法、或者上述的消息的写方法、或者上述的消息的读方法。
还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述的消息的加密方法、或者上述的消息的解密方法、或者上述的消息的写方法、或者上述的消息的读方法。
附图说明
图1为本发明实施例一提供的一种消息的加密方法的流程图;
图2为本发明实施例提供的一种白盒加密API的示意图;
图3A为本发明实施例提供的一种生成掩码的示例图;
图3B为本发明实施例提供的另一种生成掩码的示例图;
图4是本发明实施例二提供的一种消息的解密方法的流程图;
图5为本发明实施例提供的一种白盒解密API的示意图;
图6是本发明实施例三提供的一种消息的写方法的流程图;
图7是本发明实施例四提供的一种消息的读方法的流程图;
图8为本发明实施例五提供的一种消息的加密装置的结构示意图;
图9为本发明实施例六提供的一种消息的解密装置的结构示意图;
图10为本发明实施例七提供的一种消息的写装置的结构示意图;
图11为本发明实施例八提供的一种消息的读装置的结构示意图;
图12为本发明实施例九提供的一种计算机设备的结构示意图。
具体实施方式
下面结合附图和实施例对本公开作说明。
实施例一
图1为本发明实施例一提供的一种消息的加密方法的流程图,本实施例提 供了一种可抗CPA的白盒加密方案,通过添加掩码生成函数(mask generation function,MGF),对消息中不同的块生成不同的密文,MGF在白盒加密应用编程接口(Application Programming Interface,API)中与白盒加密算法合并,该方法可以由消息的加密装置来执行,该消息的加密装置可以由软件和/或硬件实现,可配置在计算机设备中,例如,移动终端(如手机、平板电脑、智能穿戴设备(如智能手表、智能眼镜等)等)、个人电脑、服务器等。
对于移动终端、个人电脑等本地设备,可以以应用内置模块、插件等形式实现白盒加密。
对于服务器等非本地设备,可以以软件开发套件(Software Development Kit,SDK)的形式实现白盒加密。用户首先选择一个密钥,然后使用它通过服务器初始化白盒加密。初始化完成后,密钥将以非明文格式生成并存储在云中,应用(客户端)应通过云API访问密钥。在服务器实现的白盒加密消除了在本地设备上进行逆向工程的风险,应用(客户端)与服务器通信以完成加密操作(例如,检索密钥)。
如图1所示,该方法包括如下步骤:
S101、确定原消息。
如图2所示,原消息(message)提供给白盒加密API作为输入,等待加密。
该原消息为明文(plaintext),可以包含一个或多个块。
针对不同的场景,原消息的形式有所不同,例如,在移动终端等本地设备,该原消息可以为密钥,即通过本实施例中白盒加密的方式进行密钥预埋,大大降低在本地设备上进行逆向工程的风险。
在原消息的长度不足的情况下,可在原消息中填充指定的数据,如公钥密码学标准#7(Public Key Cryptography Standards#7,PKCS#7),将填充之后的原消息提供给白盒加密API作为输入。
在原消息的长度足够的情况下,原消息也可以直接提供给白盒加密API作为输入,本实施例对此不加以限制。
S102、生成种子。
如图2所示,白盒加密API收到输入的原消息后,可以生成种子(seed),其中,该种子具有唯一性,不重复使用,可以为数字、字符串、字符中的至少一种,可以作为白盒加密API的输出公开。
种子的长度一般大于或等于128比特,例如为256比特。对于大于或等于128比特的种子,重复生成相同种子的概率极低,即完全相同的两段明文使用同 一个seed的概率极低趋近于0,可忽略不计。因此,可随机生成一数值,作为种子,该数值的长度大于或等于128比特,例如为256比特。随机生成数值的方式可以为伪随机数生成算法(Pseudo Random Number Generation,PRNG),C语言实现中的srand使用时间作为随机源,等等。
种子生成的过程中无需借助外接硬件设备,也并不需要要求种子达到真随机数生成(True Random Number Generation,TRNG)的级别,操作简单。
在本实施例中,通过对种子进行定制化的工作,使得攻击者只能被动地观察种子的值,而不能对其进行修改。
例如,种子生成功能被合并到白盒加密API中并与代码混淆一起应用,加大代码修改的难度。
S103、根据所述种子生成掩码。
如图2所示,MGF使用种子作为输入来产生掩码(mask),种子与掩码之间具有固定的变换关系,由于种子具有唯一性,因此,掩码也具有唯一性。
在一种情况中,可以使用外部的哈希函数生成掩码。
在此情况中,可确定原消息的长度,确定哈希函数(hash functions),将种子输入至哈希函数中进行运算,以生成该长度的掩码。
哈希函数又称散列函数,可以把任意长度的输入(又叫做预映射,pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,使得散列值的空间通常远小于输入的空间,即哈希函数为把任意长度的消息压缩到一固定长度的消息摘要的函数。
在一个示例中,哈希函数包括SHAKE函数,如SHAKE-128、SHAKE-256等。SHAKE函数可产生任何所需的长度的输出。
在本示例中,可将种子输入至SHAKE函数中进行运算,以输出该长度的掩码,该处理方式可表示为:
F(s,N)=D
其中,F()为SHAKE函数,s为种子,N为输出(D)的长度,N与原消息的长度L相等,D为掩码。
一般情况下,L和N的值至少为128位,以防止暴力攻击和彩虹表攻击,如果还考虑到哈希碰撞,则L的值应至少为256位。
在另一个示例中,哈希函数包括安全哈希算法(Secure Hash Algorithm,SHA)函数,如SHA-1、SHA-2、SHA-3。
SHA函数的思想是接收一段明文,以一种不可逆的方式将它转换成一段(通常更小)密文,也可以简单的理解为取一串输入码(称为预映射或信息),并把它们转化为长度较短、位数(160-512)固定的输出序列,即散列值(也称为信息摘要或信息认证代码)的过程。散列函数值可以说是对明文的一种“指纹”或是“摘要”,所以对散列值的数字签名就可以视为对此明文的数字签名。
SHAKE函数是在SHA-3系列中的可扩展输出哈希函数,在本示例中,SHA-3表示SHA3-224、SHA3-256、SHA3-384、SHA3-512,并不包含SHAKE函数。
在本示例中,在种子的基础上生成多个新的种子,将所有种子分别输入至SHA函数中进行运算,以输出多个摘要信息,组合多个摘要信息,获得第一数据集,从第一数据集中提取该长度的数据,作为掩码。
以SHA-1进行说明,如图3A所示,SHA-1产生160位摘要信息,如果原消息的长度为N位,则将生成总数(N/160+1)个摘要信息,若N=200,则生成(200/160+1)=2个摘要信息,若N=320,则生成(320/160+1)=3个摘要信息,等等。
每个SHA-1计算的输入是种子加上增量n,即seed,seed+1,seed+2,…,seed+n(n=0、1、2…),作为新的种子,分别使用seed,seed+1,seed+2,…,seed+n输入至SHA-1中,生成摘要信息,并按顺序将摘要信息串联在一起,得到第一数据集。
最后,删除第一数据集右端多于N位的数据,剩余的N位数据即为掩码。
在一种情况中,不使用外部的功能,而重复使用白盒加密功能生成掩码。
在此情况中,可确定原消息的长度,对种子进行白盒加密,以生成该长度的掩码。
在实现中,可在种子的基础上生成多个新的种子,将所有种子分别进行白盒加密,以生成多个密文,组合多个密文,获得第二数据集,从第二数据集中提取该长度的数据,作为掩码。
在一个示例中,如图3B所示,白盒加密(E_wb)产生128位密文,如果原消息的长度为N位,则将生成总数(N/128+1)个密文。
每个SHA-1计算的输入是种子加上增量n,即seed,seed+1,seed+2,…,seed+n(n=0、1、2…),作为新的种子,分别使用seed,seed+1,seed+2,…,seed+n输入至白盒加密(E_wb)函数中,生成密文,并按顺序将密文串联在一起,得到第二数据集。
最后,删除第二数据集右端多于N位的数据,剩余的N位数据即为掩码。
掩码的长度与原消息的长度保持相同,可以方便后续对原消息与掩码进行异或运算等操作,掩码的长度也可以大于明文,在原消息与掩码进行异或运算等操作时,截掉掩码中多余的部分数据(即多于原消息的部分数据)即可,本实施例对此不加以限制。
上述生成掩码的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成掩码的方式,哈希函数可以是任何标准的安全单向散列函数,包括但不限于SHAKE函数、SHA函数,本实施例对此不加以限制。另外,除了上述生成掩码的方式外,还可以根据实际需要采用其它生成掩码的方式,本实施例对此也不加以限制。
S104、使用所述掩码对所述原消息添加遮掩,以生成遮掩消息。
如图2所示,将掩码应用于明文(原消息)中,对原消息进行变换,遮掩其原本的内容,得到变换后的遮掩消息。
在一个示例中,在原消息的长度与掩码的长度相等的情况下,可以对原消息与掩码进行异或运算XOR,获得遮掩消息,表示如下:
Figure PCTCN2020120578-appb-000001
其中,m为原消息,D为掩码,m’为遮掩消息。
上述使用异或运算生成遮掩消息的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成遮掩消息的方式,例如,在原消息的基础上使用掩码进行插值,获得遮掩消息,或者,将原消息与掩码相同位的数据代入固定的函数式中进行运算,获得遮掩消息,等等,而在安全级别基本相同的情况下,异或运算的速度较快,可优先使用异或运算,本实施例对此不加以限制。另外,除了上述生成遮掩消息的方式外,还可以根据实际需要采用其它生成遮掩消息的方式,本实施例对此也不加以限制。
S105、对所述遮掩消息进行白盒加密,获得目标消息。
如图2所示,在ECB等模式下,可使用白盒加密算法对遮掩消息进行白盒加密,以生成密文,作为目标消息。
由于原消息(明文)具有一个或多个块,因此,目标消息(密文)也同样具有一个或多个块。
白盒加密属于对称加密,是指能够在白盒环境下抵御攻击的一种特殊的加密方法。
白盒加密的思想是混淆,混淆的作用是扰乱信息,是让信息以一种完全无法理解的形式存在,尽量让人无法理解中间的过程(也就是只能看到输入和输 出,但无法理解结果是如何得到的),但不影响信息本身发挥作用(一个加了密的程序,在源码未解密前是无法执行的,但是经过混淆的程序,可以正确执行)。
白盒加密将算法和密钥紧密捆绑在了一起,由算法和密钥生成一个加密表和一个解密表,然后可以独立用查找加密表来加密,用解密表解密,不再依赖于原来的加解密算法和密钥。
正是由于算法和密钥的合并,所有可以有效隐藏密钥,与此同时也混淆了加密逻辑。白盒加密的一种实现思路就是将算法完全用查表来替代,因为算法已知,加密的密钥已知。所以将算法和密钥固化成查表表示,这就是白盒密钥的实现过程。
在本实施例中,可以通过一些定制的工程工作在白盒加密中实现高级加密标准(Advanced Encryption Standard,AES),对称密钥信息存储在混淆的查找表中。
白盒加密算法查找表的生成遵循相同的方法和组件-组合的T-box和Ty表,以及XOR表。此外,白盒加密算法没有给出强制性的表结构。
因此,表格可使用本实施例定制的结构,并为每个表格添加额外的掩码,以增加逆向工程的难度。此外,内部/外部编码和混合双射也应用于所有查找表。
在实现中,使用一个大小为数百KB的二进制文件存储密钥的信息。在加密/解密过程中,白盒加密API将读取二进制文件以加载密钥。如果密钥改变,二进制文件很容易被替换。
S106、公开所述目标消息与所述种子。
如图2所示,在获得密文(即目标消息)与种子之后,则可以公开该目标消息与种子。
白盒解密属于对称解密,是指能够在白盒环境下抵御攻击的一种特殊的加密方法。
在本实施例中,确定原消息,生成种子,根据种子生成掩码,使用掩码对原消息添加遮掩,以生成遮掩消息,对遮掩消息进行白盒加密,获得目标消息,公开目标消息与种子,本实施例容纳其他白盒加密算法,并且,占用资源较少,运算速度较快,可应用于移动环境,填补了学术设计和工业需求之间的空白,将学术设计改进为实用的工业解决方案。
生成掩码的功能可插入其他白盒加密算法,而无需更改其主逻辑,不同的种子可以生成不同的掩码,针对相同的块可以加密为不同的密文,因此,可以 添加CPA下语义安全功能。有了掩码作为屏蔽层保护,以增加逆向工程的难度,加密任务可以安全地在ECB模式下运行,与其他非并行模式相比,ECB模式下的白盒加密的效率更高。
种子可以被视为动态初始化向量,但它们不需要像IV一样保密。由于种子不同,使得掩码不同,可将相同的明文块加密为不同的密文块,保护了多块加密在CPA下的语义安全。因此,种子有助于白盒加密的传播,具有种子知识的攻击者将不会获得额外优势来获取有用的明文。
在一个示例中,下表显示了3块明文,它已经通过CPA下语义不安全的白盒加密(第2行)和本实施例中CPA下语义安全的白盒加密(第3行)使用相同的AES-128对称密钥进行了加密。
表1 白盒加密结果
Figure PCTCN2020120578-appb-000002
第3行最后一个块为种子,128位种子附加在密文的末尾,用于恢复掩码值。
从上表可以看出,明文中块2和块3中的明文相同,被CPA下语义不安全的白盒加密算法加密为相同的密文,没有考虑CPA下的语义安全性。
本实施例中CPA下语义安全的白盒加密算法使用不同的种子生成不同的掩码对明文进行加密,加密为不同的密文,每个块中的密文具有独立值。
本实施例中CPA下语义安全的白盒加密(AES-128)在C++项目中实现并在移动环境上进行了测试。其中,混淆器-底层虚拟机(Obfuscator-Low Level Virtual Machine,OLLVM)也用于混淆源代码。测试的结果表明:
查找表需要大约350KB的额外存储空间。
单个加密操作平均花费2.9毫秒。
因此,如果表与应用集成,则这样的大小是可以接受的,在实际的移动环境中部署本实施例中CPA下语义安全的白盒加密算法是可以承受的,而负担得起的表格大小(数百KB)是遵循白盒加密算法的一个重要原因。
实施例二
图4为本发明实施例二提供的一种消息的解密方法的流程图,本实施例提供了一种可抗CPA的白盒解密方案,通过添加掩码生成函数MGF,对消息中不同的块生成不同的密文,MGF在白盒解密API中与白盒解密算法合并,该方法可以由消息的解密装置来执行,该消息的解密装置可以由软件和/或硬件实现,可配置在计算机设备中,例如,移动终端(如手机、平板电脑、智能穿戴设备(如智能手表、智能眼镜等)等)、个人电脑、服务器等。
对于移动终端、个人电脑等本地设备,可以以应用内置模块、插件等形式实现白盒解密。
对于服务器等非本地设备,可以以SDK的形式实现白盒解密。用户首先选择一个密钥,然后使用它通过服务器初始化白盒解密。初始化完成后,密钥将以非明文格式生成并存储在云中,应用(客户端)应通过云API访问密钥。在服务器实现的白盒解密消除了在本地设备上进行逆向工程的风险,应用(客户端)与服务器通信以完成解密操作(例如,检索密钥)。
如图4所示,该方法包括如下步骤:
S401、确定目标消息和种子。
如图5所示,目标消息为经过白盒加密API使用种子(seed)对原消息加密之后的密文,目标消息与种子一同公开,通过公开的渠道可获取目标消息与种子,并将目标消息与种子提供给白盒解密API作为输入,等待解密。
该种子具有唯一性,不重复使用,可以为数字、字符串、字符中的至少一种。
针对不同的场景,原消息的形式有所不同,例如,在移动终端等本地设备,该原消息可以为密钥,即通过本实施例中白盒解密的方式进行密钥预埋,大大降低在本地设备上进行逆向工程的风险。
S402、对所述目标消息进行白盒解密,获得遮掩消息。
如图5所示,在ECB等模式下,可使用白盒解密算法对目标消息进行白盒解密,还原遮掩消息,其中,对目标消息进行白盒解密算法的白盒解密算法与对目标消息进行白盒加密的白盒加密算法配对。
在本实施例中,可以通过一些定制的工程工作在白盒解密中实现AES。
S403、根据所述种子生成掩码。
如图5所示,MGF使用种子作为输入来产生掩码,种子与掩码之间具有固定的变换关系,由于种子具有唯一性,因此,掩码也具有唯一性。
在一种情况中,可以使用外部的哈希函数生成掩码。
在此情况中,可确定原消息的长度,确定哈希函数,将种子输入至哈希函数中进行运算,以生成该长度的掩码。
在一个示例中,哈希函数包括SHAKE函数,如SHAKE-128、SHAKE-256等。SHAKE函数可产生任何所需的长度的输出。
在本示例中,可将种子作为输入至SHAKE函数中进行运算,以输出该长度的掩码
在另一个示例中,哈希函数包括SHA函数,如SHA-1、SHA-2、SHA-3。
在本示例中,在种子的基础上生成多个新的种子,将所有种子分别输入至SHA函数中进行运算,以输出多个摘要信息,组合多个摘要信息,获得第一数据集,从第一数据集中提取该长度的数据,作为掩码。
在另一种情况中,不使用外部的功能,而重复使用白盒加密功能生成掩码。
在此情况中,可确定原消息的长度,对种子进行白盒加密,以生成该长度的掩码。
在实现中,可在种子的基础上生成多个新的种子,将所有种子分别进行白盒加密,以生成多个密文,组合多个密文,获得第二数据集,从第二数据集中提取该长度的数据,作为掩码。
上述生成掩码的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成掩码的方式,哈希函数可以是任何标准的安全单向散列函数,包括但不限于SHAKE函数、SHA函数,本实施例对此不加以限制。另外,除了上述生成掩码的方式外,还可以根据实际需要采用其它生成掩码的方式,本实施例对此也不加以限制。
在本实施例中,由于生成掩码的方式与实施例一生成掩码的方式应用基本相似,所以描述的比较简单,相关之处参见实施例一的部分说明即可,本实施例在此不加以详述。
S404、使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
如图5所示,将掩码应用于遮掩消息中,对遮掩消息进行变换,还原其原 本的内容,得到变换后的明文(原消息)。
白盒解密API中使用掩码对所述原消息添加遮掩的方式与白盒解密API中使用掩码对遮掩消息去除遮掩的方式配对。
在一个示例中,若在先对原消息与掩码进行异或运算、生成遮掩消息,则可以对遮掩消息与掩码进行异或运算,获得原消息,表示如下:
Figure PCTCN2020120578-appb-000003
其中,m为原消息,D为掩码,m’为遮掩消息
上述使用异或运算还原原消息的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他还原原消息的方式,例如,若在先在原消息的基础上使用掩码进行插值、生成遮掩消息,则可以在遮掩消息中去除插值(掩码)、生成原消息,或者,若在先将原消息与掩码相同位的数据代入固定的函数式中进行运算、生成遮掩消息,则可以将遮掩消息与掩码相同位的数据代入该函数式中进行逆运算、生成原消息,等等,而在安全级别基本相同的情况下,异或运算的速度较快,可优先使用异或运算,本实施例对此不加以限制。另外,除了上述还原原消息的方式外,还可以根据实际需要采用其它还原原消息的方式,本实施例对此也不加以限制。
在原消息的长度不足的情况下,在提供给白盒加密API之前,可能在原消息中填充指定的数据,如PKCS#7,可从原消息中去除在先填充的数据。
在原消息的长度足够的情况下,原消息直接提供给白盒加密API作为输入,无需从原消息中去除在先填充的数据,本实施例对此不加以限制。
在本实施例中,确定目标消息和种子,对目标消息进行白盒解密,获得遮掩消息,根据种子生成掩码,使用掩码对所述遮掩消息去除遮掩,获得原消息,本实施例容纳其他白盒解密算法,并且,占用资源较少,运算速度较快,可应用于移动环境,填补了学术设计和工业需求之间的空白,将学术设计改进为实用的工业解决方案。
生成掩码的功能可插入其他白盒解密算法,而无需更改其主逻辑,不同的种子可以生成不同的掩码,针对相同的块可以加密为不同的密文,因此,可以添加CPA下语义安全功能。有了掩码作为屏蔽层保护,以增加逆向工程的难度,解密任务可以安全地在ECB模式下运行,与其他非并行模式相比,ECB模式下的白盒解密的效率更高。
种子可以被视为动态初始化向量,但它们不需要像IV一样保密。由于种子不同,使得掩码不同,可将相同的明文块加密为不同的密文块,保护了多块加密在CPA下的语义安全。因此,种子有助于白盒解密的传播,具有种子知识的 攻击者将不会获得额外优势来获取有用的明文。
实施例三
图6为本发明实施例三提供的一种消息的写方法的流程图,本实施例提供了一种可抗CPA的白盒加密方案,通过添加掩码生成函数MGF,对消息中不同的块生成不同的密文进行存储,MGF在白盒加密API(Application Programming Interface,应用编程接口)中与白盒加密算法合并,该方法可以由消息的写装置来执行,该消息的写装置可以由软件和/或硬件实现,可配置在计算机设备中,例如,移动终端(如手机、平板电脑、智能穿戴设备(如智能手表、智能眼镜等)等)、个人电脑、服务器等。
对于移动终端、个人电脑等本地设备,可以以应用内置模块、插件等形式实现白盒加密。
对于服务器等非本地设备,可以以SDK(Software Development Kit,软件开发套件)的形式实现白盒加密。用户首先选择一个密钥,然后使用它通过服务器初始化白盒加密。初始化完成后,密钥将以非明文格式生成并存储在云中,应用(客户端)应通过云API访问密钥。在服务器实现的白盒加密消除了在本地设备上进行逆向工程的风险,应用(客户端)与服务器通信以完成加密操作(例如,检索密钥)。
如图6所示,该方法包括如下步骤:
S601、当接收到应用生成的原消息时,生成种子。
在实现中,应用可以包括浏览器、电子邮箱、记事本、通讯录等,该应用在运行的过程中会产生不同安全级别的数据。
如图2所示,部分安全级别较高的数据可以作为原消息(message),提供给白盒加密API作为输入,等待加密。
该原消息为明文(plaintext),可以包含一个或多个块。
针对不同的场景,原消息的形式有所不同,例如,在移动终端等本地设备,该原消息可以为密钥,即通过本实施例中白盒加密的方式进行密钥预埋,大大降低在本地设备上进行逆向工程的风险。
又例如,对于在移动终端中的通讯录,其可产生联系人信息等数据,如名称、手机号码、头像等,。一般情况下,用户解锁移动终端之后可浏览该联系人信息,其他应用在授权的情况下可读取联系人信息,对于部分较为隐私的联系人信息,用户可以请求通讯录对该联系人信息进行加密,提高其安全性,用 户解锁移动终端之后不可直接浏览该联系人信息,其他应用不可读取该联系人信息,在解密联系人信息之后可浏览该联系人信息。
如图2所示,白盒加密API收到输入的原消息后,可以生成种子(seed),其中,该种子具有唯一性,不重复使用,可以为数字、字符串、字符中的至少一种,可以作为白盒加密API的输出公开。
S602、根据所述种子生成掩码。
如图2所示,MGF使用种子作为输入来产生掩码(mask),种子与掩码之间具有固定的变换关系,由于种子具有唯一性,因此,掩码也具有唯一性。
在一种情况中,可以使用外部的哈希函数生成掩码。
在此情况中,可确定原消息的长度,确定哈希函数(hash functions),将种子输入至哈希函数中进行运算,以生成该长度的掩码。
在一个示例中,哈希函数包括SHAKE函数,如SHAKE-128、SHAKE-256等。SHAKE函数可产生任何所需的长度的输出。
在另一个示例中,哈希函数包括SHA函数,如SHA-1、SHA-2、SHA-3。
在本示例中,在种子的基础上生成多个新的种子,将所有种子分别输入至SHA函数中进行运算,以输出多个摘要信息,组合多个摘要信息,获得第一数据集,从第一数据集中提取该长度的数据,作为掩码。
在另一种情况中,不使用外部的功能,而重复使用白盒加密功能生成掩码。
在此情况中,可确定原消息的长度,对种子进行白盒加密,以生成该长度的掩码。
在实现中,可在种子的基础上生成多个新的种子,将所有种子分别进行白盒加密,以生成多个密文,组合多个密文,获得第二数据集,从第二数据集中提取该长度的数据,作为掩码。
上述生成掩码的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成掩码的方式,哈希函数可以是任何标准的安全单向散列函数,包括但不限于SHAKE函数、SHA函数,本实施例对此不加以限制。另外,除了上述生成掩码的方式外,还可以根据实际需要采用其它生成掩码的方式,本实施例对此也不加以限制。
S603、使用所述掩码对所述原消息添加遮掩,以生成遮掩消息。
如图2所示,将掩码应用于明文(原消息)中,对原消息进行变换,遮掩其原本的内容,得到变换后的遮掩消息。
在一个示例中,在原消息的长度与掩码的长度相等的情况下,可以对原消息与掩码进行异或运算XOR,获得遮掩消息。
上述使用异或运算生成遮掩消息的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成遮掩消息的方式,例如,在原消息的基础上使用掩码进行插值,获得遮掩消息,或者,将原消息与掩码相同位的数据代入固定的函数式中进行运算,获得遮掩消息,等等,而在安全级别基本相同的情况下,异或运算的速度较快,可优先使用异或运算,本实施例对此不加以限制。另外,除了上述生成遮掩消息的方式外,还可以根据实际需要采用其它生成遮掩消息的方式,本实施例对此也不加以限制。
S604、对所述遮掩消息进行白盒加密,获得目标消息。
如图2所示,在ECB等模式下,可使用白盒加密算法对遮掩消息进行白盒加密,以生成密文,作为目标消息。
由于原消息(明文)具有一个或多个块,因此,目标消息(密文)也同样具有一个或多个块。
S605、对应所述原消息存储所述目标消息和所述种子。
如图2所示,在获得密文(即目标消息)与种子之后,则可以将目标消息与种子一同存储在数据库等存储空间,并在数据库等存储空间中建立目标消息、种子与原消息之间的映射关系。
在本实施例中,由于加密的方式与实施例一加密的方式应用基本相似,所以描述的比较简单,相关之处参见实施例一的部分说明即可,本实施例在此不加以详述。
在本实施例中,当接收到应用生成的原消息时,生成种子,根据种子生成掩码,使用掩码对原消息添加遮掩,以生成遮掩消息,对遮掩消息进行白盒加密,获得目标消息,对原消息存储目标消息和种子,本实施例容纳其他白盒加密算法,并且,占用资源较少,运算速度较快,可应用于移动环境,填补了学术设计和工业需求之间的空白,将学术设计改进为实用的工业解决方案。
生成掩码的功能可插入其他白盒加密算法,而无需更改其主逻辑,不同的种子可以生成不同的掩码,针对相同的块可以加密为不同的密文,因此,可以添加CPA安全功能。有了掩码作为屏蔽层保护,以增加逆向工程的难度,加密任务可以安全地在ECB模式下运行,与其他非并行模式相比,ECB模式下的白盒加密的效率更高。
种子可以被视为动态初始化向量,但它们不需要像IV一样保密。由于种子不同,使得掩码不同,可将相同的明文块加密为不同的密文块,保护了多块加 密在CPA下的语义安全。因此,种子有助于白盒加密的传播,具有种子知识的攻击者将不会获得额外优势来获取有用的明文。
实施例四
图7为本发明实施例四提供的一种消息的读方法的流程图,本实施例提供了一种可抗CPA的白盒解密方案,通过添加掩码生成函数MGF,对消息中不同的块生成不同的密文,MGF在白盒解密API中与白盒解密算法合并,该方法可以由消息的读装置来执行,该消息的读装置可以由软件和/或硬件实现,可配置在计算机设备中,例如,移动终端(如手机、平板电脑、智能穿戴设备(如智能手表、智能眼镜等)等)、个人电脑、服务器等。
对于移动终端、个人电脑等本地设备,可以以应用内置模块、插件等形式实现白盒解密。
对于服务器等非本地设备,可以以SDK的形式实现白盒解密。用户首先选择一个密钥,然后使用它通过服务器初始化白盒解密。初始化完成后,密钥将以非明文格式生成并存储在云中,应用(客户端)应通过云API访问密钥。在服务器实现的白盒解密消除了在本地设备上进行逆向工程的风险,应用(客户端)与服务器通信以完成解密操作(例如,检索密钥)。
如图7所示,该方法包括如下步骤:
S701、当接收到应用对原消息的读操作时,确定所述原消息对应的目标消息和种子。
如图5所示,目标消息为经过白盒加密API使用种子(seed)对原消息加密之后的密文,目标消息与种子一同存储在数据库等存储空间,在存储空间中存储目标消息、种子与原消息之间的映射关系。
应用在运行过程中,按照需求执行度操作,以读取原消息,可在存储空间通过该映射关系查找目标消息与种子,并将目标消息与种提供给白盒解密API作为输入,等待解密。
该种子具有唯一性,不重复使用,可以为数字、字符串、字符中的至少一种。
S702、对所述目标消息进行白盒解密,获得遮掩消息。
如图5所示,在ECB等模式下,可使用白盒解密算法对目标消息进行白盒解密,还原遮掩消息,其中,对目标消息进行白盒解密算法的白盒解密算法与对目标消息进行白盒加密的白盒加密算法配对。
S703、根据所述种子生成掩码。
如图5所示,MGF使用种子作为输入来产生掩码,种子与掩码之间具有固定的变换关系,由于种子具有唯一性,因此,掩码也具有唯一性。
在一种情况中,可以使用外部的哈希函数生成掩码。
在此情况中,可确定原消息的长度,确定哈希函数,将种子输入至哈希函数中进行运算,以生成该长度的掩码。
在一个示例中,哈希函数包括SHAKE函数,如SHAKE-128、SHAKE-256等。SHAKE函数可产生任何所需的长度的输出。
在另一个示例中,哈希函数包括SHA函数,如SHA-1、SHA-2、SHA-3。
在本示例中,在种子的基础上生成多个新的种子,将所有种子分别输入至SHA函数中进行运算,以输出多个摘要信息,组合多个摘要信息,获得第一数据集,从第一数据集中提取该长度的数据,作为掩码。
在另一种情况中,不使用外部的功能,而重复使用白盒加密功能生成掩码。
在此情况中,可确定原消息的长度,对种子进行白盒加密,以生成该长度的掩码。
在实现中,可在种子的基础上生成多个新的种子,将所有种子分别进行白盒加密,以生成多个密文,组合多个密文,获得第二数据集,从第二数据集中提取该长度的数据,作为掩码。
上述生成掩码的方式只是作为示例,在实施本实施例时,可以根据实际情况设置其他生成掩码的方式,哈希函数可以是任何标准的安全单向散列函数,包括但不限于SHAKE函数、SHA函数,本实施例对此不加以限制。另外,除了上述生成掩码的方式外,还可以根据实际需要采用其它生成掩码的方式,本实施例对此也不加以限制。
S704、使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
如图5所示,将掩码应用于遮掩消息中,对遮掩消息进行变换,还原其原本的内容,得到变换后的明文(原消息)。
白盒解密API中使用掩码对所述原消息添加遮掩的方式与白盒解密API中使用掩码对遮掩消息去除遮掩的方式配对。
在一个示例中,若在先对原消息与掩码进行异或运算、生成遮掩消息,则可以对遮掩消息与掩码进行异或运算,获得原消息。
上述使用异或运算还原原消息的方式只是作为示例,在实施本实施例时, 可以根据实际情况设置其他还原原消息的方式,例如,若在先在原消息的基础上使用掩码进行插值、生成遮掩消息,则可以在遮掩消息中去除插值(掩码)、生成原消息,或者,若在先将原消息与掩码相同位的数据代入固定的函数式中进行运算、生成遮掩消息,则可以将遮掩消息与掩码相同位的数据代入该函数式中进行逆运算、生成原消息,等等,而在安全级别基本相同的情况下,异或运算的速度较快,可优先使用异或运算,本实施例对此不加以限制。另外,除了上述还原原消息的方式外,还可以根据实际需要采用其它还原原消息的方式,本实施例对此也不加以限制。
在原消息的长度不足的情况下,在提供给白盒加密API之前,可能在原消息中填充指定的数据,如PKCS#7,可从原消息中去除在先填充的数据。
在原消息的长度足够的情况下,原消息直接提供给白盒加密API作为输入,无需从原消息中去除在先填充的数据,本实施例对此不加以限制。
S705、将所述原消息发送至所述应用。
在解析得到原消息之后,则可以将该原消息返回给应用,实现原消息的读操作。
在本实施例中,由于解密的方式与实施例二解密的方式应用基本相似,所以描述的比较简单,相关之处参见实施例二的部分说明即可,本实施例在此不加以详述。
在本实施例中,当接收到应用对原消息的读操作时,确定原消息对应的目标消息和种子,对目标消息进行白盒解密,获得遮掩消息,根据种子生成掩码,使用掩码对遮掩消息去除遮掩,以获得原消息,将原消息发送至应用,本实施例容纳其他白盒解密算法,并且,占用资源较少,运算速度较快,可应用于移动环境,填补了学术设计和工业需求之间的空白,将学术设计改进为实用的工业解决方案。
生成掩码的功能可插入其他白盒解密算法,而无需更改其主逻辑,不同的种子可以生成不同的掩码,针对相同的块可以加密为不同的密文,因此,可以添加CPA下语义安全功能。有了掩码作为屏蔽层保护,以增加逆向工程的难度,加密任务可以安全地在ECB模式下运行,与其他非并行模式相比,ECB模式下的白盒加密的效率更高。
种子可以被视为动态初始化向量,但它们不需要像IV一样保密。由于种子不同,使得掩码不同,可将相同的明文块加密为不同的密文块,保护了多块加密在CPA下的语义安全。因此,种子有助于白盒加密的传播,具有种子知识的攻击者将不会获得额外优势来获取有用的明文。
实施例五
图8为本发明实施例五提供的一种消息的加密装置的结构示意图,该装置可以包括如下模块:
原消息确定模块801,设置为确定原消息;种子生成模块802,设置为生成种子;掩码生成模块803,设置为根据所述种子生成掩码;遮掩添加模块804,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;白盒加密模块805,设置为对所述遮掩消息进行白盒加密,获得目标消息;密文公开模块806,设置为公开所述目标消息与所述种子。
实施例六
图9为本发明实施例六提供的一种消息的解密装置的结构示意图,该装置可以包括如下模块:
密文确定模块901,设置为确定目标消息和种子;白盒解密模块902,设置为对所述目标消息进行白盒解密,获得遮掩消息;掩码生成模块903,设置为根据所述种子生成掩码;遮掩去除模块904,设置为使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
实施例七
图10为本发明实施例七提供的一种消息的写装置的结构示意图,该装置可以包括如下模块:
种子生成模块1001,设置为当接收到应用生成的原消息时,生成种子;掩码生成模块1002,设置为根据所述种子生成掩码;遮掩添加模块1003,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;白盒加密模块1004,设置为对所述遮掩消息进行白盒加密,获得目标消息;密文存储模块1005,设置为对应所述原消息存储所述目标消息和所述种子。
实施例八
图11为本发明实施例八提供的一种消息的读装置的结构示意图,该装置可以包括如下模块:
密文确定模块1101,设置为当接收到应用对原消息的读操作时,确定所述 原消息对应的目标消息和种子;白盒解密模块1102,设置为对所述目标消息进行白盒解密,获得遮掩消息;掩码生成模块1103,设置为根据所述种子生成掩码;遮掩去除模块1104,设置为使用所述掩码对所述遮掩消息去除遮掩,以获得原消息;原消息发送模块1005,设置为将所述原消息发送至所述应用。
实施例九
图12为本发明实施例九提供的一种计算机设备的结构示意图。如图12所示,该计算机设备包括处理器1200、存储器1201、通信模块1202、输入装置1203和输出装置1204。
存储器1201作为一种计算机可读存储介质,可设置为存储软件程序、计算机可执行程序以及模块,如本实施例中的消息的加密方法对应的模块(例如,如图8所示的消息的加密装置中的原消息确定模块801、种子生成模块802、掩码生成模块803、遮掩添加模块804、白盒加密模块805和密文公开模块806)、或者本实施例中的消息的解密方法对应的模块(例如,如图9所示的消息的解密装置中的密文确定模块901、白盒解密模块902、掩码生成模块903和遮掩去除模块904)、或者本实施例中的消息的写方法对应的模块(例如,如图10所示的消息的写装置中的种子生成模块1001掩码生成模块1002、遮掩添加模块1003、白盒加密模块1004和密文存储模块1005)、或者本实施例中的消息的写方法对应的模块(例如,如图11所示的消息的写装置中的密文确定模块1101、白盒解密模块1102、掩码生成模块1103、遮掩去除模块1104和原消息发送模块1105)。处理器1200通过运行存储在存储器1201中的软件程序、指令以及模块,从而执行计算机设备的多种功能应用以及数据处理,即实现上述的消息的加密方法、或者消息的解密方法、或者消息的写方法、或者消息的读方法。
实施例十
本发明实施例十还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器质性时实现上述消息的加密方法、消息的解密方法、消息的写方法和消息的读方法中的至少一者。

Claims (19)

  1. 一种消息的加密方法,包括:
    生成种子;
    根据所述种子生成掩码;
    使用所述掩码对原消息添加遮掩,以生成遮掩消息;
    对所述遮掩消息进行白盒加密,获得目标消息;
    公开所述目标消息与所述种子。
  2. 根据权利要求1所述的方法,在所述生成种子之前,还包括:
    确定所述原消息;
    在所述原消息的长度不足的情况下,在所述原消息中填充指定的数据,以对填充数据后的原消息加密。
  3. 根据权利要求1所述的方法,其中,所述生成种子,包括:
    随机生成一数值,作为所述种子。
  4. 根据权利要求1所述的方法,其中,所述根据所述种子生成掩码,包括:
    确定所述原消息的长度;
    确定哈希函数;
    将所述种子输入至所述哈希函数中进行运算,以生成所述原消息的长度的掩码。
  5. 根据权利要求4所述的方法,其中,所述哈希函数包括SHAKE函数或者安全哈希算法SHA函数;
    所述将所述种子输入至所述哈希函数中进行运算,以生成所述原消息的长度的掩码,包括:
    将所述种子输入至所述SHAKE函数中进行运算,以输出所述原消息的长度的掩码;或者,
    在所述种子的基础上生成多个新的种子;将所有种子分别输入至所述SHA函数中进行运算,以输出多个摘要信息;组合所述多个摘要信息,获得第一数据集;从所述第一数据集中提取所述原消息的长度的数据,作为所述掩码。
  6. 根据权利要求1所述的方法,其中,所述根据所述种子生成掩码,包括:
    确定所述原消息的长度;
    对所述种子进行白盒加密,以生成所述原消息的长度的掩码。
  7. 根据权利要求6所述的方法,其中,所述对所述种子进行所述白盒加密,以生成所述原消息的长度的掩码,包括:
    在所述种子的基础上生成多个新的种子;
    将所有种子分别进行白盒加密,以生成多个密文;
    组合所述多个密文,获得第二数据集;
    从所述第二数据集中提取所述原消息的长度的数据,作为所述掩码。
  8. 根据权利要求1-7中任一项所述的方法,其中,所述使用所述掩码对所述原消息添加遮掩,以生成遮掩消息,包括:
    对所述原消息与所述掩码进行异或运算,获得所述遮掩消息。
  9. 一种消息的解密方法,包括:
    确定目标消息和种子;
    对所述目标消息进行白盒解密,获得遮掩消息;
    根据所述种子生成掩码;
    使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
  10. 根据权利要求9所述的方法,其中,所述使用所述掩码对所述遮掩消息去除遮掩,获得原消息,包括:
    对所述遮掩消息与所述掩码进行异或运算,获得所述原消息。
  11. 根据权利要求8所述的方法,还包括:
    从所述原消息中去除在先填充的数据。
  12. 一种消息的写方法,包括:
    在接收到应用生成的原消息的情况下,生成种子;
    根据所述种子生成掩码;
    使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
    对所述遮掩消息进行白盒加密,获得目标消息;
    对应所述原消息存储所述目标消息和所述种子。
  13. 一种消息的读方法,包括:
    在接收到应用对原消息的读操作的情况下,确定所述原消息对应的目标消息和种子;
    对所述目标消息进行白盒解密,获得遮掩消息;
    根据所述种子生成掩码;
    使用所述掩码对遮掩消息去除遮掩,以获得所述原消息;
    将所述原消息发送至所述应用。
  14. 一种消息的加密装置,包括:
    种子生成模块,设置为生成种子;
    掩码生成模块,设置为根据所述种子生成掩码;
    遮掩添加模块,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
    白盒加密模块,设置为对所述遮掩消息进行白盒加密,获得目标消息;
    密文公开模块,设置为公开所述目标消息与所述种子。
  15. 一种消息的解密装置,包括:
    密文确定模块,设置为确定目标消息和种子;
    白盒解密模块,设置为对所述目标消息进行白盒解密,获得遮掩消息;
    掩码生成模块,设置为根据所述种子生成掩码;
    遮掩去除模块,设置为使用所述掩码对所述遮掩消息去除遮掩,获得原消息。
  16. 一种消息的写装置,包括:
    种子生成模块,设置为在接收到应用生成的原消息的情况下,生成种子;
    掩码生成模块,设置为根据所述种子生成掩码;
    遮掩添加模块,设置为使用所述掩码对所述原消息添加遮掩,以生成遮掩消息;
    白盒加密模块,设置为对所述遮掩消息进行白盒加密,获得目标消息;
    密文存储模块,设置为对应所述原消息存储所述目标消息和所述种子。
  17. 一种消息的读装置,包括:
    密文确定模块,设置为在接收到应用对原消息的读操作的情况下,确定所述原消息对应的目标消息和种子;
    白盒解密模块,设置为对所述目标消息进行白盒解密,获得遮掩消息;
    掩码生成模块,设置为根据所述种子生成掩码;
    遮掩去除模块,设置为使用所述掩码对所述遮掩消息去除遮掩,以获得所 述原消息;
    原消息发送模块,设置为将所述原消息发送至所述应用。
  18. 一种计算机设备,包括:
    至少一个处理器;
    存储器,设置为存储至少一个程序;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-8中任一项所述的消息的加密方法、或者如权利要求9-11中任一项所述的消息的解密方法、或者如权利要求12所述的消息的写方法、或者如权利要求13所述的消息的读方法。
  19. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-8中任一项所述的消息的加密方法、或者如权利要求9-11中任一项所述的消息的解密方法、或者如权利要求12所述的消息的写方法、或者如权利要求13所述的消息的读方法。
PCT/CN2020/120578 2019-12-09 2020-10-13 消息的加解密、读写方法、装置、计算机设备和存储介质 WO2021114850A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20899533.2A EP4075716A4 (en) 2019-12-09 2020-10-13 METHOD AND DEVICE FOR ENCRYPTION AND DECRYPTION AND FOR READING AND WRITING MESSAGES, COMPUTER DEVICE AND STORAGE MEDIA
US17/782,939 US20230027142A1 (en) 2019-12-09 2020-10-13 Method and apparatus for encrypting and decrypting and reading and writing messages, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911250793.1 2019-12-09
CN201911250793.1A CN111010266B (zh) 2019-12-09 2019-12-09 消息的加解密、读写方法、装置、计算机设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021114850A1 true WO2021114850A1 (zh) 2021-06-17

Family

ID=70115135

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/120578 WO2021114850A1 (zh) 2019-12-09 2020-10-13 消息的加解密、读写方法、装置、计算机设备和存储介质

Country Status (4)

Country Link
US (1) US20230027142A1 (zh)
EP (1) EP4075716A4 (zh)
CN (1) CN111010266B (zh)
WO (1) WO2021114850A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010266B (zh) * 2019-12-09 2023-04-07 广州市百果园信息技术有限公司 消息的加解密、读写方法、装置、计算机设备和存储介质
CN112469036B (zh) * 2020-10-23 2023-10-20 百果园技术(新加坡)有限公司 一种消息加解密方法、装置、移动终端和存储介质
KR20220122009A (ko) * 2021-02-26 2022-09-02 삼성전자주식회사 시스템 온 칩 및 그 동작 방법
CN113507448B (zh) * 2021-06-17 2022-05-17 中国汽车技术研究中心有限公司 安全访问服务认证方法和系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120179920A1 (en) * 2011-01-10 2012-07-12 Apple Inc. Securing cryptographic process keys using internal structures
US20160080143A1 (en) * 2014-09-16 2016-03-17 Apple Inc. Multi-Block Cryptographic Operation
CN106059752A (zh) * 2016-07-04 2016-10-26 中国科学院信息工程研究所 一种基于扩张密文的白盒密码加解密方法
CN106663387A (zh) * 2014-09-18 2017-05-10 华为国际有限公司 加密函数和解密函数生成方法、加密和解密方法以及相关装置
CN108369784A (zh) * 2015-12-08 2018-08-03 捷德移动安全有限责任公司 具有密钥相关掩码计算步骤(sbox调用)的加密算法
CN109478995A (zh) * 2016-07-12 2019-03-15 捷德移动安全有限责任公司 白盒加密算法实现
CN111010266A (zh) * 2019-12-09 2020-04-14 广州市百果园信息技术有限公司 消息的加解密、读写方法、装置、计算机设备和存储介质

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101088246A (zh) * 2004-12-14 2007-12-12 皇家飞利浦电子股份有限公司 用于传送消息的系统、终端、方法、和软件
WO2006119637A1 (en) * 2005-05-13 2006-11-16 Cryptomill Cryptographic control for mobile storage means
US8209549B1 (en) * 2006-10-19 2012-06-26 United Services Automobile Association (Usaa) Systems and methods for cryptographic masking of private data
KR20110005090A (ko) * 2009-07-09 2011-01-17 삼성전자주식회사 액정표시장치, 액정구동장치 및 액정표시장치 구동방법
US8503456B2 (en) * 2009-07-14 2013-08-06 Broadcom Corporation Flow based path selection randomization
KR101026439B1 (ko) * 2009-07-20 2011-04-07 한국전자통신연구원 Seed 암호화에서 차분 전력 분석 공격을 방어하기 위한 마스킹 방법
KR101462742B1 (ko) * 2009-10-14 2014-11-17 차오로직스, 아이엔씨. 가변 회로 토폴로지를 가지는 고활용도 범용 로직 어레이 및 상수 전력 특징을 가지는 다양한 로직 게이트를 실현하기 위한 로지스틱 맵 회로
FR2985624B1 (fr) * 2012-01-11 2014-11-21 Inside Secure Procede de chiffrement protege contre des attaques par canaux auxiliaires
US9648444B2 (en) * 2014-01-06 2017-05-09 Brian G. Agee Physically secure digital signal processing for wireless M2M networks
US10812955B2 (en) * 2013-01-05 2020-10-20 Brian G Agee Generation of signals with unpredictable transmission properties for wireless M2M networks
DE102014016548A1 (de) * 2014-11-10 2016-05-12 Giesecke & Devrient Gmbh Verfahren zum Testen und zum Härten von Softwareapplikationen
AU2018100581A4 (en) * 2015-10-06 2018-06-07 Business And Personal Solutions Group Pty Ltd Electronic document certification
US10608813B1 (en) * 2017-01-09 2020-03-31 Amazon Technologies, Inc. Layered encryption for long-lived data
CN108964870B (zh) * 2018-07-05 2020-04-28 西南交通大学 基于自同步混沌密码的铁路应答器报文安全增强方法
US11032271B2 (en) * 2019-02-01 2021-06-08 Rsa Security Llc Authentication based on shared secret seed updates for one-time passcode generation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120179920A1 (en) * 2011-01-10 2012-07-12 Apple Inc. Securing cryptographic process keys using internal structures
US20160080143A1 (en) * 2014-09-16 2016-03-17 Apple Inc. Multi-Block Cryptographic Operation
CN106663387A (zh) * 2014-09-18 2017-05-10 华为国际有限公司 加密函数和解密函数生成方法、加密和解密方法以及相关装置
CN108369784A (zh) * 2015-12-08 2018-08-03 捷德移动安全有限责任公司 具有密钥相关掩码计算步骤(sbox调用)的加密算法
CN106059752A (zh) * 2016-07-04 2016-10-26 中国科学院信息工程研究所 一种基于扩张密文的白盒密码加解密方法
CN109478995A (zh) * 2016-07-12 2019-03-15 捷德移动安全有限责任公司 白盒加密算法实现
CN111010266A (zh) * 2019-12-09 2020-04-14 广州市百果园信息技术有限公司 消息的加解密、读写方法、装置、计算机设备和存储介质

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP4075716A1 (en) 2022-10-19
CN111010266B (zh) 2023-04-07
US20230027142A1 (en) 2023-01-26
EP4075716A4 (en) 2023-01-25
CN111010266A (zh) 2020-04-14

Similar Documents

Publication Publication Date Title
US10903994B2 (en) Many-to-many symmetric cryptographic system and method
US11233659B2 (en) Method of RSA signature or decryption protected using a homomorphic encryption
WO2021114850A1 (zh) 消息的加解密、读写方法、装置、计算机设备和存储介质
US8300828B2 (en) System and method for a derivation function for key per page
WO2000031917A1 (en) Data encrypting and decrypting apparatus and methods
US20160028540A1 (en) Multiple encrypting method and system for encrypting a file and/or a protocol
Banerjee et al. Cloak: A stream cipher based encryption protocol for mobile cloud computing
CN113711564A (zh) 用于加密数据的计算机实现的方法和系统
CA3056814A1 (en) Symmetric cryptographic method and system and applications thereof
Joshy et al. Text to image encryption technique using RGB substitution and AES
Sharma et al. Compression and encryption: An integrated approach
Park et al. Methods for practical whitebox cryptography
CN114036541A (zh) 一种复合加密存储用户私密内容的应用方法
Kadry et al. An improvement of RC4 cipher using vigenère cipher
Neforawati et al. Message Digest 5 (MD-5) Decryption Application using Python-Based Dictionary Attack Technique
Sri et al. Concealing the Data Using Cryptography
WO2020008363A1 (en) Method for encoding, transmitting and/or storing and decoding digital information in an unbreakable manner
CN111314051A (zh) 一种加解密方法和装置
Dodmane A new hybrid symmetric-key technique to enhance data security of textual information using random number generator
US12101415B2 (en) Method of RSA signature or decryption protected using a homomorphic encryption
Budzik et al. Encryption-based Security in Wearable Devices
Chavan Cloud Data Security Improvement Using Cryptographic Steganography by Truly Random and Cryptographically Secure Random Number
US20220393853A1 (en) Method and devices for creating redundancy and encryption using mojette transform
Rao et al. Securing Image using Triple Data Encryption Standard
Bhagoliwal et al. Securing mobile data using cryptography

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020899533

Country of ref document: EP

Effective date: 20220711