Teaching method of micro encryption algorithm

Through the mini-encrypt algorithm Mini-Encrypt tool, the teaching process of encryption algorithm is simplified, and the core encryption ideas are displayed through four rounds of iteration and fixed permutation tables, which improves the understanding efficiency and encryption effect of beginners.

CN120408656APending Publication Date: 2025-08-01浪潮智能终端有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510364625.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Traditional encryption algorithms are designed in complex, making it difficult for beginners to understand their working principles, resulting in low learning efficiency.

Method used

The mini encryption algorithm Mini-Encrypt is used as a teaching tool to demonstrate permutation operations, self-cipher generation, expansion, exclusive OR operations and S-box replacement operations, and simplify the encryption process through four rounds of iteration and fixed permutation tables.

Benefits of technology

The network structure and data block scale of encryption algorithms are simplified, and the comprehensibility and confusion of the encryption process are improved, making it suitable for teaching and lightweight applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408656A_ABST
    Figure CN120408656A_ABST
Patent Text Reader

Abstract

The invention particularly relates to a teaching method of a micro encryption algorithm. According to the teaching method and system for the miniature encryption algorithm, in teaching activities, the miniature encryption algorithm Mini-Encrypt is adopted as an entry-level teaching tool, and replacement operation, self-password generation, expansion, exclusive-or operation and S-box replacement operation in the encryption algorithm are displayed for students to carry out modification and experiment and simulate password analysis attack of a user-defined type. According to the teaching method of the micro encryption algorithm, the network structure is simplified, the scale and the cycle number of data blocks are reduced, simplified S box replacement is introduced, the confusion degree and the encryption effect of the algorithm are ensured, the core idea of the encryption algorithm can be displayed more clearly, and the teaching method is suitable for teaching demonstration and lightweight application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of encryption algorithm teaching, and particularly to a teaching method for a micro encryption algorithm. Background Art

[0002] In modern society, the security of data and privacy protection have become increasingly important. With the popularization of the Internet and the development of information technology, the risk of information leakage in aspects such as personal privacy, corporate secrets, and national security has increased day by day. Therefore, how to effectively protect data has become an important research topic.

[0003] Data leakage not only leads to the infringement of personal privacy, but may also cause huge economic losses to enterprises and even affect national security. For example, the 2017 Equifax data breach exposed more than 140 million personal information, resulting in the company facing huge fines and reputational losses. Similar data breach incidents occur frequently worldwide, highlighting the importance of data security.

[0004] Traditional encryption algorithms, such as DES (Data Encryption Standard), 3DES (Triple DES), and AES (Advanced Encryption Standard), ensure the security of data through complex key management and multiple rounds of transformation. However, these algorithms are often designed complexly and are difficult for beginners to understand their working principles. For example, DES uses a data block size of 64 bits and a key length of 56 bits, and achieves the encryption process through 16 rounds of complex conversions. This complexity poses a huge challenge for learners when they first come into contact with learning, and is not conducive to beginners quickly understanding and mastering the basic principles of encryption.

[0005] In order to help beginners better understand the basic principles of encryption, many educational institutions and researchers have begun to explore how to design a simple but fully functional encryption algorithm model.

[0006] To solve the above problems, the present invention proposes a teaching method for a micro encryption algorithm. Summary of the Invention

[0007] The present invention provides a simple and efficient teaching method for a micro encryption algorithm to make up for the deficiencies of the prior art.

[0008] The present invention is realized through the following technical solutions:

[0009] A teaching method for a micro encryption algorithm. In teaching activities, the micro encryption algorithm Mini-Encrypt is used as an entry-level teaching tool to demonstrate the permutation operation, self-password generation, expansion, exclusive OR operation, and S-box substitution operation in the encryption algorithm for students to modify and experiment with, and to simulate custom types of cryptographic analysis attacks.

[0010] The operation process of the micro encryption algorithm Mini-Encrypt tool includes the following steps:

