[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116610485B - Isolation gateway data verification method, electronic equipment and storage medium - Google Patents

Isolation gateway data verification method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116610485B
CN116610485B CN202310896249.4A CN202310896249A CN116610485B CN 116610485 B CN116610485 B CN 116610485B CN 202310896249 A CN202310896249 A CN 202310896249A CN 116610485 B CN116610485 B CN 116610485B
Authority
CN
China
Prior art keywords
data
slice
data slice
check
transmission
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.)
Active
Application number
CN202310896249.4A
Other languages
Chinese (zh)
Other versions
CN116610485A (en
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.)
Shenzhen Urban Transport Planning Center Co Ltd
Original Assignee
Shenzhen Urban Transport Planning Center 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 Shenzhen Urban Transport Planning Center Co Ltd filed Critical Shenzhen Urban Transport Planning Center Co Ltd
Priority to CN202310896249.4A priority Critical patent/CN116610485B/en
Publication of CN116610485A publication Critical patent/CN116610485A/en
Application granted granted Critical
Publication of CN116610485B publication Critical patent/CN116610485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1012Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error
    • G06F11/1032Simple parity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)

Abstract

An isolation barrier data verification method, electronic equipment and a storage medium belong to the field of isolation barrier data processing. The method aims to improve the verification efficiency, the verification accuracy and the safety of the data transmission of the isolation gatekeeper. The invention carries out data slicing on the data to be transmitted in the external resource pool of the isolation gatekeeper to construct a data slice sequence code; calculating a data slice check code by adopting a hash algorithm; the obtained data slice check codes, the data slices and the data slice sequence codes are subjected to data encapsulation to obtain data slice frames for transmission, the data slice frames transmitted to the internal resource pool are subjected to splitting operation after being checked, and the check codes and the slice ordinals are used as key words to establish a red-black tree hash chain table; and calculating the transmitted data slice check code by adopting a hash algorithm, searching the data slice check code, and carrying out data transmission check by judging whether the transmitted check code is consistent with the data slice check code or not, and carrying out exception handling on the data slice with abnormal data transmission.

Description

