Integrated tube optical axis keyboard and signal encryption method

The signal encryption method of the integrated tube optical axis keyboard solves the problem of electromagnetic signal leakage during the transmission process of the optical axis keyboard, reduces costs and improves information security, and achieves enhanced security during the encryption and decryption of information. .

CN118764182AActive Publication Date: 2024-10-11ANHUI YUGUAN OPTOELECTRONICS TECH CO LTD

Patent Information

Application Number
CN202410901149.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-11
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

Existing optical axis keyboards can easily cause leakage of electromagnetic signals during the transmission process, posing a serious threat to information security. They are also costly and complex in structure.

Method used

The signal encryption method of the integrated tube optical axis keyboard is adopted, and the original data is collected for preprocessing and encryption. The parallel program model and random number generator are used to exchange and encrypt the key, generate a ciphertext matrix, and decrypt it through inverse operation. Finally, the encrypted signal current is output to prevent information leakage.

Benefits of technology

It reduces the cost of button production, improves information security, prevents information leakage of signal current during the inductive coupling process, and enhances the security of ciphertext.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764182A_ABST
    Figure CN118764182A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of keyboard encryption, solves the technical problem that in the prior art, when a keyboard is used for typewriting, information obtained by converting electromagnetic signals of the keyboard into signal current information may be directly obtained, and information leakage is caused, and particularly relates to an integrated tube optical axis keyboard and a signal encryption method. The method comprises the following steps: S1, collecting original data during keyboard input, and preprocessing the original data to obtain a primary plaintext C and a round key Mi, and S2, segmenting the round key Mi through random processing according to a preset seed value Yn. According to the invention, information signals are encrypted during generation of the information signals in a keyboard, internal information is prevented from being directly acquired, and the encryption efficiency is improved. And meanwhile, before the ciphertext is encrypted and generated, exchange is performed according to the numerical value of the random generator, and the numerical value is encrypted, so that the decryption difficulty is increased, the safety of the ciphertext is improved, and the problem of information leakage in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of keyboard encryption technology, and in particular to an integrated tube optical axis keyboard and a signal encryption method. Background Art

[0002] The optical axis keyboard is a new type of keyboard in recent years. It is based on the traditional mechanical key axis technology. By replacing the traditional contact paddles with optical sensing components, some problems of traditional contact mechanical switches are improved. In the process of processing information, computers, information communication terminals and other electronic information equipment will inevitably emit electromagnetic waves to the surrounding environment, generating unintentional, non-subjective communication electromagnetic radiation. These unintentionally emitted electromagnetic signals have rich spectral components, carry a lot of useful information, and there is a risk of information leakage.

[0003] The prior art has the following problems:

[0004] 1. Optical axis keyboards usually use three kinds of lamp beads, IR infrared transmitting tube, PT infrared receiving tube, and visible light RGB, as three lamp bead patches. Among them, the IR infrared transmitting tube and the PT infrared receiving tube are side-mounted and facing each other. When powered on, they are normally in the receiving OK state. The light signal emitted by the IR infrared transmitting tube is blocked by the shading sheet of the key cap to identify the function of the corresponding keyboard key. This method requires three lamp bead patches to realize the function, which is costly. In addition, the IRPT infrared transmitting and receiving tubes are side-mounted, which has a more complicated structure for the key itself and increases the design and production cost of the key cap.

[0005] 2. When typing on the keyboard, such as entering information in a file, the electromagnetic signal generated by the keyboard will be converted into a signal current during the transmission process, and then it is easy to be inductively coupled with the outside world during the process of passing through the connecting line between the microprocessor and the host interface, so that the information of the signal current may be directly obtained, resulting in information leakage, which brings great problems to the user's information security. If the information is extremely important, it may cause very serious consequences. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention provides an integrated tube optical axis keyboard and a signal encryption method, which solves the problem that when using the keyboard to type, such as entering information in a file, the electromagnetic signal generated by the keyboard will be converted into a signal current during the transmission process, and then it is easy to be inductively coupled with the outside world during the process of passing through the connecting line between the microprocessor and the host interface, so that the information of the signal current may be directly obtained, thereby causing information leakage problems, which brings great problems to the user's information security. If the information is extremely important, it may cause very serious consequences. The technical problem is achieved that the information input by the keyboard is kept confidential and the security of the information input by the user is improved.

[0007] In order to solve the above technical problems, the present invention provides the following technical solution, a signal encryption method of an integrated tube optical axis keyboard, the method comprising the following steps:

[0008] S1. Collect the original data when inputting from the keyboard, and pre-process the original data to obtain the primary plaintext C and the round key M. i ;

[0009] S2, according to the preset seed value Y n The round key M is randomly processed i Split and randomly swap to get the swap key N:

[0010] S3, establish a parallel program model, perform parallel encryption on the primary plaintext C and the exchange key N to obtain the ciphertext matrix Z;

[0011] S4, output the ciphertext matrix Z to the terminal;

