CN109951501A - A kind of network packet encryption method, decryption method and relevant apparatus - Google Patents

A kind of network packet encryption method, decryption method and relevant apparatus Download PDF

Info

Publication number
CN109951501A
CN109951501A CN201910375688.4A CN201910375688A CN109951501A CN 109951501 A CN109951501 A CN 109951501A CN 201910375688 A CN201910375688 A CN 201910375688A CN 109951501 A CN109951501 A CN 109951501A
Authority
CN
China
Prior art keywords
key
key parameter
parameter
data packet
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910375688.4A
Other languages
Chinese (zh)
Inventor
郭刚
宋修福
唐明洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHANDONG YUWENG INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHANDONG YUWENG INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANDONG YUWENG INFORMATION TECHNOLOGY Co Ltd filed Critical SHANDONG YUWENG INFORMATION TECHNOLOGY Co Ltd
Priority to CN201910375688.4A priority Critical patent/CN109951501A/en
Publication of CN109951501A publication Critical patent/CN109951501A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

This application discloses a kind of network packet encryption methods, comprising: obtains the first key parameter locally prestored;Using the characteristic of data packet to be sent as the second key parameter;Key generation processing is carried out to the first key parameter and second key parameter according to preset rules, obtains key;The data packet to be sent according to the key pair is encrypted.Key is generated by first key parameter and the second key parameter, key is avoided to be stolen in the transmission, improves the safety of data encrypting and deciphering process.Disclosed herein as well is a kind of network packet encryption device, network packet decryption method, network packet decryption device, computer equipment and computer readable storage mediums.

Description

