Encryption and decryption method and device, electronic equipment and computer readable storage medium
By dynamically obtaining and using time numbers, sorting numbers, formula numbers and password book numbers, the data is encrypted, solving the problem that existing encryption methods are easily cracked and custom encryption methods are insecure, achieving higher security and difficult-to-crack encryption effects.
Patent Information
- Application Number
- CN202411836724.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing data encryption methods are easily cracked, and custom encryption methods are not safe for a long time due to the fixed keys and algorithms.
By obtaining the time number, sorting number, formula number and cipherbook number from the keychain library, the encrypted data is split and encoded, and dynamic encoding rules and formulas are used for encryption to generate unfixed ciphertexts.
Improves encryption security and reduces the possibility of cracking, because the same data is encrypted with different keychain at different times, and the generated ciphertext is also different.
Smart Images

Figure CN119835015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to an encryption and decryption method, an encryption and decryption device, an electronic device and a computer-readable storage medium. Background Art
[0002] In existing project development, data encryption usually adopts traditional data encryption methods or custom encryption methods.
[0003] However, traditional data encryption methods are easy to be cracked. Custom encryption methods, such as key combination algorithms, will affect the security of this method due to the length, complexity, long usage time, failure to replace in time, and fixedness of the algorithm. These data encryption methods are still safe in the short term, but the keys and combined algorithms of these data encryption methods are relatively fixed, which is not a safe method in the long run. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide an encryption and decryption method, an encryption and decryption device, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In order to solve the above problem, an embodiment of the present invention discloses an encryption method, which includes:
[0006] Obtaining a keychain for encryption from a keychain library, and splitting the keychain into a time number, a sorting number, a formula number, and a codebook number;
[0007] Split the data to be encrypted to obtain multiple single characters;
[0008] Convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character;
[0009] The first code corresponding to each single character is encrypted based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
[0010] In one or more embodiments, encrypting the first code corresponding to each single character based on the time number, the sorting number, the formula number, and the code book number to obtain the encrypted ciphertext corresponding to each single character includes:
[0011] Determine current time information using the time number; the current time information includes multiple information items;
[0012] Determine the order of each of the information items using the order numbers to obtain the ordered information items;
[0013] Calculate the offset of the first code by using the first code, the sorted information items and the formula number to obtain a first offset;
[0014] The first offset and the code book number are used to determine the encrypted ciphertext corresponding to each single character.
[0015] In one or more embodiments, the calculating the offset of the first code by using the first code, the sorted information items and the formula number to obtain the first offset includes:
[0016] S1, obtaining the first formula sub-number in the formula number as the first formula sub-number, and obtaining the first information item in the sorted information items as the first information item;
[0017] S2. Obtain a first function formula corresponding to the first formula sub-number and a first parameter value of the first information item;
[0018] S3, detecting whether the first formula sub-number is the first one of the formula numbers, if so, executing S4, if not, executing S5;
[0019] S4, substituting the first code and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0020] S5, substituting the candidate offset corresponding to the previous information item and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0021] S6, check whether there is a next formula sub-number, if yes, execute S7, if no, obtain the first offset;
[0022] S7, obtaining the next formula sub-number in the formula number as the first formula sub-number, and obtaining the next information item in the sorted information items as the first information item, and executing S2.
[0023] In one or more embodiments, the using the first offset and the code book number to determine the encrypted ciphertext corresponding to each single character includes:
[0024] Convert the first offset using a preset second encoding rule to obtain a corresponding second encoding;
[0025] Determining a corresponding code book according to the code book number;
[0026] The second code is used as the code field of the encrypted ciphertext, and a character is randomly selected from the code book as the character field of the ciphertext.
[0027] Accordingly, an embodiment of the present invention discloses a decryption method, comprising:
[0028] Obtaining a keychain for decryption from a keychain library, and splitting the keychain into a time number, a sorting number, a formula number, and a codebook number;
[0029] Parsing each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext;
[0030] Parsing the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext;
[0031] Each second offset is converted using a preset first encoding rule to obtain each decrypted single character.
[0032] In one or more embodiments, the step of parsing each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext includes:
[0033] Determining a corresponding code book according to the code book number;
[0034] Using the code book to query each ciphertext to obtain a second code corresponding to each ciphertext;
[0035] Each second code is converted using a preset third coding rule to obtain each first offset.
[0036] In one or more embodiments, the parsing the first offset based on the time number, the sorting number, and the formula number to obtain the second offset corresponding to each ciphertext includes:
[0037] Determine current time information using the time number; the current time information includes multiple information items;
[0038] Determine the order of each information item using the order number to obtain the ordered information items;
[0039] The first offset, the sorted information items, and the formula number are used to parse the first offset to obtain a second offset corresponding to each ciphertext.
[0040] In one or more embodiments, the using the first offset, the sorted information items, and the formula number to parse the first offset to obtain the second offset corresponding to each ciphertext includes:
[0041] S1, obtaining the last formula sub-number in the formula number as the second formula sub-number, and obtaining the last information item in the sorted information items as the second information item;
[0042] S2. Obtain a second function formula corresponding to the second formula sub-number and a second parameter value of the second information item;
[0043] S3, detecting whether the second formula sub-number is the last one of the formula numbers, if so, executing S4, if not, executing S5;
[0044] S4, substituting the first offset and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0045] S5, substituting the candidate offset corresponding to the next information item and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0046] S6, check whether there is a previous formula sub-number, if yes, execute S7, if no, obtain the second offset;
[0047] S7, obtaining the previous formula sub-number in the formula number as the second formula sub-number, and obtaining the previous information item in the sorted information items as the second information item, and executing S2.
[0048] Accordingly, an embodiment of the present invention discloses an encryption device, the device comprising:
[0049] A first acquisition module is used to acquire a keychain for encryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number;
[0050] A splitting module is used to split the data to be encrypted into multiple single characters;
[0051] A first conversion module, used to convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character;
[0052] The encryption module is used to encrypt the first code corresponding to each single character based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
[0053] In one or more embodiments, the encryption module includes:
[0054] A first processing submodule, configured to determine current time information using the time number; the current time information includes a plurality of information items;
[0055] A second processing submodule, configured to determine the order of each of the information items using the order numbers to obtain the ordered information items;
[0056] A third processing submodule, configured to calculate an offset of the first code by using the first code, the sorted information items and the formula number to obtain a first offset;
[0057] The fourth processing submodule is used to determine the encrypted ciphertext corresponding to each single character by using the first offset and the code book number.
[0058] In one or more embodiments, the third processing submodule is specifically configured to:
[0059] S1, obtaining the first formula sub-number in the formula number as the first formula sub-number, and obtaining the first information item in the sorted information items as the first information item;
[0060] S2. Obtain a first function formula corresponding to the first formula sub-number and a first parameter value of the first information item;
[0061] S3, detecting whether the first formula sub-number is the first one of the formula numbers, if so, executing S4, if not, executing S5;
[0062] S4, substituting the first code and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0063] S5, substituting the candidate offset corresponding to the previous information item and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0064] S6, check whether there is a next formula sub-number, if yes, execute S7, if no, obtain the first offset;
[0065] S7, obtaining the next formula sub-number in the formula number as the first formula sub-number, and obtaining the next information item in the sorted information items as the first information item, and executing S2.
[0066] In one or more embodiments, the fourth processing submodule is specifically configured to:
[0067] Convert the first offset using a preset second encoding rule to obtain a corresponding second encoding;
[0068] Determining a corresponding code book according to the code book number;
[0069] The second code is used as the code field of the encrypted ciphertext, and a character is randomly selected from the code book as the character field of the ciphertext.
[0070] Accordingly, an embodiment of the present invention discloses a decryption device, the device comprising:
[0071] A second acquisition module is used to obtain a keychain for decryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number;
[0072] A first decryption module, used to parse each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext;
[0073] A second decryption module, configured to parse the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext;
[0074] The second conversion module is used to convert each second offset using a preset first encoding rule to obtain each decrypted single character.
[0075] In one or more embodiments, the first decryption module is specifically used to:
[0076] Determining a corresponding code book according to the code book number;
[0077] Using the code book to query each ciphertext to obtain a second code corresponding to each ciphertext;
[0078] Each second code is converted using a preset third coding rule to obtain each first offset.
[0079] In one or more embodiments, the second decryption module includes:
[0080] A fifth processing submodule, configured to determine current time information using the time number; the current time information includes a plurality of information items;
[0081] A sixth processing submodule, configured to determine the order of each information item using the order number to obtain the ordered information items;
[0082] The seventh processing submodule is used to parse the first offset by using the first offset, the sorted information items, and the formula number to obtain a second offset corresponding to each ciphertext.
[0083] In one or more embodiments, the seventh processing submodule is specifically configured to:
[0084] S1, obtaining the last formula sub-number in the formula number as the second formula sub-number, and obtaining the last information item in the sorted information items as the second information item;
[0085] S2. Obtain a second function formula corresponding to the second formula sub-number and a second parameter value of the second information item;
[0086] S3, detecting whether the second formula sub-number is the last one of the formula numbers, if so, executing S4, if not, executing S5;
[0087] S4, substituting the first offset and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0088] S5, substituting the candidate offset corresponding to the next information item and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0089] S6, check whether there is a previous formula sub-number, if yes, execute S7, if no, obtain the second offset;
[0090] S7, obtaining the previous formula sub-number in the formula number as the second formula sub-number, and obtaining the previous information item in the sorted information items as the second information item, and executing S2.
[0091] Correspondingly, an embodiment of the present invention discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the various steps of the above-mentioned encryption method embodiment and decryption method embodiment when executed by the processor.
[0092] Accordingly, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the above-mentioned encryption method embodiment and decryption method embodiment is implemented.
[0093] The embodiments of the present invention include the following advantages:
[0094] A keychain for encryption is obtained from a keychain library, and the keychain is split to obtain a time number, a sorting number, a formula number, and a codebook number; the data to be encrypted is split to obtain a plurality of single characters; each single character is converted using a preset first coding rule to obtain a first code corresponding to each single character; the first code corresponding to each single character is encrypted based on the time number, the sorting number, the formula number, and the codebook number to obtain an encrypted ciphertext corresponding to each single character. Since the time information corresponding to the time number, the time information item corresponding to the sorting number, the function formula corresponding to the formula number, and the codebook corresponding to the codebook number are not fixed, the ciphertexts obtained by encrypting the same data using different keychains may also be different. Compared with fixed keys and codebooks, the possibility of cracking is greatly reduced, and the security of encryption is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 is a flow chart of the steps of Embodiment 1 of an encryption method of the present invention;
[0096] Figure 2 is a flow chart of the steps of calculating the first offset of the present invention;
[0097] Figure 3 is a flow chart of steps of a second embodiment of a decryption method of the present invention;
[0098] Figure 4 is a flow chart of the steps of calculating the second offset of the present invention;
[0099] Figure 5 is a structural block diagram of a first embodiment of an encryption device of the present invention;
[0100] Figure 6 It is a structural block diagram of a second embodiment of a decryption device of the present invention. DETAILED DESCRIPTION
[0101] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0102] One of the core concepts of the embodiments of the present invention is that, since the time information corresponding to the time number, the time information item corresponding to the sort number, the function formula corresponding to the formula number and the code book corresponding to the code book number are not fixed, the ciphertexts obtained by encrypting the same data with different key chains may also be different. Compared with fixed keys and code books, the possibility of cracking is greatly reduced, and the security of encryption is guaranteed.
[0103] Reference Figure 1, shows a flowchart of a first embodiment of an encryption method of the present invention, which may specifically include the following steps:
[0104] Step 101, obtain a keychain for encryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number.
[0105] Specifically, the keychain library can store keychains, which may include time numbers, sorting numbers, formula numbers, and password book numbers.
[0106] The time number is used to indicate the number corresponding to the current time information. The current time information may be the information of the time when the keychain is generated. It may include multiple information items: season, week, year, month, day, hour, minute, and second. Among them, spring, summer, autumn, and winter in the seasons may be indicated by 1, 2, 3, and 4, respectively. For example, February is in winter, so the parameter value of the season information item corresponding to February is "4"; Monday to Sunday are indicated by 1 to 7, respectively. For example, the parameter value of the week information item corresponding to Monday is "1". The time number may be recorded as S001.
[0107] It should be noted that, in addition to the above-mentioned information items, the current time information may also include other information items, and each information item may be represented in other ways in addition to the above-mentioned representation methods. In actual applications, specific information items and the representation methods of information items may be set according to actual needs, and the embodiments of the present invention do not limit this.
[0108] The sorting number is used to indicate the number corresponding to the arrangement order of the serial numbers of each information item. For example, the default arrangement order of information items is: season, week, year, month, day, hour, minute, second, and the corresponding serial numbers are: 1, 2, 3, 4, 5, 6, 7. The order of the rearranged serial numbers is: 2, 1, 6, 7, 8, 3, 4, 5, that is, week, season, hour, minute, second, year, month, day. The sorting number can be recorded as X001.
[0109] It should be noted that the order of the rearranged information items can be other orders besides the above order. In practical applications, the order of the information items corresponding to the sorting numbers can be set according to actual needs, and the embodiment of the present invention does not limit this.
[0110] The formula number is used to indicate the number corresponding to the formula used during encryption. The number of formulas is the same as the number of information items. In other words, the formula number includes multiple formula sub-numbers, and each information item corresponds to a formula sub-number. Each formula sub-number corresponds to a function formula. There are no less than two unknowns in the function formula, so the function formula can be a quadratic equation or a linear equation. The value after the function formula row number is a null value, which is generated by calculation.
[0111] Furthermore, the function formulas corresponding to the formula sub-numbers are different from each other, and the value calculated by the function formula corresponding to the current information item is used as the input of the function formula corresponding to the next information item. For example, the value calculated by the function formula corresponding to the first information item is used as the input of the function formula corresponding to the second information item. The value calculated by the function formula corresponding to the last information item is used as the offset (described in detail later). In the embodiment of the present invention, the number of information items is 8, so 8 formula sub-numbers can be corresponding, which are recorded as G001 to G008 respectively.
[0112] It should be noted that the specific form of the function formula may be in other forms besides the above-mentioned form. In practical applications, the specific form of the function formula may be set according to actual needs, and the embodiment of the present invention does not limit this.
[0113] The codebook number is used to indicate the number corresponding to the codebook. The codebook is used to encrypt and decrypt text, that is, a one-time codebook. The codebook has no specific pattern. It can be a string of random numbers, a sentence, or an English classic. Among them, the codebook is at least as long as the encrypted data. The text (codebook) used for encryption can only be used once. When it is no longer used, the text used for encryption should be destroyed to prevent reuse. The codebook number can be recorded as M001. In other words, the complete keychain can be recorded as S001X001G001G002G003G004G005G006G007G008M001.
[0114] After obtaining the keychain, the keychain can be split to obtain the time number, sorting number, formula number and password book number.
[0115] Step 102, split the data to be encrypted to obtain multiple single characters.
[0116] After obtaining the time number, sorting number, formula number and code book number, the encrypted data can be split to obtain multiple single characters. For example, if the encrypted data is "oCJ[V4}&%", multiple single characters "o", "C", "J", "[", "V", "4", "}", "&", and "%" can be obtained after splitting.
[0117] Step 103: convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character.
[0118] After obtaining each single character, a preset encoding rule (referred to as the "first encoding rule" for easy distinction) can be used to convert each single character, thereby obtaining the encoding corresponding to each single character (referred to as the "first encoding"). The first encoding rule may be the utf-8 encoding rule. For example, taking "%" as an example, the decimal encoding "37" can be obtained by converting it using the utf-8 encoding rule. Of course, in addition to the above encoding rules, the first encoding rule may also use other encoding rules. In actual applications, the specific encoding rule may be set according to actual needs, and the embodiment of the present invention does not limit this.
[0119] Step 104, encrypting the first code corresponding to each single character based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
[0120] After obtaining the first code, the time number, the sorting number, the formula number and the code book number can be used to encrypt the first code corresponding to each single character, so as to obtain the encrypted ciphertext corresponding to each single character. For example, for the single character "%", after obtaining the corresponding first code "37", the time number, the sorting number, the formula number and the code book number are used in sequence to encrypt "37", so as to obtain the final encrypted ciphertext.
[0121] In an embodiment of the present invention, encrypting the first code corresponding to each single character based on the time number, the sorting number, the formula number, and the code book number to obtain the encrypted ciphertext corresponding to each single character includes:
[0122] Determine current time information using the time number; the current time information includes multiple information items;
[0123] Determine the order of each of the information items using the order numbers to obtain the ordered information items;
[0124] Calculate the offset of the first code by using the first code, the sorted information items and the formula number to obtain a first offset;
[0125] The first offset and the code book number are used to determine the encrypted ciphertext corresponding to each single character.
[0126] Specifically, during encryption, the time number may be used to determine the current time information. As mentioned above, the current time information may include multiple information items, such as "season, week, year, month, day, hour, minute, second".
[0127] Then, the reordered sequence numbers of each information item are obtained by using the sorting numbers, and the reordered information items are determined according to the reordered sequence numbers. For example, if the reordered sequence numbers are 2, 1, 6, 7, 8, 3, 4, 5, then the corresponding reordered information items are: week, season, hour, minute, second, year, month, day.
[0128] Then, the offset of the single character (referred to as "first offset") is calculated based on the first code, the sorted information items and the formula number. For example, the first code is calculated in sequence based on the day of the week, season, hour, minute, second, year, month, day and each formula sub-number, thereby obtaining the final first offset.
[0129] The encrypted ciphertext corresponding to each single character can be determined based on the first offset and the code book number. For example, the first offset is converted based on the code book number to obtain the encrypted ciphertext.
[0130] In the embodiment of the present invention, the step of calculating the offset of the first code by using the first code, the sorted information items and the formula number to obtain the first offset includes:
[0131] S1, obtaining the first formula sub-number in the formula number as the first formula sub-number, and obtaining the first information item in the sorted information items as the first information item;
[0132] S2. Obtain a first function formula corresponding to the first formula sub-number and a first parameter value of the first information item;
[0133] S3, detecting whether the first formula sub-number is the first one of the formula numbers, if so, executing S4, if not, executing S5;
[0134] S4, substituting the first code and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0135] S5, substituting the candidate offset corresponding to the previous information item and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0136] S6, check whether there is a next formula sub-number, if yes, execute S7, if no, obtain the first offset;
[0137] S7, obtaining the next formula sub-number in the formula number as the first formula sub-number, and obtaining the next information item in the sorted information items as the first information item, and executing S2.
[0138] Specifically, refer to Figure 2 , a flowchart of the steps for calculating the first offset is shown. For the formula number, the first formula sub-number (recorded as "first formula sub-number") can be obtained, and the first information item in the sorted information items (recorded as "first information item") can be obtained.
[0139] Then, the function formula corresponding to the first formula sub-number is obtained (recorded as "first function formula"), and the parameter value of the first information item is obtained (recorded as "first parameter value").
[0140] Check whether the first formula sub-number is the first one in the formula number. If so, substitute the first parameter value and the first code into the first function formula to calculate the offset corresponding to the first information item (recorded as "first candidate offset").
[0141] If the first formula subnumber is not the first one in the formula number, then the first parameter value and the candidate offset corresponding to the previous information item are substituted into the first function formula to obtain the first candidate offset corresponding to the first information item.
[0142] Check whether the next formula subnumber exists. If so, obtain the next formula subnumber as the new first formula subnumber, and obtain the next information item as the new first information item.
[0143] Then obtain the first function formula corresponding to the first formula sub-number (that is, the function formula corresponding to the next formula sub-number) and the first parameter value of the first information item (that is, the parameter value corresponding to the next information item), and substitute the first candidate offset and the first parameter value into the first function formula to obtain a new first candidate offset (that is, the case where the first formula sub-number is not the first in the formula number).
[0144] Then continue to repeat the above steps for the next formula sub-number until it is detected that there is no next formula sub-number, and the final offset (recorded as "first offset") can be obtained.
[0145] For example, continuing with the previous example, after obtaining the first code "37", obtain the first formula sub-number and the corresponding function formula in the formula number, that is, the function formula corresponding to G001, assuming it is "3x+4y=", and obtain the parameter value corresponding to the first information item in the sorted information items, that is, the parameter value corresponding to "week", assuming it is "7" (i.e. Sunday), and then substitute "37" and "7" into the function formula, that is, "3*37+4*7=139", and "139" is the offset corresponding to the first information item.
[0146] Then obtain the second formula sub-number and the corresponding function formula in the formula number, that is, the function formula corresponding to G002, assuming it is "2x-100y=", and obtain the parameter value corresponding to the second information item in the sorted information item, that is, the parameter value corresponding to "season", assuming it is "4" (i.e. winter). Since G002 is neither the first nor the last in the formula number, substitute "139" and "4" into the function formula, that is, "2*139-100*4=-122", and "-122" is the offset corresponding to the second information item.
[0147] And so on, until the offset corresponding to G008 is calculated, assuming it is "800", then it means that "800" is the final offset (ie, the first offset).
[0148] It should be noted that in addition to using the offset calculated by the current information item as the parameter value of x in the function formula corresponding to the next information item, and the parameter value corresponding to the next information item as the parameter value of y in the function formula, the offset can also be used as the parameter value of y, and the parameter value corresponding to the information item as the parameter value of x. In actual applications, the specific setting method of the parameter value of the unknown number can be set according to actual needs, and the embodiment of the present invention is not limited to this.
[0149] In the embodiment of the present invention, the step of using the first offset and the code book number to determine the encrypted ciphertext corresponding to each single character includes:
[0150] Convert the first offset using a preset second encoding rule to obtain a corresponding second encoding;
[0151] Determining a corresponding code book according to the code book number;
[0152] The second code is matched with the code field in the code book, and the character field corresponding to the matched code field is used as the ciphertext corresponding to the single character.
[0153] Specifically, after the first offset is calculated, a preset second encoding rule may be used to convert the first offset to obtain a second encoding, wherein the second encoding rule may be a hexadecimal encoding.
[0154] The code book may include a code field and a character field. After obtaining the second code, the second code may be matched with the code field in the code book, and the character field corresponding to the matched code field may be used as the final ciphertext.
[0155] For example, continuing with the previous example, the first offset "800" is converted into hexadecimal to obtain the second code "320", and then the code book number M001 is used to determine the code book, and "320" is matched with the code field in the code book. Assuming that a certain "code field-character field" in the code book is "320-&", then when the match is successful, "&" can be used as the final ciphertext.
[0156] It should be noted that, in addition to hexadecimal, the second encoding rule may also adopt other encoding rules. In practical applications, it can be set according to actual needs, and the embodiment of the present invention does not limit this.
[0157] Furthermore, the password book can be updated at every preset time interval, so that the difficulty of cracking can be increased. That is, the same key string can be used for encryption and decryption within the preset time interval. For example, key string 1 is used for encryption and decryption from January 1 to January 7, and the password book is updated on January 8 to obtain a new key string 2, and key string 2 is used for encryption and decryption from January 8 to January 15.
[0158] In an embodiment of the present invention, a keychain for encryption is obtained from a keychain library, and the keychain is split to obtain a time number, a sorting number, a formula number, and a codebook number; the data to be encrypted is split to obtain a plurality of single characters; each single character is converted using a preset first coding rule to obtain a first code corresponding to each single character; the first code corresponding to each single character is encrypted based on the time number, the sorting number, the formula number, and the codebook number to obtain an encrypted ciphertext corresponding to each single character. Since the time information corresponding to the time number, the time information item corresponding to the sorting number, the function formula corresponding to the formula number, and the codebook corresponding to the codebook number are not fixed, the ciphertexts obtained by encrypting the same data using different keychains may also be different, which greatly reduces the possibility of cracking and ensures the security of encryption compared to fixed keys and codebooks.
[0159] Reference Figure 3 , shows a flow chart of the steps of a second embodiment of a decryption method of the present invention, which may specifically include the following steps:
[0160] Step 301, obtain a keychain for decryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number.
[0161] Specifically, the keychain library can store keychains, which can include time numbers, sorting numbers, formula numbers, and password book numbers. After obtaining the keychain, the keychain can be split to obtain the time number, sorting number, formula number, and password book number.
[0162] Step 302: parse each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext.
[0163] Since the decryption process is the opposite of the encryption process, after obtaining the codebook number, the encrypted ciphertexts can be parsed based on the codebook number to obtain the first offset corresponding to each ciphertext. For example, during encryption, the ciphertext corresponding to the first offset "800" is "&", so during decryption, "&" can be parsed as "800".
[0164] In the embodiment of the present invention, the step of parsing each encrypted ciphertext based on the password number to obtain the first offset corresponding to each ciphertext includes:
[0165] Determining a corresponding code book according to the code book number;
[0166] Using the code book to query each ciphertext to obtain a second code corresponding to each ciphertext;
[0167] Each second code is converted using a preset third coding rule to obtain each first offset.
[0168] Specifically, during decryption, the corresponding codebook can be determined according to the codebook number, and then each ciphertext is matched with the codebook to obtain the second code corresponding to each ciphertext, and then each second code is converted using a preset first coding rule to obtain the first offset corresponding to each ciphertext. The third coding rule can be a decimal code.
[0169] For example, for the ciphertext “&”, the cipherbook is determined according to the cipherbook number M001, and “&” is matched with the character field in the cipherbook to obtain the corresponding second code “320”, and “320” is converted into a decimal code, that is, “800”, thereby obtaining the first offset “800” corresponding to the ciphertext “&”.
[0170] It should be noted that the third encoding rule may be other encoding rules besides decimal. In practical applications, the third encoding rule may be set according to actual needs, and the embodiment of the present invention does not limit this.
[0171] Step 303: Parse the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext.
[0172] After obtaining the first offset, the time number, sort number and formula number can be used to parse the first offset, so as to obtain the second offset corresponding to each ciphertext. The second offset is the first code in the encryption process. For example, for the ciphertext "&", after obtaining the first offset "800", the time number, sort number and formula number are used to parse "800" in turn, so as to obtain the second offset "37", which is the first code in the encryption process.
[0173] In the embodiment of the present invention, the parsing of the first offset based on the time number, the sorting number, and the formula number to obtain the second offset corresponding to each ciphertext includes:
[0174] Determine current time information using the time number; the current time information includes multiple information items;
[0175] Determine the order of each information item using the order number to obtain the ordered information items;
[0176] The first offset, the sorted information items, and the formula number are used to parse the first offset to obtain a second offset corresponding to each ciphertext.
[0177] Specifically, during encryption, the time number may be used to determine the current time information. As mentioned above, the current time information may include multiple information items, such as "season, week, year, month, day, hour, minute, second".
[0178] Then, the reordered sequence numbers of each information item are obtained by using the sorting numbers, and the reordered information items are determined according to the reordered sequence numbers. For example, if the reordered sequence numbers are 2, 1, 6, 7, 8, 3, 4, 5, then the corresponding reordered information items are: week, season, hour, minute, second, year, month, day.
[0179] The second offset of the ciphertext is then calculated based on the first offset, the sorted information items and the formula number. For example, the first offset is calculated in sequence based on the day of the week, season, hour, minute, second, year, month, day and each formula sub-number, thereby obtaining the final second offset.
[0180] In the embodiment of the present invention, the first offset, the sorted information item, and the formula number are used to parse the first offset to obtain the second offset corresponding to each ciphertext, including:
[0181] S1, obtaining the last formula sub-number in the formula number as the second formula sub-number, and obtaining the last information item in the sorted information items as the second information item;
[0182] S2. Obtain a second function formula corresponding to the second formula sub-number and a second parameter value of the second information item;
[0183] S3, detecting whether the second formula sub-number is the last one of the formula numbers, if so, executing S4, if not, executing S5;
[0184] S4, substituting the first offset and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0185] S5, substituting the candidate offset corresponding to the next information item and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0186] S6, check whether there is a previous formula sub-number, if yes, execute S7, if no, obtain the second offset;
[0187] S7, obtaining the previous formula sub-number in the formula number as the second formula sub-number, and obtaining the previous information item in the sorted information items as the second information item, and executing S2.
[0188] Specifically, refer to Figure 4 , shows a flowchart of the steps of calculating the second offset. For the formula number, the last formula sub-number (recorded as "second formula sub-number") can be obtained, and the last information item in the sorted information items (recorded as "second information item") can be obtained.
[0189] Then, the function formula corresponding to the second formula sub-number is obtained (recorded as "second function formula"), and the parameter value of the second information item is obtained (recorded as "second parameter value").
[0190] Check whether the second formula sub-number is the last one in the formula number. If so, substitute the second parameter value and the first offset into the first function formula to calculate the offset corresponding to the second information item (recorded as "second candidate offset").
[0191] If the second formula subnumber is not the last one in the formula number, the second parameter value and the candidate offset corresponding to the next information item are substituted into the second function formula to obtain a second candidate offset corresponding to the second information item.
[0192] Check whether there is a previous formula subnumber. If so, obtain the previous formula subnumber as the new second formula subnumber, and obtain the previous information item as the new second information item.
[0193] Then obtain the second function formula corresponding to the second formula sub-number (that is, the function formula corresponding to the previous formula sub-number) and the second parameter value of the second information item (that is, the parameter value corresponding to the previous information item), and substitute the second candidate offset and the second parameter value into the second function formula to obtain a new second candidate offset (that is, the case where the second formula sub-number is not the last one in the formula number).
[0194] Then continue to repeat the above steps for the previous formula sub-number until it is detected that the previous formula sub-number does not exist, and the final second offset can be obtained.
[0195] For example, continuing with the previous example, after obtaining the first offset "800", obtain the last formula sub-number and the corresponding function formula in the formula number, that is, the function formula corresponding to G008, assuming it is "x+5y=", and obtain the parameter value corresponding to the last information item in the sorted information items, that is, the parameter value corresponding to "day", assuming it is "5" (i.e. the 5th), and then substitute "800" and "5" into the function formula, that is, "800-5*26=670", and "670" is the offset corresponding to the last information item.
[0196] Then obtain the second to last formula sub-number in the formula number and the corresponding function formula, that is, the function formula corresponding to G007, assuming it is "x-4y=", and obtain the parameter value corresponding to the second to last information item in the sorted information items, that is, the parameter value corresponding to "month", assuming it is "4" (i.e. April). Since G007 is neither the first nor the last in the formula number, substitute "670" and "4" into the function formula, that is, "670+4*2=678", and "678" is the offset corresponding to the second to last information item.
[0197] And so on, until the offset corresponding to G001 is calculated, assuming it is "37", then it means that "37" is the final second offset (ie, the first code).
[0198] Step 304: convert each second offset using a preset first encoding rule to obtain each decrypted single character.
[0199] After obtaining the second offset, each second offset is converted using the preset first encoding rule to obtain a decrypted single character corresponding to each ciphertext. For example, after obtaining the second offset "37", "37" is converted using the utf-8 encoding rule to obtain a single character "%.
[0200] In the embodiment of the present invention, the key chain used for encryption is used to decrypt the ciphertext, which greatly reduces the possibility of cracking and ensures the security of encryption.
[0201] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0202] Reference Figure 5 , shows a structural block diagram of an encryption device embodiment 1 of the present invention, which may specifically include the following modules:
[0203] The first acquisition module 501 is used to acquire a keychain for encryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number;
[0204] A splitting module 502 is used to split the data to be encrypted to obtain multiple single characters;
[0205] The first conversion module 503 is used to convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character;
[0206] The encryption module 504 is used to encrypt the first code corresponding to each single character based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
[0207] In an embodiment of the present invention, the encryption module includes:
[0208] A first processing submodule, configured to determine current time information using the time number; the current time information includes a plurality of information items;
[0209] A second processing submodule, configured to determine the order of each of the information items using the order numbers to obtain the ordered information items;
[0210] A third processing submodule, configured to calculate an offset of the first code by using the first code, the sorted information items and the formula number to obtain a first offset;
[0211] The fourth processing submodule is used to determine the encrypted ciphertext corresponding to each single character by using the first offset and the code book number.
[0212] In the embodiment of the present invention, the third processing submodule is specifically used for:
[0213] S1, obtaining the first formula sub-number in the formula number as the first formula sub-number, and obtaining the first information item in the sorted information items as the first information item;
[0214] S2. Obtain a first function formula corresponding to the first formula sub-number and a first parameter value of the first information item;
[0215] S3, detecting whether the first formula sub-number is the first one of the formula numbers, if so, executing S4, if not, executing S5;
[0216] S4, substituting the first code and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0217] S5, substituting the candidate offset corresponding to the previous information item and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6;
[0218] S6, check whether there is a next formula sub-number, if yes, execute S7, if no, obtain the first offset;
[0219] S7, obtaining the next formula sub-number in the formula number as the first formula sub-number, and obtaining the next information item in the sorted information items as the first information item, and executing S2.
[0220] In the embodiment of the present invention, the fourth processing submodule is specifically used to:
[0221] Convert the first offset using a preset second encoding rule to obtain a corresponding second encoding;
[0222] Determining a corresponding code book according to the code book number;
[0223] The second code is used as the code field of the encrypted ciphertext, and a character is randomly selected from the code book as the character field of the ciphertext.
[0224] Reference Figure 6, shows a structural block diagram of a decryption device embodiment 1 of the present invention, which may specifically include the following modules:
[0225] The second acquisition module 601 is used to acquire a keychain for decryption from the keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number;
[0226] A first decryption module 602, configured to parse each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext;
[0227] A second decryption module 603 is used to parse the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext;
[0228] The second conversion module 604 is used to convert each second offset using a preset first encoding rule to obtain each decrypted single character.
[0229] In the embodiment of the present invention, the first decryption module is specifically used to:
[0230] Determining a corresponding code book according to the code book number;
[0231] Using the code book to query each ciphertext to obtain a second code corresponding to each ciphertext;
[0232] Each second code is converted using a preset third coding rule to obtain each first offset.
[0233] In this embodiment of the present invention, the second decryption module includes:
[0234] A fifth processing submodule, configured to determine current time information using the time number; the current time information includes a plurality of information items;
[0235] A sixth processing submodule, configured to determine the order of each information item using the order number to obtain the ordered information items;
[0236] The seventh processing submodule is used to parse the first offset by using the first offset, the sorted information items, and the formula number to obtain a second offset corresponding to each ciphertext.
[0237] In the embodiment of the present invention, the seventh processing submodule is specifically used for:
[0238] S1, obtaining the last formula sub-number in the formula number as the second formula sub-number, and obtaining the last information item in the sorted information items as the second information item;
[0239] S2. Obtain a second function formula corresponding to the second formula sub-number and a second parameter value of the second information item;
[0240] S3, detecting whether the second formula sub-number is the last one of the formula numbers, if so, executing S4, if not, executing S5;
[0241] S4, substituting the first offset and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0242] S5, substituting the candidate offset corresponding to the next information item and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6;
[0243] S6, check whether there is a previous formula sub-number, if yes, execute S7, if no, obtain the second offset;
[0244] S7, obtaining the previous formula sub-number in the formula number as the second formula sub-number, and obtaining the previous information item in the sorted information items as the second information item, and executing S2.
[0245] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0246] An embodiment of the present invention further provides an electronic device, including:
[0247] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned encryption and decryption method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0248] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned encryption and decryption method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0249] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0250] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0251] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0252] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0253] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0254] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0255] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0256] The above is a detailed introduction to an encryption and decryption method and an encryption and decryption device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An encryption method, characterized in that: The method comprises: Obtaining a keychain for encryption from a keychain library, and splitting the keychain into a time number, a sorting number, a formula number, and a codebook number; Split the data to be encrypted to obtain multiple single characters; Convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character; The first code corresponding to each single character is encrypted based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
2. The encryption method according to claim 1, characterized in that: The method of encrypting the first code corresponding to each single character based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character includes: Determine current time information using the time number; the current time information includes multiple information items; Determine the order of each of the information items using the order numbers to obtain the ordered information items; Calculate the offset of the first code by using the first code, the sorted information items and the formula number to obtain a first offset; The first offset and the code book number are used to determine the encrypted ciphertext corresponding to each single character.
3. The encryption method according to claim 2, characterized in that: The step of calculating the offset of the first code by using the first code, the sorted information items and the formula number to obtain the first offset includes: S1, obtaining the first formula sub-number in the formula number as the first formula sub-number, and obtaining the first information item in the sorted information items as the first information item; S2. Obtain a first function formula corresponding to the first formula sub-number and a first parameter value of the first information item; S3, detecting whether the first formula sub-number is the first one of the formula numbers, if so, executing S4, if not, executing S5; S4, substituting the first code and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6; S5, substituting the candidate offset corresponding to the previous information item and the first parameter value into the first function formula to obtain a first candidate offset corresponding to the first information item, and executing S6; S6, check whether there is a next formula sub-number, if yes, execute S7, if no, obtain the first offset; S7, obtaining the next formula sub-number in the formula number as the first formula sub-number, and obtaining the next information item in the sorted information items as the first information item, and executing S2.
4. The encryption method according to claim 2, characterized in that: The step of using the first offset and the code book number to determine the encrypted ciphertext corresponding to each single character includes: Convert the first offset using a preset second encoding rule to obtain a corresponding second encoding; Determining a corresponding code book according to the code book number; The second code is used as the code field of the encrypted ciphertext, and a character is randomly selected from the code book as the character field of the ciphertext.
5. A decryption method, characterized in that: include: Obtaining a keychain for decryption from a keychain library, and splitting the keychain into a time number, a sorting number, a formula number, and a codebook number; Parsing each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext; Parsing the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext; Each second offset is converted using a preset first encoding rule to obtain each decrypted single character.
6. The decryption method according to claim 5, characterized in that: The step of parsing each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext includes: Determining a corresponding code book according to the code book number; Using the code book to query each ciphertext to obtain a second code corresponding to each ciphertext; Each second code is converted using a preset third coding rule to obtain each first offset.
7. The decryption method according to claim 5, characterized in that: The parsing the first offset based on the time number, the sorting number, and the formula number to obtain the second offset corresponding to each ciphertext includes: Determine current time information using the time number; the current time information includes multiple information items; Determine the order of each information item using the order number to obtain the ordered information items; The first offset, the sorted information items, and the formula number are used to parse the first offset to obtain a second offset corresponding to each ciphertext.
8. The decryption method according to claim 7, characterized in that: The adopting the first offset, the sorted information items, and the formula number to parse the first offset to obtain the second offset corresponding to each ciphertext includes: S1, obtaining the last formula sub-number in the formula number as the second formula sub-number, and obtaining the last information item in the sorted information items as the second information item; S2. Obtain a second function formula corresponding to the second formula sub-number and a second parameter value of the second information item; S3, detecting whether the second formula sub-number is the last one of the formula numbers, if so, executing S4, if not, executing S5; S4, substituting the first offset and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6; S5, substituting the candidate offset corresponding to the next information item and the second parameter value into the second function formula to obtain a second candidate offset corresponding to the second information item, and executing S6; S6, check whether there is a previous formula sub-number, if yes, execute S7, if no, obtain the second offset; S7, obtaining the previous formula sub-number in the formula number as the second formula sub-number, and obtaining the previous information item in the sorted information items as the second information item, and executing S2.
9. An encryption device, characterized in that: The device comprises: A first acquisition module is used to acquire a keychain for encryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number; A splitting module is used to split the data to be encrypted into multiple single characters; A first conversion module, used to convert each single character using a preset first encoding rule to obtain a first encoding corresponding to each single character; The encryption module is used to encrypt the first code corresponding to each single character based on the time number, the sorting number, the formula number and the code book number to obtain the encrypted ciphertext corresponding to each single character.
10. A decryption device, characterized in that: The device comprises: A second acquisition module is used to obtain a keychain for decryption from a keychain library, and split the keychain into a time number, a sorting number, a formula number and a codebook number; A first decryption module, used to parse each encrypted ciphertext based on the password number to obtain a first offset corresponding to each ciphertext; A second decryption module, configured to parse the first offset based on the time number, the sorting number, and the formula number to obtain a second offset corresponding to each ciphertext; The second conversion module is used to convert each second offset using a preset first encoding rule to obtain each decrypted single character.
11. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the encryption method according to any one of claims 1 to 4 or the steps of the decryption method according to any one of claims 5 to 8 are implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the encryption method according to any one of claims 1 to 4 or the steps of the decryption method according to any one of claims 5 to 8 are implemented.
Citation Information
Patent Citations
Chinese encryption and decryption method, medium and device
CN117595981A
Key generation method and device, data encryption method and device, storage medium and computer equipment
CN118316727A
Method for encryption of character strings
EP2835931A1
Artificial intelligence post-quantum encryption method and artificial intelligence post-quantum encryption apparatus
US20230231705A1