Embedded host data encryption method and encryption system

By setting a sixteen-bit character index table and logical operations in the embedded host, the data transmission startup password is converted into various forms of ciphertext characters, which solves the problem that the data transmission startup password of the embedded host is prone to leak and improves the security of data transmission.

CN120257326APending Publication Date: 2025-07-04SHENZHEN ZHONGGUANGKONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510398425.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The data transmission startup password of embedded host is easily stolen, resulting in an increased risk of leakage of functional program codes and bringing economic losses to developers.

Method used

By setting a sixteen-bit character index table, the data transmission start password is converted into a symbolic cipher character group, and logical operations and fill processing are performed to generate first-level symbolic cipher characters and second-level symbolic cipher characters, which are displayed as various forms of cipher strings.

Benefits of technology

It effectively reduces the risk of leakage of the data transmission startup password of embedded host, enhances data transmission security, and prevents the packet capture side from obtaining passwords.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257326A_ABST
    Figure CN120257326A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded host data encryption method and encryption system in the technical field of data encryption. The method comprises the following steps: setting a data transmission starting password and a 16-bit character index table of a microprocessor; correspondingly converting the data transmission starting password into a binary ASCII value according to an ASCII code table; performing grouping calculation on the binary ASCII values to obtain a decimal character array, sequentially converting each value in the decimal character array according to a 16-bit character index table to generate a symbol ciphertext character group of a data transmission starting password with N values, and taking the value of the symbol ciphertext character group as a first-level symbol ciphertext character; and sequentially carrying out logical operation on the ASCII code values of the adjacent values in the symbol ciphertext character group. According to the method, the 16-bit character index table is set, so that the data transmission starting password can be encrypted into two kinds of ciphertext character strings, namely the first-level symbol ciphertext character and the second-level symbol ciphertext character, and the leakage risk of the data transmission starting password of the embedded host can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data encryption, and particularly to an embedded host data encryption method and an encryption system. Background Art

[0002] An embedded host, also known as an embedded processor, is a special type of computer system. The embedded host includes components such as a microprocessor, a memory, and peripherals, and can be widely used in industrial automation, transportation systems, smart homes, medical devices, military devices, etc. For example, in industrial automation, the embedded host is used to control the operation of a production line; in a transportation system, it is used for monitoring and signal control; in a smart home, it is used for the management of smart home appliances.

[0003] When the functional program code of the embedded host is compiled, a HEX file can be generated. By importing the HEX file into the SPI software, the corresponding program file can be parsed. During the process of downloading the program file to the single-chip microcomputer for operation, the program file can be read out by the code reading software, the read code is decompiled to form a HEX file, and then the HEX file is further decompiled to form an assembly file. At this time, simply rewriting the assembly file can rewrite the original functional program code of the embedded host, causing the development source code to be stolen, increasing the risk of leakage of the existing functional program code of the embedded host, and bringing serious economic losses to the development entity of the embedded program or the embedded host. Summary of the Invention

[0004] The purpose of the present invention is to provide an embedded host data encryption method and an encryption system. By setting a sixteen-digit character index table, the data transmission start password can be encrypted into a ciphertext in which the first-level symbol ciphertext characters and / or the second-level symbol ciphertext characters are alternately displayed, which can effectively reduce the risk of leakage of the data transmission start password of the embedded host.

[0005] In a first aspect, the present invention provides an embedded host data encryption method, including setting a data transmission start password of a microprocessor and a sixteen-digit character index table; Converting the data transmission start password into a binary ASCII value according to the ASCII code table; Performing grouped calculations on the binary ASCII value to obtain a decimal character array, and sequentially converting each value in the decimal character array according to the sixteen-digit character index table to generate a symbol ciphertext character group of the data transmission start password with N values, and using the values of the symbol ciphertext character group as the first-level symbol ciphertext characters; Performing logical operations on the ASCII code values of each adjacent value in the symbol ciphertext character group in sequence to obtain a logical operation result; Supplement binary padding bits to the logical operation result to obtain the number of padding values equal to the symbol ciphertext character group; Perform operations on the padding values in sequence with each value in the decimal character array, convert the operation result value into a symbol ciphertext character group, and use the values included in this symbol ciphertext character group as the secondary symbol ciphertext characters; During the data transmission process, the data transmission startup password is displayed in two forms: the primary symbol ciphertext character group and the secondary symbol ciphertext character group.

