WO2019237550A1 - 加密方法、装置、终端设备及存储介质 - Google Patents

加密方法、装置、终端设备及存储介质 Download PDF

Info

Publication number
WO2019237550A1
WO2019237550A1 PCT/CN2018/106401 CN2018106401W WO2019237550A1 WO 2019237550 A1 WO2019237550 A1 WO 2019237550A1 CN 2018106401 W CN2018106401 W CN 2018106401W WO 2019237550 A1 WO2019237550 A1 WO 2019237550A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
preset
group
encryption
sub
Prior art date
Application number
PCT/CN2018/106401
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 WO2019237550A1 publication Critical patent/WO2019237550A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • 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

Definitions

  • the present application relates to the field of finance, and in particular, to an encryption method, device, terminal device, and storage medium.
  • the embodiments of the present application provide an encryption method, device, terminal device and storage medium to solve the problem of low encryption flexibility.
  • an embodiment of the present application provides an encryption method, including: obtaining password information; obtaining data information to be encrypted; encrypting the password information by using a first preset encryption method to obtain a target key; The key specification length of the two preset encryption methods extracts all or part of the continuous key information from the target key as an encryption key; and through the second preset encryption method, the encryption key is used to pair the The data information to be encrypted is encrypted to obtain a ciphertext; and the ciphertext is sent to a receiver through a preset sending method.
  • an embodiment of the present application provides an encryption device, including: a first acquisition module for acquiring password information; a second acquisition module for acquiring data information to be encrypted; a first encryption module for passing the first A preset encryption method is used to encrypt the password information to obtain a target key; and an extraction module is configured to extract all or part of the continuous encryption key from the target key according to the key specification length of the second preset encryption method.
  • the key information is used as an encryption key; a second encryption module is configured to use the encryption key to encrypt the data information to be encrypted by using the second preset encryption method to obtain a ciphertext; Sending the ciphertext to a receiver through a preset sending method.
  • an embodiment of the present application provides a terminal device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer may The steps of the encryption method are implemented when the instruction is read.
  • embodiments of the present application provide one or more non-volatile readable storage media storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more A plurality of processors execute the steps of implementing the written document generating method.
  • FIG. 1 is an implementation flowchart of an encryption method provided in Embodiment 1 of the present application.
  • step S3 is a flowchart of implementing step S3 in the encryption method provided in Embodiment 1 of the present application;
  • step S35 is a flowchart of implementing step S35 in the encryption method provided in Embodiment 1 of the present application;
  • step S354 is a flowchart of implementing step S354 in the encryption method provided in Embodiment 1 of the present application;
  • FIG. 5 is a flowchart of an implementation of encoding a ciphertext by using a preset encoding method in an encryption method provided in Embodiment 1 of the present application;
  • step S7 is a flowchart of implementing step S7 in the encryption method provided in Embodiment 1 of the present application;
  • FIG. 7 is a schematic diagram of an encryption device provided in Embodiment 2 of the present application.
  • FIG. 8 is a schematic diagram of a terminal device provided in Embodiment 4 of the present application.
  • FIG. 1 illustrates an implementation process of an encryption method provided by this embodiment.
  • the encryption method is applied in the financial industry. Details are as follows:
  • the password information is temporarily stored in a temporary storage area.
  • the password database is used to store password information.
  • the temporary storage area is used to store temporary data. Each time the temporary data is taken out, the temporary storage area is cleared to zero.
  • the password information sent by the encryption party to the temporary storage area through the delivery method is extracted, and the password information is saved in the password database.
  • the encryption party can be a user terminal or a smart device.
  • the delivery method can be input method, transmission method, etc.
  • the transmission method can be radio wave transmission, other physical media transmission, or vehicle transportation.
  • the password information can be It is letters, numbers, symbols, and combinations of letters and numbers, etc.
  • the specific content of the encryption party, delivery method, transmission method, and password information can be set according to the actual application, and there is no limitation here.
  • the length of the password information can be more than one character.
  • the data information is stored in an information database.
  • the data information to be encrypted may be data information extracted from an information database or temporary data extracted from temporary data, where the temporary data is data transmitted by the encryptor through a delivery method.
  • the data information to be encrypted in the information database is extracted, and the data information to be encrypted is stored in the information database to be encrypted.
  • the data information to be encrypted may be text, sound, picture, image, video, etc.
  • the specific content of the data information to be encrypted is set according to the actual application, and is not limited here.
  • S3 Encrypt the cryptographic information by using a first preset encryption method to obtain a target key.
  • the first preset encryption method may be a one-way encryption method or a two-way encryption method, wherein the one-way encryption method refers to a method of generating ciphertext by performing a digest calculation on data, and the two-way encryption refers to reversible encryption. That is, after the cipher text is generated, it can be reversed into the plain text when needed.
  • the one-way encryption method can be MD5, SHA-0, or HMAC
  • the two-way encryption method can be DES, 3DES, or RSA.
  • the first preset The specific contents of the encryption method, one-way encryption method, and two-way encryption method are set according to actual applications, and there is no limitation here.
  • the password information is first extracted from the password database, and then the one-way encryption method or the two-way encryption method is used to encrypt the password information to obtain a target key, and the target key is stored in the target key database.
  • S4 Extract all or part of the continuous key information from the target key as the encryption key according to the key specification length of the second preset encryption method.
  • the second preset encryption method may be a one-way encryption method or a two-way encryption method
  • the key specification length refers to a key length specified when the second preset encryption method is used to encrypt data information.
  • the specification length can be 16 bits, 24 bits, or 32 bits, etc.
  • the second preset encryption method and the specific content of the key specification length are set according to the actual application, and there is no limitation here.
  • the target key is first extracted from the target key database, and then all or part of the target key is extracted according to the key specification length of the second preset encryption method.
  • the continuous key information is used as the encryption key, and the encryption key is stored in the encryption key database.
  • part of the continuous key information may be continuous key information of a front part, a middle part, or a rear part of the entire key information.
  • step S4 In order to better understand step S4, an example is described below, and the specific expression is as follows:
  • the target key database is A database
  • the target key is 603F52D844017E83CA267751FEE5B61B
  • the key specification length of the second preset encryption method is 32 bits or 24 bits
  • the encryption key is 603F52D844017E83CA267751FEE5B61B
  • 603F52D844017E83CA267751, 52D844017E83CA267751BEE5 or 44017E83751E database is the key database B, the first extracted from the database and 603F52D844017E83CA267751FEE5B61B A, and 32 in accordance with the encryption key extracted entirety, B and saved to the database 603F52D844017E83CA267751FEE5B61B 603F52D844017E83CA267751FEE5B61B from, or extracted from 603F52D844017E83CA267751FEE5B61B 03F52D844017E83CA267751,52D84
  • the second preset encryption method is used to encrypt the data information to be encrypted by using an encryption key to obtain a ciphertext.
  • the cipher text refers to encrypted data information.
  • the second preset encryption method is used to encrypt the data information to be encrypted by using an encryption key to obtain a ciphertext, and the ciphertext is stored in a ciphertext database.
  • step S5 In order to better understand step S5, an example is described below, and the specific expression is as follows:
  • the second preset encryption method is 3DES
  • the encryption key is 603F52D844017E83CA267751FEE5B61B
  • the data information to be encrypted is "love me Chinese !!!”
  • the ciphertext database is D database
  • 603F52D844017E83CA267751FEE5B61B is used to "love me Zhonghua !!! "was encrypted to get”
  • S6 Send the ciphertext to the receiver through a preset sending method.
  • the preset sending method may be radio wave sending, other physical medium sending, or vehicle transportation.
  • the receiver may be a user terminal or a smart device.
  • the specific content of the receiver and the preset sending method is Set according to the actual application, there is no limitation here.
  • the target ciphertext is stored in a target ciphertext database.
  • the target ciphertext is first extracted from the target ciphertext database, and then the ciphertext is sent to the receiver.
  • the password information is obtained, the data information to be encrypted is obtained, the password information is encrypted by the first preset encryption method to obtain the target key, and the key according to the second preset encryption method is obtained.
  • the specification length extracts all or part of the continuous key information from the target key as the encryption key.
  • the encryption key is used to encrypt the data information to be encrypted to obtain the ciphertext.
  • the send method sends the ciphertext to the receiver. Encrypt the plaintext password information by using the first preset encryption method to obtain the target key, and then extract key information that matches the key specification length of the second preset encryption method from the target key as the encryption key, Therefore, the password information can be of any length.
  • the data information to be encrypted is encrypted to obtain a ciphertext, thereby improving the flexibility and efficiency of encryption.
  • step S3 On the basis of the embodiment corresponding to FIG. 1, a specific implementation method of step S3 will be described in detail below through a specific embodiment.
  • step S3 illustrates a specific implementation process of step S3, which is detailed as follows:
  • S31 Fill the password information to a preset length according to a preset filling method to obtain the target password information.
  • the preset padding method may be to first convert the password information into a preset base number to obtain the converted password information, and then pad P 1, 0, or 1 before or after the converted password information. The combination with 0, etc., obtains the first padding password information. Next, the length of the padding password information is filled in front of or behind the first padding password information, and the length of the password information is expressed by a length of Q bits.
  • the preset length can be 512bit or 1024bit, etc., where P> 1 and Q> 1.
  • the preset base can be binary, octal, or hexadecimal, etc.
  • the preset filling method, preset length, and specific content of the preset base are set according to the actual application. Make restrictions.
  • the password information that has been extracted from the password database is filled to a preset length according to a preset filling method to obtain the target password information, and the target password information is stored in the target password information database.
  • step S31 In order to better understand step S31, an example is described below, and the specific expression is as follows:
  • the preset length is 512bit
  • the preset padding method is to first convert the password information to hexadecimal, get the converted password information, and then fill the back of the converted password information A combination of one 1 and 407 zeros to obtain the first padding password information.
  • the padding password length is filled after the first padding password information.
  • the length of the password information is represented by a length of 64 bits.
  • the password database is the E database.
  • the target password information database is F database, then first convert "jklmn" to hexadecimal to get “6A 6B 6C 6D 6E", and then fill one "1" and 407 "0" after “6A 6B 6C 6D 6E” Combination to get 6A, 6B, 6C, 6D, 6E, 80, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00
  • S32 Group the target password information according to the first preset grouping method to obtain M groups of key groups, where M> 0.
  • the first preset grouping method may be to group data according to equal or non-equivalent groups.
  • the specific content of the first preset grouping method is set according to actual applications. limit.
  • the target password information is grouped according to equal or unequal portions to obtain M sets of key blocks, and the key blocks are stored in a key block database, where M> 0.
  • the second preset grouping method may be to group data according to equal or non-equivalent groups.
  • the specific content of the second preset grouping method is set according to the actual application, and is not described here. limit.
  • step S33 In order to better understand step S33, an example is described below, and the specific expression is as follows:
  • the second preset grouping method is to divide the data into 16 groups in equal parts, 1 *
  • the 16 first key sub-grouping group names are G0, G1, G2, G3, G4, G5, G6, G7, G8, G9, G10, G11, G12, G13, G14, and G15.
  • the first key sub-grouping For the H database, for 6A, 6B, 6C, 6D, 80E, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 28, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
  • the preset copying method may be copying one data at a time or two or more data at a time.
  • the specific content of the preset copying method is set according to the actual application, which is not limited here.
  • all the first key sub-packets in the M * N group of key sub-packets are first extracted from the first key sub-packet database, and then copied in a manner of copying the first key sub-groups of the M * N group at one time,
  • the second key sub-packet of the M * N * L group is obtained, and the second key sub-packet of the M * N * L group is stored in the second key sub-packet database, where L> 0.
  • S35 Use a first preset algorithm to obtain a preliminary key according to each of the second key sub-packets in the M * N * L group of second key sub-packets.
  • the first preset algorithm may be an arithmetic operation or a logical operation, and the specific content of the first preset algorithm is set according to an actual application, which is not limited herein.
  • the M * N * L group of second key sub-packets in the second key sub-packet database is extracted using an arithmetic operation or a logical operation to obtain a preliminary key.
  • S36 Output the preliminary key according to a preset output method to obtain a target key.
  • the preset output method may be output from a memory or an optical disc, and the specific content of the preset output method is set according to an actual application, which is not limited herein.
  • the preliminary key is output in a manner such as output from the memory or output from the optical disc to obtain the target key.
  • step S36 In order to better understand step S36, an example is described below, and the specific expression is as follows:
  • the arrangement of a, b, c, and d in memory is a: 60 3F 52 D8, b: 44, 01, 7E, 83, c: CA, 26, 77, 51, and d: FE5B6, 1B, and then output a, b, c, and d from the low address to the high address to obtain 603F52D844017E83CA267751FEE5B61B.
  • the target password information is obtained by filling the password information to a preset length according to a preset filling method, and the target password information is grouped according to a first preset grouping method to obtain M sets of keys. Grouping, grouping each group of key groups separately according to a second preset grouping method to obtain M * N groups of first key subgroups, and performing grouping of the M * N group of key subgroups according to a preset replication method Copy to obtain the second key sub-group of the M * N * L group, and then use the first preset algorithm to obtain the preliminary key according to the second key sub-group, and output the preliminary key according to the preset output method,
  • the target key is obtained, and the plaintext password information is converted into irreversible key information, thereby improving the security of encryption.
  • step S35 On the basis of the embodiment corresponding to FIG. 2, a specific implementation method of step S35 will be described in detail below through a specific embodiment.
  • step S35 illustrates a specific implementation process of step S35, which is detailed as follows:
  • S351 Obtain the sorted first group of the second key sub-packets in the M * N * L group of the second key sub-packets arranged in the front-to-back order as the current array.
  • the M * N * L group of the second key sub-packets is first extracted from the second key sub-packing database, and then the first in the M * N * L group of the second key sub-packets arranged in order is extracted.
  • One group of second key subgroups is used as the current array, and the current array is saved to the current array database.
  • step S351 In order to better understand step S351, an example is described below, and the specific expression is as follows:
  • the second key subgroup database is the P database
  • M is 1
  • N 16
  • L 4
  • M * N * L 64
  • the 64 second key subgroups are 6A, 6B, 6C, 6D, and 6E.
  • the constant means an amount that does not change.
  • I different values are extracted from different constants as the current intermediate quantity, and the current intermediate quantity is stored in the current intermediate quantity database.
  • S353 Determine the current algorithm from two or more first preset algorithms according to the current array.
  • a first preset algorithm is determined from more than two first preset algorithms according to the current array, and the first preset algorithm is used as the current algorithm, where the current array and the first preset are The algorithm has a corresponding relationship.
  • the current intermediate quantity in the current intermediate quantity database and the current array in the current array database are extracted using a current algorithm to obtain a temporary key, and the temporary result is stored in the temporary result database.
  • S355 Determine whether the current array is the last second group of second key sub-packets in the M * N * L group of second key sub-packets arranged in order.
  • the current array is the sorted last key group of the second key sub-packets in the M * N * L group of the second key sub-packets arranged in order, that is, the current array and the Sort the second key sub-group of the M * N * L group and compare the last group of the second key sub-groups, and analyze whether the comparison results are consistent.
  • I is a positive integer.
  • the current array is a sorted last group of second key subgroups in the M * N * L group of second key subgroups arranged in order, that is, if the current array and The order of the second key subgroup of the M * N * L group is the same as that of the second key subgroup of the last group, and then the second preset algorithm is used to calculate according to the temporary key and I different values to obtain the preliminary secret. key.
  • the second preset algorithm may be an arithmetic operation, a logical operation, or a relational operation, and the specific content of the third preset algorithm is set according to an actual application, which is not limited herein.
  • the current array is not the last group of the second key subgroups in the M * N * L group of the second key subgroups arranged in order, that is, if the current array is In the second key sub-group of the M * N * L group, the last second key sub-group of the first group is inconsistent, then the next second key sub-group of the first group of the second key sub-groups is obtained as The current array is determined, and the temporary key is determined as the current intermediate quantity, and the process returns to step S354.
  • the current value is used as the current intermediate quantity to obtain the current array.
  • the current algorithm is determined from two or more first preset algorithms. The current algorithm is used to obtain temporary results based on the current intermediate quantity and the current array.
  • the algorithm obtains a temporary result step, so that for each different plaintext password information, the plaintext password information is encrypted to obtain a unique plus corresponding to the plaintext password information. Password information, thereby increasing the difficulty of cracking the password information to improve the security of encryption.
  • step S354 will be described in detail below through a specific embodiment.
  • step S354 Please refer to FIG. 4, which illustrates a specific implementation process of step S354, which is detailed as follows:
  • (( ⁇ X) & Z) or G (X, Y, Z) (X & Z)
  • a preset operation function and J values in a current intermediate quantity corresponding to the preset operation function are used to perform an operation to obtain a first intermediate key, and the first intermediate key is stored in the first intermediate key database.
  • step S3541 In order to better understand step S3541, an example is described below, and the specific expression is as follows:
  • S3542 Sum the first intermediate key, one or more values of k values, one or more of the current array, and preset constants to the left or right by circularly shifting preset positions to obtain a second intermediate key, where: k is the absolute value of the difference between I and J.
  • the preset position may be 1, 2, or 5, etc.
  • the preset constant may be 0x12124567, 0x12127766, or 0x99885656.
  • the specific content of the preset position and the preset constant may be set according to actual applications. There is no restriction here.
  • k is a positive integer and refers to the absolute value of the difference between I and J.
  • the first intermediate key is extracted from the first intermediate key database
  • the current array is extracted from the key sub-grouping database
  • the sum of the current array and the preset constants is cyclically shifted to the left or right by a preset position to obtain a second intermediate key
  • the second intermediate key is stored in a second intermediate key database.
  • step S3542 In order to better understand step S3542, an example is described below, and the specific expression is as follows:
  • step S3531 For example, continue to use the example in step S3531 for description.
  • the key subgroup database is database A
  • the current array is 0x6A6B6C6D
  • 4-3 1, 1 value is 0x01234567
  • the preset constant is 0xd76aa478, and the preset bit is 7.
  • the second intermediate key database is the B database
  • the sum of 0xfedcba98, 0x01234567, 0x6A6B6C6D, and 0xd76aa478 0x00007f6e ⁇ 7 is obtained, and 0x003fb700 is obtained, and 0x003fb700 is saved to the B database.
  • S3543 Use a third preset algorithm to calculate a temporary key according to one or more values of the current intermediate amount corresponding to the second intermediate key and the preset operation function.
  • the third preset algorithm may be an arithmetic operation or a relational operation, and the specific content of the fourth preset algorithm is set according to an actual application, which is not limited herein.
  • the second intermediate key is first extracted from the second intermediate key database, and then a third preset algorithm is adopted according to one or more values of the current intermediate amount corresponding to the second intermediate key and the preset operation function. Perform calculations to obtain temporary keys.
  • a first intermediate key is obtained by calculating by using a preset operation function and J values in a current intermediate amount corresponding to the predetermined operation function.
  • the first intermediate key, k The sum of one or more of the values, one or more of the current array, and a preset constant is cyclically shifted left or right by a preset position to obtain a second intermediate key, which corresponds to the preset operation function according to the second intermediate key.
  • One or more values in the current intermediate quantity of are calculated by using a third preset algorithm to obtain a temporary key. Therefore, each character in the plaintext password information is converted into irreversible character information through complex arithmetic operations and logical operations, thereby improving the security of the key.
  • the encryption method also include:
  • S7 Encode the ciphertext by a preset encoding method to obtain the encoded ciphertext.
  • the encoded ciphertext refers to the ciphertext encoded by a preset encoding method.
  • the preset encoding method refers to a network encoding method, where the network encoding refers to a method in which information received on each channel is processed linearly or non-linearly at each node in the network and then forwarded to a downstream node.
  • the network encoding method can be base64, 7Unicode, or UTF-8.
  • the specific content of the network encoding method can be set according to the actual application, and there is no limitation here.
  • the ciphertext is first extracted from the ciphertext database, and then the ciphertext is encoded by a preset encoding method to obtain the encoded ciphertext, and the encoded ciphertext is stored in the encoding database.
  • step S7 In order to better understand step S7, an example is described below, and the specific expression is as follows:
  • the ciphertext database is E database
  • the preset encoding method is base64
  • the encoding database is F database
  • the ciphertext is encoded by a preset encoding method, so as to obtain a target ciphertext for secure network transmission, thereby improving the security of encryption.
  • step S7 is described in detail below through a specific embodiment.
  • step S7 illustrates a specific implementation process of step S7, which is detailed as follows:
  • S71 Split the ciphertext into a set of single characters according to a preset splitting method.
  • the ciphertext in the ciphertext database is split into a set of single characters according to a preset splitting method.
  • the preset splitting method can be single character splitting in sequence or splitting in half each time, etc.
  • the specific content of the preset splitting method is set according to the actual application. Make restrictions.
  • a preset zero is supplemented for each character according to a preset supplementary manner to obtain a target character.
  • the preset supplementary method may be supplemented in front of characters or supplemented after characters, etc.
  • the preset zero may be 2 zeros or 5 zeros, etc.
  • the content is set according to the actual application, and there is no limitation here.
  • S73 Convert each target character into a corresponding coded character according to a preset character table.
  • the preset character table records the correspondence between the target character and the coded character based on a preset coding method.
  • each target character is converted into a corresponding coded character according to a preset character table, and the preset character table records a correspondence relationship between the target character and the coded character based on a preset coding method.
  • S74 splice each coded character according to a preset splicing method to obtain a coded ciphertext.
  • each coded character is spliced together according to a preset splicing method to obtain the encoded ciphertext, and the target ciphertext is stored in the target ciphertext database.
  • the ciphertext is divided into a set of single characters according to a preset splitting method, and a preset zero is added to each character according to a preset supplementing method to obtain a target character.
  • a character table is set to convert each target character to a corresponding coded character.
  • the preset character table records the correspondence between the target character and the coded character based on a preset encoding method, and each coded character is set according to a preset splicing method. Spliced together to obtain the encoded ciphertext, the ciphertext is split into single characters by a preset splitting method, and each character is then converted into the coded characters in the preset character table to obtain a combination of a single coded character. Encoded ciphertext, which further improves the security of ciphertext transmission.
  • the ciphertext sent by the sender can be received by a preset receiving method.
  • the preset receiving method can be radio wave reception or other physical medium reception, and the sender can be a user terminal or a smart device.
  • the specific content of the square and preset receiving methods is set according to the actual application, and there is no limitation here.
  • the ciphertext of the sender is received through a preset receiving mode.
  • S102 Split the ciphertext according to a preset splitting method corresponding to the splicing method to obtain each encoded character.
  • the ciphertext is split according to a split method corresponding to a preset splicing method to obtain each encoded character.
  • the preset encoding method has been described in the foregoing encryption method. For details, refer to the content of the embodiment of the encryption method. To avoid repetition, details are not described herein again.
  • each coded character is converted into a corresponding target character according to the preset character table, where the preset character table records a correspondence relationship between the coded character and the target character, and the coded character refers to a preset The encoding character of the decoding method corresponding to the encoding method.
  • the preset zeros are removed from each target character according to a preset removal manner corresponding to the preset supplementary method to obtain each character.
  • S105 Splice each character into a decoded ciphertext according to a preset splicing method corresponding to the splitting method.
  • the preset splitting method has been described in the foregoing encryption method. For details, refer to the content of the encryption method embodiment. To avoid repetition, details are not described herein.
  • each character is spliced into a decoded ciphertext in a splicing manner corresponding to a preset splitting method.
  • step S101 to step S105 an example will be described below, and the specific expression is as follows:
  • S106 Obtain an encryption key, and determine the encryption key as a decryption key.
  • the encryption key can be used as the decryption key.
  • the encryption key is obtained by encryption using the first preset encryption method. To avoid repetition, the specific process of obtaining the encryption key by using the first preset encryption method is not described here.
  • an encryption key is obtained, and the obtained encryption key is determined as a decryption key.
  • the decryption method corresponding to the second preset encryption method is used to decrypt the decoded ciphertext using the decryption key to obtain the plaintext.
  • the decryption method corresponding to the second preset encryption method is used to decrypt the ciphertext using the decryption key to obtain the plaintext.
  • step S106 In order to better understand step S106 to step S107, an example will be described below, and the specific expression is as follows:
  • the encryption key is “603F52D844017E83CA267751FEE5B61B”
  • the decryption method corresponding to the second preset encryption method is 3DES
  • the preset reception method is radio wave reception
  • the sender is a smart device.
  • FIG. 7 shows an encryption device corresponding to the encryption method provided in Embodiment 1.
  • FIG. 7 shows an encryption device corresponding to the encryption method provided in Embodiment 1.
  • only the parts related to the embodiment of the present application are shown.
  • the encryption device includes: a first acquisition module 71, a second acquisition module 72, a first encryption module 73, an extraction module 74, a second encryption module 75, and a sending module 76.
  • the detailed description of each function module is as follows:
  • a first obtaining module 71 configured to obtain password information
  • a second obtaining module 72 configured to obtain data information to be encrypted
  • a first encryption module 73 configured to encrypt the password information by using a first preset encryption method to obtain a target key
  • An extraction module 74 configured to extract all or part of the continuous key information from the target key as the encryption key according to the key specification length of the second preset encryption method
  • a second encryption module 75 configured to perform encryption processing on the data information to be encrypted using an encryption key by using a second preset encryption method to obtain a ciphertext
  • the sending module 76 is configured to send the ciphertext to the receiver through a preset sending method.
  • the first encryption module 73 includes:
  • a padding sub-module 731 configured to pad password information to a preset length according to a preset padding method to obtain target password information
  • a first grouping submodule 732 configured to group the target password information according to a first preset grouping method to obtain M group key groups, where M> 0;
  • a second grouping sub-module 733 is configured to group each group of key groups in the M group key group according to a second preset grouping method to obtain M * N groups of first key sub-groups, where N> 0;
  • a copying sub-module 734 configured to copy each set of the first key sub-packets in the M * N set of key sub-packets according to a preset copying method to obtain a second key sub-packet of the M * N * L set, where , L> 0;
  • a first operation sub-module 735 configured to obtain a preliminary key by using a first preset algorithm according to each group of the second key sub-groups in the M * N * L group of the second key sub-groups;
  • An output sub-module 736 is configured to output a preliminary key according to a preset output mode to obtain a target key.
  • first operator sub-module 735 includes:
  • a first determining sub-module 7351 configured to obtain the sorted first group of the second key sub-packets in the M * N * L group of the second key sub-packets arranged in order, as a current array;
  • the second determining submodule 7352 is configured to obtain I different values as the current intermediate quantity, where I> 0;
  • a third determining submodule 7353 configured to determine the current algorithm from more than two first preset algorithms according to the current array
  • a second operator sub-module 7354 configured to obtain a temporary key by using a current algorithm according to the current intermediate quantity and the current array;
  • a judging submodule 7355 which is used to judge whether the current array is the last second group of the second key subgroups in the M * N * L group of the second key subgroups arranged in the order;
  • a fifth operation sub-module 7356 is configured to: if the current array is a sorted last group of the second key sub-packets in the M * N * L group of the second key sub-packets arranged in order, then according to the temporary result and the Said I different values are calculated using a second preset algorithm to obtain a preliminary key;
  • a sixth operation sub-module 7357 is configured to obtain the first sorted first key subgroup if the current array is not the sorted second key subgroup in the second key subgroup of the M * N * L groups arranged in the order. The next set of second key sub-packets of the second key sub-packet is used as the current array, and the temporary key is determined to be the current intermediate amount, and a second operation sub-module 7354 is triggered.
  • the third determining submodule 7354 includes:
  • a third operator sub-module 73541 is configured to perform operations using a preset operation function and J values in a current intermediate quantity corresponding to the preset operation function to obtain a first intermediate key, where I> J> 0;
  • a shifting sub-module 73542 which is configured to rotate the sum of the first intermediate key, one or more of the k values, one or more of the current array, and preset constants to the left or right by a preset position to obtain a second Intermediate key, where k is the absolute value of the difference between I and J;
  • a fourth operation sub-module 73543 is configured to perform a third preset algorithm to obtain a temporary key by performing a third preset algorithm on the value of the second key corresponding to the current intermediate quantity corresponding to the preset operation function.
  • the encryption device before sending the ciphertext to the receiver, the encryption device further includes:
  • the encoding module 77 is configured to encode the ciphertext by using a preset encoding method to obtain an encoded ciphertext.
  • the encoding module 77 includes:
  • a splitting submodule 771 configured to split the ciphertext into a set of single characters according to a preset splitting method
  • a supplementary submodule 772 configured to supplement a preset zero for each character according to a preset supplementation method to obtain a target character
  • a conversion sub-module 773 configured to convert each target character into a corresponding coded character according to a preset character table, and the preset character table records a correspondence between a target character and a coded character based on a preset coding method;
  • a stitching sub-module 774 is configured to stitch each coded character together according to a preset stitching method to obtain a coded ciphertext.
  • This embodiment provides a computer-readable storage medium.
  • the one or more non-volatile storage media storing computer-readable instructions.
  • the encryption method in Embodiment 1 is implemented. To avoid repetition, details are not described herein again.
  • the one or more non-readable storage media storing computer-readable instructions when the computer-readable instructions are executed by one or more processors, cause the one or more processors to execute the computer-readable instructions.
  • the functions of each module / unit in the encryption device in Embodiment 2 are implemented. To avoid repetition, details are not described herein again.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory ( Read-Only Memory (ROM), Random Access Memory (RAM), electric carrier signals and telecommunication signals.
  • a recording medium a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory ( Read-Only Memory (ROM), Random Access Memory (RAM), electric carrier signals and telecommunication signals.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • FIG. 8 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 80 of this embodiment includes a processor 81, a memory 82, and computer-readable instructions 83 stored in the memory 82 and executable on the processor 81.
  • the processor 81 executes the computer-readable instructions 83
  • the steps of the encryption method in Embodiment 1 are implemented, for example, steps S1 to S6 shown in FIG.
  • the processor 81 executes the computer-readable instructions 83
  • the functions of the modules / units in the foregoing device embodiments are implemented, for example, the functions of the modules 71 to 77 shown in FIG. 7.
  • the computer-readable instructions 63 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 62 and executed by the processor 61 to complete the application.
  • One or more modules / units may be instruction segments of a series of computer-readable instructions capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 63 in the terminal device 60.
  • the computer-readable instructions 63 may be divided into a first acquisition module, a second acquisition module, a first encryption module, an extraction module, a second encryption module, and a sending module. The specific functions of each module are as shown in Embodiment 2, and are Avoid duplication, I won't repeat them here.
  • the terminal device 80 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 81 and a memory 82.
  • FIG. 8 is only an example of the terminal device 80 and does not constitute a limitation on the terminal device 80.
  • the terminal device 80 may include more or fewer components than shown in the figure, or some components may be combined, or different components.
  • the terminal device may also include an input-output device, a network access device, and a bus.
  • the so-called processor 81 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 82 may be an internal storage unit of the terminal device 80, such as a hard disk or a memory of the terminal device 80.
  • the memory 82 may also be an external storage device of the terminal device 80, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, and a flash memory card (Flash) provided on the terminal device 80. Card) and so on.
  • the memory 82 may include both an internal storage unit of the terminal device 80 and an external storage device.
  • the memory 82 is used to store computer-readable instructions and other programs and data required by the terminal device.
  • the memory 82 may also be used to temporarily store data that has been or will be output.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

一种加密方法、装置、终端设备及存储介质中,通过获取密码信息(S1),获取待加密的数据信息(S2),通过第一预设加密法对密码信息进行加密处理,得到目标密钥(S3),按照第二预设加密法的密钥规格长度从目标密钥中提取全部或部分的连续密钥信息作为加密密钥(S4),通过第二预设加密法,采用加密密钥对待加密的数据信息进行加密处理,得到密文(S5),通过预设的发送方式将编码后的密文发送给接收方(S6)。通过采用第一预设加密法对明文密码信息进行加密,得到目标密钥,然后,从其中提取符合第二预设加密法的密钥规格长度的密钥信息作为加密密钥,从而密码信息可以为任意长度,接下来,将待加密的数据信息经过加密处理,得到密文,进而提高了加密的灵活性和效率。

Description

加密方法、装置、终端设备及存储介质
本申请以2018年06月13日提交的申请号为201810606438.2,名称为“加密方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及金融领域,尤其涉及一种加密方法、装置、终端设备及存储介质。
背景技术
目前,在金融行业中,金融公司利用不同的业务系统存储不同的数据,当用户对所述数据进行加密时,需要输入加密法规矩长度的密码,同时,输入的密码为明文,容易泄露信息,从而导致加密灵活性低。
发明内容
本申请实施例提供一种加密方法、装置、终端设备及存储介质,以解决加密灵活性低的问题。
第一方面,本申请实施例提供一种加密方法,包括:获取密码信息;获取待加密的数据信息;通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;通过预设的发送方式将所述密文发送给接收方。
第二方面,本申请实施例提供一种加密装置,包括:第一获取模块,用于获取密码信息;第二获取模块,用于获取待加密的数据信息;第一加密模块,用于通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;提取模块,用于按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;第二加密模块,用于通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;发送模块,用于通过预设的发送方式将所述密文发送给接收方。
第三方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现所述加密方法的步骤。
第四方面,本申请实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行实现所述书面文件生成方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权力要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例1提供的加密方法的实现流程图;
图2是本申请实施例1提供的加密方法中步骤S3的实现流程图;
图3是本申请实施例1提供的加密方法中步骤S35的实现流程图;
图4是本申请实施例1提供的加密方法中步骤S354的实现流程图;
图5是本申请实施例1提供的加密方法中通过预设的编码方法对密文进行编码的实现流程图;
图6是本申请实施例1提供的加密方法中步骤S7的实现流程图;
图7是本申请实施例2中提供的加密装置的示意图;
图8是本申请实施例4中提供的终端设备的示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例1
请参阅图1,图1示出了本实施例提供的加密方法的实现流程。该加密方法应用在金融行业。详述如下:
S1:获取密码信息。
在本实施例中,密码信息会暂时保存在临时存储区。优选地,密码数据库用来保存密码信息。
需要说明的是,临时存储区是用来存储临时数据,每次取出临时数据时,临时存储区都被清零。
具体地,将加密方通过送达方式送到临时存储区中的密码信息提取出来,并将该密码信息保存到密码数据库中。
需要说明的是,加密方可以是用户终端,也可以是智能设备,送达方式可以为输入方式、传输方式等,传输方式可以为电波传输、其他物理介质传输或交通工具运输等,密码信息可以是字母、数字、符号及字母与数字的组合等,加密方、送达方式、传输方式和密码信息的具体内容,可以根据实际应用进行设定,此处不做限制。密码信息长度可以为一个以上字符长度。
S2:获取待加密的数据信息。
在本实施例中,数据信息保存在信息数据库中。
需要说明的是,待加密的数据信息可以为从信息数据库中提取出来的数据信息或从临时数据中提取出的临时数据,其中,该临时数据由加密方通过送达方式传输的数据。
具体地,将信息数据库用中的待加密的数据信息提取出来,并将待加密的数据信息保存到待加密信息数据库中。
需要说明的是,将其保存到待加密信息数据库中,是为了后续对待加密的数据信息进行加密时,方便提取。
待加密的数据信息可以为文字、声音、图片或图像视频等,待加密的数据信息的具体 内容,以根据实际应用进行设定,此处不做限制。
S3:通过第一预设加密法对密码信息进行加密处理,得到目标密钥。
在本实施例中,第一预设加密法可以为单向加密法或双向加密法等,其中,单向加密法是指通过对数据进行摘要计算生成密文的方法,双向加密是指可逆加密,即生成密文后,在需要的时候可以反解为明文的方法,单向加密法可以为MD5、SHA-0或HMAC等,双向加密法可以为DES、3DES或RSA等,第一预设加密法、单向加密法和双向加密法的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,首先从密码数据库中提取密码信息,然后采用单向加密法或双向加密法等对密码信息进行加密处理,得到目标密钥,并将目标密钥保存到目标密钥数据库中。
S4:按照第二预设加密法的密钥规格长度从目标密钥中提取全部或部分的连续密钥信息作为加密密钥。
在本实施例中,第二预设加密法可以为单向加密法或双向加密法等,密钥规格长度是指采用第二预设加密法进行加密数据信息时规定的密钥长度,密钥规格长度可以为16位、24位或32位等,第二预设加密法和密钥规格长度的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,按照第二预设加密法的密钥规格长度,首先从目标密钥数据库中提取目标密钥,然后按照第二预设加密法的密钥规格长度从目标密钥中提取全部或部分的连续密钥信息作为加密密钥,并将该加密密钥保存到加密密钥数据库中。
需要说明的是,部分的连续密钥信息可以是全部密钥信息中的前面部分、中间部分或后面部分的连续密钥信息。
为了更好地理解步骤S4,下面通过一个例子进行说明,具体表述如下:
例如,假设目标密钥数据库中为A数据库,目标密钥为603F52D844017E83CA267751FEE5B61B,第二预设加密法的密钥规格长度为32位或24位,加密密钥为603F52D844017E83CA267751FEE5B61B、603F52D844017E83CA267751、52D844017E83CA267751FEE5或44017E83CA267751FEE5B61B,加密密钥数据库为B数据库,则首先从A数据库中提取603F52D844017E83CA267751FEE5B61B,然后按照32位从603F52D844017E83CA267751FEE5B61B中提取全部作为加密密钥,并将603F52D844017E83CA267751FEE5B61B保存到B数据库中,或者按照24位从603F52D844017E83CA267751FEE5B61B中提取03F52D844017E83CA267751、52D844017E83CA267751FEE5或44017E83CA267751FEE5B61B作为加密密钥,并将03F52D844017E83CA267751、52D844017E83CA267751FEE5或44017E83CA267751FEE5B61B保存到B数据库中。
S5:通过第二预设加密法,采用加密密钥对待加密的数据信息进行加密处理,得到密文。
在本实施例中,密文是指经过加密后的数据信息。
具体地,通过第二预设加密法,采用加密密钥对待加密的数据信息进行加密处理,得到密文,并将密文保存到密文数据库中。
为了更好地理解步骤S5,下面通过一个例子进行说明,具体表述如下:
例如,假设第二预设加密法为3DES,加密密钥为603F52D844017E83CA267751FEE5B61B,待加密的数据信息为“爱我中华!!!”,密文数据库为D数据库,则通过3DES,采用603F52D844017E83CA267751FEE5B61B对“爱我中华!!!”进行加密处理,得到“CgdyspSM3aRJ10x8kP9RmA==”,并将“CgdyspSM3aRJ10x8kP9RmA==”保存到D数据库中。
S6:通过预设的发送方式将密文发送给接收方。
在本实施例中,预设的发送方式可以为电波发送、其他物理介质发送或交通工具运送 等,接收方可以为用户终端或智能设备等,接收方和预设的发送方式的具体内容,以根据实际应用进行设定,此处不做限制。优选地,目标密文保存在目标密文数据库中。
具体地,首先从目标密文数据库中将目标密文提取出来,然后将密文发送给接收方。
在图1对应的实施例中,通过获取密码信息,获取待加密的数据信息,通过第一预设加密法对密码信息进行加密处理,得到目标密钥,按照第二预设加密法的密钥规格长度从目标密钥中提取全部或部分的连续密钥信息作为加密密钥,通过第二预设加密法,采用加密密钥对待加密的数据信息进行加密处理,得到密文,通过预设的发送方式将密文发送给接收方。通过采用第一预设加密法对明文密码信息进行加密处理,得到目标密钥,然后,从目标密钥中提取符合第二预设加密法的密钥规格长度的密钥信息作为加密密钥,从而密码信息可以为任意长度,接下来,将待加密的数据信息经过加密处理,得到密文,进而提高了加密的灵活性和效率。
接下来,在图1对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S3的具体实现方法进行详细说明。
请参阅图2,图2示出了步骤S3的具体实现流程,详述如下:
S31:按照预设的填充方式将密码信息填充至预设长度,得到目标密码信息。
在本实施例中,预设的填充方式可以为首先将密码信息转换为预设进制,得到转换后的密码信息,然后在转换后的密码信息的前面或后面填充P个1、0或1与0的组合等,得到第一填充密码信息,接下来,在第一填充密码信息的前面或后面填充的密码信息长度,密码信息长度以Q个bit长度来表示。预设长度可以为512bit或1024bit等,其中P>1,Q>1。
需要说明的是,预设进制可以为二进制、八进制或十六进制等,预设的填充方式、预设长度和预设进制的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,按照预设的填充方式将已经从密码数据库中提取到的密码信息填充至预设长度,得到目标密码信息,并将目标密码信息保存到目标密码信息数据库中。
为了更好地理解步骤S31,下面通过一个例子进行说明,具体表述如下:
例如,假设密码信息为“jklmn”,预设长度为512bit,预设的填充方式为首先将密码信息转换为十六进制,得到转换后的密码信息,然后在转换后的密码信息的后面填充1个1与407个0的组合,得到第一填充密码信息,接下来,在第一填充密码信息的后面填充密码信息长度,其中密码信息长度以64个bit长度来表示,密码数据库为E数据库,目标密码信息数据库为F数据库,则首先将“jklmn”转换为十六进制,得到“6A 6B 6C 6D 6E”,然后在“6A 6B 6C 6D 6E”的后面填充1个1与407个0的组合,得到6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00,接下来,在6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00的后面填充0x28,其中0x28以64个bit长度来表示,得到6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00,并将6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00保存到F数据库中。
S32:按照第一预设的分组方式对目标密码信息进行分组,得到M组密钥分组,其中,M>0。
在本实施例中,第一预设的分组方式可以为将数据按照等份或非等份进行分组,第一预设的分组方式的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,按照等份或非等份对目标密码信息进行分组,得到M组密钥分组,并将密钥 分组保存到密钥分组数据库中,其中,M>0。
S33:按照第二预设的分组方式对M组密钥分组中的每组密钥分组分别进行分组,得到M*N组第一密钥子分组,其中,N>0。
在本实施例中,第二预设的分组方式可以为将数据按照等份或非等份进行分组,第二预设的分组方式的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,首先从密钥分组数据库中提取M组密钥分组中的所有密钥分组,然后按照等份或非等分对每组密钥分组分别进行分组,得到M*N组第一密钥子分组,并将第一密钥子分组保存到第一密钥子分组数据库中,其中,N>0。
为了更好地理解步骤S33,下面通过一个例子进行说明,具体表述如下:
例如,假设密钥分组组数为1,密钥分组为6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00,第二预设的分组方式为将数据按照等份进行分成16组,1*16组第一密钥子分组组名分别为G0、G1、G2、G3、G4、G5、G6、G7、G8、G9、G10、G11、G12、G13、G14和G15,第一密钥子分组为H数据库,则对6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00按照等份进行分成1*16组第一密钥子分组分别为G0:6A 6B 6C 6D、G1:6E 80 00、G2:00 00 00 00、G3:00 00 00 00、G4:00 00 00 00、G5:00 00 00 00、G6:00 00 00 00、G7:00 00 00 00、G8:00 00 00 00、G9:00 00 00 00、G10:00 00 00 00、G11:00 00 00 00、G12:00 00 00 00、G13:00 00 00 00、G14:28 00 00 00和G15:00 00 00 00,并将G0:6A 6B 6C 6D、G1:6E 80 00、G2:00 00 00 00、G3:00 00 00 00、G4:00 00 00 00、G5:00 00 00 00、G6:00 00 00 00、G7:00 00 00 00、G8:00 00 00 00、G9:00 00 00 00、G10:00 00 00 00、G11:00 00 00 00、G12:00 00 00 00、G13:00 00 00 00、G14:28 00 00 00和G15:00 00 00 00保存到H数据库中。
S34:按照预设的复制方式对M*N组密钥子分组中的每组第一密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0。
在本实施例中,预设的复制方式可以为一次复制一个数据或一次复制两个及以上数据等,预设的复制方式的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,首先从第一密钥子分组数据库中提取M*N组密钥子分组中的所有第一密钥子分组,然后按照一次复制M*N组第一密钥子分组方式进行复制,得到M*N*L组第二密钥子分组,并将M*N*L组第二密钥子分组保存到第二密钥子分组数据库中,其中,L>0。
S35:根据M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法,得到初步密钥。
在本实施例中,第一预设的算法可以为算术运算或逻辑运算等,第一预设的算法的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,提取第二密钥子分组数据库中的M*N*L组第二密钥子分组采用算术运算或逻辑运算,得到初步密钥。
S36:按照预设的输出方式将初步密钥输出,得到目标密钥。
在本实施例中,预设的输出方式可以为从内存中输出或从光盘中输出等,预设的输出方式的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,按照从内存中输出或从光盘中输出等方式将初步密钥输出,得到目标密钥。
为了更好地理解步骤S36,下面通过一个例子进行说明,具体表述如下:
例如,假设初步密钥为:a为0xD8523F60、b为0x837E0144、c为0x517726CA和d为0x1BB6E5FE,当前计算机模式为小端模式,则a、b、c和d在内存中的排列为a:60 3F 52 D8、b:44 01 7E 83、c:CA 26 77 51和d:FE E5B6 1B,然后将a、b、c和d从低地 址到高地址输出,得到603F52D844017E83CA267751FEE5B61B。
在图2对应的实施例中,通过按照预设的填充方式将密码信息填充至预设长度,得到目标密码信息,按照第一预设的分组方式对目标密码信息进行分组,得到M组密钥分组,按照第二预设的分组方式对每组密钥分组分别进行分组,得到M*N组第一密钥子分组,按照预设的复制方式对所述M*N组密钥子分组进行复制,得到M*N*L组第二密钥子分组,然后,根据第二密钥子分组采用第一预设的算法,得到初步密钥,按照预设的输出方式将初步密钥输出,得到目标密钥,从而将明文密码信息转换为不可逆转的密钥信息,进而提高了加密的安全性。
接下来,在图2对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S35的具体实现方法进行详细说明。
请参阅图3,图3示出了步骤S35的具体实现流程,详述如下:
S351:获取按照前后顺序排列的M*N*L组第二密钥子分组中的排序最前1组第二密钥子分组作为当前数组。
具体地,首先从第二密钥子分组数据库中提取M*N*L组第二密钥子分组,然后提取按照前后顺序排列的M*N*L组第二密钥子分组中的排序最前1组第二密钥子分组作为当前数组,并将当前数组保存到当前数组数据库中。
为了更好地理解步骤S351,下面通过一个例子进行说明,具体表述如下:
例如,假设第二密钥子分组数据库为P数据库,M为1,N为16,L为4,则M*N*L=64,64组第二密钥子分组为6A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00006A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 006A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 006A 6B 6C 6D 6E 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00,当前数组数据库为Q数据库,则首先从P数据库中提取64组第二密钥子分组,然后提取按照前后顺序排列的64组第二密钥子分组中的排序最前1组6A 6B 6C 6D作为当前数组,并将当前数组保存到Q数据库中。
S352:获取I个不同的数值作为当前中间量,其中I>0。
本实施例中,常量是指不变化的量。
具体地,从不同的常量中提取I个不同的数值作为当前中间量,并将当前中间量保存到当前中间量数据库中。
S353:根据当前数组从两个以上的第一预设的算法中确定出当前算法。
具体地,根据当前数组从两个以上的第一预设的算法中确定出一个第一预设的算法,并将该第一预设的算法作为当前算法,其中,当前数组与第一预设的算法有对应关系。
S354:根据当前中间量和当前数组采用当前算法得到临时密钥。
具体地,提取当前中间量数据库中的当前中间量和当前数组数据库中的当前数组采用当前算法得到临时密钥,并将临时结果保存到临时结果数据库中。
S355:判断当前数组是否为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组。
具体地,判断当前数组是否为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组,也即,将当前数组与按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组进行对比,分析对比结果是否一致。
S356:若当前数组为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的 1组第二密钥子分组,则根据临时密钥和I个不同的数值采用第二预设的算法进行计算,得到初步密钥。
本实施例中,I是正整数。
具体地,若当前数组为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,也即,若当前数组与按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组一致,则根据临时密钥和I个不同的数值采用第二预设的算法进行计算,得到初步密钥。
需要说明的是,第二预设的算法可以为算术运算、逻辑运算或关系运算等,第三预设的算法的具体内容,以根据实际应用进行设定,此处不做限制。
S357:若当前数组不是按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则获取排序最前1组第二密钥子分组的下1组第二密钥子分组作为当前数组,并且确定临时密钥为当前中间量,返回执行步骤S354。
具体地,若当前数组不是按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,也即,若当前数组与按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组不一致,则获取排序最前1组第二密钥子分组的下1组第二密钥子分组作为当前数组,并且确定临时密钥作为当前中间量,返回执行步骤S354。
在图3对应的实施例中,通过获取按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最前1组第二密钥子分组作为当前数组,获取I个不同的数值作为当前中间量,获取当前数组从两个以上的第一预设的算法中确定出当前算法,根据当前中间量和当前数组采用当前算法得到临时结果,判断当前数组是否为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组,若是,则根据临时结果和I个不同的数值采用第二预设的算法,得到初步密钥,若否,则获取排序最前1组第二密钥子分组的下1组第二密钥子分组作为当前数组,并且确定临时结果为当前中间量,返回执行根据当前中间量和当前数组采用当前算法得到临时结果的步骤,从而针对每个不同的明文密码信息,将该明文密码信息经过加密处理,得到该明文密码信息对应的唯一的加密密码信息,进而提高了破解密码信息的难度,提高了加密的安全性。
接下来,在图3对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S354的具体实现方法进行详细说明。
请参阅图4,图4示出了步骤S354的具体实现流程,详述如下:
S3541:采用预设的操作函数和预设的操作函数对应的当前中间量中的J个数值进行计算,得到第一中间密钥,其中,I>J>0。
在本实施例中,预设的操作函数具体可以为F(X,Y,Z)=(X&Y)|((~X)&Z)或G(X,Y,Z)=(X&Z)|(Y&(~Z)),其中,&是指“与”运算,|是指“或”运算,~是指“非”运算,^是指“异或”运算,预设的操作函数的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,采用预设的操作函数和预设的操作函数对应的当前中间量中的J个数值进行运算,得到第一中间密钥,并将第一中间密钥保存到第一中间密钥数据库中,其中,I>J>0。
为了更好地理解步骤S3541,下面通过一个例子进行说明,具体表述如下:
例如,假设预设的操作函数为F(X,Y,Z)=(X&Y)|((~X)&Z),I为4,J为3,当前中间量为A=0x01234567,B=0x89ABCDEF,C=0xFEDCBA98,D=0x76543210,第一中间密钥数据库为U数据库,则采用F(X,Y,Z)=(X&Y)|((~X)&Z)和F(X,Y,Z)=(X&Y)|((~X)&Z)对应的4个A=0x01234567,B=0x89ABCDEF,C=0xFEDCBA98,D=0x76543210中的3个B=0x89ABCDEF,C=0xFEDCBA98,D=0x76543210进行运算,得到0xfedcba98,并将0xfedcba98保存到U数据库中。
S3542:将第一中间密钥、k个数值中的一个以上数值、一个以上当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,其中,k为I与J的差的绝对值。
在本实施例中,预设位可以为1、2或5等,预设的常数可以为0x12124567、0x12127766或0x99885656等,预设位和预设的常数的具体内容,以根据实际应用进行设定,此处不做限制。k为正整数,是指I与J的差的绝对值。
具体地,首先从第一中间密钥数据库中提取第一中间密钥,从密钥子分组数据库中提取当前数组,然后将第一中间密钥、k个数值中的一个以上数值、一个及以上当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,并将第二中间密钥保存到第二中间密钥数据库中。
为了更好地理解步骤S3542,下面通过一个例子进行说明,具体表述如下:
例如,继续以步骤S3531中的例子进行说明,假设密钥子分组数据库为A数据库,当前数组为0x6A6B6C6D,4-3=1,1个数值为0x01234567,预设的常数为0xd76aa478,预设位为7,第二中间密钥数据库为B数据库,则将0xfedcba98、0x01234567、0x6A6B6C6D和0xd76aa478的总和0x00007f6e<<7,得到0x003fb700,并将0x003fb700保存到B数据库。
S3543:根据第二中间密钥与预设操作函数对应的当前中间量中的一个以上的数值采用第三预设算法进行计算得到临时密钥。
在本实施例中,第三预设算法可以为算术运算或关系运算等,第四预设算法的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,首先从第二中间密钥数据库中将第二中间密钥提取出来,然后根据第二中间密钥与预设操作函数对应的当前中间量中的一个以上的数值采用第三预设算法进行计算得到临时密钥。
在图4对应的实施例中,通过采用预设的操作函数和预设的操作函数对应的当前中间量中的J个数值进行计算,得到第一中间密钥,将第一中间密钥、k个数值中的一个以上数值、一个以上当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,根据第二中间密钥与预设操作函数对应的当前中间量中的一个以上的数值采用第三预设算法进行计算得到临时密钥。从而使得明文密码信息中的每个字符经过复杂的算术运算和逻辑运算转换为不可逆推的字符信息,进而提高了密钥的安全性。
接下来,在图4对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S6中提及的将目标密文发送给接收方之前,如图5所示,该加密方法还包括:
S7:通过预设的编码方法对密文进行编码,得到编码后的密文。
本实施例中,编码后的密文是指经过预设的编码方法编码后的密文。预设的编码方法是指网络编码方法,其中,网络编码,是指在网络中的各个节点上对各条信道上收到的信息进行线性或者非线性的处理,然后转发给下游节点的方法。网络编码方法可以为base64、7Unicode或UTF-8等,网络编码方法的具体内容,可以根据实际应用进行设定,此处不做限制。
具体地,首先从密文数据库中提取出密文,然后通过预设的编码方法将密文进行编码,得到编码后的密文,并将编码后的密文保存到编码数据库中。
为了更好地理解步骤S7,下面通过一个例子进行说明,具体表述如下:
例如,假设密文数据库为E数据库,密文为“CgdyspSM3aRJ10x8kP9RmA==”,预设的编码方法为base64,编码数据库为F数据库,则首先从E数据库中提取出“CgdyspSM3aRJ10x8kP9RmA==”,然后通过base64将“CgdyspSM3aRJ10x8kP9RmA==”进行编码,得到“Q2dkeXNwU00zYVJKMTB4OGtQOVJtQT09”,并将“Q2dkeXNwU00zYVJKMTB4OGtQOVJtQT09”保存到F数据库中。
在图5对应的实施例中,通过预设的编码方法对密文进行编码,从而得到安全的网络传输的目标密文,进而提高了加密的安全性。
接下来,在图5对应的实施例的基础之上,下面通过一个具体的实施例来对步骤S7的具体实现方法进行详细说明。
请参阅图6,图6示出了步骤S7的具体实现流程,详述如下:
S71:按照预设的拆分方式将密文拆分为单个字符的集合。
具体地,按照预设的拆分方式将密文数据库中的密文拆分为单个字符的集合。
需要说明的是,预设的拆分方式可以为从先后顺序单个字符拆分或每次对半拆分等,预设的拆分方式的具体内容,以根据实际应用进行设定,此处不做限制。
S72:按照预设的补充方式对每个字符补充预设个零,得到目标字符。
具体地,按照预设的补充方式对每个字符补充预设个零,得到目标字符。
需要说明的是,预设的补充方式可以为在字符前面补充或在字符后面补充等,预设个零可以为2个零或5个零等,预设的补充方式和预设个零的具体内容,以根据实际应用进行设定,此处不做限制。
S73:按照预设字符表将每个目标字符转换为对应的编码字符,预设字符表记载了基于预设的编码方法的目标字符与编码字符之间的对应关系。
具体地,按照预设字符表将每个目标字符转换为对应的编码字符,预设字符表记载了基于预设的编码方法的目标字符与编码字符之间的对应关系。
S74:按照预设的拼接方式将每个编码字符拼接起来,得到编码后的密文。
具体地,按照预设的拼接方式将每个编码字符拼接起来,得到编码后的密文,并将目标密文保存到目标密文数据库中。
在图6对应的实施例中,通过按照预设的拆分方式将密文拆分为单个字符的集合,按照预设的补充方式对每个字符补充预设个零,得到目标字符,按照预设字符表将每个目标字符转换为对应的编码字符,预设字符表记载了基于预设的编码方法的目标字符与编码字符之间的对应关系,按照预设的拼接方式将每个编码字符拼接起来,得到编码后的密文,通过预设的拆分方式将密文拆分为单个字符,再每个字符转为为预设字符表中的编码字符,从而得到由单个编码字符组合成的编码后的密文,进而提高了密文传输的安全性。
在本实施例中,加密方法存在对应的解密方法,解密方法的具体实现流程,详述如下:
S101:接收密文。
在本实施例中,可以通过预设的接收方式接收发送方发来的密文,预设的接收方式可以为电波接收或其他物理介质接收等,发送方可以为用户终端或智能设备等,发送方和预设的接收方式的具体内容,以根据实际应用进行设定,此处不做限制。
具体地,通过预设的接收方式接收发送方的密文。
S102:按照预设的拼接方式对应的拆分方式将密文进行拆分,得到每个编码字符。
在本实施例中,预设的拼接方式存在对应的拆分方式。
具体地,按照预设的拼接方式对应的拆分方式将密文进行拆分,得到每个编码字符。
S103:按照所述预设字符表将每个编码字符转换为对应的目标字符。
在本实施例中,预设的编码方法存在对应的解码方法,预设的编码方法在上述加密法中已经描述,具体参考加密法实施例内容,为避免重复,这里不再赘述。
具体地,按照所述预设字符表将每个编码字符转换为对应的目标字符,其中,预设字符表记载了编码字符与目标字符之间的对应关系,该编码字符是指基于预设的编码方法对应的解码方法的编码字符。
S104:按照预设的补充方式对应的去除方式对每个目标字符去除所述预设个零,得到每个字符。
在本实施例中,预设的补充方式存在对应的去除方式,预设的补充方式,在上述加密 法中已经描述,具体参考加密法实施例内容,为避免重复,这里不再赘述。
具体地,按照预设的补充方式对应的去除方式对每个目标字符去除所述预设个零,得到每个字符。
S105:按照预设的拆分方式对应的拼接方式将每个字符拼接为解码后的密文。
在本实施例中,预设的拆分方式存在对应的拼接方式,预设的拆分方式在上述加密法中已经描述,具体参考加密法实施例内容,为避免重复,这里不再赘述。
具体地,按照预设的拆分方式对应的拼接方式将每个字符拼接为解码后的密文。
为了更好地理解步骤S101至步骤S105,下面通过一个例子进行说明,具体表述如下:
例如,假设密文为“Q2dkeXNwU00zYVJKMTB4OGtQOVJtQT09”,预设的编码方法对应的解码方法为base64,则,通过base64对“Q2dkeXNwU00zYVJKMTB4OGtQOVJtQT09”进行解码,得到“CgdyspSM3aRJ10x8kP9RmA==”。
S106:获取加密密钥,并将加密密钥确定为解密密钥。
在本实施例中,加密密钥可以作为解密密钥。加密密钥通过第一预设加密法加密得到,为了避免重复,此处不再阐述加密密钥通过第一预设加密法加密得到的具体过程。
具体地,获取加密密钥,并将获取到的加密密钥确定为解密密钥。
S107:通过第二预设加密法对应的解密法,采用解密密钥对解码后的密文进行解密处理,得到明文。
在本实施例中,第二预设加密法存在对应的解密法,第二预设加密法的具体内容,为了避免重复,此处不再阐述。
具体地,通过第二预设加密法对应的解密法,采用解密密钥对密文进行解密处理,得到明文。
为了更好地理解步骤S106至步骤S107,下面通过一个例子进行说明,具体表述如下:
例如,密文为“CgdyspSM3aRJ10x8kP9RmA==”,加密密钥为“603F52D844017E83CA267751FEE5B61B”,第二预设加密法对应的解密法为3DES,预设的接收方式为电波接收,发送方为智能设备,则首先,通过电波接收智能设备发来的“CgdyspSM3aRJ10x8kP9RmA==”,然后,获取“603F52D844017E83CA267751FEE5B61B”做为解密密钥,最后,通过3DES,采用“603F52D844017E83CA267751FEE5B61B”对“CgdyspSM3aRJ10x8kP9RmA==”进行解密处理,得到“爱我中华!!!”。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
实施例2
对应于实施例1中的加密方法,图7示出了与实施例1提供的加密方法一一对应的加密装置。为了便于说明,仅示出了与本申请实施例相关的部分。
请参阅图7,该加密装置包括:第一获取模块71、第二获取模块72、第一加密模块73、提取模块74、第二加密模块75和发送模块76。各功能模块详细说明如下:
第一获取模块71,用于获取密码信息;
第二获取模块72,用于获取待加密的数据信息;
第一加密模块73,用于通过第一预设加密法对密码信息进行加密处理,得到目标密钥;
提取模块74,用于按照第二预设加密法的密钥规格长度从目标密钥中提取全部或部分的连续密钥信息作为加密密钥;
第二加密模块75,用于通过第二预设加密法,采用加密密钥对所述待加密的数据信息进行加密处理,得到密文;
发送模块76,用于通过预设的发送方式将密文发送给接收方。
进一步地,第一加密模块73包括:
填充子模块731,用于按照预设的填充方式将密码信息填充至预设长度,得到目标密 码信息;
第一分组子模块732,用于按照第一预设的分组方式对目标密码信息进行分组,得到M组密钥分组,其中,M>0;
第二分组子模块733,用于按照第二预设的分组方式对M组密钥分组中的每组密钥分组分别进行分组,得到M*N组第一密钥子分组,其中,N>0;
复制子模块734,用于按照预设的复制方式对M*N组密钥子分组中的每组第一密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0;
第一运算子模块735,用于根据M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法,得到初步密钥;
输出子模块736,用于按照预设的输出方式将初步密钥输出,得到目标密钥。
进一步地,第一运算子模块735包括:
第一确定子模块7351,用于获取按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最前1组第二密钥子分组作为当前数组;
第二确定子模块7352,用于获取I个不同的数值作为当前中间量,其中,I>0;
第三确定子模块7353,用于根据当前数组从两个以上的第一预设的算法中确定出当前算法;
第二运算子模块7354,用于根据当前中间量和当前数组采用当前算法得到临时密钥;
判断子模块7355,用于判断当前数组是否为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后1组第二密钥子分组;
第五运算子模块7356,用于若当前数组为按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则根据临时结果和所述I个不同的数值采用第二预设的算法进行计算,得到初步密钥;
第六运算子模块7357,用于若当前数组不是按照前后顺序排列的M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则获取排序最前1组第二密钥子分组的下1组第二密钥子分组作为当前数组,并且确定临时密钥为当前中间量,并触发第二运算子模块7354。
进一步地,第三确定子模块7354包括:
第三运算子模块73541,用于采用预设的操作函数和预设的操作函数对应的当前中间量中的J个数值进行运算,得到第一中间密钥,其中,I>J>0;
移位子模块73542,用于将第一中间密钥、k个数值中的一个以上数值、一个以上当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,其中,k为I与J的差的绝对值;
第四运算子模块73543,用于将第二密钥与预设操作函数对应的当前中间量中的一个以上的数值进行第三预设算法得到临时密钥。
进一步地,在将密文发送给接收方之前,该加密装置还包括:
编码模块77,用于通过预设的编码方法对密文进行编码,得到编码后的密文。
进一步地,编码模块77包括:
拆分子模块771,用于按照预设的拆分方式将密文拆分为单个字符的集合;
补充子模块772,用于按照预设的补充方式对每个字符补充预设个零,得到目标字符;
转换子模块773,用于按照预设字符表将每个目标字符转换为对应的编码字符,预设字符表记载了基于预设的编码方法的目标字符与编码字符之间的对应关系;
拼接子模块774,用于按照预设的拼接方式将每个编码字符拼接起来,得到编码后的密文。
本实施例提供的一种加密装置中各模块实现各自功能的过程,具体可参考前述实施例1的描述,此处不再赘述。
实施例3
本实施例提供了一种计算机可读存储介质,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现实施例1中加密方法,为避免重复,这里不再赘述。或者,该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行计算机可读指令时实现实施例2中加密装置中各模块/单元的功能,为避免重复,这里不再赘述。
可以理解地,所述计算机可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电载波信号和电信信号等。
实施例4
图8是本申请一实施例提供的终端设备的示意图。如图8所示,该实施例的终端设备80包括:处理器81、存储器82以及存储在存储器82中并可在处理器81上运行的计算机可读指令83。处理器81执行计算机可读指令83时实现上述实施例1中加密方法的步骤,例如图1所示的步骤S1至步骤S6。或者,处理器81执行计算机可读指令83时实现上述各装置实施例中各模块/单元的功能,例如图7所示模块71至模块77的功能。
示例性的,计算机可读指令63可以被分割成一个或多个模块/单元,一个或者多个模块/单元被存储在存储器62中,并由处理器61执行,以完成本申请。一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令的指令段,该指令段用于描述计算机可读指令63在终端设备60中的执行过程。例如,计算机可读指令63可以被分割成第一获取模块、第二获取模块、第一加密模块、提取模块、第二加密模块和发送模块,各模块的具体功能如实施例2所示,为避免重复,此处不一一赘述。
终端设备80可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。终端设备可包括,但不仅限于,处理器81、存储器82。本领域技术人员可以理解,图8只是终端设备80的示例,并不构成对终端设备80的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器81可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器82可以是终端设备80的内部存储单元,例如终端设备80的硬盘或内存。存储器82也可以是终端设备80的外部存储设备,例如终端设备80上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器82还可以既包括终端设备80的内部存储单元也包括外部存储设备。存储器82用于存储计算机可读指令以及终端设备所需的其他程序和数据。存储器82还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施 例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种加密方法,其特征在于,所述加密方法包括:
    获取密码信息;
    获取待加密的数据信息;
    通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;
    按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;
    通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;
    通过预设的发送方式将所述密文发送给接收方。
  2. 如权利要求1所述的加密方法,其特征在于,所述通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥,包括:
    按照预设的填充方式将所述密码信息填充至预设长度,得到目标密码信息;
    按照第一预设的分组方式对所述目标密码信息进行分组,得到M组密钥分组,其中,M>0;
    按照第二预设的分组方式对M组密钥分组中的每组所述密钥分组分别进行分组,得到M*N组第一密钥子分组,其中,N>0;
    按照预设的复制方式对所述M*N组密钥子分组中的每组第一密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0;
    根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥;
    按照预设的输出方式将所述初步密钥输出,得到所述目标密钥。
  3. 如权利要求2所述的加密方法,其特征在于,根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥包括:
    获取按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最前1组所述第二密钥子分组作为当前数组;
    获取I个不同的数值作为当前中间量,其中I>0;
    根据所述当前数组从两个以上的第一预设的算法中确定出当前算法;
    根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥;
    判断所述当前数组是否为按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组;
    若所述当前数组为按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则根据所述临时密钥和所述I个不同的数值采用第二预设的算法进行计算,得到所述初步密钥;
    若所述当前数组不是按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则获取所述排序最前1组第二密钥子分组的下1组第二密钥子分组作为所述当前数组,并且确定所述临时密钥为当前中间量,返回执行所述根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥的步骤。
  4. 如权利要求3所述的加密方法,其特征在于,所述根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥包括:
    采用预设的操作函数和所述预设的操作函数对应的所述当前中间量中的J个数值进行计算,得到第一中间密钥,其中,I>J>0;
    将所述第一中间密钥、k个数值中的一个以上数值、一个以上所述当前数组和预设的 常数的总和进行向左或向右循环移预设位,得到第二中间密钥,其中,k为I与J的差的绝对值;
    根据所述第二密钥与所述预设操作函数对应的所述当前中间量中的一个以上的数值采用第三预设算法进行计算得到所述临时密钥。
  5. 如权利要求1至4任一项所述的加密方法,其特征在于,在将密文发送给接收方之前,所述加密方法还包括:
    通过预设的编码方法对所述密文进行编码,得到编码后的密文。
  6. 如权利要求5所述的加密方法,其特征在于,所述通过预设的编码方法对所述密文进行编码,得到编码后的密文,包括:
    按照预设的拆分方式将所述密文拆分为单个字符的集合;
    按照预设的补充方式对每个所述字符补充预设个零,得到目标字符;
    按照预设字符表将每个所述目标字符转换为对应的编码字符,所述预设字符表记载了基于所述预设的编码方法的目标字符与编码字符之间的对应关系;
    按照预设的拼接方式将每个所述编码字符拼接起来,得到所述编码后的密文。
  7. 一种加密装置,其特征在于,所述加密装置包括:
    第一获取模块,用于获取密码信息;
    第二获取模块,用于获取待加密的数据信息;
    第一加密模块,用于通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;
    提取模块,用于按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;
    第二加密模块,用于通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;
    发送模块,用于通过预设的发送方式将所述密文发送给接收方。
  8. 如权利要求7所述的加密装置,其特征在于,所述第一加密模块包括:
    填充子模块,用于按照预设的填充方式将所述密码信息填充至预设长度,得到目标密码信息;
    第一分组子模块,用于按照第一预设的分组方式对所述目标密码信息进行分组,得到M组密钥分组,其中,M>0;
    第二分组子模块,用于按照第二预设的分组方式对M组密钥分组中的每组所述密钥分组分别中的每组第一密钥子分组进行分组,得到M*N组第一密钥子分组,其中,N>0;
    复制子模块,用于按照预设的复制方式对所述M*N组密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0;
    第一运算子模块,用于根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥;
    输出子模块,用于按照预设的输出方式将所述初步密钥输出,得到所述目标密钥。
  9. 如权利要求8所述的加密装置,其特征在于,所述第一运算子模块包括:
    第一确定子模块,用于获取按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最前1组所述第二密钥子分组作为当前数组;
    第二确定子模块,用于获取I个不同的数值作为当前中间量,其中I>0;
    第三确定子模块,用于根据所述当前数组从两个以上的第一预设的算法中确定出当前算法;
    第二运算子模块,用于根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥;
    判断子模块,用于判断所述当前数组是否为按照前后顺序排列的所述M*N*L组第二 密钥子分组中的排序最后的1组第二密钥子分组;
    第五运算子模块,用于若所述当前数组为按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则根据所述临时密钥和所述I个不同的数值采用第二预设的算法进行计算,得到所述初步密钥;
    第六运算子模块,用于若所述当前数组不是按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则获取所述排序最前1组第二密钥子分组的下1组第二密钥子分组作为所述当前数组,并且确定所述临时密钥为当前中间量,触发所述第二运算子模块。
  10. 如权利要求9所述的加密装置,其特征在于,所述第三确定子模块包括:
    第三运算子模块,用于采用预设的操作函数和所述预设的操作函数对应的所述当前中间量中的J个数值进行计算,得到第一中间密钥,其中,I>J>0;
    移位子模块,用于将所述第一中间密钥、k个数值中的一个以上数值、一个以上所述当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,其中,k为I与J的差的绝对值;
    第四运算子模块,用于根据所述第二密钥与所述预设操作函数对应的所述当前中间量中的一个以上的数值采用第三预设算法进行计算得到所述临时密钥。
  11. 如权利要求7至10任一项所述的加密装置,其特征在于,所述加密装置还包括:
    编码模块,用于通过预设的编码方法对所述密文进行编码,得到编码后的密文。
  12. 如权利要求11所述的加密装置,其特征在于,所述编码模块包括:
    拆分子模块,用于按照预设的拆分方式将所述密文拆分为单个字符的集合;
    补充子模块,用于按照预设的补充方式对每个所述字符补充预设个零,得到目标字符;
    转换子模块,用于按照预设字符表将每个所述目标字符转换为对应的编码字符,所述预设字符表记载了基于所述预设的编码方法的目标字符与编码字符之间的对应关系;
    拼接子模块,用于按照预设的拼接方式将每个所述编码字符拼接起来,得到所述编码后的密文。
  13. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取密码信息;
    获取待加密的数据信息;
    通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;
    按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;
    通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;
    通过预设的发送方式将所述密文发送给接收方。
  14. 如权利要求11所述的计算机设备,其特征在于,所述通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥,包括:
    按照预设的填充方式将所述密码信息填充至预设长度,得到目标密码信息;
    按照第一预设的分组方式对所述目标密码信息进行分组,得到M组密钥分组,其中,M>0;
    按照第二预设的分组方式对M组密钥分组中的每组所述密钥分组分别进行分组,得到M*N组第一密钥子分组,其中,N>0;
    按照预设的复制方式对所述M*N组密钥子分组中的每组第一密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0;
    根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥;
    按照预设的输出方式将所述初步密钥输出,得到所述目标密钥。
  15. 如权利要求14所述的计算机设备,其特征在于,根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥包括:
    获取按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最前1组所述第二密钥子分组作为当前数组;
    获取I个不同的数值作为当前中间量,其中I>0;
    根据所述当前数组从两个以上的第一预设的算法中确定出当前算法;
    根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥;
    判断所述当前数组是否为按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组;
    若所述当前数组为按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则根据所述临时密钥和所述I个不同的数值采用第二预设的算法进行计算,得到所述初步密钥;
    若所述当前数组不是按照前后顺序排列的所述M*N*L组第二密钥子分组中的排序最后的1组第二密钥子分组,则获取所述排序最前1组第二密钥子分组的下1组第二密钥子分组作为所述当前数组,并且确定所述临时密钥为当前中间量,返回执行所述根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥的步骤。
  16. 如权利要求15所述的计算机设备,其特征在于,所述根据所述当前中间量和所述当前数组采用所述当前算法计算得到临时密钥包括:
    采用预设的操作函数和所述预设的操作函数对应的所述当前中间量中的J个数值进行计算,得到第一中间密钥,其中,I>J>0;
    将所述第一中间密钥、k个数值中的一个以上数值、一个以上所述当前数组和预设的常数的总和进行向左或向右循环移预设位,得到第二中间密钥,其中,k为I与J的差的绝对值;
    根据所述第二密钥与所述预设操作函数对应的所述当前中间量中的一个以上的数值采用第三预设算法进行计算得到所述临时密钥。
  17. 如权利要求13至16任一项所述的计算机设备,其特征在于,在将密文发送给接收方之前,所述处理器执行所述计算机可读指令时还实现如下步骤:
    通过预设的编码方法对所述密文进行编码,得到编码后的密文。
  18. 如权利要求17所述的计算机设备,其特征在于,所述通过预设的编码方法对所述密文进行编码,得到编码后的密文,包括:
    按照预设的拆分方式将所述密文拆分为单个字符的集合;
    按照预设的补充方式对每个所述字符补充预设个零,得到目标字符;
    按照预设字符表将每个所述目标字符转换为对应的编码字符,所述预设字符表记载了基于所述预设的编码方法的目标字符与编码字符之间的对应关系;
    按照预设的拼接方式将每个所述编码字符拼接起来,得到所述编码后的密文。
  19. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取密码信息;
    获取待加密的数据信息;
    通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥;
    按照第二预设加密法的密钥规格长度从所述目标密钥中提取全部或部分的连续密钥信息作为加密密钥;
    通过所述第二预设加密法,采用所述加密密钥对所述待加密的数据信息进行加密处理,得到密文;
    通过预设的发送方式将所述密文发送给接收方。
  20. 如权利要求19所述的非易失性可读存储介质,其特征在于,所述通过第一预设加密法对所述密码信息进行加密处理,得到目标密钥,包括:
    按照预设的填充方式将所述密码信息填充至预设长度,得到目标密码信息;
    按照第一预设的分组方式对所述目标密码信息进行分组,得到M组密钥分组,其中,M>0;
    按照第二预设的分组方式对M组密钥分组中的每组所述密钥分组分别进行分组,得到M*N组第一密钥子分组,其中,N>0;
    按照预设的复制方式对所述M*N组密钥子分组中的每组第一密钥子分组进行复制,得到M*N*L组第二密钥子分组,其中,L>0;
    根据所述M*N*L组第二密钥子分组中的每组第二密钥子分组采用第一预设的算法进行计算,得到初步密钥;
    按照预设的输出方式将所述初步密钥输出,得到所述目标密钥。
PCT/CN2018/106401 2018-06-13 2018-09-19 加密方法、装置、终端设备及存储介质 WO2019237550A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810606438.2A CN108989287B (zh) 2018-06-13 2018-06-13 加密方法、装置、终端设备及存储介质
CN201810606438.2 2018-06-13

Publications (1)

Publication Number Publication Date
WO2019237550A1 true WO2019237550A1 (zh) 2019-12-19

Family

ID=64541267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106401 WO2019237550A1 (zh) 2018-06-13 2018-09-19 加密方法、装置、终端设备及存储介质

Country Status (2)

Country Link
CN (1) CN108989287B (zh)
WO (1) WO2019237550A1 (zh)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688160B (zh) * 2019-01-28 2021-09-28 平安科技(深圳)有限公司 数据加密传输控制方法、装置、计算机设备及存储介质
CN110071909A (zh) * 2019-03-15 2019-07-30 平安科技(深圳)有限公司 基于rsa的长数据加密方法、装置、计算机设备及存储介质
CN109981648B (zh) * 2019-03-27 2021-07-06 深圳市创维软件有限公司 一种加密传输方法、解密方法、装置、终端及存储介质
CN112035849B (zh) * 2019-06-04 2024-05-03 华控清交信息科技(北京)有限公司 一种数据处理方法、装置和电子设备
CN110517699B (zh) * 2019-08-23 2023-05-26 平安科技(深圳)有限公司 信息隐写方法、装置、设备及存储介质
CN110516462B (zh) * 2019-08-30 2021-12-07 京东数字科技控股有限公司 用于加密数据的方法和装置
CN111211887B (zh) * 2019-12-23 2022-11-29 中移(杭州)信息技术有限公司 资源加密方法、系统、装置及计算机可读存储介质
CN111211888B (zh) * 2019-12-23 2023-04-18 新奇点智能科技集团有限公司 数据发送方法、数据接收方法、发送端及接收端
CN111786777B (zh) * 2020-06-05 2023-08-04 京东科技控股股份有限公司 一种流式数据加解密方法、装置、系统及存储介质
CN113259438B (zh) * 2021-05-14 2023-03-31 北京达佳互联信息技术有限公司 模型文件的发送方法和装置及模型文件的接收方法和装置
CN114221783B (zh) * 2021-11-11 2023-06-02 杭州天宽科技有限公司 一种数据选择加密解密系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080063206A1 (en) * 2006-09-07 2008-03-13 Karp James M Method for altering the access characteristics of encrypted data
CN101340279A (zh) * 2008-07-09 2009-01-07 深圳市金蝶移动互联技术有限公司 数据加密及解密方法、系统及设备
CN103577966A (zh) * 2012-07-31 2014-02-12 天津书生软件技术有限公司 电子印章制章方法
CN107172436A (zh) * 2017-06-09 2017-09-15 国政通科技股份有限公司 一种身份证信息传输保护的方法和系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9948621B2 (en) * 2015-05-20 2018-04-17 Alcatel Lucent Policy based cryptographic key distribution for network group encryption
CN106656475B (zh) * 2017-01-09 2020-01-21 李朋林 一种用于高速加密的新型对称型密钥加密方法
CN107070637A (zh) * 2017-01-13 2017-08-18 广东技术师范学院天河学院 一种交叠分组的数据加解密方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080063206A1 (en) * 2006-09-07 2008-03-13 Karp James M Method for altering the access characteristics of encrypted data
CN101340279A (zh) * 2008-07-09 2009-01-07 深圳市金蝶移动互联技术有限公司 数据加密及解密方法、系统及设备
CN103577966A (zh) * 2012-07-31 2014-02-12 天津书生软件技术有限公司 电子印章制章方法
CN107172436A (zh) * 2017-06-09 2017-09-15 国政通科技股份有限公司 一种身份证信息传输保护的方法和系统

Also Published As

Publication number Publication date
CN108989287A (zh) 2018-12-11
CN108989287B (zh) 2020-11-27

Similar Documents

Publication Publication Date Title
WO2019237550A1 (zh) 加密方法、装置、终端设备及存储介质
WO2021238527A1 (zh) 数字签名生成方法、装置、计算机设备和存储介质
CN113343305B (zh) 隐私数据的交集计算方法、装置、设备及存储介质
US9443091B2 (en) Method and system for protecting execution of cryptographic hash functions
CN107395368B (zh) 无介质环境中的数字签名方法及解封装方法与解密方法
CN107276744B (zh) 一种文件存储加密方法及系统
US20050210248A1 (en) Method and device for generating approximate message authentication codes
US8180048B2 (en) Method and system for computational transformation
JP2001324925A (ja) 共通鍵暗号方法及び装置
CN111526197A (zh) 一种云端数据安全共享方法
KR20110087094A (ko) 데이터 암호화 방법
CN112738051A (zh) 数据信息加密方法、系统及计算机可读存储介质
Walia et al. Implementation of new modified MD5-512 bit algorithm for cryptography
CN114244507A (zh) 基于单路传输的量子直接通信方法、装置、设备和系统
Wu et al. ElGamal algorithm for encryption of data transmission
CN115277064B (zh) 数据加密、数据解密方法、装置、电子设备和介质
US20080219448A1 (en) Multiple-layers encryption/decryption and distribution of copyrighted contents
CN114374518B (zh) 具有交集计数的psi获取交集信息的方法、装置及存储介质
KR102522708B1 (ko) 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법
CN112613054A (zh) 一种基于grs码的电子档案验证方法、装置、电子设备
US20130058483A1 (en) Public key cryptosystem and technique
CN110519055B (zh) 一种镜像比对加、解密算法的方法、装置
CN117615176A (zh) 一种流媒体的加密与解密方法及装置
JP5073635B2 (ja) 暗号システム、及び暗号プログラム
TW410519B (en) A method of encryption and decryption in data transmission

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

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

Country of ref document: EP

Kind code of ref document: A1