A kind of network packet encryption method, decryption method and relevant apparatus
Technical field
This application involves field of computer technology, in particular to a kind of network packet encryption method, network packet solution Decryption method, network packet encryption device, network packet decryption device, computer equipment and computer-readable storage medium Matter.
Background technique
With the continuous development of information technology, occurs different data safety schemes in terms of data transmission security.Mesh Before, it generallys use data key and is encrypted, to guarantee the safety of data.
It is current in the prior art, when key changes with security situation, need to other data update not Same key, it is necessary to which new key is sent in other equipment.It is stolen but there are keys during key is sent The case where taking influences the safety of follow-up equipment.That is to say, key since timeliness problem needs to synchronize key operation, It is not expired to guarantee that key does not fail.But transmitted after being encrypted at present to the transmission process of key to key, although Cryptographic operation is carried out to it in the prior art, but key makes key synchronization fail there is also the risk being trapped.
Therefore, how the timeliness of safer guarantee key be those skilled in the art concern Important Problems.
Summary of the invention
The purpose of the application is to provide a kind of network packet encryption method, network packet decryption method, network data Packet encryption device, network packet decryption device, computer equipment and computer readable storage medium, are joined by first key Several and the second key parameter generates key, and key is avoided to be stolen in the transmission, improves the safety of data encrypting and deciphering process.
In order to solve the above technical problems, the application provides a kind of network packet encryption method, comprising:
Obtain the first key parameter locally prestored;
Using the characteristic of data packet to be sent as the second key parameter;
Key generation processing is carried out to the first key parameter and second key parameter according to preset rules, is obtained Key;
The data packet to be sent according to the key pair is encrypted.
Optionally, using the characteristic of data packet to be sent as the second key parameter, comprising:
Using the message parameter data of the data packet to be sent as second key parameter.
Optionally, using the characteristic of data packet to be sent as the second key parameter, comprising:
The text of the data packet to be sent is subjected to characteristic transformation, obtains transformation results;
Using the transformation results as second key parameter.
Optionally, the first key parameter and second key parameter are carried out at key generation according to preset rules Reason, obtains key, comprising:
The first key parameter and second key parameter are calculated according to integration algorithm, obtain integrity key Parameter;
The integrity key parameter is calculated according to key algorithm, obtains the key.
The application also provides a kind of network packet decryption method, comprising:
Obtain the first key parameter locally prestored;
Using the characteristic of the data packet received as the second key parameter;
Key generation processing is carried out to the first key parameter and second key parameter according to preset rules, is obtained Key;
It is decrypted according to data packet described in the key pair.
Optionally, using the characteristic of the data packet received as the second key parameter, comprising:
Using the message parameter data of the data packet received as the second key parameter.
The application also provides a kind of network packet encryption device, comprising:
First key parameter acquisition module, for obtaining the first key parameter locally prestored;
Second key parameter obtains module, for using the characteristic of data packet to be sent as the second key parameter;
Key Acquisition Module, for being carried out according to preset rules to the first key parameter and second key parameter Key generation processing, obtains key;
Encrypting module is encrypted for the data packet to be sent according to the key pair.
The application also provides a kind of network packet decryption device, comprising:
First key parameter acquisition module, for obtaining the first key parameter locally prestored;
Second key parameter obtains module, for using the characteristic of the data packet received as the second key parameter;
Key Acquisition Module, for being carried out according to preset rules to the first key parameter and second key parameter Key generation processing, obtains key;
Deciphering module is decrypted for the data packet according to the key pair.
The application also provides a kind of computer equipment, comprising:
Memory, for storing computer program;
Processor, the step of network packet encryption method as described above is realized when for executing the computer program And/or the step of network packet decryption method.
The application also provides a kind of computer readable storage medium, and calculating is stored on the computer readable storage medium The step of machine program, the computer program realizes network packet encryption method as described above when being executed by processor and/ Or the step of network packet decryption method.
A kind of network packet encryption method provided herein, comprising: obtain the first key parameter locally prestored; Using the characteristic of data packet to be sent as the second key parameter;According to preset rules to the first key parameter and described Second key parameter carries out key generation processing, obtains key;The data packet to be sent according to the key pair is encrypted.
It is locally generated by using the first key parameter locally prestored and the second key parameter transmitted in a network Key, that is, by way of locally generating between data encryption side and data decryption side synchronisation key, rather than pass through Cipher key delivery to data ciphering method or data deciphering side is avoided in a network transmitting key by network, make key without Method is stolen in transmission process, also, first key parameter is to be pre-stored in local data, and the second key parameter is every time hair The characteristic for the data packet to be sent sent, the characteristic sent each time are all different, so that it is equal to send data packet every time Key can be replaced, realizes and real-time update is carried out to key, keep the timeliness of key, improve the safety of ciphering process.Meanwhile Using the characteristic of data packet to be sent as the second key parameter, reduction obtains the second key parameter from data packet to be sent Difficulty, so that this method to be embodied directly in existing transmission of data packets, operation is more convenient.
The application also provide a kind of network packet encryption device, network packet decryption device, computer equipment and Computer readable storage medium has the above beneficial effect, and this will not be repeated here.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of network packet encryption method provided by the embodiment of the present application;
Fig. 2 is a kind of flow chart of network packet decryption method provided by the embodiment of the present application;
Fig. 3 is a kind of structural schematic diagram of network packet encryption device provided by the embodiment of the present application;
Fig. 4 is a kind of structural schematic diagram of network packet decryption device provided by the embodiment of the present application;
Fig. 5 is a kind of structural schematic diagram of computer equipment provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide a kind of network packet encryption method, network packet decryption method, network data Packet encryption device, network packet decryption device, computer equipment and computer readable storage medium, are joined by first key Several and the second key parameter generates key, and key is avoided to be stolen in the transmission, improves the safety of data encrypting and deciphering process.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
It is current in the prior art, when key changes with security situation, need to other data update not Same key, it is necessary to which new key is sent in other equipment.It is stolen but there are keys during key is sent The case where taking influences the safety of follow-up equipment.That is to say, key since timeliness problem needs to synchronize key operation, It is not expired to guarantee that key does not fail.But transmitted after being encrypted at present to the transmission process of key to key, although Cryptographic operation is carried out to it in the prior art, but key makes key synchronization fail there is also the risk being trapped.
Therefore, the application provides a kind of network packet encryption method, by using the first key parameter locally prestored The second key parameter transmitted in a network is locally generated key, that is, in data encryption by way of locally generating Synchronisation key between side and data decryption side, rather than pass through network for cipher key delivery to data ciphering method or data deciphering Side, avoids in a network transmitting key, makes key that can not be stolen in transmission process, also, first key parameter To be pre-stored in local data, the second key parameter is the characteristic of the data packet to be sent sent every time, is sent each time Characteristic be all different so that key can be replaced by sending data packet every time, realize and real-time update carried out to key, keep The timeliness of key improves the safety of ciphering process.Meanwhile joining the characteristic of data packet to be sent as the second key Number reduces the difficulty that the second key parameter is obtained from data packet to be sent, so that this method is embodied directly in existing number According in packet transmission process, operation is more convenient.
Referring to FIG. 1, Fig. 1 is a kind of flow chart of network packet encryption method provided by the embodiment of the present application.
In the present embodiment, which may include:
S101 obtains the first key parameter locally prestored;
This step is intended to get the first key parameter prestored from local.
Wherein, which is the parameter fragment prestored in each equipment of network communication, calculates key A part.The first key parameter can be when the factory of each equipment with regard to preset data in a device, and acceptable basis can The data transmission leaned on saves data in a device, is also possible to, number with certain rule calculated using special algorithm According to.As it can be seen that the acquisition modes of the first key parameter in this step are not unique, can select to close according to actual applicable cases Suitable acquisition modes, are not specifically limited herein.
Further, which can be updated according to predetermined period, can also be fixed on a period of time It is interior without replacement.Regardless of first key parameter is updated in which way, the key in encryption and decryption processes is all It can change with the variation of the second key parameter, so that key be made constantly to be updated.
S102, using the characteristic of data packet to be sent as the second key parameter;
On the basis of S101, this step is intended to using the characteristic of data packet to be sent as the second key parameter.One As, needing the stage encrypted to data packet is the stage for sending data packet, is therefore, in this step to pending Data packet is sent to be operated.It is of course also possible to be operated to the data packet of any need encryption, do not limited in this step.
Also, changes will occur for the characteristic of the data packet to be sent sent each time, that is to say, that carries out every time The second key parameter when network packet encrypts is not identical.Also, the key encrypted is by first key parameter It is calculated with the processing simultaneously of the second key parameter.Therefore, key when being encrypted every time is not also identical.It ensure that each The key for sending data can be all updated, and more new capital improves safety, reduce simultaneously without sending key every time The consumption of Internet resources.
Wherein, the data that may select for the second key parameter in a data packet, can be the header of data packet Information, the data being also possible in data packet can also be the characteristic in data packet, such as IP, MAC, port numbers, Bale No. Deng.As it can be seen that the second key parameter selected in the present embodiment is not unique, can be selected according to practical situations suitable special Levy data,
It should be noted that the execution sequence of S101 and S102 does not require successively in the present embodiment, in the present embodiment Be illustrate it is a kind of execute sequence, it is also an option that a kind of any other execution sequence executes S101 and S102, do not do have herein Body limits.
Optionally, this step may include:
Using the message parameter data of data packet to be sent as the second key parameter.
As it can be seen that being using the message parameter of data packet to be sent as the second key parameter in this optinal plan.Message ginseng Number data are it is, form the characteristic of data packet to be sent.With data are sent each time, which will It changes, so that the second key parameter also can be different, finally make key that can also change, improve the safety of data encryption Property.
Optionally, this step may include:
The text of data packet to be sent is carried out characteristic transformation, obtains transformation results by step 1;
Step 2, using transformation results as the second key parameter.
As it can be seen that being that the text of data packet is carried out transformation results calculating in optinal plan, obtained transformation results are re-used as Second key parameter.Since the length of text is uncontrolled, so text is calculated as the fixed transformation results of length.So as to It is available to the second key parameter.
Wherein, the characteristic conversion process of progress can be Hash operation, is also possible to encryption and decryption operation, can also be XOR operation.As it can be seen that it is not unique to the characteristic transformation of text progress in this step, it is not specifically limited herein.
S103 carries out key generation processing to first key parameter and the second key parameter according to preset rules, obtains close Key;
On the basis of S102, this step is intended to carry out at key generation first key parameter and the second key parameter Reason, obtains key.
Wherein, preset rules, which refer to, can carry out first key parameter and the second key parameter according to different modes It calculates, obtains key.It can be fixed mode that is, carrying out key in this step and generating the mode of processing, it can be with It is the key generating mode according to circumstances selected, is also possible to multiple key generating modes and carries out selection reprocessing.As it can be seen that this step The mode that key generates processing is carried out to first key parameter and the second key parameter in rapid, does not do specific limit herein uniquely It is fixed.
Optionally, this step may include:
Step 1 calculates first key parameter and the second key parameter according to integration algorithm, obtains integrity key Parameter;
Step 2 calculates integrity key parameter according to key algorithm, obtains key.
As it can be seen that being to be integrated into first key parameter and the second key parameter according to integration algorithm first in this optinal plan Integrity key parameter finally calculates the integrity key parameter further according to key algorithm, obtains the key.That is, Calculated in this optinal plan by two different algorithms, just key to the end.Also, each not phase of two kinds of algorithms Together, the difficulty that key is maliciously cracked is increased, the safety of encryption is improved.
S104 is encrypted according to key pair data packet to be sent.
On the basis of S103, this step is intended to the data packet to be sent according to key pair and is encrypted.
Since the characteristic of the data packet to be sent sent every time is not identical, each data packet to be sent is encrypted Key it is also not identical, be the equal of that each data that send all have carried out primary update to key.Also, key is not carried out A possibility that transmitting, key avoided to be compromised.
To sum up, the present embodiment is joined by using the first key parameter locally prestored and the second key transmitted in a network Number is locally generated key, that is, is synchronized between data encryption side and data decryption side by way of locally generating close Key, rather than avoid in a network carrying out key by cipher key delivery to data ciphering method or data deciphering side by network Transmission, makes key that can not be stolen in transmission process, also, first key parameter is to be pre-stored in local data, second is close Key parameter is the characteristic of the data packet to be sent sent every time, and the characteristic sent each time is all different, so that often Secondary transmission data packet can replace key, realize and carry out real-time update to key, keep the timeliness of key, improve ciphering process Safety.Meanwhile using the characteristic of data packet to be sent as the second key parameter, reduction is obtained from data packet to be sent The difficulty of the second key parameter is taken, so that this method to be embodied directly in existing transmission of data packets, operation is more just Benefit.
A upper embodiment is mainly illustrated to how carrying out encryption, below by way of one embodiment to how carrying out net Network packet decryption is illustrated.
Referring to FIG. 2, Fig. 2 is a kind of flow chart of network packet decryption method provided by the embodiment of the present application.
In the present embodiment, this method may include:
S201 obtains the first key parameter locally prestored;
S202, using the characteristic of the data packet received as the second key parameter;
Optionally, this step may include:
Using the message parameter data of the data packet received as the second key parameter.
S203 carries out key generation processing to first key parameter and the second key parameter according to preset rules, obtains close Key;
S204 is decrypted according to data key packet.
As it can be seen that in the present embodiment when needing that data packet is decrypted, that is, the data packet received is solved When close processing, the first key parameter prestored is got from local first, then gets second from the data packet received Key parameter is finally carried out according to data key packet to generate key from first key parameter and the second key parameter Decryption processing obtains final data.It will be apparent that during data packet is decrypted be also by first key parameter and The key got in second key parameter, since key was sent originally according in the first key parameter and data packet prestored It is got in the second key parameter come, is not necessarily to the case where sending key to data receiver, key is avoided to be stolen, improved The safety of data.
A kind of network packet encryption device provided by the embodiments of the present application is introduced below, one kind described below Network packet encryption device can correspond to each other reference with a kind of above-described network packet encryption method.
Referring to FIG. 3, Fig. 3 is a kind of structural representation of network packet encryption device provided by the embodiment of the present application Figure.
In the present embodiment, the apparatus may include:
First key parameter acquisition module 110, for obtaining the first key parameter locally prestored;
Second key parameter obtains module 120, for using the characteristic of data packet to be sent as the second key parameter;
Key Acquisition Module 130, for carrying out key to first key parameter and the second key parameter according to preset rules Generation processing, obtains key;
Encrypting module 140, for being encrypted according to key pair data packet to be sent.
Network packet encryption device provided herein, by using the first key parameter locally prestored and in net The second key parameter transmitted in network is locally generated key, that is, in data encryption side's sum number by way of locally generating According to synchronisation key between decryption side, rather than cipher key delivery to data ciphering method or data deciphering side is avoided by network Key is transmitted in a network, makes key that can not be stolen in transmission process, also, first key parameter is to be pre-stored in Local data, the second key parameter is the characteristic of the data packet to be sent sent every time, the characteristic sent each time According to being all different, so that key can be replaced by sending data packet every time, realize and real-time update carried out to key, keep key when Effect property, improves the safety of ciphering process.Meanwhile using the characteristic of data packet to be sent as the second key parameter, reduce The difficulty of the second key parameter is obtained from data packet to be sent, is transmitted so that this method is embodied directly in existing data packet In the process, operation is more convenient.
In some specific embodiments, the second key parameter obtains module 120 and is specifically used for data packet to be sent Message parameter data are as the second key parameter.
In some specific embodiments, the second key parameter obtains module 120 and is specifically used for data packet to be sent Text carries out characteristic transformation, obtains transformation results;Using transformation results as the second key parameter.
In some specific embodiments, Key Acquisition Module 130 is specifically used for joining first key according to integration algorithm Several and the second key parameter is calculated, and integrity key parameter is obtained;Integrity key parameter is calculated according to key algorithm, Obtain key.
A kind of network packet decryption device provided by the embodiments of the present application is introduced below, one kind described below Network packet, which decrypts device, can correspond to each other reference with a kind of above-described network packet decryption method.
Referring to FIG. 4, Fig. 4 is a kind of structural representation of network packet decryption device provided by the embodiment of the present application Figure.
In the present embodiment, the apparatus may include:
First key parameter acquisition module 210, for obtaining the first key parameter locally prestored;
Second key parameter obtains module 220, for joining the characteristic of the data packet received as the second key Number;
Key Acquisition Module 230, for carrying out key to first key parameter and the second key parameter according to preset rules Generation processing, obtains key;
Deciphering module 240, for being decrypted according to data key packet.
Network packet provided herein decrypts device, when needing that data packet is decrypted, that is, docks When the data packet received is decrypted, the first key parameter prestored is got from local first, then from receiving The second key parameter is got in data packet, to generate key, last root from first key parameter and the second key parameter It is decrypted according to data key packet, obtains final data.It will be apparent that during data packet is decrypted It is the key that will be got in first key parameter and the second key parameter, since key is according to the first key parameter prestored With got in the second key parameter for being sent originally in data packet, without sending key to data receiver, avoid close The case where key is stolen improves the safety of data.
In some specific embodiments, the second key parameter obtains module 220 and is specifically used for the data packet that will be received Message parameter data as the second key parameter.
Computer equipment provided by the embodiments of the present application is introduced below, computer equipment described below and above The network packet encryption method and network packet decryption method of description can correspond to each other reference.
Referring to FIG. 5, Fig. 5 is a kind of structural schematic diagram of computer equipment provided by the embodiment of the present application, the vehicle Speed control apparatus may include:
Memory 11, for storing computer program;
Processor 12 can realize following steps when for executing the computer program of the above-mentioned storage of memory 11:
Obtain the first key parameter locally prestored;Using the characteristic of data packet to be sent as the second key parameter; Key generation processing is carried out to first key parameter and the second key parameter according to preset rules, obtains key;According to key pair Data packet to be sent is encrypted.
And/or following steps:
Obtain the first key parameter locally prestored;Join the characteristic of the data packet received as the second key Number;Key generation processing is carried out to first key parameter and the second key parameter according to preset rules, obtains key;According to key Data packet is decrypted.
In the present embodiment, processor 12 execute memory 11 in save computer subprogram when, can implement with Lower step: using the message parameter data of data packet to be sent as the second key parameter.
In the present embodiment, processor 12 execute memory 11 in save computer subprogram when, can implement with Lower step: the text of data packet to be sent is subjected to characteristic transformation, obtains transformation results;It is close using transformation results as second Key parameter.
In the present embodiment, processor 12 execute memory 11 in save computer subprogram when, can implement with Lower step: first key parameter and the second key parameter are calculated according to integration algorithm, obtain integrity key parameter;According to Key algorithm calculates integrity key parameter, obtains key.
Above method embodiment is please referred to for the introduction of equipment provided by the present application, this will not be repeated here by the application.
Further, the embodiment of the present application also discloses a kind of computer readable storage medium, for storing computer journey Sequence, wherein can realize following steps when computer program is executed by processor:
Obtain the first key parameter locally prestored;Using the characteristic of data packet to be sent as the second key parameter; Key generation processing is carried out to first key parameter and the second key parameter according to preset rules, obtains key;According to key pair Data packet to be sent is encrypted.
And/or following steps:
Obtain the first key parameter locally prestored;Join the characteristic of the data packet received as the second key Number;Key generation processing is carried out to first key parameter and the second key parameter according to preset rules, obtains key;According to key Data packet is decrypted.
In some specific embodiments, the computer subprogram saved in computer readable storage medium is held by processor When row, following steps can be implemented: using the message parameter data of data packet to be sent as the second key parameter.
In some specific embodiments, the computer subprogram saved in computer readable storage medium is held by processor When row, following steps can be implemented: the text of data packet to be sent being subjected to characteristic transformation, obtains transformation results; Using transformation results as the second key parameter.
In some specific embodiments, the computer subprogram saved in computer readable storage medium is held by processor When row, following steps can be implemented: first key parameter and the second key parameter being calculated according to integration algorithm, obtained To integrity key parameter;Integrity key parameter is calculated according to key algorithm, obtains key.
The computer readable storage medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit Store up the medium of program code.
Above method embodiment is please referred to for the specific introduction of computer readable storage medium provided by the present application, this Shen It please this will not be repeated here.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Above to a kind of network packet encryption method provided herein, network packet decryption method, network number Detailed Jie has been carried out according to packet encryption device, network packet decryption device, computer equipment and computer readable storage medium It continues.Specific examples are used herein to illustrate the principle and implementation manner of the present application, and the explanation of above embodiments is only It is to be used to help understand the method for this application and its core ideas.It should be pointed out that for those skilled in the art For, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improve and repair Decorations are also fallen into the protection scope of the claim of this application.