[0011] Step S1, input 32-bit plaintext and perform an initial permutation operation on the input 32-bit plaintext according to a predefined permutation table.

[0012] Step S2, divide the 32-bit plaintext after the initial permutation into two parts, denoted as the right half R0 and the left half L0 respectively, and both the right half R0 and the left half L0 are 16 bits.

[0013] Step S3, perform four rounds of iterative operations. In each round of iterative operation, perform sub-key generation, expansion, exclusive OR operation, and S-box substitution operation on the right half R i and perform an exclusive OR operation on the result with the left half Li, where i = 0, 1, 2, 3:

[0014] After each round of calculation, pass the right half R i after the current round of operation as the left half L i+1 for the next round;

[0015] Step S3.1, sub-key generation: perform a cyclic shift operation on the original key to generate the sub-key used in each round.

[0016] Step S3.2, exclusive OR operation: perform an exclusive OR operation on the expanded right half R i and the sub-key corresponding to the current iteration round.

[0017] Step S3.3, S-box substitution: perform a non-linear transformation on the result of the exclusive OR operation through a predefined S-box to output a new 16-bit value.

[0018] Step S3.4, merge operation: perform an exclusive OR operation on the output of the S-box and the left half L i in the current iteration round to obtain the right half R i+1 for the next round;

[0019] Step S4, after four rounds of iteration, recombine the left half R4 and the left half L4 obtained after iteration to obtain the final result R4L4, and perform a predefined final permutation operation on the final result R4L4 to obtain the ciphertext.

[0020] In the step S1, the initial permutation operation divides the 32-bit plaintext into 4 groups from front to back, each group being 8 bits, and each group is permuted according to a predefined 8-bit initial permutation table; the initial permutation table moves the original first bit of the input plaintext to the second bit, the original second bit to the sixth bit, the original third bit remains the third bit, the original fourth bit to the first bit, the original fifth bit to the fourth bit, the original sixth bit to the eighth bit, the original seventh bit to the fifth bit, and the original eighth bit to the seventh bit; the formula representation of the initial permutation table is as follows:

[0021] IP = [2, 6, 3, 1, 4, 8, 5, 7].

[0022] In the step S3.1, the original key is marked as K. In the first round of operation, the sub-key K1 is the original key K;

[0023] In the second round of operation, first shift each bit of the original key K 4 bits to the right, discard the rightmost 4 bits, and fill 0 on the left; then shift 12 bits to the left, discard the leftmost 12 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting 4 bits to the right and shifting 12 bits to the left. As long as one of them is 1, the result is 1, and thus the key K2 is obtained; the formula is as follows:

[0024] K2 = (K >> 4) | (K << 12)

[0025] In the third round of operation, first shift each bit of the original key K 8 bits to the right, discard the rightmost 8 bits, and fill 0 on the left; then shift 8 bits to the left, discard the leftmost 8 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting 8 bits to the right and shifting 8 bits to the left. As long as one of them is 1, the result is 1, and thus the key K3 is obtained; the formula is as follows:

[0026] K3 = (K >> 8) | (K << 8)

[0027] In the fourth round of operation, first shift each bit of the original key K 12 bits to the right, discard the rightmost 12 bits, and fill 0 on the left; then shift 4 bits to the left, discard the leftmost 4 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting 12 bits to the right and shifting 4 bits to the left. As long as one of them is 1, the result is 1, and thus the key K4 is obtained; the formula is as follows:

[0028] K4 = (K >> 12) | (K << 4).

[0029] In the step S3.3, in the four-round iterative operation, the S-box substitution operation uses 4 different 4x4 S-box substitution tables.

[0030] In the step S3.3, in the first round of operation, the S-box substitution table is as follows:

