Integrated tube optical axis keyboard and signal encryption method

Through the integrated optical axis keyboard design and signal encryption method, the complex structure of the optical axis keyboard and electromagnetic signal leakage are solved, and cost reduction and information security enhancement are achieved.

CN118764182BActive Publication Date: 2025-08-22ANHUI YUGUAN OPTOELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing optical axis keyboard has complex structure and high cost, and electromagnetic signals are easily leaked during transmission, resulting in information security risks.

Method used

The integrated optical axis keyboard design is adopted to encapsulate the IR chip, PT chip and RGB chip in the same patch, key triggering is achieved through the forward patch, and the signal is encrypted using the parallel program model, including data segmentation, random switching and encryption operations.

Benefits of technology

It reduces the cost of key production, improves information security, prevents electromagnetic signals from leaking, and enhances the confidentiality of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764182B_ABST
    Figure CN118764182B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of keyboard encryption technology, and solves the technical problem in the prior art that when typing on a keyboard, the information converted from the electromagnetic signal of the keyboard into a signal current may be directly obtained, resulting in information leakage. In particular, it relates to an integrated tube optical axis keyboard and a signal encryption method, which includes the following steps: S1, collecting the original data during keyboard input, and pre-processing 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 processed i The present invention encrypts the information signal when it is generated in the keyboard to prevent the internal information from being directly obtained. At the same time, before encrypting the ciphertext, the value is swapped according to the value of the random generator and encrypted, which increases the difficulty of decryption and improves the security of the ciphertext, solving the information leakage problem in the prior art.
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, it improves some problems of traditional contact mechanical switches. 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 and carry a lot of useful information, posing a risk of information leakage.

[0003] The existing technology has the following problems:

[0004] 1. Optical axis keyboards usually use three types of lamp beads: IR infrared emitting tube, PT infrared receiving tube, and visible light RGB as three lamp bead patches. Among them, the IR infrared emitting tube and 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 emitting tube is blocked by the light shielding sheet of the keycap to identify the function of the corresponding keyboard key. This method requires the use of three lamp bead patches to realize the function, which is relatively costly. In addition, the IRPT infrared emitting and receiving tubes are side-mounted, which makes the structure of the key itself more complicated and increases the design and production cost of the keycap.

[0005] 2. When typing on a 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. 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 response to the deficiencies in the prior art, the present invention provides an integrated tube optical axis keyboard and signal encryption method, which solves the problem that when typing on a keyboard, such as entering information in a file, the electromagnetic signal generated by the keyboard is converted into a signal current during transmission, and then easily undergoes inductive coupling 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, posing a huge problem to the user's information security, and if the information is extremely important, it may cause very serious consequences. The present invention achieves the purpose of keeping the information input by the keyboard confidential and improving the security of the information input by the user.

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

[0008] S1, collect the original data when the keyboard is input, and pre-process the original data to obtain the primary plaintext C and 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 to 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 key according to the random number k to obtain the swap key N, where N = [N1, N2...N j ];

[0022] S23. Evenly divide the primary plaintext C 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 using a random formula. 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 middle 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 swap key N;

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

[0034] If yes, then end the process 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, and obtain the substituted plaintext D through byte substitution;

[0040] S32. Perform row shift on the replacement plaintext D to obtain row-shifted plaintext H. It is then determined whether the shifted plaintext H is obtained by transforming the primary plaintext C in block A.