[0012] S5. Decrypt the ciphertext matrix Z using the inverse operation of the encryption process to obtain the encrypted original data.

[0013] Preferably, in step S1, the specific implementation steps are as follows:

[0014] S11, obtaining the original data of the keyboard, and preliminarily grouping the original data to obtain several groups of row data W;

[0015] S12, transform the row data W into a matrix X in a certain order i ;

[0016] S13, through the matrix X i Get the round key M i , and using the matrix X i and round key M i The primary plaintext C is obtained by the round key addition algorithm, C = [C1, C2...C k ], the calculation formula is as follows:

[0017]

[0018] Among them, C represents the primary plaintext, M i represents the round key, X i Represents a matrix.

[0019] Preferably, in step S2, the specific steps are as follows:

[0020] S21, round key M i Evenly split the key into F blocks, where F∈[4, 11, 22];

[0021] S22, using the preset seed value Y n Generate a random number k, and swap the F block split keys according to the random number k to obtain a swap key N, where N = [N1, N2...N j ];

[0022] S23, divide the primary plaintext C evenly into A blocks, and make the divided A blocks of primary plaintext C correspond to the F blocks of exchange key N one by one.

[0023] Preferably, in step S22, the specific implementation steps are as follows:

[0024] S221, preset a seed value Y n , and set the values ​​of parameters m, a and c;

[0025] S222. A random number k is obtained by using a random formula, and the calculation formula is as follows:

[0026] Y n+1 =(a×Y n +c)mod m

[0027] Among them, Y n+1 represents the randomly generated intermediate number, a represents the random coefficient, c represents the random variation, m represents the random modulus, and Y n Indicates the seed value;

[0028] k=Y n+1 mod 10

[0029] Among them, k represents the random number finally obtained, Y n+1 Represents a randomly generated intermediate number;

[0030] S223, determine whether the value of j+k is greater than F, where j represents the jth exchange key N j ;

[0031] If so, then N j and N j+k-F The positions are swapped, where j+k-11 represents the position number of the swapped key N;

[0032] If not, then N j and N j+k The positions are swapped, where j+k represents the position number of the swapped key N;

[0033] S224, judging whether the value of j is equal to F;

[0034] If yes, then end, and encrypt k to get the exchange key N. The encryption calculation formula is as follows:

[0035]

[0036] Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer;

[0037] If not, set j=j+1 and repeat step S223.

[0038] Preferably, in step S3, the specific implementation steps are as follows:

[0039] S31, establish a parallel program model, use the segmented primary plaintext C to input into the parallel program model respectively, and obtain the substituted plaintext D through byte substitution;

[0040] S32, performing row shift on the replacement plaintext D, and obtaining the row shifted plaintext H, and determining whether the shifted plaintext H is obtained by transforming the Ath block of primary plaintext C;

[0041] If yes, then end and go to step S34;

[0042] If not, proceed to step S33;

[0043] S33, performing a column obfuscation operation on the row shift plaintext H, and obtaining a column obfuscated plaintext L;

[0044] S34, using the column obfuscated plaintext L and the corresponding exchange key N to perform round key addition operation to obtain the primary ciphertext J, the calculation formula is as follows:

[0045]

[0046] Among them, the primary ciphertext J of block A obtained by encrypting the primary plaintext C is obtained by steps S31-S34, where J = [J1, J2...J F ];

[0047] S35, combine the A blocks of primary ciphertexts into a ciphertext matrix Z in the order of their numbers and output it.

[0048] Preferably, in step S5, the specific implementation steps are as follows:

[0049] S51, evenly divide the ciphertext matrix Z into F blocks, pre-set the judgment value q according to F and form the primary ciphertext J, use the parallel program model to perform round key addition calculation on the swap key N and the primary ciphertext J corresponding to it;

[0050] S52, determining whether the column obfuscated plaintext L is obtained by replacing the primary ciphertext J of the Fth block;

[0051] If yes, then end and go to step S54;

[0052] If not, proceed to step S53;

[0053] S53, performing an inverse column obfuscation operation on the column obfuscated plaintext L to obtain a row shifted plaintext H;

[0054] S54, performing a reverse row shift operation on the row shift plaintext H to obtain a substitution plaintext D;

[0055] S55, using the substitution plaintext D to perform reverse byte substitution to obtain primary plaintext C, and then obtaining F blocks of primary plaintext C through the parallel program model;

[0056] S56, decrypt the encrypted number z to obtain a random number k, and determine whether jk is less than a determination value q based on the random number k;

[0057] If so, the key N will be swapped j and N |j-k+F| The position of the key N is swapped, where |j-k+F| represents the position number of the swapped key N;

[0058] If not, the key N will be replaced j and N j-k The position of the key N is swapped, where jk represents the position number of the swapped key N;

[0059] S57, judging whether the value of j is equal to the determination value q;

[0060] If yes, then end and get the round key M i , and proceed to step S58;