[0031] S_Box=[[14,4,13,1,2,15,11,8,3,10,6,12,5,9,0,7],

[0032] In the second round of operation, the S-box replacement table is as follows:

[0033] S_Box=[0,15,7,4,14,2,13,1,10,6,12,11,9,5,3,8],

[0034] In the third round of operation, the S-box replacement table is as follows:

[0035] S_Box=[4,1,14,8,13,6,2,11,15,12,9,7,3,10,5,0],

[0036] In the fourth round of operation, the S-box replacement table is as follows:

[0037] S_Box=[15,12,8,2,4,9,1,7,5,11,3,14,10,0,6,13]].

[0038] In step S4, the final permutation operation is to divide the 32-bit final result R4L4 from front to back into 4 groups, each group is 8 bits, and each group is permuted according to a predefined 8-bit final permutation table; the final permutation table is to move the original 1st bit of the final result R4L4 to the 4th bit, the original 2nd bit to the 1st bit, the original 3rd bit remains the 3rd bit, the original 4th bit to the 5th bit, the original 5th bit to the 7th bit, the original 6th bit to the 2nd bit, the original 7th bit to the 8th bit, and the original 8th bit to the 6th bit; the formula of the final permutation table is as follows:

[0039] FP=[4,1,3,5,7,2,8,6].

[0040] A teaching method device for a micro encryption algorithm, characterized in that it includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the above method steps when executing the computer program.

[0041] A readable storage medium, characterized in that: a computer program is stored on the readable storage medium, and the computer program implements the above method steps when executed by a processor.

[0042] The beneficial effects of the present invention are: the teaching method of the micro encryption algorithm simplifies the network structure, reduces the size of the data block and the order of cycles, and introduces a simplified S-box replacement, which not only ensures the obfuscation degree and encryption effect of the algorithm, but also can more clearly demonstrate the core idea of the encryption algorithm, and is suitable for teaching demonstrations and lightweight application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0044] Appendix Figure 1 It is a schematic diagram of the Mini-Encrypt process of the micro encryption algorithm of the present invention. Specific implementation manners

[0045] In order to enable those skilled in the art of this technology to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in combination with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0046] DES adopts a structure called Feistel network, divides the input data into two halves, processes one half in each round, and combines it with the other half through a series of complex transformations. Specifically, the encryption process of DES includes the following steps:

[0047] 1) Initial permutation: Perform a fixed permutation operation on the input 64-bit plaintext.

[0048] 2) Division: Divide the result after permutation into two 32-bit parts, L0 and R0.

[0049] 3) Iterative process: Execute 16 rounds of the same processing process, and each round includes expansion, exclusive OR operation, S-box substitution and other transformations.

[0050] 4) Merging and final permutation: After the last round ends, recombine L16 and R16, and perform another 5. Fixed permutation operation, that is, the final permutation, to obtain the ciphertext.

[0051] The micro encryption algorithm Mini-Encrypt (Tiny Encryption Algorithm, also abbreviated as TEA for short) is a simplified symmetric encryption algorithm, which is especially suitable for educational purposes and theoretical research to help students, researchers and developers understand the basic encryption principles and technologies. The design concept of the micro encryption algorithm Mini-Encrypt is to provide an easy-to-understand and implement framework by simplifying the core mechanism of classical encryption algorithms (such as DES), which can help beginners quickly master important concepts such as block encryption, Feistel network structure, permutation operation and S-box substitution.

[0052] For the teaching method of the Mini-Encrypt algorithm, in teaching activities, the Mini-Encrypt algorithm is used as an entry-level teaching tool to demonstrate the permutation operation, self-password generation, expansion, exclusive OR operation, and S-box substitution operation in the encryption algorithm for students to modify and experiment with, and to simulate custom types of cryptographic analysis attacks;

[0053] The operation process of the Mini-Encrypt tool of the Mini-Encrypt algorithm includes the following steps:

[0054] Step S1, input 32-bit plaintext, and perform an initial permutation operation on the input 32-bit plaintext according to a predefined permutation table;

[0055] Step S2, divide the 32-bit plaintext after the initial permutation into two parts, denoted as the right half R0 and the left half L0 respectively, and both the right half R0 and the left half L0 are 16 bits;

