Encryption transmission method for wireless communication
Technical Field
The invention relates to the technical field of communication encryption, in particular to an encryption transmission method of wireless communication.
Background
Along with the high-speed development of internet technology, more and more intelligent devices can access the internet to bring help to life, work and study of people, on the other hand, network security is more and more important, when the existing intelligent devices are accessed to a server, the server can authenticate the connection request of the intelligent devices, and confidentiality of communication contents is also a vital requirement in the process of communication.
The traditional method is to use a single key, so that the encryption and decryption speed of data is high, the security is relatively poor, RSA is based on a large number of hard factors and is in a public-private key encryption mode, and therefore the security of an RSA algorithm is higher.
Based on this, there is a need to propose an encryption transmission method for wireless communication to solve or at least alleviate the above-mentioned drawbacks.
Disclosure of Invention
The invention mainly aims to provide an encryption transmission method for wireless communication, which aims to solve the technical problem that information hijacking occurs because information needs to be uploaded to a public gateway or a cloud server in the existing wireless communication process.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
an encryption transmission method for wireless communication comprises the following steps:
s1, acquiring a marking code of communication content, wherein the marking code comprises character communicationEvent communicationWork communicationProfile communication;
S2, screening the security level of the communication content according to the marking codeThe objective function is as follows:
;
wherein,the number of key characters is represented and,representing the total number of characters corresponding to the marking code;
s3, according to the security levelCarrying out mixed encryption processing on the communication content to obtain an encrypted file;
and S4, after the encrypted file is received, decrypting the encrypted file, completing content analysis of the encrypted file, and verifying the analyzed content.
Further, the process of the hybrid encryption process includes:
s30, acquiring a tag code of the communication object, wherein the tag code comprises a public object according to equipment classification used by a connection networkPrivate objectIntermediate objectDirect terminal;
S31, before the communication content is sent to a communication object, respectively generating a corresponding private key and a public key according to the acquired tag code, mutually disclosing the generated public keys, storing the public keys in a public gateway, and then reserving the private keys;
s32, the communication object is networked to the public gateway to download the public key, and the communication content is encrypted by the private key before being sent to the communication object, so that an encrypted file is obtained.
Further, the generating process of the public key and the private key comprises the following steps:
s300, selecting communication key characters according to the character sequence and the length of the communication contentExtraneous characterWill beAndthe number of the numerical values is multiplied to obtain the numerical valueIn combination with security levelObtaining interference factors from objective functions;
;
Wherein,interference factorIs the number of interfering characters;
s301, according to a random distribution function, the interference factors are generatedInserted in the communication key characterObtaining the calibration value of the distribution position of the random distribution functionAnd according to the key character of communicationGenerating a hint value for a number of charactersThen obtain the public key as [,]The private key is [,]。
Further, the calibration valueIs data set and calibrated to the interference factorsEach character is inserted in a specific position in the communication content.
Further, after the public key is sent to the public gateway, when the communication object downloads, the network connection is completed, the response information is generated, and the response information is encrypted in the communication object, and the encryption process comprises:
SS1, producing an encryption key through POP3 protocol;
SS2, encrypting the response information through an encryption key to obtain a first response ciphertext;
SS3, encrypting the encryption key by using the public key, and converting the encrypted encryption key into a second response ciphertext;
the SS4, the communication object sends the obtained first response ciphertext and the second response ciphertext to the public gateway;
and SS5, the terminal device for sending the communication content receives the first response ciphertext and the second response ciphertext from the public gateway.
Further, the terminal device in step SS5 decrypts the first response ciphertext and the second response ciphertext, and the steps are as follows:
the SS50 decrypts the received first response ciphertext and the second response ciphertext by using the public key reserved in the public gateway to obtain an encryption key;
and the SS51 analyzes the response information through the encryption key to obtain identification information.
Further, the identification information is decrypted by the private key at the terminal device, and the decrypted identification information is marked to determine the type of the communication object.
Further, the verification process of the response information after analysis comprises the following steps:
marking the decrypted identification information as verification information, and marking the communication content encrypted by the private key as reference information; the number of interference characters rejected by the private key in the verification information isThe number of interference characters rejected by the private key in the verification information is as followsInterference factor in reference informationComparing;
the method comprises the steps of carrying out a first treatment on the surface of the The transmission of the communication object and the terminal device is incomplete, and the defect exists;
the method comprises the steps of carrying out a first treatment on the surface of the It indicates that the transmission between the communication object and the terminal device is complete.
The invention has the following beneficial effects:
the communication content to be transmitted is divided, and the security level is divided according to the division, so that the difficulty of a security mode is realized, and secondly, the encryption and verification of the response signal of the receiving end are finished through generating a public key and a private key and then through an encryption key, so that the verification process between the sending terminal device and a communication object is shortened, and meanwhile, the security of the communication content is improved.
In addition to the objects, features and advantages described above, the present invention has other objects, features and advantages. The present invention will be described in further detail with reference to the drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of the principles of the present invention;
fig. 2 is a schematic diagram of the hybrid encryption process in the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are merely used to explain the relative positional relationship, movement, etc. between the components in a particular posture (as shown in the drawings), and if the particular posture is changed, the directional indicator is changed accordingly.
An encrypted transmission method for wireless communication as shown in fig. 1 comprises the following steps:
s1, acquiring a marking code of communication content, wherein the marking code comprises character communicationEvent communicationWork communicationProfile communication;
S2, screening the security level of the communication content according to the marking codeThe objective function is as follows:
;
wherein,the number of key characters is represented and,representing the total number of characters corresponding to the marking code;
s3, according to the security levelCarrying out mixed encryption processing on the communication content to obtain an encrypted file;
and S4, after the encrypted file is received, decrypting the encrypted file, completing content analysis of the encrypted file, and verifying the analyzed content.
In this embodiment, the terminal device, the public gateway and the communication object participate in the communication process, and when the terminal device and the communication object are initially paired, information is communicated through the public gateway, and after the terminal device and the communication object are successfully configured, the terminal device and the communication object are directly connected, so that the problem that the communication content is hijacked in the public gateway can be reduced to the greatest extent, but it is to be understood that the method is generally used for short-distance transmission, such as smart factories, smart blocks and the like.
Referring to fig. 2, in this embodiment, the procedure of the hybrid encryption process includes:
s30, acquiring a tag code of the communication object, wherein the tag code comprises a public object according to equipment classification used by a connection networkPrivate objectIntermediate objectDirect terminalThe method comprises the steps of carrying out a first treatment on the surface of the By classifying communication objects and combining the security level marked by the communication contentDouble verification is performed to ensure that secret information cannot leak out;
it should be noted that the generation process of the public key and the private key includes:
s300, selecting communication key characters according to the character sequence and the length of the communication contentExtraneous characterWill beAndthe number of the numerical values is multiplied to obtain the numerical valueIn combination with security levelObtaining interference factors from objective functions;
;
Wherein,interference factorIs the number of interfering characters;
s301, according to a random distribution function, the interference factors are generatedInserted in the communication key characterObtaining the calibration value of the distribution position of the random distribution function And according to the key character of communicationGenerating a hint value for a number of charactersThen obtain the public key as [,]The private key is [,]。
Specifically, by randomly adding interference factors into the communication content, when the public key and the private key matched in the invention are not available, an external hijack hives the encrypted communication information in time, but the key information is difficult to analyze due to the fact that the external hijack does not match the public key and the private key, and confidentiality of communication is guaranteed;
s31, before the communication content is sent to a communication object, respectively generating a corresponding private key and a public key according to the acquired tag code, mutually disclosing the generated public keys, storing the public keys in a public gateway, and then reserving the private keys;
s32, the communication object is networked to the public gateway to download the public key, and the communication content is encrypted by the private key before being sent to the communication object to obtain an encrypted file; by generating the public key and the private key, the confidentiality of communication content is improved.
Further, the calibration valueIs data set and calibrated to the interference factorsEach character is inserted in a specific position in the communication content.
Further, after the public key is sent to the public gateway, when the communication object downloads, the network connection is completed, the response information is generated, and the response information is encrypted in the communication object, and the encryption process comprises:
SS1, generating an encryption key through POP3 protocol;
SS2, encrypting the response information through an encryption key to obtain a first response ciphertext;
SS3, encrypting the encryption key by using the public key, and converting the encrypted encryption key into a second response ciphertext;
the SS4, the communication object sends the obtained first response ciphertext and the second response ciphertext to the public gateway;
and SS5, the terminal device for sending the communication content receives the first response ciphertext and the second response ciphertext from the public gateway.
Further, the terminal device in step SS5 decrypts the first response ciphertext and the second response ciphertext, and the steps are as follows:
the SS50 decrypts the received first response ciphertext and the second response ciphertext by using the public key reserved in the public gateway to obtain an encryption key;
and the SS51 analyzes the response information through the encryption key to obtain identification information.
Further, the identification information is decrypted by the private key at the terminal device, and the decrypted identification information is marked to determine the type of the communication object.
Further, the verification process of the parsed response information includes:
marking the decrypted identification information as verification information, and marking the communication content encrypted by the private key as reference information; the number of interference characters rejected by the private key in the verification information isThe number of interference characters rejected by the private key in the verification information is as followsInterference factor in reference informationComparing;
the method comprises the steps of carrying out a first treatment on the surface of the The transmission of the communication object and the terminal device is incomplete, and the defect exists;
the method comprises the steps of carrying out a first treatment on the surface of the The transmission of the communication object and the terminal device is complete; and then the public key and the private key are used for encrypting and verifying the response signal of the receiving end through the encryption key, so that the verification process between the sending terminal device and the communication object is shortened, and the confidentiality of the communication content is improved.
The foregoing description is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art, who is within the scope of the present invention, should make equivalent substitutions or modifications according to the technical solution of the present invention and the inventive concept thereof, and should be covered by the scope of the present invention.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.