Isolation gateway data verification method, electronic equipment and storage medium
Technical Field
The invention belongs to the field of data processing of isolation gatekeepers, and particularly relates to an isolation gatekeeper data verification method, electronic equipment and a storage medium.
Background
The basic working principle of the isolation gatekeeper is information ferry, namely conditional access between different network segments which are completely isolated can be realized, and the gatekeeper is only in physical connection with one of the internal network or the external network at the same time, so that continuous physical communication connection cannot be established between the internal network and the external network, and no protocol ferry of data is only carried out, so that the isolation gatekeeper is physically isolated and blocks all connections with potential attacks.
Because of the data transmission property requirement of the isolation barrier, a protocol-free communication or unidirectional isolation communication technology is adopted, the data transmission and the receivers are in a back-to-back state, the data details of the other party are unknown to the sender and the receiver of the isolation barrier, and if the correctness of the data needs to be checked, a specific algorithm and a checking method need to be designed and optimized.
At present, most isolation gates based on memory buses mostly adopt a CRC cyclic redundancy check method. After the data is transmitted into the internal terminal, the internal terminal performs CRC cyclic redundancy check on the data, and after the transmission is proved to be error-free, the data is subjected to protocol encapsulation again. CRC cyclic redundancy is a data transmission error detection function, where polynomial computation is performed on the data at the data link layer, and the result is appended to the frame, and the receiving device also performs a similar algorithm to ensure the correctness and integrity of the data transmission. The basic principle is that after binary information code (frame), check code is spliced to make the whole coding length be the sum of two bit width, so as to obtain a new data frame. R-1 bit remainder (CRC check code) generated by performing modulo-two division on a K bit binary information code (frame) by shifting R bits left and a determined specific divisor polynomial G (x) (provided that G (x) is a generating polynomial of the CRC code), combining the K bit information code and the R-1 bit check code to obtain a brand new data frame, after the data transmission is completed, receiving the data frame by a receiving end, removing the data frame by using the above selected polynomial divisor G (x) by modulo-two division, and verifying whether the remainder is 0, if the remainder is 0, then indicating that the data frame has no error.
When the isolated gate performs data transmission, a specific divisor needs to be pre-defined in advance or a common CRC standard class such as CRC32 serving different functions is used, and if there is a check requirement, the communication cost of both parties will be increased. For the case of large files, the calculation time is greatly increased when CRC redundancy detection is used, if data slicing is used, multiple operations are needed to be carried out on each data, and each data slicing needs to carry out redundancy calculation on all bytes, the efficiency is higher when the data quantity is small, but the efficiency is gradually reduced when the data quantity is increased; because the generation polynomial is required to be agreed in advance by the transmitting and receiving parties and the length of the generation polynomial is smaller than the length of transmission data, the slicing requirement on the data slicing is also increased, the verification efficiency of the isolation gatekeeper is reduced, encryption is not generated, and the security is poor.
The multi-isolation gatekeeper cluster solves the problem of balanced load of each independent gatekeeper in a centralized manner, so that efficient transmission efficiency is achieved, the data checking work after transmission is not important enough, and the data checking method adopts simpler parity check or BCC exclusive OR check commonly used for serial port communication.
The parity check checks an error by adding one bit after all bytes of data before transmission, and checks according to whether the number of "1" s in the bits of the binary code of the transmitted data is an odd or even number. Odd parity is used, otherwise even parity. It is usually agreed in advance to perform odd or even parity, set a parity bit, and use it to make the number of "1" in the set of codes odd or even by adding "1" or "0". If the odd check is used, when the receiving end receives the group of codes, checking whether the number of 1's is odd, thereby determining the correctness of the transmitted codes. When the parity check is adopted, the error detection rate of the parity check is not high, and errors can be detected only when the data has an odd number of data bit changes; the data processing of parity check is complicated, and one check bit is added for each byte transmitted when the parity check is adopted; and parity can only be used for error detection, requiring an overall retransmission when an error occurs.
The BCC exclusive-OR check needs to perform exclusive-OR (XOR) calculation on all data before transmission to obtain a check code, wherein the BCC exclusive-OR check starts from the first byte of all data, the check code is obtained after the data of each byte are exclusive-OR, the exclusive-OR times are equal to the total byte number of the data to be 1, the exclusive-OR calculation is performed again on all data after the transmission is completed to obtain the check code, and the check code obtained by comparing the two data is consistent, so that the transmission is correct. When the BCC exclusive OR check is adopted, a large amount of calculation needs to be carried out once, N data slices exist, 2N (M-1) exclusive OR calculations need to be carried out when each data slice is M bytes, N check code comparison is carried out, the check can be carried out efficiently and accurately when the data amount is smaller, the check efficiency is greatly reduced when the data amount is larger, and a temporary storage which is enough in memory needs to be arranged to meet the check requirement of a large amount of scattering of the data slices, encryption does not exist, and the security is poor.
Disclosure of Invention
The invention aims to solve the problems of improving the verification efficiency, the verification accuracy and the safety of data transmission of an isolation barrier, and provides an isolation barrier data verification method, electronic equipment and a storage medium.
In order to achieve the above purpose, the present invention is realized by the following technical scheme:
a data verification method of an isolation gatekeeper comprises the following steps:
S1, data slicing is carried out on data to be transmitted in an external resource pool of an isolation gatekeeper, and a data slice sequence code is constructed on each data slice;
s2, calculating a data slice check code by adopting a hash algorithm on each data slice constructing the data slice sequence code in the step S1 in an external resource pool of the isolation gatekeeper;
S3, carrying out data encapsulation on the data slice verification, the data slice and the data slice sequence code obtained in the step S2 to obtain a data slice frame;
S4, transmitting the data slice frame obtained in the step S3, carrying out splitting operation after checking the data slice frame transmitted to the internal resource pool, and splitting the data slice frame into check codes, slice ordinals, data slices and accept ordinals; establishing a red-black tree hash chain table by taking the obtained check code and the slice ordinal as key words;
S5, calculating transmitted data slice check codes of the data slices obtained in the step S4 and the data slices in the receiving ordinal numbers by adopting a hash algorithm, searching the data slice check codes in the hash table established in the step S4 by taking the receiving ordinal numbers as key words, and carrying out data transmission check by judging whether the transmitted check codes and the data slice check codes are consistent, wherein if yes, the data transmission is normal, and if no, the data transmission is abnormal;
S6, performing exception processing on the data slice judged to be abnormal in data transmission in the step S5.
Further, the specific implementation method of the step S1 includes the following steps:
S1.1, constructing 128-bit sequence codes with equivalent data slice sequence codes, wherein each data slice sequence code comprises a slice ordinal number and a bearing ordinal number, the slice ordinal number is the same as the data of the bearing ordinal number, and the values of the slice ordinal number and the bearing ordinal number of an initial data slice sequence code are set to be 0;
S1.2, sequentially reading data to be transmitted from an external resource pool of an isolation gatekeeper, inserting a slice ordinal number of an initial data slice sequence code into a data head, inserting a receiving ordinal number of the initial data slice sequence code through a preset slice position, and separating data slices;
S1.3, setting a sequence of data slice sequence codes and adding one, and continuing to create the data slice sequence codes for the rest data waiting to be transmitted, so that the format of the data slice for creating the data slice sequence codes is a slice ordinal number, a data slice and a receiving ordinal number;
S1.4, repeating the steps S1.2 and S1.3 until all the data waiting to be transmitted are processed, and finally adding the data slice sequence code again.
Further, the specific implementation method of the step S2 is to adopt an MD5 algorithm, which includes the following steps:
S2.1, positioning a data slice by judging a data slice sequence code, expanding data of the data slice, taking the data slice as input, adding a filling bit, filling one bit 1 behind the data slice, then filling 0 until the length of the data slice is N.512+448 bits, and then refilling 64 bits of the input data slice to obtain the length of the data slice expanded by the data as N.512+512 bits;
S2.2, grouping data and initializing a register: the data slice of the data expansion obtained in the step S2.1 is subjected to data grouping, the data is divided into grouping data slices by taking 512 bits as group distance, each grouping is divided into 16 32-bit sub-grouping data slices as input link variables, four 32-bit registers are initialized, and the link variables of the registers are respectively: a=0x01234567, b=0x89 abcdef, c= xfedcba98, d=0x 76543210, and respectively modulo-adding the obtained 4 register link variables with the input link variable to obtain an output link variable of packet processing;
S2.3, carrying out cyclic calculation on the output link variable of the packet processing obtained in the step S2.2, judging whether all the packet processing is completed after the cyclic calculation, if yes, carrying out next step output check code, and if no, taking the output link variable of the cyclic calculation as an input link variable of a register, and returning to the step S2.2;
the calculation formula of the cyclic calculation is as follows:
The first function is set to FF (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+F(b,c,d)++/>)<<<s);
the second function is set to GG (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+G(b,c,d)++/>)<<<s);
The third function is set to HH (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+H(b,c,d)++/>)<<<s);
The fourth function is set to II (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+I( b,c,d)++/>)<<<s);
Wherein, Is the jth subpacket of a message within 512 bit groups, s is a cyclic left shift of s bits,/>Is a constant;
S2.4, outputting the check codes, and printing the obtained values of a, b, c and d from low to high according to the address sequence after all packet data slices are circularly calculated, so as to obtain the check codes of the data slices with 128 bits.
Further, the specific implementation method of step S3 is to place the check code at the head of the data slice, and the structure of the obtained data slice frame is the check code, the slice ordinal number, the data slice and the accept ordinal number.
Further, the specific implementation method of the step S4 includes the following steps:
s4.1, transmitting the data slice frame obtained in the step S3 to an internal resource pool;
s4.2, checking the data slice frame obtained in the step S4.1, reading the slice ordinal numbers of 129 th to 256 th bits, reversely reading the bearing ordinal numbers of 1 st to 128 th bits, judging whether the read slice ordinal numbers are the same as the bearing ordinal numbers, if so, judging that the data slice frame is normal, and if not, judging that the data slice frame is abnormal;
S4.3, splitting the data slice frame judged to be normal in the step S4.2 into a check code storage part consisting of check codes and slice ordinal numbers and a check code recalculation part consisting of data slices and accept ordinal numbers by a sequential reading mode;
s4.4, establishing a red-black tree hash table data structure for the check code storage part obtained in the step S4.3, reading check codes as hash values stored in the red-black tree, reading slice ordinals as keywords stored in the red-black tree, and establishing the red-black tree with the keywords as indexes;
S4.5, repeating the steps S4.3 and S4.4, completing the inserting step for the data slice frame check code storage part of each transmission completion and forming a data linked list of one transmission, and finally obtaining the red-black tree hash linked list.
Further, for the data slice frame determined to be abnormal in step S4.2, the check code and the slice ordinal number obtained by calculation before and after transmission are written into the transmission abnormal log of the barrier net gate at the net gate inner net gate end, and the abnormal data slice frame is deleted from the resource pool.
Further, the specific implementation method of the step S5 includes the following steps:
S5.1, reading the data fragments of a check code recalculation part consisting of the data fragments and the receiving ordinal numbers, and performing check code calculation on the transmitted data fragments by adopting an MD5 algorithm to obtain transmitted data fragment check codes;
S5.2, searching the same key words in the red-black tree hash chain table constructed in the step S4 by taking the transmitted data slice check codes obtained in the step S5.1 as indexes to locate, judging whether the data transmission is normal or not by comparing whether the data slice check codes are consistent with the transmitted data slice check codes after locating, judging that the data transmission is normal if yes, and judging that the data transmission is abnormal if no.
Further, step S6 is to determine that the data transmission is abnormal in step S5.2, write the check code and the slice number obtained by calculation before and after transmission into the transmission abnormal log of the barrier net gate at the net gate inner net end, and delete the abnormal data slice in the resource pool.
The electronic equipment comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the isolation gatekeeper data checking method when executing the computer program.
A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of quarantine gatekeeper data verification.
The invention has the beneficial effects that:
The hash algorithm is an irreversible one-way mapping function, maps the input information or data with any length into a short fixed-length hash value, is a one-way cipher system, has only encryption process and has no decryption process. The hash algorithm has: unidirectional: the original data cannot be reversely pushed; sensitivity: extremely sensitive to the input data, once the original data is changed, the resulting hash value will change; balance of: the hash result can be distributed to all buffers as much as possible, so that all buffer spaces can be effectively utilized; crash resistance: for any two different data blocks, the probability that the hash values are the same is extremely small; for a given data block, it is extremely difficult to find the same data block as its hash value; easy-to-press and easy-to-calculate: for a given data, its hash value is small and computationally simple. Considering the property requirement of the data transmission of the isolation gatekeeper, the property of the hash algorithm is very in line with the property requirement of the unidirectional security check of the isolation gatekeeper, and the integrity and the correctness of the data can be checked by adopting the hash algorithm. Before transmission, the hash value is calculated by applying a specific hash function to the data to be transmitted, before the data is transmitted by the isolation barrier, after the data transmission process is finished, the hash value is calculated by applying the same specific hash function again, and the data is checked to be correct through the uniqueness comparison. However, the isolation barrier is poor in transmission support for the conditions of large single data and large data volume, data slicing is needed, and for sliced data, a specific hash algorithm is designed to optimize by combining other verification methods and the characteristics of the isolation barrier, so that data verification is accurately and efficiently completed.
According to the data verification method for the isolation gatekeeper, the hash distribution is the total number of hash values hashed on different intervals, the better the hash distribution is, the more uniform the data distribution is, and the higher the calculation efficiency is, the faster the data positioning is. The anti-collision performance is that a plurality of hash values with the same hash value cannot be generated after the hash calculation, namely, different inputs cannot generate the same output. The data verification method of the isolation gatekeeper has unidirectionality, cannot be used for reverse calculation, and has safety.
The data verification method for the isolation gatekeeper meets the requirements of high-efficiency, safe and accurate verification of different forms of the isolation gatekeeper: by analyzing the existing data verification method which is not enough to meet the data verification aging requirement of the isolation barrier, the transmission property of the attached isolation barrier is used, and a proper verification code calculation method is selected to be combined with a designed specific data verification structure to form a new verification algorithm by taking the improvement of the defects of the original data verification method as the core direction, so that the aim of efficiently and accurately verifying the data fragments is fulfilled.
Drawings
FIG. 1 is a flow chart of a method for checking data of an isolated gate according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and detailed description. It should be understood that the embodiments described herein are for purposes of illustration only and are not intended to limit the invention, i.e., the embodiments described are merely some, but not all, of the embodiments of the invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein can be arranged and designed in a wide variety of different configurations, and the present invention can have other embodiments as well.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, are intended to fall within the scope of the present invention.
For further understanding of the invention, the following detailed description is presented in conjunction with the accompanying drawings 1 to provide a further understanding of the invention in its aspects, features and efficacy:
The first embodiment is as follows:
a data verification method of an isolation gatekeeper comprises the following steps:
S1, data slicing is carried out on data to be transmitted in an external resource pool of an isolation gatekeeper, and a data slice sequence code is constructed on each data slice;
Further, the specific implementation method of the step S1 includes the following steps:
S1.1, constructing 128-bit sequence codes with equivalent data slice sequence codes, wherein each data slice sequence code comprises a slice ordinal number and a bearing ordinal number, the slice ordinal number is the same as the data of the bearing ordinal number, and the values of the slice ordinal number and the bearing ordinal number of an initial data slice sequence code are set to be 0;
S1.2, sequentially reading data to be transmitted from an external resource pool of an isolation gatekeeper, inserting a slice ordinal number of an initial data slice sequence code into a data head, inserting a receiving ordinal number of the initial data slice sequence code through a preset slice position, and separating data slices;
S1.3, setting a sequence of data slice sequence codes and adding one, and continuing to create the data slice sequence codes for the rest data waiting to be transmitted, so that the format of the data slice for creating the data slice sequence codes is a slice ordinal number, a data slice and a receiving ordinal number;
s1.4, repeating the steps S1.2 and S1.3 until all the data waiting to be transmitted are processed, and finally adding a data slice sequence code again;
s2, calculating a data slice check code by adopting a hash algorithm on each data slice constructing the data slice sequence code in the step S1 in an external resource pool of the isolation gatekeeper;
further, the specific implementation method of the step S2 is to adopt an MD5 algorithm, which includes the following steps:
S2.1, positioning a data slice by judging a data slice sequence code, expanding data of the data slice, taking the data slice as input, adding a filling bit, filling one bit 1 behind the data slice, then filling 0 until the length of the data slice is N.512+448 bits, and then refilling 64 bits of the input data slice to obtain the length of the data slice expanded by the data as N.512+512 bits;
S2.2, grouping data and initializing a register: the data slice of the data expansion obtained in the step S2.1 is subjected to data grouping, the data is divided into grouping data slices by taking 512 bits as group distance, each grouping is divided into 16 32-bit sub-grouping data slices as input link variables, four 32-bit registers are initialized, and the link variables of the registers are respectively: a=0x01234567, b=0x89 abcdef, c= xfedcba98, d=0x 76543210, and respectively modulo-adding the obtained 4 register link variables with the input link variable to obtain an output link variable of packet processing;
S2.3, carrying out cyclic calculation on the output link variable of the packet processing obtained in the step S2.2, judging whether all the packet processing is completed after the cyclic calculation, if yes, carrying out next step output check code, and if no, taking the output link variable of the cyclic calculation as an input link variable of a register, and returning to the step S2.2;
the calculation formula of the cyclic calculation is as follows:
The first function is set to FF (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+F(b,c,d)++/>)<<<s);
the second function is set to GG (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+G(b,c,d)++/>)<<<s);
The third function is set to HH (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+H(b,c,d)++/>)<<<s);
The fourth function is set to II (a, b, c, d, ,s,/>) The calculation formula is as follows:
a=b+((a+I( b,c,d)++/>)<<<s);
Wherein, Is the jth subpacket of a message within 512 bit groups, s is a cyclic left shift of s bits,/>Is a constant;
S2.4, outputting check codes, and printing the obtained values of a, b, c and d from low to high according to the address sequence after all packet data slices are circularly calculated to obtain the check codes of the data slices with 128 bits;
S3, carrying out data encapsulation on the data slice verification, the data slice and the data slice sequence code obtained in the step S2 to obtain a data slice frame;
Further, the specific implementation method of step S3 is that the check code is placed at the head of the data slice, and the structure of the obtained data slice frame is the check code, the slice ordinal number, the data slice and the receiving ordinal number;
S4, transmitting the data slice frame obtained in the step S3, carrying out splitting operation after checking the data slice frame transmitted to the internal resource pool, and splitting the data slice frame into check codes, slice ordinals, data slices and accept ordinals; establishing a red-black tree hash chain table by taking the obtained check code and the slice ordinal as key words;
further, the specific implementation method of the step S4 includes the following steps:
s4.1, transmitting the data slice frame obtained in the step S3 to an internal resource pool;
s4.2, checking the data slice frame obtained in the step S4.1, reading the slice ordinal numbers of 129 th to 256 th bits, reversely reading the bearing ordinal numbers of 1 st to 128 th bits, judging whether the read slice ordinal numbers are the same as the bearing ordinal numbers, if so, judging that the data slice frame is normal, and if not, judging that the data slice frame is abnormal;
Further, for the data slice frame judged to be abnormal in the step S4.2, writing the check code and the slice ordinal number obtained by calculation before and after transmission into a network gate transmission abnormal log of the internal network end of the isolation network gate, and deleting the abnormal data slice frame in the resource pool;
S4.3, splitting the data slice frame judged to be normal in the step S4.2 into a check code storage part consisting of check codes and slice ordinal numbers and a check code recalculation part consisting of data slices and accept ordinal numbers by a sequential reading mode;
s4.4, establishing a red-black tree hash table data structure for the check code storage part obtained in the step S4.3, reading check codes as hash values stored in the red-black tree, reading slice ordinals as keywords stored in the red-black tree, and establishing the red-black tree with the keywords as indexes;
s4.5, repeating the steps S4.3 and S4.4, completing the inserting step for the data slice frame check code storage part of each transmission completion and forming a data linked list of one transmission, and finally obtaining a red-black tree hash linked list;
S5, calculating transmitted data slice check codes of the data slices obtained in the step S4 and the data slices in the receiving ordinal numbers by adopting a hash algorithm, searching the data slice check codes in the hash table established in the step S4 by taking the receiving ordinal numbers as key words, and carrying out data transmission check by judging whether the transmitted check codes and the data slice check codes are consistent, wherein if yes, the data transmission is normal, and if no, the data transmission is abnormal;
further, the specific implementation method of the step S5 includes the following steps:
S5.1, reading the data fragments of a check code recalculation part consisting of the data fragments and the receiving ordinal numbers, and performing check code calculation on the transmitted data fragments by adopting an MD5 algorithm to obtain transmitted data fragment check codes;
S5.2, searching the same key words in the red-black tree hash chain table constructed in the step S4 by taking the transmitted data slice check codes obtained in the step S5.1 as indexes to locate, judging whether the data transmission is normal or not by comparing whether the data slice check codes are consistent with the transmitted data slice check codes after locating, judging that the data transmission is normal if yes, and judging that the data transmission is abnormal if no;
s6, judging the step S5 to be abnormal for data transmission, and performing abnormality processing on the data slices;
Further, step S6 is to determine that the data transmission is abnormal in step S5.2, write the check code and the slice number obtained by calculation before and after transmission into the transmission abnormal log of the barrier net gate at the net gate inner net end, and delete the abnormal data slice in the resource pool.
The aim of the embodiment is to meet the requirements of efficient, safe and accurate verification of different forms of the isolation gatekeeper by designing a specific verification algorithm. The comparison is carried out based on a plurality of standards by comparing several checking methods, and the checking methods used for comparison comprise CRC cyclic redundancy check, MD5 algorithm, SHA-1 algorithm and some character string hash algorithms. The beneficial effects of the method need to be measured by setting the following criteria: security, computational efficiency, there are additionally criteria for hash distribution, anti-collision for the alternatives employed with respect to the hash function. The hash distribution is the total number of hash values hashed on different intervals, the better the hash distribution is, the more uniform the data distribution is, and the higher the calculation efficiency is, the faster the data positioning is. The anti-collision performance is that a plurality of hash values with the same hash value cannot be generated after the hash calculation, namely, different inputs cannot generate the same output.
And (5) safety assessment. The CRC cyclic redundancy check does not have an encryption process, and the security is basically none; the MD5 algorithm has unidirectionality, cannot be used for reverse calculation, and has safety; the SHA-1 algorithm has unidirectionality, cannot be used for reverse calculation, and has safety; the hash algorithm of various character strings has unidirectionality, cannot be used for reverse calculation, and has safety.
Comparing the calculation efficiency, and configuring the environment adopted by the experiment as sample data: unordered traffic data binary files and text files of 64G size, etc.; operating system: the external terminal machine adopts Windows and the internal terminal machine adopts Linux; hardware configuration: running 16G, wherein the solid state disk 1T, CPU is an 8-core 16 thread, using a 1000M network card, and adopting the same configuration by an internal terminal and an external terminal; number of experiments: 50 times.
The average time of the CRC cyclic redundancy check rows is: the average time for 237ms, MD5 algorithm operation is: the mean time for 258ms, SHA-1 algorithm operation is: 346ms, and the average running time of various character string hash algorithms is more than 400s. It can be observed that the running speed of the CRC cyclic redundancy check is larger than that of the MD5 algorithm and the SHA-1 algorithm under the specified experimental conditions, and the running speed is far larger than that of various hash algorithm functions.
The comparison of the hash distribution and the conflict resistance of the selected various hash algorithms except the CRC cyclic redundancy check can be summarized through the experimental data of the existing paper, the hash distribution of the selected various hash algorithms is approximately equivalent, and the anti-conflict performance of the hash functions of various character strings is superior to that of the SHA-1 algorithm and the MD5 algorithm.
In order to meet the invention purpose, flow, data structure and other designs, the CRC cyclic redundancy check with no obvious difference between the operation speed and the MD5 algorithm but no safety is eliminated, various character string hash algorithms with extremely slow calculation speed are eliminated, and the SHA-1 algorithm with safety but with the operation speed obviously lower than the MD5 algorithm is eliminated, so that the MD5 can be judged to be the check code calculation algorithm which is the most consistent with the invention.
The comparison of the verification methods determines the requirement of high-efficiency, safe and accurate verification.
The second embodiment is as follows:
The electronic equipment comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the isolation gatekeeper data checking method when executing the computer program.
The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit. And the processor is used for realizing the steps of the data verification method of the isolation gatekeeper when executing the computer program stored in the memory.
The Processor may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart memory card (SMART MEDIA CARD, SMC), secure Digital (SD) card, flash memory card (FLASH CARD), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
And a third specific embodiment:
a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the method of quarantine gatekeeper data verification.
The computer readable storage medium of the present invention may be any form of storage medium that is readable by a processor of a computer device, including but not limited to, nonvolatile memory, volatile memory, ferroelectric memory, etc., on which a computer program is stored, and when the processor of the computer device reads and executes the computer program stored in the memory, the steps of an isolated gate data verification method described above may be implemented.
The computer program comprises computer program code which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The technical key points and the points to be protected of the invention are as follows: the technical key point of the invention is to design a specific verification algorithm to meet the requirements of high-efficiency, safe and accurate verification of different forms of isolation gatekeepers: by analyzing the existing data verification method which is not enough to meet the data verification aging requirement of the isolation barrier, the transmission property of the attached isolation barrier is used, and a proper verification code calculation method is selected to be combined with a designed specific data verification structure to form a new verification algorithm by taking the improvement of the defects of the original data verification method as the core direction, so that the aim of efficiently and accurately verifying the data fragments is fulfilled.
The invention aims at protecting the logic implementation and application method of a specific checking algorithm. The logic implementation comprises an integral verification algorithm flow, a core verification code calculation function of the verification algorithm and the like, and the application method comprises a data structure method for quickly comparing the verification codes and physical support of verification.
It is noted that relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Although the application has been described above with reference to specific embodiments, various modifications may be made and equivalents may be substituted for elements thereof without departing from the scope of the application. In particular, the features of the disclosed embodiments may be combined with each other in any manner so long as there is no structural conflict, and the exhaustive description of these combinations is not given in this specification solely for the sake of brevity and resource saving. Therefore, it is intended that the application not be limited to the particular embodiments disclosed herein, but that the application will include all embodiments falling within the scope of the appended claims.