[0056] The splitting is to divide the data into two parts for separate processing in each round. This splitting method helps to achieve the diffusion and confusion of data, thereby improving the security of encryption.

[0057] Step S3, perform four rounds of iterative operations. In each round of iterative operation, perform sub-key generation, expansion, exclusive OR operation, and S-box substitution operation on the right half R i and perform an exclusive OR operation on the result with the left half Li, i = 0, 1, 2, 3:

[0058] After each round of calculation, transfer the right half R i after the operation of the current round as the left half L of the next round i+1 ;

[0059] Step S3.1, sub-key generation: perform a cyclic shift operation on the original key to generate the sub-key used in each round;

[0060] Step S3.2, exclusive OR operation: perform an exclusive OR operation on the expanded right half R i with the sub-key of the corresponding iteration round;

[0061] Step S3.3, S-box substitution: perform a non-linear transformation on the result of the exclusive OR operation through a predefined S-box to output a new 16-bit value;

[0062] Step S3.4, merge operation: perform an exclusive OR operation on the output of the S-box and the left half L i of the current iteration round to obtain the right half R i+1 of the next round;

[0063] Step S4: After four rounds of iteration, recombine the left half R4 and the left half L4 obtained after iteration to get the final result R4L4, and perform a predefined final permutation operation on the final result R4L4 to obtain the ciphertext.

[0064] The role of the final permutation is to further scramble the bit order so that the ciphertext looks more random. This is of great significance for resisting statistical attacks and frequency analysis attacks.

[0065] The design of the permutation table needs to consider several factors:

[0066] Uniform distribution: Ensure that each bit has the opportunity to participate in subsequent encryption operations and avoid certain bits remaining unchanged.

[0067] Randomness: Try to make the result after permutation look random to increase the cracking difficulty for attackers.

[0068] In the said step S1, the initial permutation operation is to divide the 32-bit plaintext into 4 groups from front to back, each group being 8 bits, and each group is permuted according to a predefined 8-bit initial permutation table; the initial permutation table is to move the original first bit of the input plaintext to the second bit, the original second bit to the sixth bit, the original third bit remains the third bit, the original fourth bit to the first bit, the original fifth bit to the fourth bit, the original sixth bit to the eighth bit, the original seventh bit to the fifth bit, and the original eighth bit to the seventh bit; the formula representation of the initial permutation table is as follows:

[0069] IP = [2, 6, 3, 1, 4, 8, 5, 7].

[0070] In the said step S3.1, the original key is marked as K. In the first round of operation, the sub-key K1 is the original key K;

[0071] In the second round of operation, first shift each bit of the original key K to the right by 4 bits, discard the rightmost 4 bits, and fill 0 on the left; then shift it to the left by 12 bits, discard the leftmost 12 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting to the right by 4 bits and shifting to the left by 12 bits. As long as one of them is 1, the result is 1, and thus the key K2 is obtained; the formula is as follows:

[0072] K2 = (K >> 4) | (K << 12)

[0073] In the third round of operation, first shift each bit of the original key K to the right by 8 bits, discard the rightmost 8 bits, and fill 0 on the left; then shift it to the left by 8 bits, discard the leftmost 8 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting to the right by 8 bits and shifting to the left by 8 bits. As long as one of them is 1, the result is 1, and thus the key K3 is obtained; the formula is as follows:

[0074] K3 = (K >> 8) | (K << 8)

[0075] In the fourth round of operations, first shift each bit of the original key K to the right by 12 bits, discard the rightmost 12 bits, and fill 0 on the left; then shift it to the left by 4 bits, discard the leftmost 4 bits, and fill 0 on the right; finally, perform an OR operation on each bit of the two numbers obtained after shifting to the right by 12 bits and shifting to the left by 4 bits. As long as one of them is 1, the result is 1, and thus the key K4 is obtained. The formula is as follows:

[0076] K4 = (K >> 12) | (K << 4).

[0077] In step S3.3, during the four rounds of iterative operations, the S-box substitution operation uses 4 different 4x4 S-box substitution tables.

