Internet encryption data transmission methodTechnical Field
The invention relates to the field of data transmission methods, in particular to an internet encryption data transmission method.
Background
At present, SSL or IPsec is mostly adopted for internet data transmission in the market, but the performance is very low when the SSL or IPsec is used for data transmission, the SSL or IPsec cannot be well qualified under the condition of large flow, the bandwidth of 1Gbps can only run to 100Mbps, and particularly the performance is far from enough when the 5G era comes.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects in the prior art and provide an internet encryption data transmission method.
The invention is realized by the following technical scheme:
an internet encryption transmission data method is characterized by comprising the following steps:
a. establishing an ssl secure channel between a sending end and a receiving end;
b. the sending end sends a handshake request message to the receiving end, and the receiving end returns a handshake response message to the sending end after receiving the handshake request message;
c. the sending end sends a first random number message to the receiving end, the receiving end sends a second random number message to the sending end, and the sending end sends a confirmation message to the receiving end after receiving the second random number message;
d. the sending end and the receiving end respectively utilize the first random number, the second random number and the local integrity key to carry out XOR operation to obtain an integrity check key;
e. the sending end and the receiving end respectively use the first random number, the second random number and the local private key to carry out XOR operation to obtain a symmetric key;
f. the sending end carries out encryption operation on plaintext data by using the symmetric secret key to obtain a ciphertext;
g. the sending end utilizes the integrity check secret key to carry out MD5 algorithm operation on the ciphertext obtained in the step f to obtain a sending end integrity check value, and sends the ciphertext and the sending end integrity check value to the receiving end;
h. the receiving end utilizes the integrity check secret key to carry out MD5 algorithm operation on the received ciphertext to obtain a receiving end integrity check value, the receiving end integrity check value is compared with the transmitting end integrity check value, and whether the ciphertext is tampered or not is confirmed;
i. and the receiving end decrypts the received ciphertext by using the symmetric key to obtain plaintext data.
Preferably, the algorithm for encrypting plaintext data or decrypting ciphertext using a symmetric key is a DES or AES algorithm.
Preferably, the integrity check key is 32 bits.
Preferably, the symmetric key is 256 bits.
The invention has the beneficial effects that:
the internet data transmission method in the invention does not need to use SSL mechanism to encrypt, only uses SSL security channel to transmit relevant information such as handshake, random number, etc., uses the important information and local private key to generate final symmetric encryption key, the subsequent data encryption algorithm can be flexibly selected, the security is higher than that of common SSL, and the transmission performance can be obviously improved.
Drawings
FIG. 1 is a schematic flow diagram of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the present invention will be further described in detail with reference to the accompanying drawings and preferred embodiments.
Establishing an ssl secure channel between a sending end and a receiving end;
the sending end sends a handshake request message, and the receiving end receives the handshake request message and then returns a handshake response message to the receiving end;
a sending end sends a random number message X to a receiving end, the receiving end sends a random number Y message to the sending end, and the sending end sends a confirmation message to the receiving end;
the sending end and the receiving end respectively use the random number X, Y and the local integrity key to perform exclusive-or operation to obtain a 32-bit integrity check key auth _ key, and simultaneously use the random number X, Y and the local private key N to perform exclusive-or operation to obtain a 256-bit symmetric key encrypt _ key, thereby completing final key negotiation;
the sending end sends the data hello, firstly, the symmetric secret key encrypt _ key is used for carrying out encryption operation on a plaintext by using algorithms such as DES (data encryption standard), AES (advanced encryption standard) and the like to obtain a ciphertext, and the ciphertext is sent to the receiving end;
the sending end uses auth _ key to perform MD5 algorithm operation on the whole ciphertext to obtain an integrity check value, the integrity check value is placed in an auth _ data field of a message encapsulation head, and finally the message is sent to the receiving end;
the receiving end receives the ciphertext data, firstly, MD5 algorithm operation is carried out on the whole ciphertext by using auth _ key to obtain an integrity check value, whether the integrity check value is the same as the auth value of the message header is compared, the same data represents that the data is not tampered, then, the symmetric secret key encrypt _ key is used for carrying out DES, AES and other algorithm decryption on the ciphertext to obtain the plaintext, and the obtained data is hello.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.