Claims (5)

1. A data verification method for an isolation gatekeeper is characterized by comprising the following steps of: the method comprises the following steps:
S1, data slicing is carried out on data to be transmitted in an external resource pool of an isolation gatekeeper, and a data slice sequence code is constructed on each data slice;
The specific implementation method of the step S1 comprises the following steps:
S1.1, constructing 128-bit sequence codes with equivalent data slice sequence codes, wherein each data slice sequence code comprises a slice ordinal number and a bearing ordinal number, the slice ordinal number is the same as the data of the bearing ordinal number, and the values of the slice ordinal number and the bearing ordinal number of an initial data slice sequence code are set to be 0;
S1.2, sequentially reading data to be transmitted from an external resource pool of an isolation gatekeeper, inserting a slice ordinal number of an initial data slice sequence code into a data head, inserting a receiving ordinal number of the initial data slice sequence code through a preset slice position, and separating data slices;
S1.3, setting a sequence of data slice sequence codes and adding one, and continuing to create the data slice sequence codes for the rest data waiting to be transmitted, so that the format of the data slice for creating the data slice sequence codes is a slice ordinal number, a data slice and a receiving ordinal number;
s1.4, repeating the steps S1.2 and S1.3 until all the data waiting to be transmitted are processed, and finally adding a data slice sequence code again;
s2, calculating a data slice check code by adopting a hash algorithm on each data slice constructing the data slice sequence code in the step S1 in an external resource pool of the isolation gatekeeper;
the specific implementation method of the step S2 is to adopt an MD5 algorithm, and comprises the following steps:
S2.1, positioning a data slice by judging a data slice sequence code, expanding data of the data slice, taking the data slice as input, adding filling bits, filling one bit 1 behind the data slice, then filling 0 until the length of the data slice is N.512+448 bits, and then refilling 64 bits of the input data slice to obtain the length of the data slice expanded by the data, wherein N is the number of the data slices, and the length of the data slice expanded by the data is N.512+512 bits;
s2.2, grouping data and initializing a register: the data slice of the data expansion obtained in the step S2.1 is subjected to data grouping, the data is divided into grouping data slices by taking 512 bits as group distance, each grouping data slice is divided into 16 32-bit sub-grouping data slices, the sub-grouping data slices are used as input link variables, four 32-bit registers are initialized, and the link variables of the registers are respectively set as follows: a=0x01234567, b=0x89 abcdef, c= xfedcba98 and d=0x 76543210, and performing modulo addition on the obtained 4 register link variables and the input link variable respectively to obtain output link variables of packet processing;
S2.3, carrying out cyclic calculation on the output link variable of the packet processing obtained in the step S2.2, judging whether all the packet processing is completed after the cyclic calculation, if yes, carrying out next step output check code, and if no, taking the output link variable of the cyclic calculation as an input link variable of a register, and returning to the step S2.2;
the calculation formula of the cyclic calculation is as follows:
setting the first function as The calculation formula is as follows:
Wherein, Is the j-th sub-packet of the message in the 512 bit group, < < < s is the cyclic left shift by s bits,/>Is a constant;
S2.4, outputting check codes, and printing the obtained values of a, b, c and d from low to high according to the address sequence after all packet data slices are circularly calculated to obtain the check codes of the data slices with 128 bits;
S3, carrying out data encapsulation on the data slice verification, the data slice and the data slice sequence code obtained in the step S2 to obtain a data slice frame;
The specific implementation method of the step S3 is that the check code is arranged at the head of the data slice, and the structure of the obtained data slice frame is the check code, the slice ordinal number, the data slice and the receiving ordinal number;
S4, transmitting the data slice frame obtained in the step S3, carrying out splitting operation after checking the data slice frame transmitted to the internal resource pool, and splitting the data slice frame into check codes, slice ordinals, data slices and accept ordinals; establishing a red-black tree hash chain table by taking the obtained check code and the slice ordinal as key words;
the specific implementation method of the step S4 comprises the following steps:
s4.1, transmitting the data slice frame obtained in the step S3 to an internal resource pool;
S4.2, checking the data slice frame of the resource pool in the step S4.1, reading the 129 th to 256 th bit slice ordinal numbers, reversely reading the 1 st to 128 th bit carrying ordinal numbers, judging whether the read slice ordinal numbers are the same as the carrying ordinal numbers, if so, judging that the data slice frame is normal, and if not, judging that the data slice frame is abnormal;
S4.3, splitting the data slice frame judged to be normal in the step S4.2 into a check code storage part consisting of check codes and slice ordinal numbers and a check code recalculation part consisting of data slices and accept ordinal numbers by a sequential reading mode;
s4.4, establishing a red-black tree hash table data structure for the check code storage part obtained in the step S4.3, reading check codes as hash values stored in the red-black tree, reading slice ordinals as keywords stored in the red-black tree, and establishing the red-black tree with the keywords as indexes;
s4.5, repeating the steps S4.3 and S4.4, completing the inserting step for the data slice frame check code storage part of each transmission completion and forming a data linked list of one transmission, and finally obtaining a red-black tree hash linked list;
S5, calculating transmitted data slice check codes of the data slices obtained in the step S4 and the data slices in the receiving ordinal numbers by adopting a hash algorithm, searching the data slice check codes in the hash table established in the step S4 by taking the receiving ordinal numbers as key words, and carrying out data transmission check by judging whether the transmitted check codes and the data slice check codes are consistent, wherein if yes, the data transmission is normal, and if no, the data transmission is abnormal;
the specific implementation method of the step S5 comprises the following steps:
S5.1, reading the data fragments of a check code recalculation part consisting of the data fragments and the receiving ordinal numbers, and performing check code calculation on the transmitted data fragments by adopting an MD5 algorithm to obtain transmitted data fragment check codes;
S5.2, searching the same key words in the red-black tree hash chain table constructed in the step S4 by taking the transmitted data slice check codes obtained in the step S5.1 as indexes to locate, judging whether the data transmission is normal or not by comparing whether the data slice check codes are consistent with the transmitted data slice check codes after locating, judging that the data transmission is normal if yes, and judging that the data transmission is abnormal if no;
S6, performing exception processing on the data slice judged to be abnormal in data transmission in the step S5.
2. The method for checking data of an isolated gate according to claim 1, wherein for the data slice frames determined to be abnormal in step S4.2, the check codes and the slice numbers obtained by calculation before and after transmission are written into a gate transmission anomaly log of an intranet end of the isolated gate, and the abnormal data slice frames are deleted from the resource pool.
3. The method for checking data of an isolated gate according to claim 2, wherein step S6 writes check codes and slice numbers obtained by calculation before and after transmission into a gate transmission anomaly log of an intranet end of the isolated gate for the data slice determined to be abnormal in data transmission, and deletes the abnormal data slice in the resource pool.
4. An electronic device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of a method of checking data of an isolated gate as claimed in any one of claims 1 to 3 when the computer program is executed.
5. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a method of quarantine gatekeeper data verification according to any of claims 1-3.
CN202310896249.4A 2023-07-21 2023-07-21 Isolation gateway data verification method, electronic equipment and storage medium Active CN116610485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310896249.4A CN116610485B (en) 2023-07-21 2023-07-21 Isolation gateway data verification method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310896249.4A CN116610485B (en) 2023-07-21 2023-07-21 Isolation gateway data verification method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116610485A CN116610485A (en) 2023-08-18
CN116610485B true CN116610485B (en) 2024-04-30