[0078] In step S3.3, in the first round of operations, the S-box substitution table is as follows:

[0079] S_Box = [[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7],

[0080] In the second round of operations, the S-box substitution table is as follows:

[0081] S_Box = [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8],

[0082] In the third round of operations, the S-box substitution table is as follows:

[0083] S_Box = [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0],

[0084] In the fourth round of operations, the S-box substitution table is as follows:

[0085] S_Box = [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13]].

[0086] In step S4, the final permutation operation is to divide the 32-bit final result R4L4 into 4 groups from front to back, each group is 8 bits, and each group is permuted according to a predefined 8-bit final permutation table; the final permutation table is to move the original first bit of the final result R4L4 to the fourth bit, the original second bit to the first bit, the original third bit remains the third bit, the original fourth bit to the fifth bit, the original fifth bit to the seventh bit, the original sixth bit to the second bit, the original seventh bit to the eighth bit, and the original eighth bit to the sixth bit; the formula representation of the final permutation table is as follows:

[0087] FP = [4, 1, 3, 5, 7, 2, 8, 6].

[0088] Teaching method device for a micro encryption algorithm, including a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the above method steps when executing the computer program.

[0089] A computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the above method steps are implemented.

[0090] Compared with the prior art, the teaching method of this micro encryption algorithm has the following characteristics:

[0091] First, the structure is simplified: adopting a structure similar to the Feistel network, the input data is divided into two halves, one half is processed in each round, and combined with the other half through a simple transformation.

[0092] Second, small-scale data blocks: Using a data block size of 32 bits, suitable for teaching demonstrations and lightweight application scenarios.

[0093] Third, limited number of rounds: Simulating the encryption process through 4 rounds of transformation. Although the security is relatively low, it is sufficient to demonstrate the core idea of encryption.

[0094] Fourth, custom S-box: Introducing a simplified S-box substitution to increase the non-linear transformation and improve the confusion degree of the algorithm.

[0095] Fifth, initial and final permutations: Shuffling the bit order through a fixed permutation table to further enhance the encryption effect.

[0096] The above-described embodiments are only one of the specific implementation manners of the present invention, and the ordinary changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A teaching method for a micro encryption algorithm, characterized in that: In teaching activities, the Mini-Encrypt micro-encryption algorithm is used as an entry-level teaching tool to demonstrate the permutation operation, self-password generation, expansion, exclusive-or operation, and S-box substitution operation in the encryption algorithm for students to modify and experiment with, and to simulate custom-type password analysis attacks; The operation process of the Mini-Encrypt micro-encryption algorithm tool includes the following steps: Step S1, input 32-bit plaintext, and perform an initial permutation operation on the input 32-bit plaintext according to a predefined permutation table; Step S2, divide the 32-bit plaintext after the initial permutation into two parts, denoted as the right half R0 and the left half L0 respectively. Both the right half R0 and the left half L0 are 16 bits; Step S3, perform four rounds of iterative operations. In each round of iterative operation, for the right half R i perform sub-key generation, expansion, XOR operation, and S-box substitution operation, and perform XOR operation on the result with the left half Li, where i = 0, 1, 2, 3: After each round of calculation, the right half R i after the operation of the current round is passed as the left half L of the next round i+1 ; Step S3.1, sub-key generation: perform a circular shift operation on the original key to generate the sub-key used in each round; Step S3.2, Exclusive-OR operation: Exclusive-OR the extended right half R i with the sub-key corresponding to the iteration round; Step S3.3, S-box substitution: perform a non-linear transformation on the result of the exclusive-or operation through a predefined S-box, and output a new 16-bit value; Step S3.4, merging operation: perform an exclusive OR operation on the output of the S-box and the left half L of the current iteration round to obtain the right half R of the next round i ; i+1 ; Step S4, after four rounds of iteration, recombine the left half R4 and the left half L4 obtained after iteration to obtain the final result R4L4, and perform a predefined final permutation operation on the final result R4L4 to obtain the ciphertext.