[0061] If not, let j=j-1 and repeat step S56. The calculation formula for decrypting the encrypted number z is as follows:

[0062]

[0063] Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer;

[0064] S58, using the primary plaintext C and the round key M i Perform round key addition operation to obtain matrix X i , the calculation formula is as follows:

[0065]

[0066] Among them, X i Represents the matrix obtained through the original data, M i represents the round key, C represents the primary plaintext;

[0067] S59, Matrix X i Transform into row data W, and combine the row data W to get the original data.

[0068] The technical solution also provides an optical axis keyboard that uses the signal encryption method, including a base, four spring rods for pressing and resetting are fixedly connected to the top of the base, a groove divided into three areas for placing a chip is opened in the central position of the top surface of the base, transparent colloids for fixing the chip are fixedly connected to both sides of the bottom surface of the groove, black colloids for fixing the chip and shielding visible light are fixedly connected to the middle of the transparent colloids on both sides, a PT chip for receiving infrared signals is fixedly connected to the top surface of the black colloid, an RGB chip for emitting visible light is fixedly connected to the top surface of the transparent colloid on the left side of the PT chip, and an IR chip for emitting infrared signals is fixedly connected to the top surface of the transparent colloid on the right side of the PT chip.

[0069] Preferably, a bottom platform for reflecting infrared signals is provided at the top of the base, and the bottom platform includes a reflection bin, a fixed reflection plate for reflecting infrared signals is fixedly connected to the side end of the reflection bin, and sliding grooves for auxiliary sliding are respectively provided on the two inner side walls of the reflection bin, and a rotating reflection plate for rotating and reflecting infrared signals is rotatably connected to the side wall of the reflection bin, and the rotating reflection plate is slidably connected to the inner side of the sliding groove away from the rotating end, and a top frame for rotating the rotating reflection plate is slidably connected to the bottom end of the rotating reflection plate, and four connecting grooves for connecting spring rods are provided on the bottom surface of the bottom platform.

[0070] Preferably, the top end of the spring rod is fixedly connected to the inner side of the connecting groove, the bottom end of the top frame is fixedly connected to the inner wall of the groove, the top end of the bottom platform is fixedly connected to a keycap, and the inside of the base is fixedly connected to a partition.

[0071] By means of the above technical solution, the present invention provides an integrated tube optical axis keyboard and a signal encryption method, which have at least the following beneficial effects:

[0072] 1. The present invention packages the IR chip, PT chip and RGB chip in the same patch, reducing the cost of patching three lamp beads separately. At the same time, the original key triggering mode of the infrared transmitting and receiving tube is changed by the positive patching method. The IR chip transmits a signal directly upward, and the bottom platform is lowered to a certain distance by pressing the key downward. The signal of the IR chip is reflected to the PT chip through the bottom platform to realize the function triggering of the optical axis keyboard key. This not only reduces the cost of the patch, but also does not require a complex shaft structure at the bottom of the key cap, reducing the key manufacturing cost.

[0073] 2. In the process of generating information signals in the keyboard, the present invention further encrypts the information signals, so that the microprocessor outputs the encrypted signal current. After the signal current is inductively coupled, it can prevent the internal important information from being directly obtained. At the same time, before encrypting and generating ciphertext, the round key is replaced according to the value generated by the random generator and the value is encrypted, and then the replaced round key is used for round key addition. Therefore, the decryptor cannot simply decrypt the round key, but also needs to successfully obtain the value of the random generator, which increases the difficulty of decryption and improves the security of the ciphertext. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0075] Figure 1 It is a three-dimensional structural diagram of the key cap, base and bottom platform of the present invention;

[0076] Figure 2 It is a three-dimensional structural diagram of the interior of the base of the present invention;

[0077] Figure 3 It is a three-dimensional structural diagram of the bottom side of the bottom platform of the present invention;

[0078] Figure 4 This is a diagram of the internal welding lines of the base of the present invention;

[0079] Figure 5 This is a glue dot diagram inside the base of the present invention;

[0080] Figure 6 It is a working principle diagram of the present invention;

[0081] Figure 7 The present invention is a flowchart of the information encryption method.

[0082] In the figure: 1. keycap; 2. base; 21. spring rod; 22. IR chip; 23. PT chip; 24. RGB chip; 25. transparent colloid; 26. black colloid; 3. bottom platform; 31. reflection chamber; 32. fixed reflection plate; 33. sliding groove; 34. rotating reflection plate; 35. top frame; 36. connecting groove; 4. partition. DETAILED DESCRIPTION