Claims (10)

1. a kind of network packet encryption method characterized by comprising
Obtain the first key parameter locally prestored;
Using the characteristic of data packet to be sent as the second key parameter;
Key generation processing is carried out to the first key parameter and second key parameter according to preset rules, is obtained close Key;
The data packet to be sent according to the key pair is encrypted.
2. network packet encryption method according to claim 1, which is characterized in that by the characteristic of data packet to be sent According to as the second key parameter, comprising:
Using the message parameter data of the data packet to be sent as second key parameter.
3. network packet encryption method according to claim 1, which is characterized in that by the characteristic of data packet to be sent According to as the second key parameter, comprising:
The text of the data packet to be sent is subjected to characteristic transformation, obtains transformation results;Using the transformation results as Second key parameter.
4. network packet encryption method according to any one of claims 1 to 3, which is characterized in that according to preset rules Key generation processing is carried out to the first key parameter and second key parameter, obtains key, comprising:
The first key parameter and second key parameter are calculated according to integration algorithm, obtain integrity key ginseng Number;
The integrity key parameter is calculated according to key algorithm, obtains the key.
5. a kind of network packet decryption method characterized by comprising
Obtain the first key parameter locally prestored;
Using the characteristic of the data packet received as the second key parameter;
Key generation processing is carried out to the first key parameter and second key parameter according to preset rules, is obtained close Key;
It is decrypted according to data packet described in the key pair.
6. network packet decryption method according to claim 5, which is characterized in that by the feature of the data packet received Data are as the second key parameter, comprising:
Using the message parameter data of the data packet received as the second key parameter.
7. a kind of network packet encryption device characterized by comprising
First key parameter acquisition module, for obtaining the first key parameter locally prestored;
Second key parameter obtains module, for using the characteristic of data packet to be sent as the second key parameter;
Key Acquisition Module, for carrying out key to the first key parameter and second key parameter according to preset rules Generation processing, obtains key;
Encrypting module is encrypted for the data packet to be sent according to the key pair.
8. a kind of network packet decrypts device characterized by comprising
First key parameter acquisition module, for obtaining the first key parameter locally prestored;
Second key parameter obtains module, for using the characteristic of the data packet received as the second key parameter;
Key Acquisition Module, for carrying out key to the first key parameter and second key parameter according to preset rules Generation processing, obtains key;
Deciphering module is decrypted for the data packet according to the key pair.
9. a kind of computer equipment characterized by comprising
Memory, for storing computer program;
Processor is realized when for executing the computer program as the described in any item network packets of Claims 1-4 add The step of the step of decryption method and/or claim 5 to 6 described in any item network packet decryption methods.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program is realized when the computer program is executed by processor such as the described in any item network packet encryptions of Claims 1-4 The step of the step of method and/or claim 5 to 6 described in any item network packet decryption methods.
CN201910375688.4A 2019-05-07 2019-05-07 A kind of network packet encryption method, decryption method and relevant apparatus Pending CN109951501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910375688.4A CN109951501A (en) 2019-05-07 2019-05-07 A kind of network packet encryption method, decryption method and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910375688.4A CN109951501A (en) 2019-05-07 2019-05-07 A kind of network packet encryption method, decryption method and relevant apparatus