[0006] When the data transmission startup password is captured during the transmission process, the data transmission startup password is displayed in two forms: the primary symbol ciphertext character group and the secondary symbol ciphertext character group. "Capturing the packet" means that during the data transmission process of the microprocessor, when the transmitted data is maliciously intercepted, the data transmission startup password of the transmitted data will be displayed as the string included in this symbol ciphertext character group, so that even if the data in the microprocessor is captured, the capturing end cannot know the data transmission startup password in the microprocessor, greatly enhancing the data transmission security and data security of the embedded host microprocessor.

[0007] As a further solution of the present invention: When the input data transmission startup password is: "ChuanShuMiMa"; Then, the binary ASCII value corresponding to "ChuanShuMiMa" is: [01000011 01101000 01110101 01100001 01101110 01010011 01101000 01110101 01001101 01101001 01001101 01100001]; Group the ASCII values of the above data transmission startup password into groups of four bits to obtain an array Arr_2

[24] composed of multiple consecutive four-bit binary values, as follows: Arr_2

[24] ={0100,0011,0110,1000,0111,0101,0110,0001,0110,1110,0101,0011,0110,1000,0111,0101,0100,1101,0110,1001,0100,1101,0110,0001} Calculate the decimal numerical values of the ASCII values of each value in the array Arr_2

[24] to obtain a decimal character array Arr_10

[24] , as follows: Arr_10

[24] = {4,3,6,8,7,5,6,1,6,14,5,3,6,8,7,5,4,13,6,9,4,13,6,1}; Convert each value in the above decimal character array Arr_10

[24] according to the sixteen - bit character index table in sequence, and generate a symbol ciphertext character array for the data transmission startup password. Arr_