[0083] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0084] Please refer to Figure 1-7 , this embodiment proposes an information encryption method for use with an optical axis keyboard. The present invention mainly focuses on the process of electromagnetic signal transmission of the keyboard. After the information signal generated by the keyboard is converted into a signal current, it is easy to be inductively coupled with the outside world through the connecting line between the microprocessor and the host interface in this process, thereby causing information leakage problems, so that information can be directly obtained. For example, when using a keyboard to enter information in a file, or when using a keyboard to communicate in a chat software, due to the signal current generated by typing on the keyboard, information leakage problems may occur during the transmission of the signal current. In the process of generating the information signal in the keyboard, the present invention further encrypts the information signal, and then causes the microprocessor to output the encrypted signal current. In this way, after the signal current is inductively coupled, it can prevent important internal information from being directly obtained. To achieve this function, the specific implementation steps are as follows:

[0085] S1. Directly collect the original data of the keyboard to form row data W. In order to facilitate the subsequent calculation, the number of bytes of our row data is generally an integer multiple of sixteen. If the number of bytes is insufficient, numbers can be used to fill it, such as using 0 to fill the row data. If the number of bytes exceeds an integer multiple of sixteen, it is doubled and the missing part is filled. Here, the default is exactly an integer multiple of sixteen. Then, the row data W is converted into a matrix, and the round key Mi is obtained through the key expansion algorithm. In order to achieve this function, the specific implementation steps are as follows:

[0086] S11. When typing on the keyboard, the original data of the keyboard can be directly obtained, and the original data is preliminarily grouped into groups of sixteen bytes to obtain several groups of row data W, for example, W=[0102030405060708090A0B0C0D0E0F10];

[0087] S12, transform the row data W into matrix X i , for example the matrix It should be noted that in step S12, the matrix X i The arrangement order is from left to right and from top to bottom to form a matrix with four rows and four columns;

[0088] S13, preset key value Y i ,For example Use the key expansion algorithm to use the key value Y i Get the matrix X i The round key M i , the corresponding result can be obtained by using the existing key expansion algorithm, and no improvement is required, so it will not be described in detail. i and round key M i The primary plaintext C is obtained by the round key addition algorithm, C = [C1, C2...Ck ], the calculation formula is as follows:

[0089]

[0090] It should be noted that in step S13, the round key is a byte matrix with a large number of bytes and the round key M i The bytes in the key can be arranged into four rows and forty-four columns. i The number of columns of the matrix X is exactly i An integer multiple of the number of columns to facilitate subsequent segmentation operations.

[0091] The encryption method of the prior art generally uses a conventional symmetric encryption method, but since the position of the round key is not changed, the security after encryption is low and it is easy to decrypt by decryption. Before encrypting and generating ciphertext, the present invention exchanges the round key according to the value generated by the random generator and encrypts the value, and then uses the exchanged round key to perform round key addition. Therefore, the decryptor cannot simply decrypt the round key, but also needs to successfully obtain the value of the random generator, which increases the difficulty of decryption and improves the security of the ciphertext. In order to implement this process, the specific steps are as follows:

[0092] S2, round key M i Perform uniform division to form several division keys, generate random swap values ​​based on a random number generator and swap the matrix positions according to the random swap values ​​to obtain the swapped swap key N, where N = [N1, N2...N j ], where N j Indicates the jth exchange key. To achieve this function, the specific implementation steps are as follows:

[0093] S21, round key M i The key is evenly divided into F blocks, where F∈[4, 11, 22], and F is set to 11 in the present invention;

[0094] S22, generate a random value k and complete the replacement of the positions of the 11-block split keys according to the random value k. To achieve this function, the specific implementation steps are as follows:

[0095] S221. Set a seed value Y n And set the values ​​of parameters m, a, and c. For example, set Y n =10, m=8, a=6, c=7; In step S221, it should be noted that m is generally selected as a power of 2, and the values ​​of a and c are generally selected as any integer from 1 to m-1, and Y n The value of can be selected from positive integers that are less than or equal to 11.

[0096] S222. Calculate a random value k using a random formula. The calculation formula is as follows:

[0097] Y n+1 =(a×Y n +c)mod m

[0098] Among them, Y n+1 represents the randomly generated intermediate number, a represents the random coefficient, c represents the random variation, and m represents the random modulus;

[0099] k=Y n+1 mod 10

[0100] Among them, k represents the random number finally obtained, Y n+1 Represents a randomly generated number;

[0101] S223, determine whether the value of j+k is greater than 11;

[0102] If so, then N j and N j+k-11 The positions are swapped, where j+k-11 represents the position number of the swapped key N;

[0103] If not, then N j and N j+k The positions are swapped, where j+k represents the position number of the swapped key N;

[0104] S224, determine whether the value of j is equal to 11;

[0105] If yes, then end and encrypt k Get the exchange key N , the encryption calculation formula is as follows:

[0106]

[0107] Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer;

[0108] If not, set j=j+1 and repeat step S223; in step S223, it should be noted that (k+b) is preset in advance, for example, it can be preset to (k+2), and can also be modified as needed, but (k+b) needs to be a positive integer;

[0109] S23. The primary plaintext C is also evenly divided into A blocks, and the divided A blocks of primary plaintext C are made to correspond one-to-one with the 11 blocks of exchange keys N. It should be noted in step S23 that due to the one-to-one correspondence between the primary plaintext C and the exchange key N, the value of A is equal to the value of F.