Publications (1)

Publication Number Publication Date
CN109951501A true CN109951501A (en) 2019-06-28

Family

ID=67017095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910375688.4A Pending CN109951501A (en) 2019-05-07 2019-05-07 A kind of network packet encryption method, decryption method and relevant apparatus

Country Status (1)

Country Link
CN (1) CN109951501A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127900A (en) * 2021-04-19 2021-07-16 上海同态信息科技有限责任公司 Privacy computing software and hardware service mode based on homomorphic configuration encryption
CN114338176A (en) * 2021-12-29 2022-04-12 支付宝(杭州)信息技术有限公司 Data transmission method, device and network card
CN116707771A (en) * 2023-08-04 2023-09-05 深圳市菲尼基科技有限公司 Communication method based on data encryption

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6084877A (en) * 1997-12-18 2000-07-04 Advanced Micro Devices, Inc. Network switch port configured for generating an index key for a network switch routing table using a programmable hash function
JP2002044068A (en) * 2000-07-25 2002-02-08 Matsushita Electric Works Ltd Cryptographic communication equipment and program recording medium
CN101304407A (en) * 2007-05-09 2008-11-12 华为技术有限公司 Method, system and apparatus for authentication of source address
CN103905187A (en) * 2012-12-26 2014-07-02 厦门雅迅网络股份有限公司 Network communication encryption method based on contents
CN103945371A (en) * 2013-01-17 2014-07-23 中国普天信息产业股份有限公司 End to end encryption synchronization method
CN105072113A (en) * 2015-08-10 2015-11-18 南京邮电大学 Security protection method of wireless sensor network based on dynamic encryption of data packet
CN105450620A (en) * 2014-09-30 2016-03-30 阿里巴巴集团控股有限公司 Information processing method and device
CN103684787B (en) * 2013-12-13 2018-01-16 北京大学深圳研究生院 The encrypting and decrypting method and terminal of packet based on network transmission

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6084877A (en) * 1997-12-18 2000-07-04 Advanced Micro Devices, Inc. Network switch port configured for generating an index key for a network switch routing table using a programmable hash function
JP2002044068A (en) * 2000-07-25 2002-02-08 Matsushita Electric Works Ltd Cryptographic communication equipment and program recording medium
CN101304407A (en) * 2007-05-09 2008-11-12 华为技术有限公司 Method, system and apparatus for authentication of source address
CN103905187A (en) * 2012-12-26 2014-07-02 厦门雅迅网络股份有限公司 Network communication encryption method based on contents
CN103945371A (en) * 2013-01-17 2014-07-23 中国普天信息产业股份有限公司 End to end encryption synchronization method
CN103684787B (en) * 2013-12-13 2018-01-16 北京大学深圳研究生院 The encrypting and decrypting method and terminal of packet based on network transmission
CN105450620A (en) * 2014-09-30 2016-03-30 阿里巴巴集团控股有限公司 Information processing method and device
CN105072113A (en) * 2015-08-10 2015-11-18 南京邮电大学 Security protection method of wireless sensor network based on dynamic encryption of data packet

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李剑: "《信息安全导论》", 30 September 2007, 北京邮电大学出版社 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127900A (en) * 2021-04-19 2021-07-16 上海同态信息科技有限责任公司 Privacy computing software and hardware service mode based on homomorphic configuration encryption
CN114338176A (en) * 2021-12-29 2022-04-12 支付宝(杭州)信息技术有限公司 Data transmission method, device and network card
CN116707771A (en) * 2023-08-04 2023-09-05 深圳市菲尼基科技有限公司 Communication method based on data encryption
CN116707771B (en) * 2023-08-04 2023-12-05 深圳市菲尼基科技有限公司 Communication method based on data encryption