Family

ID=87682170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310896249.4A Active CN116610485B (en) 2023-07-21 2023-07-21 Isolation gateway data verification method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116610485B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109885576A (en) * 2019-03-06 2019-06-14 珠海金山网络游戏科技有限公司 A kind of Hash table creation method and system calculate equipment and storage medium
CN110995391A (en) * 2019-11-18 2020-04-10 国能日新科技股份有限公司 Data transmission method in isolated network, server and terminal
CN111200479A (en) * 2018-11-19 2020-05-26 福建天泉教育科技有限公司 Transmission data verification method and storage medium
CN111709038A (en) * 2020-05-07 2020-09-25 北京中科凡语科技有限公司 File encryption and decryption method, distributed storage system, equipment and storage medium
CN111726344A (en) * 2020-06-12 2020-09-29 安徽云中联讯科技有限公司 Multi-serial port safety network gate scheduling algorithm
CN113612705A (en) * 2021-08-02 2021-11-05 广西电网有限责任公司 Power grid monitoring system data transmission method based on Hash algorithm fragmentation and recombination
CN114124416A (en) * 2020-08-24 2022-03-01 中国航天系统工程有限公司 System and method for quickly exchanging data between networks
WO2022099683A1 (en) * 2020-11-16 2022-05-19 华为云计算技术有限公司 Data transmission method and apparatus, device, system, and storage medium
CN115022069A (en) * 2022-06-20 2022-09-06 武汉思普崚技术有限公司 IP fragment message recombination method and device for network attack detection

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111200479A (en) * 2018-11-19 2020-05-26 福建天泉教育科技有限公司 Transmission data verification method and storage medium
CN109885576A (en) * 2019-03-06 2019-06-14 珠海金山网络游戏科技有限公司 A kind of Hash table creation method and system calculate equipment and storage medium
CN110995391A (en) * 2019-11-18 2020-04-10 国能日新科技股份有限公司 Data transmission method in isolated network, server and terminal
CN111709038A (en) * 2020-05-07 2020-09-25 北京中科凡语科技有限公司 File encryption and decryption method, distributed storage system, equipment and storage medium
CN111726344A (en) * 2020-06-12 2020-09-29 安徽云中联讯科技有限公司 Multi-serial port safety network gate scheduling algorithm
CN114124416A (en) * 2020-08-24 2022-03-01 中国航天系统工程有限公司 System and method for quickly exchanging data between networks
WO2022099683A1 (en) * 2020-11-16 2022-05-19 华为云计算技术有限公司 Data transmission method and apparatus, device, system, and storage medium
CN113612705A (en) * 2021-08-02 2021-11-05 广西电网有限责任公司 Power grid monitoring system data transmission method based on Hash algorithm fragmentation and recombination
CN115022069A (en) * 2022-06-20 2022-09-06 武汉思普崚技术有限公司 IP fragment message recombination method and device for network attack detection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"HMA-CMD5算法的硬件实现";吴旭凡等;《电子器件》;第26卷(第1期);66-70 *
"一种跨网闸数据传输系统的设计与实现";付雷扬等;《计算机与数字工程》;20161031;第44卷(第10期);1996-2000 *

