A data encryption and transmission method based on key expansion
Through the data encryption transmission method based on key expansion, a seed key is used to generate a multi-level round key, combined with symmetry and public key encryption technology, the problem of easy cracking of keys in the prior art is solved, and high security and efficient data transmission is achieved.
Patent Information
- Application Number
- CN202211211831.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-09-30
AI Technical Summary
In the prior art, the security of symmetric encryption algorithms mainly depends on the confidentiality of the key. Once the key is obtained by a third party, the communication security cannot be guaranteed, and the RSA algorithm also has security risks when the private key is leaked.
The data encryption transmission method based on key expansion is adopted, and the key expansion is performed through seed keys to generate multi-level round keys. Combined with symmetric encryption and public key encryption technology, the plaintext is multi-level encryption process to ensure the security of the key and plaintext.
Improves the security of data transmission, ensures that the key is not easy to be cracked, and ensures the security of plaintext and encryption efficiency.
Smart Images

Figure CN115567308B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data encryption transmission method based on key expansion, belonging to the technical field of data encryption. Background Art
[0002] Cryptography is widely used and has become an indispensable security technology in people's daily lives. For example, in the social chat tools commonly used by people, a large amount of personal privacy information is involved. In order to ensure the security of users' personal information and chat information, the existing technology encrypts both the chat records stored locally and the information transmitted over the network; in addition to the protection of chat information and personal privacy in existing applications, payment is also one of the services that often uses cryptography. In addition to the above two familiar tools using cryptography technology, banking services, e-government, satellite communication, wireless transmission, etc. all involve cryptography technology. Therefore, it is very necessary to study cryptography technology.
[0003] The symmetric encryption (also known as private key encryption) algorithm gets its name because the same key is used in both the encryption and decryption processes, that is, the traditional (block) encryption algorithm we usually mention. Since the encryption and decryption processes of the algorithm require the same key, in order to use this algorithm for communication, it is required that both communication parties (sender and receiver) negotiate to obtain a shared key known only to both parties for encryption and decryption before secure communication. The security of the symmetric algorithm mainly depends on the confidentiality of the key. Once the key used in the communication process is obtained by a third party, it means that the third party can use the obtained symmetric key to decrypt the sent and received ciphertext messages. Therefore, the confidentiality of the key is the key to symmetric encryption communication.
[0004] The RSA algorithm is a commonly used method for encrypting information and is the basis for Internet communication encryption. Using the RSA algorithm, public keys and private keys can be generated. The private key is retained by the server, while the public key is retained by the client. At the same time, the private key can decrypt the content encrypted by the public key, and the information encrypted by the private key can only be decrypted by the public key. Therefore, as long as the private key is not leaked, the communication security between the two parties will be guaranteed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a data encryption transmission method based on key expansion, which adopts a brand-new design logic and applies key expansion and multi-level encryption technologies to effectively improve the security of data transmission.
[0006] The present invention adopts the following technical solutions to solve the above technical problems: The present invention designs a data encryption transmission method based on key expansion for realizing the encrypted transmission of the plaintext to be transmitted from the sender to the receiver, including the following steps:
[0007] Step A. Based on the seed key composed of a preset number of words of equal length corresponding to the preset-length initial key, using the seed key as the first-round round key, and according to the key sequence expansion method of a preset number of rounds composed of preset various key expansion methods in a preset sorting, sequentially perform key expansion processing, and sequentially obtain round keys of the same length as the initial key for each round, then enter Step B;
[0008] Step B. Sequentially split the plaintext to be transmitted to obtain each independent plaintext block of the same length as the initial key. If the length of the last independent plaintext block is insufficient, fill it with 0 to meet the length; then enter Step C;
[0009] Step C. The sender respectively performs encryption processing on each independent plaintext block, and sequentially applies the round keys of each round to the independent plaintext block to obtain the corresponding independent ciphertext block, and further obtains each independent ciphertext block, then enters Step D;
[0010] Step D. The sender uses the public key of the receiver to encrypt the round keys of each round and the preset information involved in Steps A to B, obtains the encrypted key encodedKey information, and the sender sends each independent ciphertext block and the key encodedKey information to the receiver, then enters Step E;
[0011] Step E. The receiver uses its private key to decrypt the key encodedKey information from the sender, obtains the round keys of each round and the preset information involved in Steps A to B, and performs the inverse operation of Step B to decrypt each independent ciphertext block from the sender to obtain each independent plaintext block, that is, the encrypted transmission of the plaintext to be transmitted from the sender to the receiver is completed.
[0012] As a preferred technical solution of the present invention: in the above Step A, based on the seed key composed of 4 words of 32 bits each corresponding to the 128-bit initial key, using the seed key as the first-round key, and according to the key sequence expansion method of a preset number of rounds composed of preset various key expansion methods in a preset sorting, sequentially perform key expansion and update on 4 words in each round key obtained in each round except the last round according to the key expansion method in the corresponding round to obtain 4 words in the next-round round key, and form the next-round round key, and sequentially obtain round keys of 128 bits for each round.
[0013] As a preferred technical solution of the present invention: the various key expansion methods include key expansion method R1 and key expansion method R2, where the key expansion method R1 is as follows:
[0014] Process the fourth word in the round key according to the preset function transformation T, and perform an exclusive OR operation on the processing result with the first word in the round key to obtain the result of the key expansion update corresponding to the first word in the round key;
[0015] Perform an exclusive OR operation on the second word in the round key and the result of the key expansion update corresponding to the first word in the round key to obtain the result of the key expansion update corresponding to the second word in the round key;
[0016] Perform an exclusive OR operation on the third word in the round key and the result of the key expansion update corresponding to the second word in the round key to obtain the result of the key expansion update corresponding to the third word in the round key;
[0017] Perform an exclusive OR operation on the fourth word in the round key and the result of the key expansion update corresponding to the third word in the round key to obtain the result of the key expansion update corresponding to the fourth word in the round key;
[0018] Furthermore, the results of the key expansion updates corresponding to the first, second, third, and fourth words in the round key respectively form the four words in the next round of the round key, and the next round of the round key is obtained;
[0019] The key expansion method R2 is as follows:
[0020] Process the first word in the round key according to the preset function transformation T, and perform an exclusive OR operation on the processing result with the fourth word in the round key to obtain the result of the key expansion update corresponding to the fourth word in the round key;
[0021] Perform an exclusive OR operation on the third word in the round key and the result of the key expansion update corresponding to the fourth word in the round key to obtain the result of the key expansion update corresponding to the third word in the round key;
[0022] Perform an exclusive OR operation on the second word in the round key and the result of the key expansion update corresponding to the third word in the round key to obtain the result of the key expansion update corresponding to the second word in the round key;
[0023] Perform an exclusive OR operation on the first word in the round key and the result of the key expansion update corresponding to the second word in the round key to obtain the result of the key expansion update corresponding to the first word in the round key;
[0024] Furthermore, the results of the key expansion updates corresponding to the first, second, third, and fourth words in the round key respectively form the four words in the next round of the round key, and the next round of the round key is obtained.
[0025] As a preferred technical solution of the present invention: the preset function transformation T sequentially includes three operations of first row shift, first byte substitution, and first round constant XOR. Among them, the first row shift means cyclically shifting 4 bytes in 1 word to the left or right in a single direction by 1 byte position; the first byte substitution means respectively for the 4 bytes in 1 word, using the high 4 bits of 1 byte as the row value and the low 4 bits as the column value, and taking out the corresponding elements from the preset two-dimensional matrix S box for output, so as to obtain the corresponding outputs of each byte respectively; the first round constant XOR means XORing the result of the first byte substitution process with the round constant of the same round.
[0026] As a preferred technical solution of the present invention: based on the second round round key to the last round round key, each round function is preset one by one, and the round functions corresponding to the second round round key to the penultimate round round key respectively include sequentially executed second byte substitution, second row shift, column mixing, and key addition with the corresponding round key applied; in the step C, the sender respectively performs key addition processing on each independent plaintext block with the first round round key for the state matrix corresponding to the independent plaintext block in units of bytes, and then processes the result through the round functions corresponding to the second round round key to the last round round key respectively to obtain the corresponding independent ciphertext block;
[0027] Among them, the second byte substitution means respectively for each byte in the state matrix, using the high 4 bits of the byte as the row value and the low 4 bits as the column value, and taking out the corresponding elements from the preset two-dimensional matrix S box for output, so as to obtain the corresponding outputs of each byte respectively, and updating the state matrix; the second row shift means shifting the corresponding row of bytes in each row of the state matrix to the left or right in a single direction to update the state matrix; the column mixing means multiplying the state matrix by a preset fixed matrix to obtain a confused state matrix; applying the corresponding round key to perform key addition means performing key addition processing on the state matrix with the corresponding round key.
[0028] As a preferred technical solution of the present invention: the public key and private key of the receiver are obtained by the following operations;
[0029] The receiver first randomly selects two unequal prime numbers p and q, and obtains N according to N = p * q;
[0030] Then, according to L = lcm(p - 1, q - 1), L is calculated, where lcm(X, Y) represents the least common multiple of X and Y;
[0031] Then, according to 1 < E < L and gcd(E, L) = 1, E is calculated, and gcd(X, Y) is used to represent the greatest common divisor of X and Y;
[0032] Then, according to 1 < D < L and E * D mod L = 1, calculate D, that is, obtain the public key (N, E) of the receiver and the private key (N, D) of the receiver.
[0033] For the data encryption and transmission method based on key expansion described in the present invention, compared with the prior art by adopting the above technical solution, it has the following technical effects:
[0034] The data encryption and transmission method based on key expansion designed by the present invention first uses the seed key as the first-round round key, executes the key sequential expansion method according to various preset key expansion methods, and sequentially obtains round keys with the same length as the initial key in each round; then sequentially divides the plaintext to be transmitted to obtain each independent plaintext block with the same length as the initial key; then respectively encrypts each independent plaintext block by sequentially applying the round keys in each round to obtain each independent ciphertext block, and encrypts each round key and each preset information involved to obtain the key encodedKey information, and the sender sends each encrypted data to the receiver; finally, the receiver decrypts it to complete the encrypted transmission of the plaintext to be transmitted from the sender to the receiver; the design adopts a key expansion method to perform multi-level encryption technology on the plaintext to be transmitted, and combines the encryption operation of the key, which not only ensures the security of the key, but also can ensure the security of the plaintext and the encryption efficiency in the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a flowchart of the data encryption and transmission method based on key expansion designed by the present invention;
[0036] Figure 2 is a schematic framework diagram of the key expansion method R1 involved in the present invention;
[0037] Figure 3 is a schematic framework diagram of the key expansion method R2 involved in the present invention;
[0038] Figure 4 is a schematic diagram of the encryption process for each independent plaintext block in step C designed by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] The following further describes in detail the specific embodiments of the present invention with reference to the accompanying drawings of the specification.
[0040] The present invention designs a data encryption and transmission method based on key expansion for realizing the encrypted transmission of the plaintext to be transmitted from the sender to the receiver. In actual application, as Figure 1 shown, the following specific steps A to E are specifically executed.
[0041] Step A. Based on the seed key composed of a preset number of words of equal length corresponding to the preset-length initial key, using the seed key as the first-round round key, and according to the key sequence expansion method of a preset number of rounds composed of various preset key expansion methods in a preset order, sequentially perform key expansion processing to obtain round keys of the same length as the initial key for each round in sequence, and then enter Step B.
[0042] In practical applications, in the above Step A, based on the seed key composed of 4 words each of 32 bits corresponding to the 128-bit initial key, using the seed key as the first-round key, and according to the key sequence expansion method of a preset number of rounds composed of various preset key expansion methods in a preset order, for each of the 4 words in each round key obtained except the last round, perform key expansion and update according to the key expansion method in the corresponding round to obtain 4 words in the next-round round key, and form the next-round round key, and sequentially obtain round keys of 128 bits for each round.
[0043] Among them, various key expansion methods include key expansion method R1 and key expansion method R2, that is, the key sequence expansion method of a preset number of rounds composed of R1 and R2 in a preset order, such as {R1, R2, R2, R1... R1, R2}, where, as Figure 2 shown, the key expansion method R1 is as follows:
[0044] Process the 4th word in the round key according to the preset function transformation T, and perform exclusive OR processing on the processing result and the 1st word in the round key to obtain the result of the key expansion and update corresponding to the 1st word in the round key;
[0045] Perform exclusive OR processing on the 2nd word in the round key and the result of the key expansion and update corresponding to the 1st word in the round key to obtain the result of the key expansion and update corresponding to the 2nd word in the round key;
[0046] Perform exclusive OR processing on the 3rd word in the round key and the result of the key expansion and update corresponding to the 2nd word in the round key to obtain the result of the key expansion and update corresponding to the 3rd word in the round key;
[0047] Perform exclusive OR processing on the 4th word in the round key and the result of the key expansion and update corresponding to the 3rd word in the round key to obtain the result of the key expansion and update corresponding to the 4th word in the round key;
[0048] Furthermore, the results of the key expansion and update corresponding to the 1st word, the 2nd word, the 3rd word, and the 4th word in the round key respectively form 4 words in the next-round round key to obtain the next-round round key.
[0049] And as Figure 3 shown, the key expansion method R2 is as follows:
[0050] Process the first word in the round key according to the preset function transformation T, and perform an exclusive OR operation on the processing result and the fourth word in the round key to obtain the result of the key expansion update corresponding to the fourth word in the round key;
[0051] Perform an exclusive OR operation on the result of the key expansion update corresponding to the third word and the fourth word in the round key to obtain the result of the key expansion update corresponding to the third word in the round key;
[0052] Perform an exclusive OR operation on the result of the key expansion update corresponding to the second word and the third word in the round key to obtain the result of the key expansion update corresponding to the second word in the round key;
[0053] Perform an exclusive OR operation on the result of the key expansion update corresponding to the first word and the second word in the round key to obtain the result of the key expansion update corresponding to the first word in the round key;
[0054] Furthermore, the results of the key expansion updates corresponding to the first, second, third, and fourth words in the round key respectively form the four words in the next round of the round key, and the next round of the round key is obtained.
[0055] Here, the preset function transformation T successively includes three operations: the first row shift, the first byte substitution, and the first round constant exclusive OR. Among them, the first row shift means shifting the 4 bytes in 1 word in a single direction (left or right) by 1 byte position in a circular manner; the first byte substitution means respectively for the 4 bytes in 1 word, taking the high 4 bits of 1 byte as the row value and the low 4 bits as the column value, and taking out the corresponding elements from the preset two-dimensional matrix S box for output, and then obtaining the outputs corresponding to each byte respectively; the first round constant exclusive OR means performing an exclusive OR operation on the result of the first byte substitution process with the round constant.
[0056] Step B. Successively divide the plaintext to be transmitted to obtain each independent plaintext block with the same length as the initial key. If the length of the last independent plaintext block is insufficient, fill it with 0 to meet the length; then enter Step C.
[0057] Step C. The sender respectively performs encryption processing on each independent plaintext block by sequentially applying each round of the round key to obtain the corresponding independent ciphertext block, and then obtains each independent ciphertext block, and then enters Step D.
[0058] In practical applications, such as Figure 4As shown, based on the second-round round key to the last-round round key, each corresponds to a preset round function one by one. And for the round functions corresponding to the second-round round key to the second-to-last-round round key, they include sequentially performing the second byte substitution, the second row shift, the column mixing, and performing key addition with the corresponding round key. The round function corresponding to the last-round round key includes sequentially performing the second byte substitution, the second row shift, and performing key addition with the corresponding round key. In step C, for each independent plaintext block by the sender, first, for the state matrix corresponding to the independent plaintext block in bytes, perform key addition processing with the first-round round key, and then process the result sequentially through the round functions corresponding to the second-round round key to the last-round round key respectively to obtain the corresponding independent ciphertext block.
[0059] Among them, the second byte substitution means that for each byte in the state matrix, using the high 4 bits of the byte as the row value and the low 4 bits as the column value, take out the corresponding element from the preset two-dimensional matrix S-box for output, and then obtain the output corresponding to each byte respectively to update the state matrix. The second row shift means shifting the bytes in each row of the state matrix in a single direction to the left or right by the corresponding number of bytes in the row to update the state matrix. The column mixing means multiplying the state matrix by a preset fixed matrix to obtain the confused state matrix. Performing key addition with the corresponding round key means performing key addition processing on the state matrix with the corresponding round key.
[0060] In the application, the public key and private key of the receiver are obtained according to the following operations.
[0061] The receiver first randomly selects two unequal prime numbers p and q, and obtains N according to N = p * q.
[0062] Then, according to L = lcm(p - 1, q - 1), calculate to obtain L, where lcm(X, Y) represents the least common multiple of X and Y.
[0063] Next, according to 1 < E < L and gcd(E, L) = 1, calculate to obtain E, where gcd(X, Y) represents the greatest common divisor of X and Y.
[0064] Then, according to 1 < D < L and E * D mod L = 1, calculate to obtain D, that is, obtain the public key (N, E) of the receiver and the private key (N, D) of the receiver.
[0065] Step D. The sender uses the public key of the receiver to encrypt each round key and the preset information involved in steps A to B to obtain the encrypted key encodedKey information. And the sender sends each independent ciphertext block and the key encodedKey information to the receiver, and then enters step E.
[0066] Step E. The receiver applies its private key to decrypt the key encodedKey information from the sender, obtains each round key and each preset information involved in Steps A to B, and performs the inverse operation of Step B to decrypt each independent ciphertext block from the sender to obtain each independent plaintext block, thus completing the encrypted transmission of the plaintext to be transmitted from the sender to the receiver.
[0067] The above-described data encryption transmission method based on key expansion first uses the seed key as the first-round key, executes the key sequence expansion method according to various preset key expansion methods, and sequentially obtains round keys of the same length as the initial key for each round; then sequentially divides the plaintext to be transmitted to obtain each independent plaintext block of the same length as the initial key; then respectively performs encryption processing on each independent plaintext block by sequentially applying the round keys of each round to obtain each independent ciphertext block, and encrypts each round key and each preset information involved to obtain the key encodedKey information, and the sender sends each encrypted data to the receiver; finally, the receiver decrypts it to complete the encrypted transmission of the plaintext to be transmitted from the sender to the receiver; the design uses the key expansion method to perform multi-level encryption technology on the plaintext to be transmitted, and combines the encryption operation of the key, which not only ensures the security of the key, but also can ensure the security of the plaintext and the efficiency of encryption in the application.
[0068] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge scope of those of ordinary skill in the art.
Claims
1. A data encryption and transmission method based on key expansion, which is used to implement the encrypted transmission of the plaintext to be transmitted from the sender to the receiver, and is characterized in that, It includes the following steps: Step A. Based on a seed key composed of a preset number of words of equal length corresponding to a preset-length initial key, with the seed key as the first-round round key, in accordance with a key sequence expansion method of a preset number of rounds composed of preset various key expansion methods in a preset order, successively perform key expansion processing to sequentially obtain round keys of the same length as the initial key for each round, and then proceed to Step B; Step B. Sequentially split the plaintext to be transmitted to obtain each independent plaintext block of the same length as the initial key. If the length of the last independent plaintext block is insufficient, fill it with 0 to meet the length; then proceed to Step C; Step C. The sender respectively performs encryption processing on each independent plaintext block using each round of round keys for the independent plaintext block to obtain corresponding independent ciphertext blocks, and further obtains each independent ciphertext block, and then proceeds to Step D; Step D. The sender encrypts each round of round keys and the preset information involved in Steps A to B using the public key of the receiver to obtain the encrypted key encodedKey information, and the sender sends each independent ciphertext block and the key encodedKey information to the receiver, and then proceeds to Step E; Step E. The receiver decrypts the key encodedKey information from the sender using its private key to obtain each round of round keys and the preset information involved in Steps A to B, and performs the reverse operation of Step B to decrypt each independent ciphertext block from the sender to obtain each independent plaintext block, that is, the encrypted transmission of the plaintext to be transmitted from the sender to the receiver is completed; The various key expansion methods include key expansion method R1 and key expansion method R2. Among them, the key expansion method R1 is as follows: Process the 4th word in the round key according to the preset function transformation T, and perform an exclusive OR operation on the processing result and the 1st word in the round key to obtain the result of the key expansion update corresponding to the 1st word in the round key; Perform an exclusive OR operation on the 2nd word in the round key and the result of the key expansion update corresponding to the 1st word in the round key to obtain the result of the key expansion update corresponding to the 2nd word in the round key; Perform an exclusive OR operation on the 3rd word in the round key and the result of the key expansion update corresponding to the 2nd word in the round key to obtain the result of the key expansion update corresponding to the 3rd word in the round key; Perform an exclusive OR operation on the 4th word in the round key and the result of the key expansion update corresponding to the 3rd word in the round key to obtain the result of the key expansion update corresponding to the 4th word in the round key; Furthermore, the results of the key expansion updates corresponding to the 1st word, 2nd word, 3rd word, and 4th word in the round key respectively constitute 4 words in the next-round round key to obtain the next-round round key; The key expansion method R2 is as follows: Process the 1st word in the round key according to the preset function transformation T, and perform an exclusive OR operation on the processing result and the 4th word in the round key to obtain the result of the key expansion update corresponding to the 4th word in the round key; Perform an exclusive OR operation on the result of the key expansion update corresponding to the third word in the round key and the result of the key expansion update corresponding to the fourth word in the round key to obtain the result of the key expansion update corresponding to the third word in the round key; Perform an exclusive OR operation on the result of the key expansion update corresponding to the second word in the round key and the result of the key expansion update corresponding to the third word in the round key to obtain the result of the key expansion update corresponding to the second word in the round key; Perform an exclusive OR operation on the result of the key expansion update corresponding to the first word in the round key and the result of the key expansion update corresponding to the second word in the round key to obtain the result of the key expansion update corresponding to the first word in the round key; Furthermore, the results of the key expansion updates corresponding to the first, second, third, and fourth words in the round key respectively form 4 words in the next round of the round key, and the next round of the round key is obtained; Based on the second round of the round key to the last round of the round key, respectively corresponding to the preset round functions one by one, and the round functions corresponding to the second round of the round key to the second-to-last round of the round key respectively include the second byte substitution, the second row shift, the column mixing, and the key round addition performed by applying the corresponding round key. The round function corresponding to the last round of the round key includes the second byte substitution, the second row shift, and the key round addition performed by applying the corresponding round key. In step C, the sender respectively performs key round addition processing on the state matrix corresponding to each independent plaintext block in units of bytes by applying the first round of the round key, and then processes the result sequentially through the round functions corresponding to the second round of the round key to the last round of the round key to obtain the corresponding independent ciphertext block; Among them, the second byte substitution means that for each byte in the state matrix, taking the high 4 bits of the byte as the row value and the low 4 bits as the column value, the corresponding element is taken out from the preset two-dimensional matrix S box for output, and then the output corresponding to each byte is obtained to update the state matrix; the second row shift means that each row in the state matrix is shifted to the left or right in a single direction by the corresponding number of bytes in the row to update the state matrix; the column mixing means that the state matrix is multiplied by the preset fixed matrix to obtain the confused state matrix; performing key round addition by applying the corresponding round key means performing key round addition processing on the state matrix by applying the corresponding round key.
2. The data encryption transmission method based on key expansion according to claim 1, characterized in that: In step A, based on the seed key composed of 4 words each of 32 bits corresponding to the 128-bit initial key, with the seed key as the first round of the round key, according to the preset key expansion method composed of various preset key expansion methods in a preset sorting to form the key sequence expansion method of the preset number of rounds, sequentially perform key expansion updates on the 4 words in each round of the round key obtained except for the last round according to the key expansion method in the corresponding round to obtain 4 words in the next round of the round key, and form the next round of the round key, and sequentially obtain the 128-bit round keys of each round.
3. The data encryption and transmission method based on key expansion according to claim 1, characterized in that: The preset function transformation T sequentially includes three operations: the first row shift, the first byte substitution, and the first round constant XOR. Among them, the first row shift means cyclically shifting 4 bytes in 1 word 1 byte position to the left or right in a single direction; the first byte substitution means respectively for the 4 bytes in 1 word, using the high 4 bits of 1 byte as the row value and the low 4 bits as the column value, and taking out the corresponding elements from the preset two-dimensional matrix S box for output, so as to obtain the output corresponding to each byte; the first round constant XOR means XORing the result of the first byte substitution processing with the round constant.
4. The data encryption and transmission method based on key expansion according to claim 1, characterized in that: The public key and private key of the receiver are obtained according to the following operations; The receiver first randomly selects two unequal prime numbers p and q, and obtains N according to N = p * q; Then, according to L = lcm(p - 1, q - 1), L is calculated, where lcm(X, Y) represents the least common multiple of X and Y; Next, according to 1 < E < L and gcd(E, L) = 1, E is calculated, where gcd(X, Y) represents the greatest common divisor of X and Y; then, according to 1 < D < L and E * D mod L = 1, D is calculated, that is, the public key (N, E) of the receiver and the private key (N, D) of the receiver are obtained.
Citation Information
Patent Citations
Encryption algorithm determination method and device, computer equipment and storage medium
CN114257402A