[0110] In the prior art, conventional encryption methods are generally used to encrypt data.i On the basis of evenly dividing and exchanging positions, the parallel program model is used to process the divided plaintext in parallel, which improves the efficiency of the encryption process and shortens the encryption time. In order to achieve this function, the specific implementation steps are as follows:

[0111] S3, establish a parallel program model and set the parallel steps as the first step of byte substitution, the second step of step shift, the third step of column confusion and the fourth step of round key addition, input the split primary plaintext C and the corresponding exchange key N into the parallel program to obtain 11 blocks of primary ciphertext J, and form a ciphertext matrix Z with the 11 blocks of primary ciphertext J. In order to realize this function, the specific implementation steps are as follows;

[0112] S31, establish a parallel program model, for example, use the GPU-based CUDA programming model to realize program parallelism, use the segmented primary plaintext C to input into the parallel program model respectively, for example, use the first block of primary plaintext C1 to input into the parallel program model, perform byte substitution through the S box and obtain the substitution plaintext D1, use the existing byte substitution to perform calculation to obtain the corresponding result, no need to make any improvement, so it will not be described in detail, the S box is a preset byte substitution table, which can be determined in advance;

[0113] S32, perform row shift on the replacement plaintext D1 and obtain row shift plaintext H1, and determine whether the shifted plaintext H1 is the 11th block of primary plaintext C 11 Transformed;

[0114] If yes, then end and go to step S34;

[0115] If not, proceed to step S33;

[0116] S33, perform column obfuscation operation on the row shift plaintext H1 and obtain the column obfuscated plaintext L1. The corresponding result can be obtained by using the existing column obfuscation operation for calculation. No improvement is required and therefore no further description is given.

[0117] S34, using the column obfuscated plaintext L1 and the corresponding exchange key N1 to perform round key addition operation, to obtain the primary ciphertext J1, the calculation formula is as follows:

[0118]

[0119] After the primary ciphertext J1 is obtained, the primary ciphertext J1 is saved. By using steps S31-S34, 11 blocks of primary ciphertext J obtained by the primary plaintext C through the encryption process can be obtained, where J = [J1, J2...J 11 ];

[0120] S35, combine the 11 blocks of primary ciphertexts into a ciphertext matrix Z in the order of the numbers, and output the ciphertext matrix Z; in step S3, it should be noted that the primary plaintext C, C = [C1, C2...C k ], encryption is performed simultaneously in parallel programs to form the primary ciphertext J, but for security reasons, the last block of primary plaintext C 11 No column obfuscation operation is performed to prevent the encryption process from being cracked by simple inverse operations.

[0121] S4, input the ciphertext matrix Z into the terminal; in step S4, it should be noted that the primary ciphertext J is in an encrypted state, and the signal current formed in the output of the microprocessor is also in an encrypted state. If it is obtained by inductive coupling, it can ensure that the original data will not be cracked under a certain probability or within a certain period of time.

[0122] S5. Decrypt the ciphertext matrix Z using the inverse operation of the encryption process and finally obtain the original data. In order to achieve this function, the specific implementation steps are as follows:

[0123] S51, the ciphertext matrix Z is evenly divided into 11 blocks to form primary ciphertext J, and a parallel program model is used to perform round key addition calculations using the swap key N and the primary ciphertext J one by one. For example, the swap key N1 and the primary ciphertext J1 are used to perform round key addition calculations to obtain the column obfuscated plaintext L1. The calculation formula is as follows:

[0124]

[0125] Wherein, L1 represents the column obfuscated plaintext, J1 represents the primary ciphertext, and N1 represents the exchange key corresponding to the primary ciphertext J1;

[0126] S52, determine whether the column obfuscated plaintext L1 is the 11th block of primary ciphertext J 11 Transformed;

[0127] If yes, then end and go to step S54;

[0128] If not, then proceed to step S53; in step S52, it should be noted that since the 11th primary plaintext C 11 No column confusion operation is performed during the encryption process, so the corresponding primary ciphertext J is not 11 Perform column confusion operation and directly perform row shift operation;

[0129] S53, performing an inverse column obfuscation operation on the column obfuscated plaintext L1 to obtain a row shift plaintext H1. The corresponding result can be obtained by using the existing inverse column obfuscation operation for calculation, and no improvement is required, so it will not be described in detail.

[0130] S54, performing a reverse shift operation on the row-shifted plaintext H1 to obtain a substitution plaintext D1, and the corresponding result can be obtained by using the existing reverse shift operation for calculation, and no improvement is required, so it will not be described in detail;

[0131] S55, using the substitution plaintext D1 to perform a reverse byte substitution operation to obtain the primary plaintext C1, and then obtaining 11 blocks of primary plaintext C through the parallel program model;

[0132] S56, decrypt the encrypted number z to obtain a random number k, and determine whether jk is less than a determination value q. In the present invention, the determination value q is set to 1;