Also Published As

Publication number Publication date
CN116610485A (en) 2023-08-18

Similar Documents

Publication Publication Date Title
Koopman 32-bit cyclic redundancy codes for internet applications
US20220229727A1 (en) Encoding and storage node repairing method for minimum storage regenerating codes for distributed storage systems
ES2673513T3 (en) Procedures that use FEC codes with permanent inactivation of symbols for coding and decoding processes
US8804950B1 (en) Methods and apparatus for producing a hash value based on a hash function
JP3297668B2 (en) Encoding / decoding device and encoding / decoding method
US9496897B1 (en) Methods and apparatus for generating authenticated error correcting codes
EP2773061B1 (en) A method and an apparatus for deriving secret information from a series of response values and a method and an apparatus for providing helper data allowing to derive a secret information
US20200119928A1 (en) Signature compression for hash-based signature schemes
US8601358B2 (en) Buffer transfer check on variable length data
JPH08330975A (en) Error correction code decoding method and circuit adopting this method
US20070165673A1 (en) Method for reconstructing lost packets using a binary parity check
JP2011514743A (en) Method and system for detecting and correcting phased burst errors, erasures, symbol errors, and bit errors in received symbol sequences
US8447988B2 (en) Hash processing using a processor
JP7429223B2 (en) Turbo product code decoding method, device, decoder and computer storage medium
CN116610485B (en) Isolation gateway data verification method, electronic equipment and storage medium
CN111464258B (en) Data verification method, device, computing equipment and medium
US7945843B2 (en) Error correcting code
CN114388053B (en) SSD data testing method and device, storage medium and testing equipment
WO2017185213A1 (en) Encoding method and encoding device
CN111752747A (en) Memory security verification method for enhancing error detection capability
Reyzin et al. Simple stateless steganography
Klimenko et al. The Study of Implementations of CRCs Algorithms
US11182249B1 (en) Block ID encoding in an erasure coded storage system
Gangadhar et al. RELIABLE CRC BASED ERROR DETECTION TECHNIQUES FOR FINITE FIELD MULTIPLIERS
RU2710911C1 (en) Method of transmitting multi-unit messages in telecode communication systems

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
GR01 Patent grant
GR01 Patent grant