Similar Documents

Publication Publication Date Title
CN108200028B (en) Method and system for safely acquiring trusted data of server by using block chain
RU2621182C1 (en) Key joint usage device and the system for its configuration
CN107086915B (en) Data transmission method, data sending end and data receiving end
US8538024B2 (en) Method and apparatus for initializing a new stream cipher during handoff
CN109951501A (en) A kind of network packet encryption method, decryption method and relevant apparatus
CN103441841B (en) A kind of welding data is from encrypting and decrypting system and method
JP6190470B2 (en) Key sharing network device and configuration thereof
CN108632296B (en) Dynamic encryption and decryption method for network communication
CN112104453B (en) Anti-quantum computation digital signature system and signature method based on digital certificate
CN109698746B (en) Method and system for generating sub-keys of binding equipment based on master key negotiation
EP2962420B1 (en) Network device configured to derive a shared key
CN101640682A (en) Method for improving safety of Web service
CN105897748B (en) A kind of transmission method and equipment of symmetric key
CN109194474A (en) A kind of data transmission method and device
US9065639B2 (en) Device for generating encryption key, method thereof and computer readable medium
CN109005184A (en) File encrypting method and device, storage medium, terminal
CN111865579B (en) SM2 algorithm transformation-based data encryption and decryption method and device
CN110719160A (en) Database encryption method based on quantum random number and national encryption algorithm
CN112672342A (en) Data transmission method, device, equipment, system and storage medium
CN108718237A (en) A kind of modified AKA identity authorization systems and method based on pool of symmetric keys
CN116208326A (en) Data transmission method, device, system, storage medium and electronic equipment
CN115567189A (en) Encryption method, decryption method and device
CN116684870B (en) Access authentication method, device and system of electric power 5G terminal
CN115296841B (en) Data encryption transmission method, device, equipment and storage medium
CN113708928A (en) Edge cloud communication method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190628

RJ01 Rejection of invention patent application after publication