[0133] If so, the key N will be swapped j and N |j-k+11| The position of the key N is swapped, where |j-k+11| represents the position number of the swapped key N;

[0134] If not, the key N will be replaced j and N j-k The position of the key N is swapped, where jk represents the position number of the swapped key N;

[0135] S57, judging whether the value of j is equal to the determination value q;

[0136] If yes, then end and get the round key M i , proceed to step S58;

[0137] If not, let j=j-1 and repeat step S56. The calculation formula for decrypting the encrypted number z is as follows:

[0138]

[0139] Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer;

[0140] S58, using the primary plaintext C and the round key M i Perform round key addition operation to obtain matrix X i , the calculation formula is as follows:

[0141]

[0142] Among them, X i Represents the matrix obtained through the original data, M i represents the round key, C represents the primary plaintext;

[0143] S59, Matrix X i Transform into row data W, and combine the row data W to get the original data.

[0144] S6. The terminal transmits the obtained original data to the next step by decryption.

[0145] The existing optical axis keyboard usually uses three kinds of lamp beads, IR infrared transmitting tube, PT infrared receiving tube and visible light RGB, as three lamp bead patches. Among them, the IR infrared transmitting tube and the PT infrared receiving tube are side-mounted and facing each other. When powered on, they are normally in the receiving OK state. The shading sheet of the key cap blocks the IR infrared transmitting tube from transmitting infrared signals to identify the function of the corresponding keyboard key. This method requires three lamp beads to be patched separately to realize the function, which is costly. In addition, the IRPT infrared transmitting and receiving tubes are side-mounted. For the key itself, the structure is relatively complex and the design and production cost of the key cap is increased. The present invention encapsulates the IR chip 22, the PT chip 23 and the RGB chip 24 in the same patch, reducing the cost of patching the three lamp beads separately. At the same time, the original key triggering mode of the infrared transmitting and receiving tube is changed by the positive pasting method. The IR chip 22 transmits a signal directly upward. When the key is pressed down, the bottom platform drops to a certain distance, and the signal of the IR chip 22 is reflected to the PT chip 23 through the bottom platform to realize the function triggering of the optical axis keyboard key. In order to achieve this effect, the specific implementation method is as follows:

[0146] Please refer to Figure 1-3 The present embodiment proposes an integrated tube optical axis keyboard and a signal encryption method, including a base 2, four spring rods 21 are fixedly connected to the top of the base 2, a groove is opened in the central position of the top surface of the base 2, transparent colloids 25 are fixedly connected to the bottom surfaces of the grooves on both sides, black colloids 26 are fixedly connected to the middle of the transparent colloids 25 on both sides, a PT chip 23 is fixedly connected to the top surface of the black colloid 26, an RGB chip 24 is fixedly connected to the top surface of the transparent colloid 25 on the right side of the PT chip 23, and an IR chip 22 is fixedly connected to the top surface of the transparent colloid 25 on the left side of the PT chip 23. The present invention fixes the IR chip 22, the PT chip 23 and the RGB chip 24 on the same bottom surface of the groove through the base 2. The base 2 is a new PLCC bracket structure. At the same time, the bottom surface of the groove of the base 2 is divided into three areas, which are separated by a partition 4 in the middle. The partition 4 is a black PPA injection molded plate, so that the three areas are separated and do not affect each other. Please refer to Figure 4 and Figure 5 , first use welding wire to connect, use any color chip for the RGB chip 24 on the far right, after the solid welding is completed, apply transparent colloid 25 on the position of the IR chip 22, the IR chip 22 is always in working state after the keyboard works, and is used to transmit infrared signals, and black colloid 26 is applied on the position of the middle PT chip 23 to shield the band below 800nm ​​and reduce the interference of visible light generated by the RGB chip 24 on the receiving signal of the PT chip 23, and transparent colloid 25 is applied on the position of the RGB chip 24 on the far right, and the spring rod 21 is a small spring rod structure that can be reset.

[0147] Please refer to Figure 3 The top of the base 2 is fixedly connected to a bottom platform 3, and the bottom platform 3 includes a reflection chamber 31. A fixed reflection plate 32 is fixedly connected to the side end of the reflection chamber 31. Sliding grooves 33 are respectively provided on the two inner side walls of the reflection chamber 31. A rotating reflection plate 34 is rotatably connected to the side wall of the reflection chamber 31. The rotating reflection plate 34 is slidably connected to the inner side of the sliding groove 33 away from the rotating end. The bottom end of the rotating reflection plate 34 is slidably connected to a top frame 35. Four connecting grooves 36 are provided on the bottom surface of the bottom platform 3. The IR chip 22 sends out an infrared signal. When the keyboard key is not pressed, the rotating reflection plate 34 is in a horizontal state, and the signal cannot reach the position of the PT chip 23. Please refer to Figure 6 When a keyboard key is pressed, the keycap 1 and the bottom platform 3 move downward at the same time. At this time, due to the fixed state of the top frame 35, the rotating reflective plate 34 inside the bottom platform 3 moving downward will be pushed open, and the rotating reflective plate 34 will be rotated to a forty-five degree position, wherein the rotating end of the rotating reflective plate 34 is located on the side wall of the reflection bin 31, and the sliding end of the rotating reflective plate 34 slides inside the sliding groove 33. Since the angle of the rotating reflective plate 34 is forty-five degrees, the infrared signal of the IR chip 22 is reflected to the fixed reflective plate 32. The angle of the fixed reflective plate 32 is a fixed forty-five degrees, and the infrared signal of the rotating reflective plate 34 can be reflected to the PT chip 23 just below the bottom, thereby realizing the function triggering of the optical axis keyboard.

