A kind of verification method of message source authenticity and content integrity
Technical field
The present invention relates to computer network security technology fields, especially true to network packet data source is applied to
Property verifying and message content integrality, the method for consistency real-time verification.
Background technique
Network security certification is in order to which the identity of confirmation message source side, and discovery information are being transmitted, in storing process
Whether it is tampered, identifies the spurious information of others' identity transmission of personation, is to guarantee message integrity and progress based on HMAC verifying
The rudimentary algorithm of data source authentication, it exports the label of a regular length using the message of key and random length as input,
Verifier is set to be capable of the sender of verification message whether is tampered in who and message transmitting procedure.This verifying exists
It is very important in the Internet, is therefore widely used in various security protocols such as SSL/TLS, SSH, SNMP etc..HMAC
It is transmitted under unreliable environment where verifying provides a kind of method and can check or the integrality of the message of storage, calculates and hand over open
In the environment of stream, this is a primary demand, to ensure the legitimacy of the message of two sides transmission.
The following problems that above-mentioned HMAC verification method faces in the online real-time verification of high speed network:
(1) information authentication is two entities in communicating pair, HMAC message authentication need to occupy server calculating and
The resources such as memory, the online real-time verification to high-speed communicating network are a very big challenges.
(2) key agreement between communicating pair client and server-side leverages communication efficiency.
Summary of the invention
The purpose of the present invention is there are a large amount of source address spoofing, messages to distort for current network, man-in-the-middle attack etc.
Cyberthreat proposes a kind of verifying for real-time verification message source legitimacy and integrality towards high-performance backbone network network
Method.This method carries authentication code by message, and the zero interactive key Negotiation Technology based on id password generates lead in real time
The symmetric key for believing both sides, realizes based on the message source authenticity of Self-certified code and the real-time verification of integrality.
Technical scheme is as follows:
A kind of verification method of message source authenticity and content integrity, comprising:
Examiner ID is preassigned, communicating pair symmetric key corresponding with the examiner ID is generated in real time in CPU, checks
Person checks message by communicating pair symmetric key;
For the network message data flow of processing, it is necessary first to which CPU carries out message flow pretreatment, then uses id password skill
Art generates key according to message traffic identifier, finally calculates message authentication code, and traffic identifier and key are stored in TCAM respectively
Table and SRAM table, so that the subsequent packet of the stream is quickly searched cipher key calculation message authentication code by FPGA;
For having traffic identifier and key in TCAM and SRAM list item, by TCAM table Rapid matching and FPGA to message number
Verification processing is carried out according to message;For the message traffic identifier not inquired in TCAM and SRAM list item, message is reported on CPU
Key is generated by zero interaction technique, traffic identifier and delivering key to TCAM and SRAM table are stored, by FPGA to message data
Message carries out verification processing;
The message flowed for one, it is only necessary to carry out a small amount of authentication code information authentication in CPU, stream subsequent packet directly by
FPGA carries out verification processing to message data message.
Present invention application high performance network processor and FPGA Coordination Treatment take full advantage of the processing of CPU and FPGA advantage
Data generate communicating pair symmetric key using zero interactive key based on id password on CPU and a small amount of message are recognized
It demonstrate,proves code to calculate, a large amount of authentication code operation and verifying, filtration treatment is carried out to message in FPGA, can be greatly improved online
The performance of authentication code verifying filters the data message without verifying in a network, can mitigate in network using this framework and take
Business device and terminal processes pressure.
In the present invention FPGA to message data message carry out verification processing the following steps are included:
Step 101:FPGA pre-processes message, traffic identifier in message is extracted, to be subsequently generated authentication code
The key of calculating;
Step 102:FPGA according to the traffic identifier of extraction inquire TCAM table, determine traffic identifier whether in TCAM list item, if
It is to then follow the steps 103, it is no to then follow the steps 107;
Step 103:FPGA finds the key being computed according to traffic identifier, and calculates message authentication code;
Step 104:FPGA determines whether the authentication code calculated is equal with the authentication code of message institute band, if so then execute step
105, it is no to then follow the steps 106;
After step 105:FPGA verifies message success, E-Packeted according to configuration into network;
After step 106:FPGA verifies message failure, message is assert for illegal source messages or nonuniformity message, at discarding
Reason;
Step 107:FPGA determines that this stream does not generate key, and CPU is needed to generate key schedule using zero interaction, by
CPU extracts message traffic identifier and produces key according to mark, and pre-processes to message;
Step 108:CPU issues traffic identifier and key to TCAM, stores in SRAM table, for FPGA to this stream subsequent packet into
Row fast verification;
Step 109:CPU pre-processes message, and according to cipher key calculation message authentication code;
Step 110:CPU determines whether the authentication code calculated is equal with the authentication code of message institute band, if so then execute step
111, it is no to then follow the steps 112;
After step 111:CPU verifies message success, downward message executes step 105 to FPGA processing;
Step 112:CPU verifies message failure, dropping packets processing.
Compared with prior art, the beneficial effect of message authentication code multistage in-line verification method of the present invention is:
The method of the present invention utilizes high performance network processing technique combination authentication code algorithm, carries out high speed to the online message of network
Authentication code verifying processing, rapid authentication is carried out to message source and integrality online in a network, to non-sources of law or non-
Consistency message data quickly filters, and demonstrates length of random message from 64 to 1518 in the case where byte using the method for the present invention
Process performance can reach the process performance of 30Gbps, in the communications between to message carry out high speed online verification, can subtract significantly
The influence to communication performance is verified using hmac algorithm less, improves the reliability and integrality of communication data;
The method of the present invention uses the zero interactive key Negotiation Technology based on id password, it may not be necessary to negotiate to generate one
The key of the communicating pair of data flow avoids resource consumption brought by key agreement, improves the efficiency of communicating pair.
Specific embodiment
The present invention will be described in detail below, the description of this part be only it is exemplary and explanatory, should not be to the present invention
Protection scope have any restriction effect.In addition, description of the those skilled in the art according to this document, it can be in this document
Feature in embodiment and in different embodiments carries out the corresponding combination.
Description and claims of this specification and term " first ", " second ", " third " " the 4th " etc. are (if deposited
) it is to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that use in this way
Data are interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein, such as can be in addition to scheming herein
Sequence other than those of showing or describe is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
In cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units need not
Those of be limited to be clearly listed step or unit, but may include be not clearly listed or for these process, methods,
The other step or units of product or equipment inherently.
The authentication code multistage in-line verifying that the invention proposes a kind of in backbone network based on message identification cryptographic algorithm
Methods and techniques, by preassigning examiner ID and no interactions authentication key construction method, examiner's adopting said method is in net
The correctness of message authentication code can be verified on network at a high speed, the authenticity and content in data message source is complete in guarantee network
Property, prevent source address spoofing, the attack such as packet network is distorted and is injected.
The purpose of the present invention is there are a large amount of source address spoofing, messages to distort for current network, man-in-the-middle attack etc.
Cyberthreat proposes a kind of authentication for real-time verification message source legitimacy, integrality towards high-performance backbone network network
Method.This method carries authentication code by message, and the zero interactive key Negotiation Technology based on id password generates communication in real time
The symmetric key of both sides is realized based on the message source authenticity of Self-certified code and the real-time verification of integrality.
Method of the present embodiment based on message Self-certified code real-time messages source authenticity and integrality multi-level verification, in order to
Real-time verification is carried out to message in backbone network, is applied on CPU+FPGA framework based on id password algorithm and oneself
The message real-time verification technology that authentication code algorithm combines can carry out high speed real-time online to message in backbone network
Verifying and filtering by using the zero interactive key Negotiation Technology based on id password, and preassign examiner's mark, realize
Terminal is not necessarily to complicated key management and examiner generates the ability of communicating pair symmetric key in real time, with CPU multithreading and
FPGA multilevel flow crystal really controls advantage and calculates message authentication code, and carries out the verifying of high speed real-time online to message, can be with
Authentication of message treatment effeciency is substantially increased, guarantees the integrality, source legitimacy and actual effect of network communication.
For needing the network message data flow using the method for the present invention processing, it is necessary first to which CPU carries out message flow and locates in advance
Then reason generates key according to message traffic identifier with identification cipher technology, finally calculates message authentication code, verifies message
Source legitimacy, integrality and actual effect, and traffic identifier and key are stored in TCAM table and SRAM table respectively, it is subsequent so as to the stream
Message is quickly searched cipher key calculation authentication code verifying message integrality, legitimacy and actual effect by FPGA.
For having traffic identifier and key in TCAM and SRAM list item, pass through TCAM table Rapid matching and FPGA multistage flowing water
Technology calculates message HMAC, and carries out verification processing to message data message.For not inquired in TCAM and SRAM list item
Message is reported on CPU and generates key by zero interaction technique, extremely by traffic identifier and delivering key by the message traffic identifier arrived
The storage of TCAM and SRAM table carries out verification processing to message data message by FPGA.
The message flowed for one, it is only necessary to carry out a small amount of authentication code information authentication in CPU, stream subsequent packet directly by
FPGA multistage flowing water technology is rapidly performed by authentication code verifying, substantially increases network message treatment effeciency, ensure that network number
According to the integrality, legitimacy and actual effect of transmission, communicating pair data transmission performance is also substantially increased.
Present invention application high performance network processor and FPGA Coordination Treatment take full advantage of the processing of CPU and FPGA advantage
Data generate communicating pair symmetric key using zero interactive key based on id password on CPU and a small amount of message are recognized
It demonstrate,proves code to calculate, verification processing is carried out to message data message in FPGA and (a large amount of authentication code operation is carried out to message and is tested
Card, filtration treatment), the performance of on-line authentication code verifying can be greatly improved, filters the datagram without verifying in a network
Text can mitigate server and terminal processes pressure in network using this framework.
In the present invention FPGA to message data message carry out verification processing the following steps are included: the following steps are included:
Step 101:FPGA pre-processes message, traffic identifier in message is extracted, to be subsequently generated authentication code
The key of calculating;
Step 102:FPGA according to the traffic identifier of extraction inquire TCAM table, determine traffic identifier whether in TCAM list item, if
It is to then follow the steps 103, it is no to then follow the steps 107;
Step 103:FPGA finds the key being computed according to traffic identifier, and calculates message authentication code;
Step 104:FPGA determines whether the authentication code calculated is equal with the authentication code of message institute band, if so then execute step
105, it is no to then follow the steps 106;
After step 105:FPGA verifies message success, E-Packeted according to configuration into network;
After step 106:FPGA verifies message failure, message is assert for illegal source messages or nonuniformity message, at discarding
Reason;
Step 107:FPGA determines that this stream does not generate key, and CPU is needed to generate key schedule using zero interaction, by
CPU extracts message traffic identifier and produces key according to mark, and pre-processes to message;
Step 108:CPU issues traffic identifier and key to TCAM, stores in SRAM table, for FPGA to this stream subsequent packet into
Row fast verification;
Step 109:CPU pre-processes message, and according to cipher key calculation message authentication code;
Step 110:CPU determines whether the authentication code calculated is equal with the authentication code of message institute band, if so then execute step
111, it is no to then follow the steps 112;
After step 111:CPU verifies message success, downward message executes step 105 to FPGA processing;
Step 112:CPU verifies message failure, dropping packets processing.
The above is only a preferred embodiment of the present invention, protection scope of the present invention is not limited merely to above-mentioned implementation
Example, all technical solutions belonged under thinking of the present invention all belong to the scope of protection of the present invention.It should be pointed out that for the art
Those of ordinary skill for, several improvements and modifications without departing from the principles of the present invention, these improvements and modifications
It should be regarded as protection scope of the present invention.