[24] = { \, , ), , (, / , ), ], ), @, / , , ), , (, / , \, #, ), &, \, #, ),}}, and the string formed by the values of this ciphertext character array Arr_ciphertext

[24] is the first - level symbol ciphertext.

[0008] During the data transmission process, alternately display the values of the first - level symbol ciphertext character array and the second - level symbol ciphertext character array.

[0009] As a further solution of the present invention: The method for setting the data transmission startup password of the microprocessor includes: The developer inputs the data transmission startup password to the microprocessor and stores the data transmission startup password through the memory.

[0010] The ASCII code table is as follows:

[0011] As a further solution of the present invention: The method for grouping and calculating the binary ASCII values to obtain a decimal character array includes: Group the ASCII values of the data transmission startup password in groups of four to obtain multiple consecutive four - bit binary values.

[0012] As a further solution of the present invention: The sixteen - bit character index table is a coding table of sixteen symbol characters. Generate corresponding character values according to the encodings corresponding to the numerical values in the sixteen - bit character index table. By setting the coding table of sixteen symbol characters, data can be securely transmitted in the text protocol and will not be misparsed by non - text encoding systems. The sixteen - bit character index table is as follows:

[0013] As a further solution of the present invention: The string formed by the order of the values of the first ciphertext character array is the first - level symbol ciphertext.

[0014] As a further solution of the present invention: The method for successively performing logical operations on adjacent values in the symbol ciphertext character array includes: Each time, take two adjacent values in the symbol ciphertext character array for logical exclusive - OR operation, and obtain an (N - 1) - bit logical result value according to the order of the exclusive - OR operation.

[0015] As a further solution of the present invention: a padding value is added at the end of the logical result value at the N-1 position.

[0016] As a further solution of the present invention: the one-bit padding value is 1.

[0017] As a further solution of the present invention: the one-bit padding value is 0.

[0018] As a further solution of the present invention: the method of performing operations on the padding value and each value in the decimal character array in sequence includes: Values exceeding the numerical values in the encoding table of the sixteen symbol characters are specified as 1.

[0019] As a further solution of the present invention: the adjacent values in the N-1 bit logical result value are sequentially subjected to logical operations. Each time, two adjacent values in the N-1 bit logical result value are subjected to a logical exclusive OR operation, and an N-2 bit logical result value is obtained according to the order of the exclusive OR operations.

[0020] As a further solution of the present invention: two padding values are added at the end of the N-2 bit logical result value.

[0021] As a further solution of the present invention: the two-bit padding value is 11.

[0022] In a second aspect, the present invention also provides an embedded host data encryption system, which adopts the embedded host data encryption method as described in the above solution. The embedded host data encryption system includes:

[0023] A microprocessor, a memory, and an I / O interface; the input / output pins of the microprocessor are electrically connected to the memory and the I / O interface.

[0024] Compared with the prior art, the beneficial effects of the present invention are: 1. When the transmitted data is maliciously intercepted in the present invention, the transmission start password of the transmitted data will be displayed as the string included in the symbol ciphertext character group, so that even if the data in the microprocessor is captured, the capture end cannot know the transmission start password of the data in the microprocessor, greatly strengthening the data transmission security and data security of the embedded host microprocessor.

[0025] 2. In the present invention, by setting a sixteen-bit character index table, the data transmission start password can be encrypted into two ciphertext character strings, namely a first-level symbol ciphertext character and a second-level symbol ciphertext character, which can effectively reduce the leakage risk of the data transmission start password of the embedded host, and the encryption method provided by the present invention has simple steps and low consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of the steps of the encryption method of the present invention; Figure 2 The encryption logic calculation diagram of the first embodiment of the present invention; Figure 3 The encryption logic calculation diagram of the second embodiment of the present invention; Figure 4 The encryption logic calculation diagram of the third embodiment of the present invention; Figure 5 The structure diagram of the embedded host module of the present invention. Specific implementation manners

[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0028] Embodiment 1: Please refer to Figure 1 and Figure 2 , in the embodiment of the present invention, the embedded host data encryption method includes the following steps: S1: Set the data transmission start password of the microprocessor and the sixteen - character index table; S2: Convert the data transmission start password into a binary ASCII value according to the ASCII code table; S3: Perform grouped calculations on the binary ASCII value to obtain a decimal character array, and sequentially convert each value in the decimal character array according to the sixteen - character index table to generate a symbol ciphertext character array of the data transmission start password with N values, and use the values of this symbol ciphertext character array as the first - level symbol ciphertext characters; S4: Perform logical operations on the ASCII code values of each adjacent value in the symbol ciphertext character array in sequence to obtain a logical operation result; S5: Supplement binary padding bits to the logical operation result to obtain the number of padding values equal to the symbol ciphertext character array; S6: Perform operations on the padding values in sequence with each value in the decimal character array, convert the operation result values into a symbol ciphertext character array, and use the values included in this symbol ciphertext character array as the second - level symbol ciphertext characters; S7: During the data transmission process, the data transmission start password is displayed in two forms: the first - level symbol ciphertext character array and the second - level symbol ciphertext character array.

[0029] If the input data transmission start password is: "ChuanShuMiMa"; Then, the binary ASCII value corresponding to "ChuanShuMiMa" is: [01000011 01101000 01110101 01100001 01101110 01010011 01101000 01110101 01001101 01101001 01001101 01100001]; Group the ASCII values of the above data transmission start password into groups of four bits to obtain an array Arr_2

[24] consisting of multiple consecutive four-bit binary values, as follows: Arr_2

[24] = {0100, 0011, 0110, 1000, 0111, 0101, 0110, 0001, 0110, 1110, 0101, 0011, 0110, 1000, 0111, 0101, 0100, 1101, 0110, 1001, 0100, 1101, 0110, 0001} Calculate the decimal values of the ASCII values of each value in the array Arr_2

[24] to obtain a decimal character array Arr_10

[24] , as follows: Arr_10

[24] = {4, 3, 6, 8, 7, 5, 6, 1, 6, 14, 5, 3, 6, 8, 7, 5, 4, 13, 6, 9, 4, 13, 6, 1}; Convert each value in the above decimal character array Arr_10

[24] sequentially according to the sixteen-bit character index table, and generate a symbol ciphertext character array for the data transmission start password, Arr_

[24] = {, ,), ,(, / ,),],),@, / , ,), ,(, / ,\,#,),&,\,#,),]},The string formed by the values of this ciphertext character array Arr_ciphertext

[24] is the first-level symbol ciphertext character; Here, "packet capture" means that during the data transmission process of the microprocessor, when the transmitted data is maliciously intercepted, the data transmission start password of the transmitted data will be displayed as the string included in this symbol ciphertext character array, so that even if the data in the microprocessor is packet captured, the packet capture end cannot know the data transmission start password in the microprocessor, greatly enhancing the data transmission security and data security of the embedded host microprocessor; Perform exclusive OR logical operations on the ASCII code values of each adjacent value in the symbol ciphertext character array in turn to obtain the results of each logical operation, as follows: \⊕ = 1, ⊕)= 1,)⊕ = 1, ⊕(=1,(⊕ / =1, / ⊕)=1,)⊕]=1,]⊕)=1, )⊕@=1,@⊕ / =1, / ⊕ =1, ⊕)=1,)⊕ =1, ⊕(=1,(⊕ / =1, / ⊕\=1, \⊕#=1,#⊕)=1,)⊕&=1,&⊕\=1,\⊕#=1,#⊕)=1,)⊕]=1 The logical operation results are taken out in order to obtain: 1111 1111 1111 1111 1111 111; For the logical operation results, binary 1 padding bits are supplemented to obtain the following padding value data: 1111 1111 1111 1111 1111 1111; Taking the individual values in the padding value data as the values of the padding array Arr_T

[24] , then, Arr_T

[24] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; The padding value is successively summed with each value in the decimal character array, and it is stipulated that: when the sum result is 16, the numerical value 1 is returned. The operation process and results are as follows: Arr_T

[24] +Arr_10

[24] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} +{4,3,6,8,7,5,6,1,6,14,5,3,6,8,7,5,4,13,6,9,4,13,6,1}= {5,4,7,9,8,6,7,2,7,15,6,4,7,9,8,6,5,14,7,10,5,14,7,2} Converting the operation result value to a secondary symbol ciphertext character array, the following ciphertext character array is obtained; { / ,\,(,&, ,),(,[,(,!,),\,(,&,8,), / ,@,(,^, / ,@,(,[}, Taking this ciphertext character array as the secondary symbol ciphertext: / \(& )([(!)\(&8) / @(^ / @([, During the data transmission process, the values of the primary symbol ciphertext character array and the secondary symbol ciphertext character array are alternately displayed.

[0030] Preferably, the method for setting the data transmission start password of the microprocessor includes: The developer inputs the data transmission start password into the microprocessor and stores the data transmission start password through the memory.

[0031] The ASCII code table is as follows:

[0032] Preferably, the method for grouping and calculating the binary ASCII values to obtain a decimal character array includes: Group the ASCII values of the data transmission start password in groups of four to obtain multiple consecutive four-bit binary values.

[0033] Preferably, the sixteen-bit character index table is the encoding table of sixteen symbol characters. By generating the corresponding character values according to the encodings corresponding to the values in the sixteen-bit character index table, the data can be securely transmitted in the text protocol and will not be misparsed by non-text encoding systems. The sixteen-bit character index table is as follows:

[0034] Preferably, the string formed by the value order of the first ciphertext character group is the first-level symbol ciphertext character.

[0035] Preferably, the method for performing logical operations on adjacent values in the symbol ciphertext character group in sequence includes: Each time, take two adjacent values in the symbol ciphertext character group for exclusive OR operation, obtain an N - 1-bit logical result value according to the order of the exclusive OR operation, and append a padding value at the end of the N - 1-bit logical result value.

[0036] Preferably, the one-bit padding value is 1.

[0037] Preferably, the method for performing operations on the padding value and each value in the decimal character array in sequence includes: Define the value exceeding the value in the encoding table of the sixteen symbol characters as 1.

[0038] Embodiment 2: Please refer to Figure 1 and Figure 3 , the present invention provides an embedded host data encryption method, including the following steps: S1: Set the data transmission start password of the microprocessor and the sixteen-bit character index table; S2: Convert the data transmission start password into binary ASCII values according to the ASCII code table; S3: Group the binary ASCII values for calculation to obtain a decimal character array, and successively convert each value in the decimal character array according to a sixteen-bit character index table to generate a symbol ciphertext character array of the data transmission startup password with N values. Use the values of this symbol ciphertext character array as the first-level symbol ciphertext characters; S4: Perform logical operations on the ASCII code values of adjacent values in the symbol ciphertext character array in sequence to obtain a logical operation result; S5: Supplement binary padding bits to the logical operation result to obtain the same number of padding values as the symbol ciphertext character array; S6: Perform operations on the padding values and each value in the decimal character array in sequence, convert the operation result values into a symbol ciphertext character array, and use the values included in this symbol ciphertext character array as the second-level symbol ciphertext characters; S7: During the data transmission process, the data transmission startup password is displayed in two forms: the first-level symbol ciphertext character array and the second-level symbol ciphertext character array.

[0039] Preferably, the method for grouping and calculating binary ASCII values to obtain a decimal character array includes: Group the ASCII values of the data transmission startup password into groups of four bits to obtain multiple consecutive four-bit binary values.

[0040] Preferably, the method for setting the data transmission startup password of the microprocessor includes: The developer inputs the data transmission startup password to the microprocessor and stores the data transmission startup password through the memory.

[0041] Preferably, the memory includes a flash memory.

[0042] Preferably, the sixteen-bit character index table is a coding table of sixteen symbol characters. Generate corresponding character values according to the codes corresponding to the values in the sixteen-bit character index table. By setting the coding table of the sixteen symbol characters, data can be securely transmitted in the text protocol and will not be misparsed by non-text coding systems. The sixteen-bit character index table is as follows:

[0043] Preferably, the string formed by the value order of the first ciphertext character array is the first-level ciphertext character.

[0044] Preferably, the method for performing logical operations on adjacent values in the symbol ciphertext character array in sequence includes: Each time, take two adjacent values in the symbol ciphertext character array for logical exclusive OR operation, obtain an N - 1-bit logical result value according to the order of the exclusive OR operation, and supplement a padding value at the end of the N - 1-bit logical result value.

[0045] Preferably, the padding value of one digit is 0.

[0046] If the input data transmission start password is: "ChuanShuMiMa"; Then, the binary ASCII value corresponding to "ChuanShuMiMa" is: [01000011 01101000 01110101 01100001 01101110 01010011 01101000 01110101 01001101 01101001 01001101 01100001]; Taking the ASCII values of the above data transmission start password in groups of four digits, an array Arr_2

[24] composed of multiple consecutive four-digit binary values is obtained, as follows: Arr_2

[24] = {0100, 0011, 0110, 1000, 0111, 0101, 0110, 0001, 0110, 1110, 0101, 0011, 0110, 1000, 0111, 0101, 0100, 1101, 0110, 1001, 0100, 1101, 0110, 0001} Calculating the decimal numerical values of the ASCII values of each value in the array Arr_2

[24] , a decimal character array Arr_10

[24] is obtained, as follows: Arr_10

[24] = {4, 3, 6, 8, 7, 5, 6, 1, 6, 14, 5, 3, 6, 8, 7, 5, 4, 13, 6, 9, 4, 13, 6, 1}; Successively converting each value in the above decimal character array Arr_10

[24] according to the sixteen-bit character index table, and generating a symbol ciphertext character array of the data transmission start password, Arr_

[24] = { \, , ), , (, / , ), ], ), @, / , , ), , (, / , \, #, ), &, \, #, ),}], and the string formed by the values of this ciphertext character array Arr_ciphertext

[24] is the first-level symbol ciphertext character; Here, "packet capture" means that during the data transmission process of the microprocessor, when the transmitted data is maliciously intercepted, the transmission start password of the transmitted data will be displayed as the string included in this symbol ciphertext character array, so that even if the data transmitted in the microprocessor is packet-captured, the packet-capturing end cannot know the transmission start password of the data in the microprocessor, greatly strengthening the data transmission security and data security of the embedded host microprocessor; Perform the XOR logical operation on the ASCII code values of each adjacent value in the symbol ciphertext character group in sequence to obtain the results of each logical operation as follows: \⊕ = 1, ⊕) = 1, )⊕ = 1, ⊕( = 1, (⊕ / = 1, / ⊕) = 1, )⊕] = 1, ]⊕) = 1, )⊕@ = 1, @⊕ / = 1, / ⊕ = 1, ⊕) = 1, )⊕ = 1, ⊕( = 1, (⊕ / = 1, / ⊕\ = 1, \⊕# = 1, #⊕) = 1, )⊕& = 1, &⊕\ = 1, \⊕# = 1, #⊕) = 1, )⊕] = 1 Take out the results of each logical operation in order to obtain: 1111 1111 1111 1111 1111 111; Supplement the binary 1 padding bits to the results of the logical operation to obtain the padding value data as follows: 1111 1111 1111 1111 1111 1110; Take the single value in the padding value data as the value of the padding array Arr_T

[24] . Then, Arr_T

[24] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0}; Perform the summation operation on the padding value and each value in the decimal character array in order. The operation process and results are as follows: Arr_T

[24] + Arr_10

[24] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0} + {4, 3, 6, 8, 7, 5, 6, 1, 6, 14, 5, 3, 6, 8, 7, 5, 4, 13, 6, 9, 4, 13, 6, 1} = {5, 4, 7, 9, 8, 6, 7, 2, 7, 15, 6, 4, 7, 9, 8, 6, 5, 14, 7, 10, 5, 14, 7, 1} Convert the operation result value into a secondary symbol ciphertext character group to obtain the following ciphertext character group; { / , \, (, &, , ), (, [, (,!, ), \, (, &, 8, ), / , @, (, ^, / , @, (, ]}, Take this ciphertext character group as the secondary symbol ciphertext: / \(& )([(!)\(&8) / @(^ / @(], During the data transmission process, the values of the first-level symbol ciphertext character group and the second-level symbol ciphertext character group are alternately displayed.

[0047] Embodiment 3: As Figure 1 and Figure 4 shown, in the embodiment of the present invention, the embedded host data encryption method includes the following steps: S1: Set the data transmission start password of the microprocessor and the sixteen-bit character index table; S2: Convert the data transmission start password into a binary ASCII value according to the ASCII code table; S3: Perform grouped calculations on the binary ASCII value to obtain a decimal character array, and sequentially convert each value in the decimal character array according to the sixteen-bit character index table to generate a symbol ciphertext character group of the data transmission start password with N values, and use the value of this symbol ciphertext character group as the first-level symbol ciphertext character; S4: Perform logical operations on the ASCII code values of each adjacent value in the symbol ciphertext character group in sequence to obtain a logical operation result; S5: Supplement binary padding bits to the logical operation result to obtain the number of padding values equal to the symbol ciphertext character group; S6: Perform operations on the padding values in sequence with each value in the decimal character array, convert the operation result value into a symbol ciphertext character group, and use the values included in this symbol ciphertext character group as the second-level symbol ciphertext characters; S7: During the data transmission process, the data transmission start password is displayed in two forms: the first-level symbol ciphertext character group and the second-level symbol ciphertext character group.

[0048] Preferably, the method for setting the data transmission start password of the microprocessor includes: The developer inputs the data transmission start password to the microprocessor and stores the data transmission start password through the memory.

[0049] The ASCII code table is as follows:

[0050] Preferably, the method for performing grouped calculations on the binary ASCII value to obtain a decimal character array includes: Group the ASCII values of the data transmission start password in groups of four to obtain multiple consecutive four-bit binary values.

[0051] Preferably, the sixteen - bit character index table is a coding table of sixteen symbol characters. According to the codes corresponding to the values in the sixteen - bit character index table, the corresponding character values are generated. By setting the coding table of sixteen symbol characters, data can be safely transmitted in the text protocol and will not be misinterpreted by non - text coding systems. The sixteen - bit character index table is as follows:

[0052] Preferably, the string formed by the value order of the first ciphertext character group is the first - level symbol ciphertext character.

[0053] Preferably, the method of performing logical operations on adjacent values in the symbol ciphertext character group in turn includes: Each time, two adjacent values in the symbol ciphertext character group are taken for exclusive - OR operation. According to the order of the exclusive - OR operation, an N - 1 - bit logical result value is obtained, and a padding value is added at the end of the N - 1 - bit logical result value.

[0054] Preferably, the one - bit padding value is 1.

[0055] If the input data transmission start password is: "ChuanShuMiMa"; Then, the binary ASCII value corresponding to "ChuanShuMiMa" is: [01000011 01101000 01110101 01100001 01101110 01010011 01101000 01110101 01001101 01101001 01001101 01100001]; Taking the ASCII value of the above - mentioned data transmission start password in groups of four, an array Arr_2

[24] composed of multiple consecutive four - bit binary values is obtained, as follows: Arr_2

[24] ={0100,0011,0110,1000,0111,0101,0110,0001,0110,1110,0101,0011,0110,1000,0111,0101,0100,1101,0110,1001,0100,1101,0110,0001} Calculating the decimal values of the ASCII values of each value in the array Arr_2

[24] , a decimal character array Arr_10

[24] is obtained, as follows: Arr_10

[24] = {4,3,6,8,7,5,6,1,6,14,5,3,6,8,7,5,4,13,6,9,4,13,6,1}; Convert each value in the above decimal character array Arr_10

[24] according to the sixteen - bit character index table in sequence, and generate a symbol ciphertext character group for the data transmission start password. Arr_

[24] = { \, , ), , (, / , ), ], ), @, / , , ), , (, / , \, #, ), &, \, #, ),}}, and the string formed by the values of this ciphertext character group Arr_ciphertext

[24] is the first - level symbol ciphertext character; Here, "packet capture" means that during the data transmission process of the microprocessor, when the transmitted data is maliciously intercepted, the transmission start password of the transmitted data will be displayed as the string contained in this symbol ciphertext character group. Even if the data in the microprocessor is packet - captured, the packet - capturing end cannot know the transmission start password of the data in the microprocessor, which greatly enhances the data transmission security and data security of the embedded host microprocessor; Perform exclusive - OR logical operations on the ASCII code values of each adjacent value in the symbol ciphertext character group in sequence to obtain the results of each logical operation, as follows: \ ⊕ = 1, ⊕ ) = 1, ) ⊕ = 1, ⊕ ( = 1, ( ⊕ / = 1, / ⊕ ) = 1, ) ⊕ ] = 1, ] ⊕ ) = 1, ) ⊕ @ = 1, @ ⊕ / = 1, / ⊕ = 1, ⊕ ) = 1, ) ⊕ = 1, ⊕ ( = 1, ( ⊕ / = 1, / ⊕ \ = 1, \ ⊕ # = 1, # ⊕ ) = 1, ) ⊕ & = 1, & ⊕ \ = 1, \ ⊕ # = 1, # ⊕ ) = 1, ) ⊕ ] = 1, Take out the results of each logical operation in order to get: 1111 1111 1111 1111 1111 111; Perform exclusive - OR logical operations on the results of each logical operation in sequence to obtain the results of each logical operation, as follows: 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, 1 ⊕ 1 = 0, Take out the results of each logical operation in order to get: 0000 0000 0000 0000 0000 00; Supplement the binary 11 padding bits to the result of the second XOR logical operation to obtain the following padding value data: 0000 0000 0000 0000 0000 0011; Take the individual values in the padding value data as the values of the padding array Arr_TT

[24] . Then, Arr_TT

[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; Perform a summation operation on the padding value and each value in the decimal character array in sequence, and stipulate that when the summation result is 16, return the value 1. The operation process and result are as follows: Arr_TT

[24] +Arr_10

[24] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1} +{4,3,6,8,7,5,6,1,6,14,5,3,6,8,7,5,4,13,6,9,4,13,6,1}= {4,3,6,8,7,5,6,1,6,14,5,3,6,8,7,5,4,13,6,9,4,13,7,2} Convert the operation result value into a three - level symbol ciphertext character group to obtain the following ciphertext character group; {\, ,), ,(, / ,),],),@, / , ,), ,(, / ,\,#,),&,\,#,),(,[}, Take this ciphertext character group as the three - level symbol ciphertext: \ ) ( / )])@ / ) ( / \#)&\#)([, During the data transmission process, alternately display the values of the first - level symbol ciphertext character group and the values of the three - level symbol ciphertext character group.

[0056] Preferably, the method of performing operations on the padding value and each value in the decimal character array in sequence includes: Specify the values exceeding the values in the encoding table of sixteen symbol characters as 1.

[0057] Such as Figure 5As shown in the figure, the present invention also provides an embedded host data encryption system, which adopts the embedded host data encryption method as described above. The embedded host data encryption system includes:

[0058] A microprocessor, a flash memory, and an I / O interface; the input / output pins of the microprocessor are electrically connected to the flash memory and the I / O interface.

[0059] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, making equivalent substitutions or changes, should be covered by the protection scope of the present invention.

Claims

1. An embedded host data encryption method, characterized in that, Including: Set the data transmission startup password of the microprocessor and the sixteen - bit character index table; Convert the data transmission startup password into binary ASCII values according to the ASCII code table; Perform grouped calculations on the binary ASCII values to obtain a decimal character array, and sequentially convert each value in the decimal character array according to the sixteen - bit character index table to generate a symbol ciphertext character group of the data transmission startup password with N values, and use the values of this symbol ciphertext character group as the first - level symbol ciphertext characters; Perform logical operations on the ASCII code values of each adjacent pair of values in the symbol ciphertext character group to obtain a logical operation result; Supplement binary padding bits to the logical operation result to obtain the number of padding values equal to the symbol ciphertext character group; Perform operations on the padding values in order with each value in the decimal character array, convert the operation result values into a symbol ciphertext character group, and use the values included in this symbol ciphertext character group as the second - level symbol ciphertext characters; During the data transmission process, the data transmission startup password is displayed in two forms: the first - level symbol ciphertext character group and the second - level symbol ciphertext character group.

2. The embedded host data encryption method according to claim 1, characterized in that, The method for setting the data transmission startup password of the microprocessor includes: The developer inputs the data transmission startup password to the microprocessor and stores the data transmission startup password through the memory.

3. The embedded host data encryption method according to claim 1, characterized in that: The method for performing grouped calculations on the binary ASCII values to obtain a decimal character array includes: Group the ASCII values of the data transmission startup password in groups of four to obtain multiple consecutive four - bit binary values.

4. The embedded host data encryption method according to claim 1, characterized in that: The sixteen - bit character index table is a coding table of sixteen symbol characters, and corresponding character values are generated according to the codes corresponding to the numerical values in the sixteen - bit character index table.

5. The embedded host data encryption method according to claim 1, characterized in that: The string formed by the value order of the first ciphertext character group is the first - level symbol ciphertext characters.

6. The embedded host data encryption method according to claim 1, wherein The method for performing logical operations on each adjacent pair of values in the symbol ciphertext character group in sequence includes: Each time, take two adjacent values in the symbol ciphertext character group for logical exclusive - OR operation, obtain an N - 1 - bit logical result value according to the order of the exclusive - OR operation, and supplement a padding value at the end of the N - 1 - bit logical result value.

7. The embedded host data encryption method according to claim 6, wherein: The one - bit padding value is 1.

8. The embedded host data encryption method according to claim 6, characterized in that: The one - bit padding value is 0.

9. The embedded host data encryption method according to claim 1, characterized in that: The method for performing operations on the padding values in order with each value in the decimal character array includes: Specify the value exceeding the numerical values in the coding table of sixteen symbol characters as 1.

10. An embedded host data encryption system, characterized in that, Adopt the embedded host data encryption method according to any one of claims 1 - 9. The embedded host data encryption system includes: A microprocessor, a memory, and an I / O interface; The input / output pins of the microprocessor are electrically connected to the memory and the I / O interface.