[0148] It should be noted that the fixed reflective plate 32 and the rotating reflective plate 34 use commonly used infrared reflective materials, such as aluminum film, which can reflect most infrared signals and has low cost.

[0149] Please refer to Figure 2 and Figure 3 The top end of the spring rod 21 is fixedly connected to the inner side of the connecting groove 36, and the bottom end of the top frame 35 is fixedly connected to the inner wall of the groove. The top frame 35 is an L-shaped bracket with a solid material, which can lift the rotating reflector 34 from a horizontal state to a 45-degree inclined state.

[0150] Please refer to Figure 1 A key cap 1 is fixedly connected to the top of the bottom platform 3 , and a partition 4 is fixedly connected to the inside of the base 2 .

[0151] It should be noted that the partition 4 is a black PPA injection molding material, which can separate the optical signal and prevent the visible light generated by the RGB chip 24 from affecting the normal operation of the PT chip 23.

[0152] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0153] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0154] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A signal encryption method for an integrated tube optical axis keyboard, It is characterized in that The method comprises the following steps: S1. Collect the original data when inputting from the keyboard, and pre-process the original data to obtain the primary plaintext C and the round key M. i ; S2, according to the preset seed value Y n The round key M is randomly i Split and randomly swap to get the swap key N: S3, establish a parallel program model, perform parallel encryption on the primary plaintext C and the exchange key N to obtain the ciphertext matrix Z; S4, output the ciphertext matrix Z to the terminal; S5. Decrypt the ciphertext matrix Z using the inverse operation of the encryption process to obtain the encrypted original data.

2. The signal encryption method according to claim 1, It is characterized in that In step S1, the specific implementation steps are as follows: S11, obtaining the original data of the keyboard, and preliminarily grouping the original data to obtain several groups of row data W; S12, transform the row data W into a matrix X in a certain order i ; S13, through the matrix X i Get the round key M i , and using the matrix X i and round key M i The primary plaintext C is obtained by the round key addition algorithm, C = [C 1 , C 2 ……C k ], the calculation formula is as follows: Among them, C represents the primary plaintext, M i represents the round key, X i Represents a matrix.

3. The signal encryption method according to claim 1, It is characterized in that In step S2, the specific steps are as follows: S21, round key M i Evenly split the key into F blocks, where F∈[4, 11, 22]; S22, using the preset seed value Y n Generate a random number k, and swap the F block split keys according to the random number k to obtain the swap key N, N = [N 1 、N 2 ...N j ]; S23, divide the primary plaintext C evenly into A blocks, and make the divided A blocks of primary plaintext C correspond to the F blocks of exchange key N one by one.

4. The signal encryption method according to claim 3, It is characterized in that In step S22, the specific implementation steps are as follows: S221, preset a seed value Y n , and set the values ​​of parameters m, a and c; S222. A random number k is obtained by using a random formula, and the calculation formula is as follows: Y n+1 =(a×Y n +c)mod m Among them, Y n+1 represents the randomly generated intermediate number, a represents the random coefficient, c represents the random variation, m represents the random modulus, and Y n Indicates the seed value; k=Y n+1 against 10 Among them, k represents the random number finally obtained, Y n+1 Represents a randomly generated intermediate number; S223, determine whether the value of j+k is greater than F, where j represents the jth exchange key N j ; If so, then N j and N j+k-F The positions are swapped, where j+k-11 represents the position number of the swapped key N; If not, then N j and N j+k The positions are swapped, where j+k represents the position number of the swapped key N; S224, determine whether the value of j is equal to F; If yes, then end, and encrypt k to get the exchange key N. The encryption calculation formula is as follows: Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer; If not, set j=j+1 and repeat step S223.