2. The teaching method of the micro encryption algorithm according to claim 1, characterized in that: In the said step S1, the initial permutation operation is to divide the 32-bit plaintext into 4 groups from front to back, each group is 8 bits, and each group is permuted according to a predefined 8-bit initial permutation table; the initial permutation table is to move the original first bit of the input plaintext to the second bit, the original second bit to the sixth bit, the original third bit remains the third bit, the original fourth bit to the first bit, the original fifth bit to the fourth bit, the original sixth bit to the eighth bit, the original seventh bit to the fifth bit, and the original eighth bit to the seventh bit; the formula representation of the initial permutation table is as follows: IP = [2, 6, 3, 1, 4, 8, 5, 7].

3. The teaching method of the micro encryption algorithm according to claim 1, characterized in that: In the said step S3.1, the original key is marked as K. In the first round of operation, the sub-key K1 is the original key K; In the second round of operation, first shift each bit of the original key K 4 bits to the right, discard the rightmost 4 bits, and fill 0 on the left; then shift 12 bits to the left, discard the leftmost 12 bits, and fill 0 on the right; finally, perform an or operation on each bit of the two numbers obtained after shifting 4 bits to the right and shifting 12 bits to the left. As long as one of them is 1, the result is 1, and then the key K2 is obtained; the formula is as follows: K2 = (K >> 4) | (K << 12) In the third round of operation, first shift each bit of the original key K 8 bits to the right, discard the rightmost 8 bits, and fill 0 on the left; then shift 8 bits to the left, discard the leftmost 8 bits, and fill 0 on the right; finally, perform an or operation on each bit of the two numbers obtained after shifting 8 bits to the right and shifting 8 bits to the left. As long as one of them is 1, the result is 1, and then the key K3 is obtained; the formula is as follows: K3 = (K >> 8) | (K << 8) In the fourth round of operation, first shift each bit of the original key K 12 bits to the right, discard the rightmost 12 bits, and fill 0 on the left; then shift 4 bits to the left, discard the leftmost 4 bits, and fill 0 on the right; finally, perform an or operation on each bit of the two numbers obtained after shifting 12 bits to the right and shifting 4 bits to the left. As long as one of them is 1, the result is 1, and then the key K4 is obtained; the formula is as follows: K4 = (K >> 12) | (K << 4).

4. The teaching method of the micro encryption algorithm according to claim 1, characterized in that: In step S3.3, in the four-round iterative operation, the S-box substitution operation uses four different 4x4 S-box substitution tables.

5. The teaching method of the micro encryption algorithm according to claim 4, characterized in that: In step S3.3 In the first-round operation, the S-box substitution table is as follows: S_Box = [[14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7], In the second-round operation, the S-box substitution table is as follows: S_Box = [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8], In the third-round operation, the S-box substitution table is as follows: S_Box = [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0], In the fourth-round operation, the S-box substitution table is as follows: S_Box = [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13]].

6. The teaching method of the micro encryption algorithm according to claim 1, characterized in that: In step S4, the final permutation operation divides the 32-bit final result R4L4 into four groups from front to back, each group is 8 bits, and each group is permuted according to a predefined 8-bit final permutation table; the final permutation table moves the original first bit of the final result R4L4 to the fourth bit, the original second bit to the first bit, the original third bit remains the third bit, the original fourth bit to the fifth bit, the original fifth bit to the seventh bit, the original sixth bit to the second bit, the original seventh bit to the eighth bit, and the original eighth bit to the sixth bit; The formula representation of the final permutation table is as follows: FP = [4, 1, 3, 5, 7, 2, 8, 6].

7. A teaching method device for a micro encryption algorithm, characterized in that: It includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method steps described in any one of claims 1 to 6 when executing the computer program.

8. A readable storage medium, characterized in that: A computer program is stored on the readable storage medium, and when the computer program is executed by the processor, it implements the method steps described in any one of claims 1 to 6.