Message Encryption Transmission Method, Device and Storage Medium
By preprocessing and key sequence generation of plaintext messages in aviation broadband data link communication, combined with target encryption algorithm and compression perception technology, the problem of time and efficiency of plaintext messages is solved, and the security and interaction capabilities of data transmission are improved.
Patent Information
- Application Number
- CN202210246471.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-03-14
AI Technical Summary
When encrypting plaintext messages in aviation broadband data link communications, the prior art has problems of time and low efficiency, resulting in a reduction in the interaction capability of aviation data links.
By preprocessing different types of plaintext messages, different key sequences are generated, and the target encryption algorithm is determined based on the message type to realize the encryption of plaintext messages. For video/image messages, compression perception and image confusion methods are used to reduce the amount of data and accelerate the encryption process.
It improves the security of data transmission, avoids the problem of reducing the interaction capability of aviation data links due to the long encryption time, and realizes efficient encryption of different types of messages.
Smart Images

Figure CN114614986B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a method, device, and storage medium for encrypted transmission of messages. Background Art
[0002] The AeroMACS (Aero Mobile Airport Communication System) is a new generation of aviation broadband data link communication technology promoted by the International Civil Aviation Organization, which can provide safe and reliable data link broadband communication services for aircraft and other equipment in the airport surface area. Based on traditional text messages, this system can provide the ability to transmit real-time images and videos.
[0003] Currently, the civil aviation industry has not yet formed an effective method for encrypting messages in aviation broadband data link communication. If all plaintext messages are encrypted using AES (Advanced Encryption Standard), there will be problems of long time consumption and low efficiency when applied to image / video information encryption, reducing the interaction ability of the aviation data link. Therefore, how to encrypt plaintext messages in aviation broadband data link communication while avoiding reducing the interaction ability of the aviation data link is an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides a method, device, and storage medium for encrypted transmission of messages. After preprocessing different types of plaintext messages, different key sequences are generated to achieve encryption of the plaintext messages, improve the security of data transmission, and perform encryption based on different target encryption algorithms to avoid excessive encryption time for video / image messages. The specific solutions are as follows:
[0005] In a first aspect, a method for encrypted transmission of messages is provided. The method includes:
[0006] Obtain a plaintext message to be encrypted and preprocess the plaintext message, and generate a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0007] Determine a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypt the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message;
[0008] Send the ciphertext message to a receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message.
[0009] Further, the generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0010] Perform a corresponding key sequence generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate the key sequence.
[0011] Further, when the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is a video encryption algorithm, and the preprocessing of the video plaintext message includes:
[0012] Split the video into frames and arrange them in chronological order to obtain an image stream;
[0013] Separate each frame image in the image stream into three channels of R, G, and B to obtain three image matrices corresponding to the R, G, and B channels respectively;
[0014] Perform compressive sensing measurement on the three image matrices to obtain corresponding three compressed matrices.
[0015] Further, the generating of the key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0016] Perform an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key;
[0017] For each of the compressed matrices, determine a first number of iterations according to the number of rows and columns of the compressed matrix, and perform an iterative operation on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sort the chaotic sequence by size to obtain the key sequence corresponding to the compressed matrix.
[0018] Further, the encrypting of the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes:
[0019] For each of the compressed matrices, perform a replacement operation on the elements of the compressed matrix according to the index value of the key sequence corresponding to the compressed matrix to obtain a corresponding ciphertext;
[0020] Merge the ciphertexts corresponding to the three compressed matrices for each frame into three channels to obtain a corresponding ciphertext image;
[0021] Sort all the ciphertext images in time series to obtain a ciphertext image stream, and obtain a corresponding ciphertext video according to the ciphertext image stream, and use the ciphertext video as the ciphertext message.
[0022] Further, the performing of the compressive sensing measurement on the three image matrices to obtain corresponding compressed matrices includes:
[0023] For each image matrix, perform an operation according to the following formula:
[0024] Y = DX;
[0025] Wherein, D is a measurement matrix of N×M dimensions, the measurement matrix is composed of a discrete cosine transform and a random Gaussian matrix, X is an image matrix of M×M dimensions, and Y is a compression matrix corresponding to the image matrix.
[0026] Further, when the type of the plaintext message to be encrypted is text, the target encryption algorithm corresponding to this type is a text encryption algorithm;
[0027] The obtaining of the plaintext message to be encrypted and the preprocessing of the plaintext message, and the generating of the key sequence according to the type of the plaintext message to be encrypted and a preset initial key include:
[0028] Dividing the text into plaintext blocks according to a preset block sequence and a preset block size;
[0029] Performing an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key;
[0030] Determining a second number of iterations according to the preset block size, and performing an iterative operation on the chaotic system again according to the second number of iterations to obtain a target sequence, and performing a preset operation on the target sequence to obtain the key sequence corresponding to the text.
[0031] Further, the encrypting of the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes:
[0032] Performing an advanced encryption operation on each plaintext block according to the key sequence for a preset number of encryption times to obtain an encrypted message block;
[0033] Combining all the encrypted message blocks into the ciphertext message according to the preset block sequence.
[0034] Further, the sending end is an aircraft.
[0035] Further, the sending of the ciphertext message to the receiving end includes:
[0036] Transmitting the ciphertext message to the receiving end through an airport surface mobile communication link.
[0037] In a second aspect, a method for encrypted transmission of a message is provided, and the method includes:
[0038] The sending end obtains a plaintext message to be encrypted and preprocesses the plaintext message, and generates a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0039] The sending end determines a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypts the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message, so as to send the ciphertext message to the receiving end;
[0040] The receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message.
[0041] In a third aspect, a message encryption and transmission device is provided, and the device includes:
[0042] A key module, configured to obtain a plaintext message to be encrypted, preprocess the plaintext message, and generate a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0043] An encryption module, configured to determine a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypt the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message;
[0044] A sending module, configured to send the ciphertext message to the receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message.
[0045] In a fourth aspect, a storage medium is provided, and a plurality of instructions are stored in the storage medium, and the instructions are suitable for being loaded by a processor to execute the method as described above.
[0046] In the present invention, for different types of plaintext messages, different preprocessing methods, different key sequences, and different target encryption algorithms are adopted, so as to generate different ciphertext messages, that is, different encryption methods are used for different types of plaintext messages to obtain ciphertext messages. Further, corresponding encryption methods can be adopted according to the size of the plaintext message. For text messages, AES is used for encryption after obtaining the key sequence by using a chaotic system. For video / image messages, methods of compressive sensing and image scrambling are adopted to reduce the data volume of the video / image messages, and to avoid the too long encryption time caused by using AES for video / image messages. When the method in the present invention is applied to an aircraft system, on the one hand, it can encrypt the plaintext messages to be transmitted in the aircraft system, avoid data leakage, and improve the security of data transmission. On the other hand, different encryption methods are implemented for different types of plaintext messages, avoiding the too long encryption time for video / image messages with a large data volume caused by using the same encryption method, and further avoiding reducing the data link interaction ability of the aviation system. Description of the Drawings
[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0048] Figure 1 It is a flowchart of the message encryption transmission method applied to the sending end in the embodiments of the present invention;
[0049] Figure 2 It is the message encryption transmission method applied to the aircraft system and the corresponding receiving system in the embodiments of the present invention;
[0050] Figure 3 It is a flowchart of the video message encryption method applied to the aircraft system in the embodiments of the present invention;
[0051] Figure 4 It is a flowchart of the text message encryption method applied to the aircraft system in the embodiments of the present invention;
[0052] Figure 5 It is a flowchart of the message encryption transmission method applied to the sending end and the receiving end in the embodiments of the present invention;
[0053] Figure 6 It is a flowchart of the image reconstruction in the embodiments of the present invention;
[0054] Figure 7 It is a schematic diagram of the message encryption transmission device in the embodiments of the present invention. Detailed implementation manners
[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0056] Throughout the specification, the reference to "one embodiment", "an example" or "example" means that the specific features, structures or characteristics described in connection with the embodiment or example are included in at least one embodiment of the present invention. Thus, the phrases "in one embodiment", "in an embodiment", "an example" or "example" appearing throughout the specification do not necessarily refer to the same embodiment or example. In addition, the specific features, structures or characteristics can be combined in any appropriate combination and / or sub-combination in one or more embodiments or examples.
[0057] As Figure 1 shown, the present invention provides a method for encrypted transmission of messages, and the method includes:
[0058] S101. Obtain a plaintext message to be encrypted, preprocess the plaintext message, and generate a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0059] S102. Determine a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypt the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message;
[0060] S103. Send the ciphertext message to a receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain a plaintext message.
[0061] In step 101, the types of the plaintext message include a text plaintext and a video / image plaintext. When the plaintext message is a video / image message, generally speaking, in terms of the data volume, the video / image plaintext has a larger data volume than the text plaintext. When encrypting a video / image, the time is usually longer, and the corresponding ciphertext after encryption is usually also larger, occupying more bandwidth during data transmission. Therefore, in the present invention, for different types of plaintext messages, the preprocessing methods are different, and the methods for generating the key sequence through the preset initial key are also different. In this step, the initial key is pre-agreed by the sending end and the receiving end before the encrypted transmission of the message.
[0062] In step 102, the encryption algorithms corresponding to different types of plaintext messages are also different. Therefore, the methods for encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message are different.
[0063] In step 103, the ciphertext message is decrypted into a plaintext message by using a decryption algorithm opposite to the target encryption algorithm. Among them, the decryption involves two methods of decrypting an image / video message and decrypting a text message. When the receiving end receives the ciphertext message, it will determine the corresponding decryption algorithm according to the target encryption algorithm of the ciphertext message.
[0064] In the present invention, different preprocessing methods, different key sequences, and different target encryption algorithms are adopted for different types of plaintext messages, so as to generate different ciphertext messages. Thus, different encryption methods are used for different types of plaintext messages to obtain ciphertext messages. Exemplarily, corresponding encryption methods can be adopted according to the size of the plaintext message. For text messages, they are relatively small, while video / image messages are relatively large. Different encryption methods are used to shorten the encryption time of video / image messages and reduce the data volume after encryption of video / image messages, avoiding occupying a large bandwidth during the transmission of ciphertext messages. Further, when the method in the present invention is applied to an aircraft system, on the one hand, it can encrypt the plaintext messages to be transmitted in the aircraft system, avoid data leakage, and improve the security of data transmission. On the other hand, different encryption methods are implemented for different types of plaintext messages, avoiding the overly long encryption time for video / image messages with a large data volume caused by using the same encryption method, and thus avoiding reducing the data link interaction ability of the aviation system.
[0065] Further, generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0066] Performing a corresponding initial key generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate a key sequence.
[0067] In the present invention, the Logistic chaotic system is used as a key generation function to generate a key sequence. The formula of the Logistic chaotic system is as follows:
[0068] x n+1 = u·x n ·(1 - x n ); Equation (1);
[0069] In the above formula, u is a parameter, and its value range is 0 < u < 4. x 0 is the initial value, and its value range is 0 < x 0 < 1, and 0 < x n < 1. In the present invention, u and x 0 are the initial keys. n is the chaotic value after n iterations. The initial keys are used as the parameters of the chaotic system and substituted into Equation (1) for iteration to generate a key sequence. At the same time, the two initial keys expand the key space and further protect the security of the ciphertext.
[0070] For different types of plaintext messages, the initial keys of the corresponding chaotic systems are different, and the corresponding number of iterations is also different. Thus, different key sequences can be obtained.
[0071] In the present invention, the Logistic chaotic system is adopted to effectively improve the security of the secret key, increase the key space, provide stronger protection for the ciphertext. At the same time, the chaotic system can quickly generate a key sequence through iterative calculation, which not only encrypts the video / image quickly but also reduces the pressure on key storage and management.
[0072] For different types of plaintext messages, the methods for generating the key sequence are different based on the chaotic system.
[0073] Further, when the type of the plaintext message to be encrypted is a video, the target encryption algorithm corresponding to this type is a video encryption algorithm. The preprocessing of the video plaintext message includes:
[0074] Frame the video and arrange it in chronological order to obtain an image stream;
[0075] Separate each frame image in the image stream into three image matrices corresponding to the R, G, and B channels respectively;
[0076] Perform compressive sensing measurement on the three image matrices to obtain the corresponding three compressed matrices.
[0077] When the plaintext message to be encrypted is a video, then, before generating the key sequence according to the type of the plaintext message to be encrypted and the preset initial key, the preprocessing operation on the video plaintext is to frame the video and obtain an image stream in chronological order. Exemplarily, the obtained image stream is image a1 - image a1000. Thus, each of these 1000 frame images is separated into the three R, G, and B channels, and then three image matrices X R , X G , X R , are obtained. After performing compressive sensing measurement on these three image matrices, three compressed matrices Y R , Y G , Y R , are obtained. Thus, each frame image is compressed. Compared with before compression, the data volume of the video plaintext is effectively reduced, thereby improving the operation efficiency of the subsequent encryption algorithm.
[0078] Further, generating the key sequence according to the type of the plaintext message to be encrypted and the preset initial key includes:
[0079] Perform iterative operations on the chaotic system according to the preset basic number of iterations and the initial key;
[0080] For each compression matrix, determine the first iteration count based on the number of rows and columns of the compression matrix, and perform iterative operations on the chaotic system again according to the first iteration count to obtain a chaotic sequence, and sort the chaotic sequence by size to obtain the key sequence corresponding to the compression matrix.
[0081] In the process of encrypting the video plaintext, in the process of generating the key sequence, for each compression matrix, generate the corresponding key respectively. First, iterate the chaotic system for the basic iteration count according to the initial key to avoid the periodicity of the chaotic sequence. Exemplarily, the basic iteration count can be 1000 times; then, iterate the first iteration count, where the first iteration count is determined according to the number of rows and columns of each compression matrix. Exemplarily, the first iteration count is N×M×3, where N is the number of rows of the compression matrix and M is the number of columns of the compression matrix, thereby determining the compression matrix Y of each frame of the image. R , Y G , Y R corresponding three first iteration counts; finally, perform iterative operations on the chaotic system again according to the first iteration count corresponding to each compression matrix to obtain a chaotic sequence, and sort the chaotic sequence by size to obtain an index sequence, and use the index sequence as the key sequence corresponding to the compression matrix. Thus, three key sequences corresponding to the three compression matrices Y R , Y G , Y R can be obtained respectively, and then the three key sequences corresponding to the three compression matrices of each frame in the image stream can be determined.
[0082] In the present invention, for the compression matrix of each frame of the image, the corresponding key sequence is determined through the chaotic system, realizing chaotic scrambling, having a better encryption effect, and further enhancing the security of video plaintext transmission.
[0083] Further, encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes:
[0084] For each compression matrix, perform a replacement operation on the elements of the compression matrix according to the index value of the key sequence corresponding to the compression matrix to obtain the corresponding ciphertext;
[0085] Merge the ciphertexts corresponding to the three compression matrices corresponding to each frame in three channels to obtain the corresponding ciphertext image;
[0086] Sort all the ciphertext images according to the time sequence to obtain a ciphertext image stream, and obtain the corresponding ciphertext video according to the ciphertext image stream, and use the ciphertext video as the ciphertext message.
[0087] After determining the key sequence corresponding to each compression matrix, the specific process of encrypting the video plaintext is as follows: Replace the elements of each compression matrix according to the index value of the corresponding key sequence to obtain the ciphertext of each compression matrix. Exemplarily, for the compression matrices Y R , Y G , Y R , first rearrange the two-dimensional array corresponding to the compression matrix into a one-dimensional array in row order, and then perform a numerical permutation on the one-dimensional data according to the index value of the key sequence. For example, if the index value corresponding to position 1 on the one-dimensional array is 100, then the value corresponding to position 1 is permuted with the value corresponding to position 100, thereby disrupting the sorting of the elements on the compression matrix and further disrupting the sorting of the pixels on the original image to generate ciphertext. The specific formula is as follows, where S represents the ciphertext image, i represents the pixel position, and P represents the one-dimensional array:
[0088] S(i) = P[arg(Logistic(i))];
[0089] Among them, Logistic(i) represents the value of the chaotic sequence, and arg(Logistic(i)) represents the index position.
[0090] After obtaining the above ciphertext, merge the ciphertexts of the three compression matrices corresponding to each frame of the image in three channels, sort all the ciphertext images according to the time sequence to obtain the ciphertext image stream, and obtain the corresponding ciphertext video according to the ciphertext image stream. Then, use the ciphertext video as the ciphertext message and transmit the ciphertext message to the receiving end. The decryption process at the receiving end is the reverse process of the above video encryption method, and the image compressive sensing reconstruction algorithm uses the matching pursuit algorithm for reconstruction.
[0091] In the process of encrypting the video plaintext, the key generated by the chaotic system can not only enhance the security of the ciphertext. Since the chaotic system can quickly generate a large number of key sequences, it can quickly encrypt the video, making up for the disadvantage of the long encryption time of the Advanced Encryption Standard (AES). At the same time, it reduces the pressure of key storage and management. Further, in the process of encrypting the video plaintext, the video plaintext is disassembled into an image stream. And in the process of encrypting the image stream, each frame of the image is first separated into three channels of R, G, and B and then compressed sensing measurement is performed to obtain the compression matrix corresponding to each frame of the image. Compared with before compression, the data volume is significantly reduced. And when encrypting the compression matrix with the chaotic system, the elements corresponding to the compression matrix are replaced with the index values of the key sequences generated by the chaotic system for each compression matrix. The scrambling encryption algorithm has higher security. Since the data volume is small, the decryption time is accelerated, so that the receiving end can obtain the corresponding video plaintext faster. Therefore, the present invention can provide stronger protection for the ciphertext while reducing the pressure on key storage and management.
[0092] Further, performing compressed sensing measurement on the three image matrices to obtain the corresponding compression matrices includes:
[0093] For each image matrix, perform operations according to the following formula:
[0094] Y = DX;
[0095] Wherein, D is an N×M-dimensional measurement matrix, the measurement matrix is composed of a discrete cosine transform and a random Gaussian matrix, X is an M×M-dimensional image matrix, and Y is the compression matrix corresponding to the image matrix.
[0096] For the three image matrices corresponding to each frame of the image, X R , X G , X R , are all N×N-dimensional, wherein the measurement matrix D is M×N-dimensional, where N is much smaller than M and is determined by the compression ratio, and the measurement matrix is composed of a discrete cosine transform and a random Gaussian matrix. Thus, the three image matrices are compressed to obtain the compression matrices Y R , Y G , Y R .
[0097] It should be noted that the above describes the process of encrypting the video message. For the image message, different from the video message encryption process, it is not necessary to perform frame splitting on the image to obtain an image stream, and the subsequent processes of video message encryption can all be applied to the encryption of the image message.
[0098] Further, when the type of the plaintext message to be encrypted is text, the target encryption algorithm corresponding to this type is a text encryption algorithm;
[0099] Obtaining the plaintext message to be encrypted and preprocessing the plaintext message, and generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0100] Dividing the text into plaintext blocks according to a preset block sequence and a preset block size;
[0101] Performing an iterative operation on the chaotic system according to a preset basic iteration number and the initial key;
[0102] Determining a second iteration number according to the preset block size, and performing an iterative operation on the chaotic system again according to the second iteration number to obtain a target sequence, and performing a preset operation on the target sequence to obtain the key sequence corresponding to this text.
[0103] For a text message, the preprocessing process before encryption is to divide the text plaintext into plaintext blocks according to a preset block sequence and a preset block size. Exemplarily, the preset block sequence can be according to the text type of the text plaintext, and the preset block size can be 128 bits.
[0104] For a text message, the encryption algorithm used is a text encryption algorithm. When the text encryption algorithm generates a key sequence using a chaotic system, the initial key is first iterated in the chaotic system for the basic iteration number, and then the chaotic system is iterated for the second iteration number to obtain a target sequence, where the second iteration number is determined according to the preset block size. Exemplarily, the second iteration number is equal to the value corresponding to the preset block size. If the preset block size can be 128 bits, then the second iteration number is 128 times. Finally, a preset operation is performed on the target sequence to obtain the key sequence. Exemplarily, the preset operation can be (z n * 1000) mod 255, z n being the sequence value corresponding to the target sequence.
[0105] Further, encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes:
[0106] Performing an advanced encryption operation on each plaintext block a preset number of encryption times according to the key sequence to obtain an encrypted message block;
[0107] Combining all the encrypted message blocks into a ciphertext message according to the preset block sequence.
[0108] In the specific encryption process of the text encryption algorithm, each plaintext block is subjected to a preset number of high-level encryption operations according to the key sequence to obtain an encrypted message block. Exemplarily, the preset block size is 128 bits, and the plaintext blocks are sequentially input into the encryption module. Exemplarily, if the high-level encryption operation uses AES, then the preset number of encryption times is usually 10 rounds, that is, 10 rounds of AES-128 encryption operations are performed to obtain the corresponding encrypted message block. Finally, all the encrypted message blocks are synthesized into a ciphertext message according to the preset block order. Specifically, the process of AES encryption is the four steps of round key addition transformation, S-box transformation, row shift transformation, and column mixing transformation. The AES encryption algorithm is a standard encryption algorithm, and the specific detailed process will not be elaborated here.
[0109] Further, the sending end is an aircraft.
[0110] Furthermore, sending the ciphertext message to the receiving end includes:
[0111] Transmitting the ciphertext message to the receiving end through the airport surface mobile communication link.
[0112] Exemplarily, in the present invention, the sending end is an aircraft system, and the receiving end is a receiving system that conducts data interaction with the aircraft. The flowchart of the encryption and decryption communication for the plaintext message and video / image message in the aircraft system is as Figure 2 shown, mainly including five parts: plaintext acquisition S201, key generation S202, encryption calculation S203, wireless transmission S204, and decryption and decompression S205.
[0113] For S201 plaintext acquisition: The plaintext is divided into two types: text message and video / image message. When the message is a video message, the camera captures the video and converts the video into an image stream for transmission as the message. The message must be generated according to the aviation special standard.
[0114] For S202 key generation: The aircraft system and the receiving system pre-agree on an initial key and generate a key sequence based on the Logistic chaotic system for subsequent encryption / decryption. The Logistic chaotic system effectively improves the security of the key, increases the key space, provides stronger protection for the ciphertext. At the same time, the chaotic system can quickly generate the key sequence through iterative calculation, encrypt the video / image quickly while reducing the pressure on key storage and management.
[0115] For S203 compression and encryption: Use an encryption algorithm to encrypt the plaintext message into a ciphertext that cannot be read. Among them, the encryption involves two methods: image / video compression encryption and text message encryption. When the message to be sent is a text message, the Advanced Encryption Standard (AES) encryption algorithm is used. When the message to be sent is an image / video message, the encryption method of "compressed sensing + image scrambling" is used to ensure the security and encryption timeliness of a large amount of data streams, and at the same time, the bandwidth requirement for transmitting information can be further reduced.
[0116] For S204 wireless transmission: Through the AeroMACS (Aeronautical Mobile Airport Communications System, a new type of airport aeronautical mobile communication system) wireless broadband communication channel, the ciphertext is transmitted to the receiving end. In the AeroMACS link, the transmitted information will be further encrypted based on the IEEE802.16-2009 standard to ensure the security of the transmission network and data streams.
[0117] For S205 decryption and decompression: Use a decryption algorithm opposite to the encryption algorithm to decrypt the ciphertext into plaintext. Among them, the decryption involves two methods: image / video message decryption and text message decryption. When the received message is an image / video message, the decryption method of "image scrambling restoration + image sparse restoration" is used. When the received message is a text message, the decryption algorithm corresponding to the Advanced Encryption Standard is used. The result obtained by decryption is parsed. For the text message, the plaintext message is output, while for the video / image message, it is parsed into a plaintext video / image through the image stream.
[0118] In the above process, by using a chaotic system as the key generation function, the security of the key is effectively improved, the key space is increased, and while providing stronger protection for the ciphertext, the pressure on key storage and management is reduced. At the same time, for the video / image encryption process, the encryption algorithm combining compressed sensing and scrambling can effectively reduce the amount of data, speed up the encryption and decryption time, and improve the system data transmission speed. Using the design method of the present invention can improve the data encryption speed, and on the premise of ensuring security, improve the data interaction speed of the AeroMAC data link, optimize the information interaction method between the aircraft and the ground, and improve the air traffic control efficiency.
[0119] For different types of plaintext messages, the encryption process of the aircraft system is different. Exemplarily, as Figure 3 shown, this method is applicable to the compression and encryption of image / video messages, and specifically includes the following steps:
[0120] Step 301: Frame the video collected by the camera of the aircraft system to generate an image stream arranged in chronological order.
[0121] Step 302: Separate the input color image into three channels of R, G, and B to obtain three matrices, and input them in parallel into subsequent algorithms for calculation.
[0122] Step 303: Perform compressive sensing measurements on the three matrices of R, G, and B. The measurement formula is as follows:
[0123] Y = DX;
[0124] Where D is an M×N-dimensional measurement matrix, which is composed of a discrete cosine transform and a random Gaussian matrix. X is an N×N-dimensional image matrix, and Y is the compressed matrix corresponding to the image matrix. Through compressive sensing measurement, the amount of video plaintext data is effectively reduced, which is beneficial to subsequent encryption algorithm operations and improving the channel transmission rate.
[0125] Step 304: Iterate the initial key in the chaotic system to obtain a key sequence. Specifically, first iterate the chaotic system 1000 times to avoid the periodicity of the chaotic sequence; then iterate N×M×3 times. The generated chaotic sequence is sorted according to size, and the returned index sequence is used as the key sequence. Here, N and M are the results of S304, that is, the number of rows and columns of the matrices after compression of the R, G, and B components.
[0126] Step 305: Permute the compressed matrices of R, G, and B corresponding to each frame of the image output in Step 303 according to the index values of the key sequence to generate ciphertext.
[0127] Step 306: Merge the ciphertexts corresponding to the compressed matrices of R, G, and B for each frame in three channels to obtain the corresponding ciphertext image.
[0128] Step 307: Sort all the ciphertext images according to the time sequence to obtain a ciphertext image stream, and obtain the corresponding ciphertext video according to the ciphertext image stream, and use the ciphertext video as the ciphertext message.
[0129] After the receiving system receives the ciphertext message corresponding to the video / image, the decryption process is the reverse process of encryption. The image compressive sensing reconstruction algorithm uses the matching pursuit algorithm for reconstruction.
[0130] By using the key sequence generated by the chaotic system, not only can the security of the ciphertext be enhanced, but also since the chaotic system can quickly generate a large number of key sequences, it can quickly encrypt the video, making up for the disadvantage of the long encryption time of the Advanced Encryption Standard encryption algorithm. At the same time, it reduces the pressure on key storage and management.
[0131] As Figure 4 shown, this method is applicable to text message encryption and specifically includes the following steps:
[0132] Step 401: The input text message is sequentially fed into the encryption module in chunks of 128 bits.
[0133] Step 402: Use the Logistic chaotic system as the key generation function to generate a key sequence. The main process includes: first iterate the chaotic system 1000 times to avoid the periodicity of the chaotic sequence; then iterate 128 times to obtain the target sequence, and perform (z n *1000) mod 255 on the sequence values of the target sequence, where z n is the sequence value corresponding to the target sequence, and the finally obtained result is used as the key sequence.
[0134] Step 403: The plaintext blocks in Step 401 are sequentially input into the encryption module for 10 rounds of AES-128 encryption operations. Since the chaotic system is highly sensitive to the initial value, its key security is relatively high, and it can well protect the ciphertext from being cracked.
[0135] Step 404: The encryption results are finally output sequentially and combined into a ciphertext message in block order for transmission.
[0136] In the present invention, the text key is encrypted according to the Advanced Encryption Standard, and a chaotic system is used to generate the key sequence. On the one hand, the encryption time is short, and on the other hand, the security of the encrypted text ciphertext is relatively high.
[0137] As Figure 5 shown, the present invention also provides a method for encrypted transmission of messages, which includes:
[0138] S501: The sending end obtains the plaintext message to be encrypted, preprocesses the plaintext message, and generates a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0139] S502: The sending end determines the corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypts the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message, and sends the ciphertext message to the receiving end;
[0140] S503: The receiving end decrypts the ciphertext message based on the decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message.
[0141] In one embodiment, generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0142] The sending end performs the corresponding key sequence generation operation based on the preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate a key sequence.
[0143] In one embodiment, when the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is the video encryption algorithm. The sender obtains the plaintext message to be encrypted and preprocesses the plaintext message, including:
[0144] Frame the video and arrange the frames in chronological order to obtain an image stream;
[0145] Separate each frame image in the image stream into three channels of R, G, and B to obtain three image matrices corresponding to the R, G, and B channels respectively;
[0146] Perform compressive sensing measurement on the three image matrices to obtain three corresponding compressed matrices.
[0147] In one embodiment, generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes:
[0148] The sender performs iterative operations on the chaotic system according to the preset basic number of iterations and the initial key;
[0149] For each compressed matrix, determine the first number of iterations according to the number of rows and columns of the compressed matrix, and perform iterative operations on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sort the chaotic sequence according to size to obtain the key sequence corresponding to the compressed matrix.
[0150] In one embodiment, encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message further includes:
[0151] The sender replaces the elements of each compressed matrix according to the index values of the key sequence corresponding to the compressed matrix to obtain the corresponding ciphertext;
[0152] Merge the ciphertexts corresponding to the three compressed matrices for each frame to obtain the corresponding ciphertext image;
[0153] Sort all the ciphertext images in time series to obtain a ciphertext image stream, and obtain the corresponding ciphertext video according to the ciphertext image stream, and use the ciphertext video as the ciphertext message.
[0154] In one embodiment, performing compressive sensing measurement on the three image matrices to obtain the corresponding compressed matrices includes:
[0155] For each image matrix, perform the operation according to the following formula:
[0156] Y = DX;
[0157] Among them, D is an N×M-dimensional measurement matrix, which is composed of a discrete cosine transform and a random Gaussian matrix, X is an M×M-dimensional image matrix, and Y is the compression matrix corresponding to the image matrix.
[0158] In one embodiment, the sender encrypts the video / image message into a video / image message ciphertext by using an image scrambling method and sends it to the receiver.
[0159] After receiving the video / image message ciphertext, the receiver performs scrambling recovery on the video / image message ciphertext and then performs image reconstruction calculation to obtain the video / image message.
[0160] As Figure 6 shown, for the receiver of the video / image message in the present invention, "image scrambling recovery + image reconstruction" is adopted, and the image compressive sensing reconstruction algorithm uses the Orthogonal Matching Pursuit (OMP) algorithm for reconstruction. The main process is as follows:
[0161] Step 601: Initialize the algorithm, set the iteration number t = 1, the residual r t = y, and the support set index Λ is an empty set.
[0162] Step 602: Calculate the inner product of the residual r t and the column vector φ j of the observation matrix, and the index corresponding to the maximum value in the inner product, that is:
[0163]
[0164] Step 603: Update the index set Λ, so that Λ t = Λ t-1 ∪{λ t}, update the atom set Φ t =[Φ t-1 , φ λt , and include the column vector φ λt of the observation matrix corresponding to the maximum value of the inner product in the atom set;
[0165] Step 604: Use the least squares method to calculate to minimize the residual,
[0166] Step 605: Update the residual
[0167] Step 606: Judge the stop condition (t < k). If it does not hold, execute step S52. If it holds, output
[0168] In one embodiment, when the type of the plaintext message to be encrypted is text, the target encryption algorithm corresponding to this type is a text encryption algorithm.
[0169] The sending end obtains the plaintext message to be encrypted and preprocesses the plaintext message, and generates a key sequence according to the type of the plaintext message to be encrypted and a preset initial key, including:
[0170] Dividing the text into plaintext blocks according to a preset block sequence and a preset block size;
[0171] Performing an iterative operation on the chaotic system according to a preset basic iteration number and the initial key;
[0172] Determining a second iteration number according to the preset block size, and performing an iterative operation on the chaotic system again according to the second iteration number to obtain a target sequence, and performing a preset operation on the target sequence to obtain the key sequence corresponding to the text.
[0173] In one embodiment, the sending end determines a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypts the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message, including:
[0174] Performing an advanced encryption operation on each plaintext block for a preset number of encryption times according to the key sequence to obtain an encrypted message block;
[0175] Combining all the encrypted message blocks into the ciphertext message according to the preset block sequence.
[0176] In one embodiment, the sending end is an aircraft system.
[0177] In one embodiment, sending the ciphertext message to the receiving end includes:
[0178] Transmitting the ciphertext message to the receiving end through an airport surface mobile communication link.
[0179] As Figure 7 shown, a message encryption and transmission device of the present invention, the device includes:
[0180] A key module 701, configured to obtain the plaintext message to be encrypted, preprocess the plaintext message, and generate a key sequence according to the type of the plaintext message to be encrypted and a preset initial key;
[0181] An encryption module 702, configured to determine a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypt the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message;
[0182] A sending module 703, configured to send the ciphertext message to the receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message.
[0183] In one embodiment, the key module 701 is further configured to perform a corresponding key sequence generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key, so as to generate a key sequence.
[0184] In one embodiment, when the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is a video encryption algorithm;
[0185] The key module 701 further includes a first preprocessing unit, configured to frame the video and arrange it in chronological order to obtain an image stream; separate each frame of the image stream into three channels of R, G, and B to obtain three image matrices corresponding to the R, G, and B channels respectively; and perform compressive sensing measurement on the three image matrices to obtain three corresponding compressed matrices.
[0186] In one embodiment, the key module 701 further includes a first key unit, configured to perform an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key; for each compressed matrix, determine a first number of iterations according to the number of rows and columns of the compressed matrix, and perform an iterative operation on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sort the chaotic sequence according to size to obtain the key sequence corresponding to the compressed matrix.
[0187] In one embodiment, the encryption module 702 is further configured to, for each compressed matrix, perform a replacement operation on the elements of the compressed matrix according to the index value of the key sequence corresponding to the compressed matrix to obtain the corresponding ciphertext; merge the ciphertexts corresponding to the three compressed matrices corresponding to each frame into three channels to obtain the corresponding ciphertext image; sort all the ciphertext images in time series to obtain a ciphertext image stream, and obtain the corresponding ciphertext video according to the ciphertext image stream, and use the ciphertext video as the ciphertext message.
[0188] In one embodiment, the first key unit is further configured to perform an operation on each image matrix according to the following formula:
[0189] Y = DX;
[0190] where D is an N×M-dimensional measurement matrix, the measurement matrix is composed of a discrete cosine transform and a random Gaussian matrix, X is an M×M-dimensional image matrix, and Y is the compressed matrix corresponding to the image matrix.
[0191] In one embodiment, when the type of the plaintext message to be encrypted is text, the target encryption algorithm corresponding to this type is a text encryption algorithm;
[0192] The key module 701 further includes a second preprocessing unit, which is configured to divide the text into plaintext blocks according to a preset chunking order and a preset chunk size;
[0193] A second key unit, which is configured to perform an iterative operation on the chaotic system according to a preset basic iteration number and an initial key; determine a second iteration number according to the preset chunk size, and perform an iterative operation on the chaotic system again according to the second iteration number to obtain a target sequence, and perform a preset operation on the target sequence to obtain a key sequence corresponding to the text.
[0194] In one embodiment, the encryption module 702 is further configured to perform an advanced encryption operation on each plaintext block for a preset number of encryption times according to the key sequence to obtain an encrypted message block; synthesize all the encrypted message blocks into a ciphertext message according to the preset chunking order.
[0195] In one embodiment, the sending end is an aircraft system.
[0196] In one embodiment, the sending module 703 is further configured to transmit the ciphertext message to the receiving end through an airport surface mobile communication link.
[0197] The present invention also provides a storage medium, in which multiple instructions are stored, and the instructions are suitable for being loaded by a processor to execute the message encryption and transmission method applied to the sending end as described above.
[0198] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0199] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A method for encrypted transmission of messages, characterized in that, applied to the sending end, the method includes: obtaining a plaintext message to be encrypted and preprocessing the plaintext message, and generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key; determining a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message; sending the ciphertext message to the receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message; The generating a key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes: performing a corresponding key sequence generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate the key sequence; when the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is a video encryption algorithm, and preprocessing the plaintext message includes: dividing the video into frames and arranging them in chronological order to obtain an image stream; separating each frame image in the image stream into three image matrices corresponding to the R, G, and B channels respectively; performing compressive sensing measurement on the three image matrices to obtain corresponding three compressed matrices; The performing a corresponding key sequence generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate the key sequence includes: performing an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key; for each of the compressed matrices, determining a first number of iterations according to the number of rows and columns of the compressed matrix, and performing an iterative operation on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sorting the chaotic sequence by size to obtain the key sequence corresponding to the compressed matrix.
2. The method according to claim 1, characterized in that, the encrypting the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes: for each of the compressed matrices, performing a replacement operation on the elements of the compressed matrix according to the index value of the key sequence corresponding to the compressed matrix to obtain corresponding ciphertext; merging the ciphertexts corresponding to the three compressed matrices corresponding to each frame into three channels to obtain a corresponding ciphertext image; sorting all the ciphertext images in time series to obtain a ciphertext image stream, and obtaining a corresponding ciphertext video according to the ciphertext image stream, and using the ciphertext video as the ciphertext message.
3. The method according to claim 1, characterized in that, the performing compressive sensing measurement on the three image matrices to obtain corresponding compressed matrices includes: for each image matrix, performing an operation according to the following formula: Y = DX; Among them, D is a measurement matrix of N×M dimensions, and the measurement matrix is composed of a discrete cosine transform and a random Gaussian matrix. X is an image matrix of M×M dimensions, and Y is a compression matrix corresponding to the image matrix.
4. The method according to claim 1, characterized in that when the type of the plaintext message to be encrypted is text, the target encryption algorithm corresponding to this type is a text encryption algorithm; the obtaining of the plaintext message to be encrypted and the preprocessing of the plaintext message, and the generating of a key sequence according to the type of the plaintext message to be encrypted and a preset initial key include: dividing the text into plaintext blocks according to a preset block sequence and a preset block size; performing an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key; determining a second number of iterations according to the preset block size, and performing an iterative operation on the chaotic system again according to the second number of iterations to obtain a target sequence, and performing a preset operation on the target sequence to obtain the key sequence corresponding to the text.
5. The method according to claim 4, characterized in that the encrypting of the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message includes: performing an advanced encryption operation on each plaintext block according to the key sequence for a preset number of encryption times to obtain an encrypted message block; combining all the encrypted message blocks into the ciphertext message according to the preset block sequence.
6. The method according to claim 1, characterized in that the sending end is an aircraft system.
7. The method according to claim 6, characterized in that the sending of the ciphertext message to the receiving end includes: transmitting the ciphertext message to the receiving end through an airport surface mobile communication link.
8. A method for encrypted transmission of a message, characterized in that the method includes: the sending end obtains a plaintext message to be encrypted and preprocesses the plaintext message, and generates a key sequence according to the type of the plaintext message to be encrypted and a preset initial key; the sending end determines a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypts the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message, so as to send the ciphertext message to the receiving end; the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message; the generating of the key sequence according to the type of the plaintext message to be encrypted and a preset initial key includes: performing a corresponding key sequence generating operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate the key sequence; When the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is the video encryption algorithm. The preprocessing of the plaintext message includes: splitting the video into frames and arranging them in chronological order to obtain an image stream; separating each frame image in the image stream into three image matrices corresponding to the R, G, and B channels respectively; performing compressive sensing measurement on the three image matrices to obtain three corresponding compressed matrices. The generating of the key sequence by performing the corresponding key sequence generating operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key includes: performing an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key; for each of the compressed matrices, determining a first number of iterations according to the number of rows and columns of the matrix, and performing an iterative operation on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sorting the chaotic sequence by size to obtain the key sequence corresponding to the compressed matrix.
9. A message encryption and transmission device Characterized in that The device includes: A key module, configured to obtain the plaintext message to be encrypted, preprocess the plaintext message, and generate a key sequence according to the type of the plaintext message to be encrypted and a preset initial key; An encryption module, configured to determine a corresponding target encryption algorithm according to the type of the plaintext message to be encrypted, and encrypt the preprocessed plaintext message according to the target encryption algorithm and the key sequence to generate a ciphertext message; A sending module, configured to send the ciphertext message to a receiving end, so that the receiving end decrypts the ciphertext message based on a decryption algorithm corresponding to the target encryption algorithm to obtain the plaintext message; The key module is further configured to perform a corresponding key sequence generating operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key to generate a key sequence; When the type of the plaintext message to be encrypted is video, the target encryption algorithm corresponding to this type is the video encryption algorithm; the key module further includes a first preprocessing unit, configured to split the video into frames and arrange them in chronological order to obtain an image stream; separate each frame image in the image stream into three image matrices corresponding to the R, G, and B channels respectively; perform compressive sensing measurement on the three image matrices to obtain three corresponding compressed matrices. Among them, the step of generating the key sequence by performing a corresponding key sequence generation operation based on a preset chaotic system according to the type of the plaintext message to be encrypted and the initial key includes: performing an iterative operation on the chaotic system according to a preset basic number of iterations and the initial key; for each of the compression matrices, determining a first number of iterations according to the number of rows and columns of the matrix of the compression matrix, and performing an iterative operation on the chaotic system again according to the first number of iterations to obtain a chaotic sequence, and sorting the chaotic sequence according to size to obtain the key sequence corresponding to the compression matrix.
10. A storage medium, characterized in that, the storage medium stores multiple instructions, and the instructions are adapted to be loaded by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method, device and system and network card
CN111614683A
Variable-level encryption method, system and device
CN113132418A