[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-shifted plaintext H, and obtaining a column-obfuscated plaintext L;

[0044] S34. Perform a round key addition operation using the column obfuscated plaintext L and the corresponding swap key N 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 primary ciphertexts of block A into a ciphertext matrix Z in the order of the labels 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, and use the parallel program model to perform round key addition calculation on the swap key N and the corresponding primary ciphertext J;

[0050] S52. Determine whether the column obfuscated plaintext L is obtained by swapping 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. Perform a reverse row shift operation on the row-shifted plaintext H to obtain a substitution plaintext D.

[0055] S55. Perform reverse byte substitution on the substitution plaintext D to obtain primary plaintext C, and then obtain 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 swap key N;

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

[0059] S57, judging whether the value of j is equal to the judgment 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 from 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 obtain the original data.

[0068] The technical solution also provides an optical axis keyboard that applies 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 center of the top surface of the base, transparent colloids for fixing the chip are fixedly connected on 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 chamber, and a fixed reflection plate for reflecting infrared signals is fixedly connected to the side end of the reflection chamber, and sliding grooves for assisting sliding are respectively provided on the two side walls inside the reflection chamber, and a rotating reflection plate for rotating and reflecting infrared signals is rotatably connected to the side wall of the reflection chamber, and the rotating reflection plate is slidably connected to the inner side of the sliding groove away from the rotating end, and the bottom end of the rotating reflection plate is slidably connected to a top frame for rotating 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 encapsulates the IR chip, PT chip and RGB chip in the same patch, reducing the cost of patching the three lamp beads separately. At the same time, through the positive patch method, the original key triggering method of the infrared transmitting and receiving tube is changed. The IR chip 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 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 eliminates the need for a complex shaft structure at the bottom of the keycap, reducing the cost of key production.

[0073] 2. In the process of generating an information signal in the keyboard, the present invention further encrypts the information signal, and then enables the microprocessor to output the encrypted signal current. In this way, after the signal current undergoes inductive coupling, it can prevent 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 keycap, base and bottom platform of the present invention;

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

[0077] Figure 3 This 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 diagram of glue dotting inside the base of the present invention;

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

[0081] Figure 7 This is a flow chart of the information encryption method of the present invention.

[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 reflector; 33. Sliding groove; 34. Rotating reflector; 35. Top frame; 36. Connecting groove; 4. Partition. DETAILED DESCRIPTION

[0083] To make the above-mentioned objectives, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. This will enable a full understanding of how the present application employs technical means to solve technical problems and achieve technical effects, and to implement the invention 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 easily inductively coupled with the outside world through the connection line between the microprocessor and the host interface during this process, thereby causing information leakage problems and allowing information to 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, the signal current generated by typing on the keyboard may cause information leakage problems during the transmission of the signal current. The present invention further encrypts the information signal during the process of generating the information signal in the keyboard, 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 subsequent calculations, the number of bytes in 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. During keyboard typing, the original data of the keyboard can be directly obtained, and the original data can be preliminarily grouped into groups of sixteen bytes to obtain several groups of row data W, for example, W = [0102030405060708090A0B0C0D0E0F10];

[0087] S12. Transform 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 are arranged into four rows and forty-four columns, and the round key M 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. However, since the position of the round key is not changed, the encryption is less secure and can be easily decrypted by decryption. The present invention, before encrypting to generate ciphertext, swaps the round key according to the value generated by the random generator and encrypts the value, and then uses the swapped round key 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. To implement this process, the specific steps are as follows:

[0092] S2, round key M i Perform uniform division to form several split keys, generate random swap values ​​based on random number generator and swap the matrix positions according to the random swap values ​​to obtain the swapped swap key N, N = [N1, N2...N j ], where N j Indicates the jth key swap. 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 swap 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 swap key N;

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

[0105] If so, end and encrypt k Get the swap 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. In the present invention, the round key Mi On the basis of evenly splitting and swapping positions, the parallel program model is used to process the split 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. Build a parallel program model and set the parallel steps as byte substitution (step 1), walk shift (step 2), column obfuscation (step 3), and round key addition (step 4). Input the split primary plaintext C and its corresponding swap key N into the parallel program to obtain 11 blocks of primary ciphertext J. These 11 blocks of primary ciphertext J are combined into a ciphertext matrix Z. To achieve this function, the specific implementation steps are as follows:

[0112] S31. Establish a parallel program model, such as using a GPU-based CUDA programming model to implement program parallelism. Use the segmented primary plaintext C to input the divided primary plaintexts C into the parallel program model. For example, use the first block of primary plaintext C1 to input the parallel program model. Perform byte substitution through an S-box and obtain the substituted plaintext D1. Use existing byte substitution to perform calculations to obtain the corresponding results. No improvements are required, so this will not be described in detail. The S-box is a preset byte substitution table that can be determined in advance.

[0113] S32: Perform row shift on the substituted plaintext D1 and obtain row-shifted 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 a column obfuscation operation on the row-shifted plaintext H1 and obtain the column obfuscated plaintext L1. The corresponding result can be obtained by using the existing column obfuscation operation. No improvement is required and therefore will not be described in detail.

[0117] S34. Perform a round key addition operation using the column obfuscated plaintext L1 and the corresponding swap key N1 to obtain the primary ciphertext J1. The calculation formula is as follows:

[0118]

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

[0120] S35, combine the 11 blocks of primary ciphertext into a ciphertext matrix Z in the order of the labels, and output the ciphertext matrix Z; in step S3, it should be noted that the primary plaintext C, C = [C1, C2 ... C k ], encrypt and form the primary ciphertext J in parallel programs at the same time, 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 generated by the microprocessor in the output is also in an encrypted state. If it is obtained by inductive coupling, it can ensure that the original data cannot be cracked with a certain probability or within a certain time.

[0122] S5. Decrypt the ciphertext matrix Z using the inverse operation of the encryption process and finally obtain the original data. 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. A parallel program model is used to perform round key addition calculations using the swap key N and the primary ciphertext J in a one-to-one correspondence. 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] Where L1 represents the column obfuscated plaintext, J1 represents the primary ciphertext, and N1 represents the swap 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 go to step S53; in step S52, it should be noted that since the 11th block of 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. Perform an inverse column obfuscation operation on the column obfuscated plaintext L1 to obtain the row shift plaintext H1. The corresponding result can be obtained by using the existing inverse column obfuscation operation. No improvement is required and therefore will not be described in detail.

[0130] S54. Perform a reverse shift operation on the row-shifted plaintext H1 to obtain a substitution plaintext D1. The corresponding result can be obtained by using the existing reverse shift operation. No improvement is required and therefore will not be described in detail.

[0131] S55. Perform a reverse byte substitution operation on the substitution plaintext D1 to obtain the primary plaintext C1, and then obtain 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 swap key N;

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

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

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

[0137] If not, set 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 from 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 obtain the original data.

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

[0145] Existing optical axis keyboards usually use three types of lamp beads, IR infrared emitting tubes, PT infrared receiving tubes, and visible light RGB, as three lamp bead patches. Among them, the IR infrared emitting 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 keycap blocks the IR infrared emitting tube from emitting 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 emitting and receiving tubes are side-mounted, which makes the structure of the key itself more complicated and increases the design and production cost of the keycap. The present invention encapsulates the IR chip 22, PT chip 23, and 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 method of the infrared emitting and receiving tube is changed by the front-mounted method. The IR chip 22 emits 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 through the bottom platform to the PT chip 23 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 , This embodiment proposes an integrated tube optical axis keyboard and 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 center of the top surface of the base 2, and transparent colloids 25 are fixedly connected on both sides of the bottom surface of the groove, and black colloids 26 are fixedly connected in the middle of the transparent colloids 25 on both sides, and a PT chip 23 is fixedly connected on the top surface of the black colloid 26. The top surface of the black colloid 26 is fixedly connected to the PT chip 23, the top surface of the transparent colloid 25 on the right side of the PT chip 23 is fixedly connected to the RGB chip 24, and the top surface of the transparent colloid 25 on the left side of the PT chip 23 is fixedly connected to the IR chip 22. The present invention fixes the IR chip 22, the PT chip 23 and the RGB chip 24 on the same groove bottom surface 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 is working and is used to transmit infrared signals. Apply black colloid 26 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 signal received by the PT chip 23. Apply transparent colloid 25 on the position of the RGB chip 24 on the far right. 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 the bottom platform 3, and the bottom platform 3 includes a reflection chamber 31. The side end of the reflection chamber 31 is fixedly connected to a fixed reflection plate 32. Sliding grooves 33 are respectively provided on the two side walls inside 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 on the side away from the rotating end. The bottom end of the rotating reflection plate 34 is slidably connected to the top frame 35. Four connecting grooves 36 are provided on the bottom surface of the bottom platform 3. The IR chip 22 emits 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 downward moving bottom platform 3 will be pushed open, thereby rotating the rotating reflective plate 34 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 chamber 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 fixed at forty-five degrees, which can reflect the infrared signal of the rotating reflective plate 34 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 made of strong material and can lift the rotating reflector 34 from a horizontal state to a forty-five-degree inclined state.

[0150] Please refer to Figure 1 The top of the bottom platform 3 is fixedly connected to the keycap 1, and the interior of the base 2 is fixedly connected to the partition 4.

[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 will appreciate that all or part of the steps in the above-mentioned embodiment methods can be accomplished by instructing the relevant hardware through a program. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

[0154] The above embodiments provide a detailed introduction to the present invention. 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 ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A signal encryption method for an integrated tube optical axis keyboard, characterized in that: The method comprises the following steps: S1. Collect the original data when inputting on the keyboard and pre-process the original data to obtain the primary plaintext and round key ; S2, according to the preset seed value The round key is processed randomly Split and randomly swap to get the swap key : S3. Establish a parallel program model to convert the primary plaintext and swap keys Perform parallel encryption processing to obtain the ciphertext matrix , the specific implementation steps are as follows: S31, establish a parallel program model, using the primary plaintext after segmentation Input them into the parallel program model respectively, and obtain the replaced plaintext through byte substitution ; S32, replace the plain text Perform row shift and obtain row shift plaintext , determine the displacement plaintext Is there a Block primary plaintext Obtained after transformation; If yes, then end and go to step S34; If not, proceed to step S33; S33, for row displacement plaintext Perform column obfuscation operation and obtain column obfuscated plaintext ; S34, using columns to obfuscate plaintext With the corresponding exchange key Perform round key addition operation to obtain primary ciphertext , the calculation formula is as follows: ; Among them, using steps S31-S34 to obtain Primary Plaintext Encrypted Block primary ciphertext , ; S35, will The block primary ciphertexts are combined into a ciphertext matrix in the order of the labels. And output; S4, the ciphertext matrix Output to the terminal; S5, the ciphertext matrix Decryption is performed using the inverse operation of the encryption process to obtain the original encrypted data.

2. The signal encryption method according to claim 1, wherein: In step S1, the specific implementation steps are as follows: S11. Get the original data of the keyboard and perform preliminary grouping on the original data to obtain several groups of row data. ; S12, row data Transform into a matrix in a certain order ; S13, through the matrix Get the round key , and using the matrix and round key Get the primary plaintext through the round key plus algorithm , , the calculation formula is as follows: ; in, Indicates primary plaintext, represents the round key, Represents a matrix.

3. The signal encryption method according to claim 1, wherein: In step S2, the specific steps are as follows: S21, round key Evenly divided into Block splitting key, where ; S22. Using the preset seed value Generate random numbers , based on random numbers right The block split key is swapped to obtain the swap key , ; S23, the primary plaintext Evenly divided into block, and make the split Block primary plaintext and Block swap key One to one correspondence.

4. The signal encryption method according to claim 3, wherein: In step S22, the specific implementation steps are as follows: S221. Preset a seed value , and set the parameters The value of S222, use the random formula to get a random number , the calculation formula is as follows: ; in, represents a randomly generated intermediate number, represents the random coefficient, represents the random variation, represents the random modulus, Indicates the seed value; ; in, Indicates the random number finally obtained. Represents a randomly generated middle number; S223, Judgment Is the value greater than ,in Indicates the Swap Key ; If so, then and The positions are swapped, where Indicates key swap Position number; If not, then and The positions are swapped, where Indicates key swap Position number; S224. Judgment Is the value equal to ; If so, then end and Encrypt to obtain the exchange key , the encryption calculation formula is as follows: ; in, Represents a random number The encrypted number after encryption, b is a preset positive integer; If not, then , and repeat step S223.

5. The signal encryption method according to claim 1, wherein: In step S5, the specific implementation steps are as follows: S51, divide the ciphertext matrix Z evenly into Block, according to Preset judgment value And form the primary ciphertext , using a parallel programming model, swapping keys and the corresponding primary ciphertext Perform round key addition calculation; S52, judge the obfuscated plaintext Is it the first Block primary ciphertext obtained by exchange; If yes, then end and go to step S54; If not, proceed to step S53; S53, Column Obfuscation Perform inverse column confusion operation to obtain row shift plaintext ; S54, row shift plaintext Perform reverse shift operation to obtain substitution plaintext ; S55, using substitution plaintext Perform reverse byte substitution to obtain primary plaintext , and then obtain it through the parallel program model Block primary plaintext ; S56, Encryption Number Perform decryption calculation to obtain a random number , and according to the random number judge Is it less than the judgment value? ; If so, the key will be swapped and The positions of are swapped, where Indicates key swap Position number; If not, the key will be swapped and The positions of are swapped, where Indicates key swap Position number; S57, Judgment Is the value equal to the judgment value ; If yes, then end and get the round key , and proceed to step S58; If not, then , and repeat step S56 to encrypt the data The calculation formula for decryption is as follows: ; in, Represents a random number The encrypted number after encryption, b is a preset positive integer; S58, using primary plaintext and round key Perform round key addition operation to obtain matrix , the calculation formula is as follows: ; in, represents the matrix obtained through the original data, represents the round key, Indicates primary plaintext; S59, Matrix Transformed into row data , for row data Combine to get the original data.

6. An optical axis keyboard comprising the signal encryption method according to any one of claims 1 to 5, comprising a base (2), characterized in that: The top of the base (2) is fixedly connected to four spring rods (21) for pressing and resetting. A groove is provided in the center of the top surface of the base (2) and is divided into three areas for placing a chip. 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).

7. The optical axis keyboard according to claim 6, characterized in that: The top of the base (2) is provided with a bottom platform (3) for reflecting infrared signals, and the bottom platform (3) includes a reflection chamber (31), and a fixed reflection plate (32) for reflecting infrared signals is fixedly connected to the side end of the reflection chamber (31), and sliding grooves (33) for auxiliary sliding are respectively provided on the two side walls inside 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), and 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 the spring rod (21) are provided on the bottom surface of the bottom platform (3).

8. The optical axis keyboard according to claim 7, 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 the keycap (1), and the interior of the base (2) is fixedly connected to a partition (4).

Citation Information

Patent Citations

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

    CN115314187A

  • Quantum encryption communication system

    JP2006180307A