A communication message encryption and decryption system
By using the key matrix and QR code generation method in the communication message encryption and decryption system, the problems in the existing technology that the key is easy to guess, the response time is long, and the encryption and decryption limitations are solved, and a higher level is achieved. Security and real-time.
Patent Information
- Application Number
- CN202410981148.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-22
AI Technical Summary
Existing communication message encryption and decryption algorithms have problems such as keys that are easy to guess, long dynamic keys that affect response time, limitations in character encryption and decryption, and seed key synchronization that is easily intercepted.
A communication message encryption and decryption system is designed, using the key matrix building module, request receiving module, key matrix generating module, QR code generating module and data sending module in the key library, through the 12×12 key The group matrix and QR code information generate a seed key, which is used to encrypt and decrypt data to ensure the dynamics and security of the key.
It improves the security performance of communication messages, reduces the risk of key guessing, reduces the load on the dynamic key pair hardware, enhances the system's real-time response capability, and avoids the security risks of seed key synchronization.
Smart Images

Figure CN118523912B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data security, and in particular to an encryption and decryption system for communication messages. Background Art
[0002] At present, the encryption and decryption algorithms for communication messages generally adopt the overall encryption and decryption algorithm, and the key is generally more than 256 bits. This encryption and decryption algorithm has three shortcomings:
[0003] After the information is collected, it is easy to guess because it is encrypted as a whole. As long as the key is intercepted, the content of the entire message can be known;
[0004] A dynamic key that is too long is not conducive to the high real-time requirements of the underlying hardware chip and affects the system response time. Especially in the era of the Internet of Everything, response time is an important indicator;
[0005] Some traditional encryption and decryption algorithms have certain requirements for encryption and decryption data, such as only being able to encrypt and decrypt characters, which have certain limitations; and when synchronizing the seed key, it is easy to be intercepted and used directly. Therefore, a communication message encryption and decryption system is proposed to address the above problems. Summary of the invention
[0006] The purpose of the present invention is to provide a communication message encryption and decryption system to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A communication message encryption and decryption system, comprising:
[0009] Key library; the key library includes a key matrix building module, a request receiving module, a key matrix generating module, a QR code generating module and a data sending module;
[0010] The key matrix building module includes a key model and a display model; the key model is composed of a 12×12 key group matrix, and the key group is composed of 128-bit arranged key symbols; the display model is composed of display windows arranged in a 12×12 pattern, and each display window corresponds to a key group;
[0011] The request receiving module receives the key request from the encryption end, and generates a key request tag according to one or more of the request time, request sequence, and request end information;
[0012] After receiving the key request mark, the key matrix generation module generates key request data and then synchronizes it to the key matrix construction module. The key matrix construction module calls a key symbol in each key group according to the key calling model, and displays the key symbol determined by each key group on the corresponding display window. The display model records all display windows and generates a key matrix data packet. The key matrix data packet is then synchronized to the key matrix generation module. The key matrix generation module aggregates the key matrix data packet and the key request mark to generate a key basic data packet.
[0013] The QR code generation module receives the key request tag, randomly generates 12×12 QR code information, and packages it with the key request tag to generate a QR code data packet;
[0014] The data sending module receives the key basic data packet and the QR code data packet, and sends them to the encryption end and the decryption end synchronously;
[0015] Encryption end; the encryption end includes a key request sending module, a key analysis module, a plaintext encryption module and a ciphertext sending module;
[0016] After receiving the plaintext to be sent, the key request sending module determines the sending end and receiving end of the plaintext, generates a key request, and sends the key request to the key library;
[0017] After receiving the key basic data packet and the two-dimensional code data packet, the key analysis module first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbol in the key matrix data packet, generates a key matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, overlays the two-dimensional code information on the key matrix image, records the key symbols in the dark area or light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing;
[0018] After receiving the seed key, the plaintext encryption module generates a new dynamic key using the HASH function, then receives the plaintext data to be transmitted, decomposes the plaintext data into several frames, and uses the new dynamic key combined with the Encode() function to encrypt each frame of plaintext in turn, and then re-forms each frame of ciphertext into a new overall cipher message;
[0019] After receiving the whole ciphertext message, the ciphertext sending module sends it to the decryption end;
[0020] The decryption end includes a key data analysis module, a ciphertext receiving module and a ciphertext decryption module; after the key data analysis module receives the key basic data packet and the two-dimensional code data packet, it first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbol in the key matrix data packet, generates a key square matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, covers the two-dimensional code information on the key square matrix image, records the key symbols in the dark area or light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing; after receiving the overall password message, the ciphertext receiving module decomposes the overall password message to obtain several ciphertext clusters, and decomposes each ciphertext cluster twice to obtain several frames of ciphertext messages; the ciphertext decryption module seed key generates a new dynamic key using the HASH function, and uses the new dynamic key in combination with the Decode() function to decrypt each frame of plaintext in turn to obtain several frames of decrypted plaintext messages.
[0021] As a preferred solution, the key retrieval model is generated by a key matrix generation module. The key matrix generation module constructs a 12×12 array model composed of single-point digital frames, and the digital interval displayed by each digital frame is between (1, 128). After receiving the key request mark, the key matrix generation module controls each digital frame to randomly generate any number in (1, 128) to generate a 12×12 key retrieval model.
[0022] As a preferred solution, the arrangement position of the number frame corresponds one-to-one with the arrangement position of the key group, and the arrangement order of each key symbol in the key group corresponds one-to-one with the number in the number interval of the number frame.
[0023] As a preferred solution, the arrangement order of the key symbols in the key group is changed randomly according to the time node.
[0024] As a preferred solution, when decomposing the data plaintext, the decomposition of the data plaintext is carried out according to the encryption frame length. After the data plaintext is decomposed, each frame of the data plaintext is marked once in sequence, and the marking is carried out in the order of Arabic numerals.
[0025] As a preferred solution, in plaintext encryption, the key for each frame is regenerated using a HASH function.
[0026] As a preferred solution, when each frame of ciphertext is re-formed into a new overall ciphertext message, each frame of the encrypted ciphertext message in the original order is extracted randomly or in a pre-set extraction order to generate several ciphertext clusters, which are marked twice and then formed into a new overall ciphertext message based on the secondary markings.
[0027] As a preferred solution, several frames of decrypted plaintext messages are reassembled according to a mark to obtain a whole plaintext message.
[0028] It can be seen from the technical solution provided by the present invention that the present invention provides a communication message encryption and decryption system, which has the following beneficial effects: by setting a key library, the key library includes a key matrix construction module, a request receiving module, a key matrix generation module, a two-dimensional code generation module and a data sending module, and a 12×12 key group matrix is established by using the key matrix construction module. After the key matrix generation module generates a key retrieval model, the key matrix construction module determines the key symbol of each key group in the key group matrix according to the key retrieval model, which is displayed by the display window of the display model. The key matrix generation module determines the key matrix data packet according to the display situation of the display model, and the two-dimensional code generation module generates two-dimensional code information at the same time, which is sent to the encryption end and the decryption end by the data sending module. The encryption end and the decryption end determine the seed key according to the key matrix data packet and the two-dimensional code information, and then use the encryption and decryption algorithm to encrypt and decrypt the information plaintext respectively. In this system, the seed key used is provided by the key library, and different key requests correspond to different key matrix data packets and two-dimensional code information, and the security performance is good. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The figure is a schematic diagram of the overall structure of a communication message encryption and decryption system of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0031] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0032] like Figure 1 As shown, an embodiment of the present invention provides a communication message encryption and decryption system, including:
[0033] Key library; the key library includes a key matrix building module, a request receiving module, a key matrix generating module, a QR code generating module and a data sending module;
[0034] The key matrix building module includes a key model and a display model; the key model is composed of a 12×12 key group matrix, and the key group is composed of 128-bit arranged key symbols; the display model is composed of display windows arranged in a 12×12 pattern, and each display window corresponds to a key group;
[0035] The request receiving module receives the key request from the encryption end, and generates a key request tag according to one or more of the request time, request sequence, and request end information;
[0036] After receiving the key request mark, the key matrix generation module generates key request data and then synchronizes it to the key matrix construction module. The key matrix construction module calls a key symbol in each key group according to the key calling model, and displays the key symbol determined by each key group on the corresponding display window. The display model records all display windows and generates a key matrix data packet. The key matrix data packet is then synchronized to the key matrix generation module. The key matrix generation module aggregates the key matrix data packet and the key request mark to generate a key basic data packet.
[0037] The key retrieval model is generated by the key matrix generation module. The key matrix generation module constructs a 12×12 array model composed of single-point digital frames, and the digital interval displayed by each digital frame is between (1, 128). After receiving the key request mark, the key matrix generation module controls each digital frame to randomly generate any number in (1, 128) to generate a 12×12 key retrieval model.
[0038] The QR code generation module receives the key request tag, randomly generates 12×12 QR code information, and packages it with the key request tag to generate a QR code data packet;
[0039] The data sending module receives the key basic data packet and the QR code data packet, and sends them to the encryption end and the decryption end synchronously;
[0040] Encryption end; the encryption end includes a key request sending module, a key analysis module, a plaintext encryption module and a ciphertext sending module;
[0041] After receiving the plaintext to be sent, the key request sending module determines the sending end and receiving end of the plaintext, generates a key request, and sends the key request to the key library;
[0042] After receiving the key basic data packet and the two-dimensional code data packet, the key analysis module first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbol in the key matrix data packet, generates a key matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, overlays the two-dimensional code information on the key matrix image, records the key symbols in the dark area or light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing;
[0043] After receiving the seed key, the plaintext encryption module generates a new dynamic key using the HASH function, then receives the plaintext data to be transmitted, decomposes the plaintext data into several frames, and uses the new dynamic key combined with the Encode() function to encrypt each frame of plaintext in turn, and then re-forms each frame of ciphertext into a new overall cipher message;
[0044] After receiving the whole ciphertext message, the ciphertext sending module sends it to the decryption end;
[0045] The decryption end includes a key data analysis module, a ciphertext receiving module and a ciphertext decryption module; after the key data analysis module receives the key basic data packet and the two-dimensional code data packet, it first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbol in the key matrix data packet, generates a key square matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, covers the two-dimensional code information on the key square matrix image, records the key symbols in the dark area or light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing; after receiving the overall password message, the ciphertext receiving module decomposes the overall password message to obtain several ciphertext clusters, and decomposes each ciphertext cluster twice to obtain several frames of ciphertext messages; the ciphertext decryption module seed key generates a new dynamic key using the HASH function, and uses the new dynamic key in combination with the Decode() function to decrypt each frame of plaintext in turn to obtain several frames of decrypted plaintext messages.
[0046] In this embodiment, the arrangement position of the number frame corresponds to the arrangement position of the key group one by one, and the arrangement order of each key symbol in the key group corresponds to the number in the number interval of the number frame one by one.
[0047] In this embodiment, the arrangement order of the key symbols in the key group is changed randomly according to the time node.
[0048] In this embodiment, when decomposing the data plaintext, the decomposition of the data plaintext is performed according to the encryption frame length. After the data plaintext is decomposed, each frame of the data plaintext is marked once in sequence, and the marking is performed in the order of Arabic numerals.
[0049] In this embodiment, in plain text encryption, the key of each frame is regenerated using a HASH function.
[0050] In this embodiment, when each frame of ciphertext is reformed into a new overall ciphertext message, each frame of the encrypted ciphertext message in the original order is extracted randomly or in a pre-set extraction order to generate a number of ciphertext clusters, which are marked twice, and then a new overall ciphertext message is formed based on the secondary marking.
[0051] In this embodiment, the decrypted plaintext message frames are reassembled according to a single mark to obtain a whole plaintext message.
[0052] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A communication message encryption and decryption system, characterized in that: include: Keystore; The key library includes a key matrix building module, a request receiving module, a key matrix generating module, a QR code generating module and a data sending module; The key matrix building module includes a key model and a display model; the key model is composed of a 12×12 key group matrix, and the key group is composed of 128-bit arranged key symbols; the display model is composed of display windows arranged in a 12×12 pattern, and each display window corresponds to a key group; The request receiving module receives the key request from the encryption end, and generates a key request tag according to one or more of the request time, request sequence, and request end information; After receiving the key request mark, the key matrix generation module generates key request data and then synchronizes it to the key matrix construction module. The key matrix construction module calls a key symbol in each key group according to the key calling model, and displays the key symbol determined by each key group on the corresponding display window. The display model records all display windows and generates a key matrix data packet. The key matrix data packet is then synchronized to the key matrix generation module. The key matrix generation module aggregates the key matrix data packet and the key request mark to generate a key basic data packet. The two-dimensional code generation module receives the key request mark, randomly generates 12×12 two-dimensional code information, and packages it with the key request mark to generate a two-dimensional code data packet; The data sending module receives the key basic data packet and the QR code data packet, and sends them synchronously to the encryption terminal and the decryption terminal; Encryption end; the encryption end includes a key request sending module, a key analysis module, a plaintext encryption module and a ciphertext sending module; After receiving the plaintext to be sent, the key request sending module determines the sending end and receiving end of the plaintext, generates a key request, and sends the key request to the key library; After receiving the key basic data packet and the two-dimensional code data packet, the key analysis module first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbols in the key matrix data packet, generates a key matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, overlays the two-dimensional code information on the key matrix image, records the key symbols in the dark area or the light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing; After receiving the seed key, the plaintext encryption module generates a new dynamic key using the seed key using the HASH function, then receives the plaintext data to be transmitted, decomposes the plaintext data into several frames, uses the new dynamic key in combination with the Encode() function to encrypt each frame of plaintext in turn, and then re-forms each frame of ciphertext into a new overall cipher message; After receiving the whole ciphertext message, the ciphertext sending module sends it to the decryption end; The decryption end includes a key data analysis module, a ciphertext receiving module and a ciphertext decryption module; after receiving the key basic data packet and the two-dimensional code data packet, the key data analysis module first retrieves the key matrix data packet in the key basic data packet, summarizes the arrangement position of each display window and the displayed key symbol in the key matrix data packet, generates a key matrix image, and then retrieves the two-dimensional code information in the two-dimensional code data packet, covers the two-dimensional code information on the key matrix image, records the key symbols in the dark area or the light area in the two-dimensional code in the order of the text, and obtains the seed key after summarizing; after receiving the whole ciphertext message, the ciphertext receiving module decomposes the whole ciphertext message to obtain a plurality of ciphertext clusters, and performs secondary decomposition on each ciphertext cluster to obtain a plurality of ciphertext message frames; The seed key of the ciphertext decryption module generates a new dynamic key using a HASH function, and uses the new dynamic key in combination with a Decode() function to decrypt each frame of plaintext in turn to obtain a number of decrypted plaintext messages; The key retrieval model is generated by a key matrix generation module, which constructs a 12×12 array model composed of single-point digital frames, and the digital interval displayed by each digital frame is between (1, 128). After receiving the key request mark, the key matrix generation module controls each digital frame to randomly generate any number in (1, 128) to generate a 12×12 key retrieval model.
2. A communication message encryption and decryption system according to claim 1, characterized in that: The arrangement position of the number frame corresponds one-to-one to the arrangement position of the key group, and the arrangement order of each key symbol in the key group corresponds one-to-one to the number in the number interval of the number frame.
3. A communication message encryption and decryption system according to claim 2, characterized in that: The arrangement order of the key symbols in the key group changes in an unordered manner according to the time node.
4. The communication message encryption and decryption system according to claim 1, characterized in that: When the data plaintext is decomposed, the decomposition of the data plaintext is performed according to the encryption frame length. After the data plaintext is decomposed, each frame of the data plaintext is marked once in sequence, and the marking is performed in the order of Arabic numerals.
5. A communication message encryption and decryption system according to claim 4, characterized in that: In the plaintext encryption, the key of each frame is regenerated using the HASH function.
6. A communication message encryption and decryption system according to claim 5, characterized in that: When each frame of ciphertext is re-formed into a new overall ciphertext message, each frame of the encrypted ciphertext message in the original order is extracted randomly or in a pre-set extraction order to generate several ciphertext clusters, which are marked twice and then formed into a new overall ciphertext message based on the secondary markings.
7. A communication message encryption and decryption system according to claim 6, characterized in that: The decrypted plaintext message frames are reassembled according to a mark to obtain a whole plaintext message.
Citation Information
Patent Citations
Encryption and decoding method of anti-counterfeiting two-dimensional code
CN107944527A
Image encryption method and decryption method based on Hash chain compressed sensing
CN108040191A