5. The signal encryption method according to claim 1, It is characterized in that In step S3, the specific implementation steps are as follows: S31, establish a parallel program model, use the segmented primary plaintext C to input into the parallel program model respectively, and obtain the substituted plaintext D through byte substitution; S32, performing row shift on the replacement plaintext D, and obtaining the row shifted plaintext H, and determining whether the shifted plaintext H is obtained by transforming the Ath block of primary plaintext C; If yes, then end and go to step S34; If not, proceed to step S33; S33, performing a column obfuscation operation on the row shift plaintext H, and obtaining a column obfuscated plaintext L; S34, using the column obfuscated plaintext L and the corresponding exchange key N to perform round key addition operation to obtain the primary ciphertext J, the calculation formula is as follows: Among them, the primary ciphertext J of block A obtained by encrypting the primary plaintext C is obtained by steps S31-S34, where J=[J 1 , J 2 ……J F ]; S35, combine the A blocks of primary ciphertexts into a ciphertext matrix Z in the order of their numbers and output it.

6. The signal encryption method according to claim 1, It is characterized in that In step S5, the specific implementation steps are as follows: S51, evenly divide the ciphertext matrix Z into F blocks, pre-set the judgment value q according to F and form the primary ciphertext J, use the parallel program model to perform round key addition calculation on the swap key N and the primary ciphertext J corresponding to it; S52, determining whether the column obfuscated plaintext L is obtained by replacing the primary ciphertext J of the Fth block; If yes, then the process ends and goes to step S54; If not, proceed to step S53; S53, performing an inverse column obfuscation operation on the column obfuscated plaintext L to obtain a row shifted plaintext H; S54, performing a reverse row shift operation on the row shift plaintext H to obtain a substitution plaintext D; S55, using the substitution plaintext D to perform reverse byte substitution to obtain primary plaintext C, and then obtaining F blocks of primary plaintext C through the parallel program model; S56, decrypt the encrypted number z to obtain a random number k, and determine whether jk is less than a determination value q based on the random number k; If so, the key N will be swapped j and N |j-k+F| The position of the key N is swapped, where |j-k+F| represents the position number of the swapped key N; If not, the key N will be replaced j and N j-k The position of the key N is swapped, where jk represents the position number of the swapped key N; S57, judging whether the value of j is equal to the determination value q; If yes, then end and get the round key M i , and proceed to step S58; If not, let j=j-1 and repeat step S56. The calculation formula for decrypting the encrypted number z is as follows: Wherein, z represents the encrypted number after the random number k is encrypted, and b is a preset positive integer; S58, using the primary plaintext C and the round key M i Perform round key addition operation to obtain matrix X i , the calculation formula is as follows: Among them, X i Represents the matrix obtained through the original data, M i represents the round key, C represents the primary plaintext; S59, Matrix X i Transform into row data W, and combine the row data W to get the original data.

7. An optical axis keyboard comprising the signal encryption method according to any one of claims 1 to 6, comprising a base (2), It is characterized in that The top of the base (2) is fixedly connected with four spring rods (21) for pressing and resetting. A groove divided into three areas for placing a chip is provided at the center of the top surface of the base (2). Transparent colloids (25) for fixing the chip are fixedly connected to both sides of the bottom surface of the groove. Black colloids (26) for fixing the chip and shielding visible light are fixedly connected to the middle of the transparent colloids (25) on both sides. A PT chip (23) for receiving infrared signals is fixedly connected to the top surface of the black colloid (26). An RGB chip (24) for emitting visible light is fixedly connected to the top surface of the transparent colloid (25) on the left side of the PT chip (23). An IR chip (22) for emitting infrared signals is fixedly connected to the top surface of the transparent colloid (25) on the right side of the PT chip (23).

8. The optical axis keyboard according to claim 7, It is characterized in that A bottom platform (3) for reflecting infrared signals is arranged at the top of the base (2), and the bottom platform (3) comprises a reflection chamber (31), a fixed reflection plate (32) for reflecting infrared signals is fixedly connected to the side end of the reflection chamber (31), sliding grooves (33) for auxiliary sliding are respectively provided on the two inner side walls of the reflection chamber (31), a rotating reflection plate (34) for rotating and reflecting infrared signals is rotatably connected to the side wall of the reflection chamber (31), the rotating reflection plate (34) is slidably connected to the inner side of the sliding groove (33) away from the rotating end, the bottom end of the rotating reflection plate (34) is slidably connected to a top frame (35) for rotating the rotating reflection plate (34) by 45 degrees, and four connecting grooves (36) for connecting spring rods (21) are provided on the bottom surface of the bottom platform (3).

9. The optical axis keyboard according to claim 8, It is characterized in that The top end of the spring rod (21) is fixedly connected to the inner side of the connecting groove (36), the bottom end of the top frame (35) is fixedly connected to the inner side wall of the groove, the top end of the bottom platform (3) is fixedly connected to a key cap (1), and the interior of the base (2) is fixedly connected to a partition plate (4).

Citation Information

Patent Citations

  • Implementation method and device of lightweight block cipher algorithm RainSP and electronic equipment

    CN115314187A

  • Quantum encryption communication system

    JP2006180307A

  • Encryption device of stream cipher, decryption device of stream cipher, encryption method of stream cipher, decryption method of stream cipher, and program

    JP2012235288A

Cited By

  • Visible light communication method and system

    CN121462080A