CN116418580B - Data integrity protection detection method and device for local area network and electronic equipment - Google Patents

Data integrity protection detection method and device for local area network and electronic equipment Download PDF

Info

Publication number
CN116418580B
CN116418580B CN202310379050.4A CN202310379050A CN116418580B CN 116418580 B CN116418580 B CN 116418580B CN 202310379050 A CN202310379050 A CN 202310379050A CN 116418580 B CN116418580 B CN 116418580B
Authority
CN
China
Prior art keywords
file
area network
local area
public key
target
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
CN202310379050.4A
Other languages
Chinese (zh)
Other versions
CN116418580A (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.)
Guangdong Yuemi Technical Service Co ltd
Original Assignee
Guangdong Yuemi Technical Service 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 Guangdong Yuemi Technical Service Co ltd filed Critical Guangdong Yuemi Technical Service Co ltd
Priority to CN202310379050.4A priority Critical patent/CN116418580B/en
Publication of CN116418580A publication Critical patent/CN116418580A/en
Application granted granted Critical
Publication of CN116418580B publication Critical patent/CN116418580B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Abstract

The application relates to the technical field of data processing, and discloses a data integrity protection detection method for a local area network, which comprises the following steps: constructing a private key and a public key of a local area network data file, and disclosing the public key in a target local area network; dividing the local area network file into a plurality of basic blocks to obtain basic block files of the local area network data file; constructing detection information of a local area network data file based on the public key and the basic block file; receiving a data integrity check request, searching a target check file sub-block and a target public key corresponding to the data integrity check request, and generating check information according to the target check file sub-block and the target public key; and carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result. The application further provides a data integrity protection detection device and electronic equipment for the local area network. The application can improve the accuracy of data integrity verification.

Description

Data integrity protection detection method and device for local area network and electronic equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for detecting data integrity protection of a local area network, and an electronic device.
Background
The local area network is a local area network, which is characterized in that the distribution area is limited in scope, and can be large or small, the connection between a building and adjacent buildings is large, and the connection between offices is small. The local area network is a private network, is widely used for connecting personal computers and consumer electronic devices, so that the personal computers and the consumer electronic devices can share resources and exchange information, and has the advantages of higher transmission speed, more stable performance, simple and easy framework and sealing performance compared with other networks, so that the data security can be effectively protected by maintaining the data integrity of the local area network.
The existing data integrity protection detection method mainly comprises online, mass, database and the like, when a system accesses data, the burden of a server is increased, network resources are occupied, but in a local area network, tasks for storing the data by a user are relatively more, and data privacy protection and an integrity algorithm in the tasks are too simple, so that the system needs to conduct data integrity prediction in advance when executing excessive tasks. Therefore, how to protect the data privacy and complete the data and perform the data integrity protection detection becomes a problem to be solved urgently.
Disclosure of Invention
The application provides a data integrity protection detection method and device for a local area network and electronic equipment, and mainly aims to solve the problem of low accuracy in data integrity detection.
In order to achieve the above object, the present application provides a method for detecting data integrity protection of a local area network, including:
acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to a prime number pair generated randomly, and disclosing the public key to a target local area network where the local area network data file is located;
dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file;
generating an identification tag of each basic block file based on the public key, and constructing detection information of the local area network data file based on the identification tag;
receiving a data integrity verification request carrying the private key, searching a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculating verification information of the local area network data file according to the target verification file sub-block and the target public key;
and carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result.
Optionally, the constructing the private key and the public key of the local area network data file according to the randomly generated prime number pair includes:
calculating the product between the prime number pairs, and generating public key numbers meeting preset conditions according to the prime number pairs;
and obtaining a public key of the local area network file according to the product and the public key combination, and taking the prime number pair as a private key of the local area network data file.
Optionally, the preset condition is expressed as:
gcd(e,(p-1)(q-1))=1
wherein gcd represents the greatest common divisor, e represents the public key number, p, q represents the prime number pair.
Optionally, the dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file includes:
identifying a data type in the local area network data file, and determining the data length of the local area network data file according to the data type;
dividing the local area network data file into file sub-blocks with preset data length according to the data length;
dividing each file sub-block into a preset number of basic blocks to obtain a basic block file of the local area network file.
Optionally, the generating an identification tag of each basic block file based on the public key includes:
extracting the public key number in the public key, and obtaining a file sequence of each basic block file;
generating an identification tag of each basic block file based on the public key number and the file sequence;
generating an identification tag of each basic block file by using the following formula:
wherein T is i,j The identification label corresponding to the j basic block file representing the file sequence as the i-th file sub-block, e represents the public key number, m i,j And (3) representing the file sequence as a j-th basic block file of an i-th file sub-block, h representing a homomorphic hash function, f representing a pseudo-random function, and generating a pseudo-random number for the j-th basic block file and the i-th file sub-block respectively.
Optionally, the constructing the detection information of the local area network data file based on the identification tag includes:
and constructing detection information of the local area network data file by using the following formula:
wherein H represents the detection information of the LAN file, e represents the public key number, T i,j And (3) representing the file sequence as an identification label corresponding to the j-th basic block file of the i-th file sub-block, wherein n represents the total number of the file sub-blocks, k represents the total number of the basic block files in the i-th file sub-block, and f represents a pseudo-random function.
Optionally, the searching the target verification file sub-block and the target public key corresponding to the data integrity verification request in the target local area network according to the private key includes:
calculating a target public key number of the private key meeting a preset condition according to the private key, and searching a target public key corresponding to the target public key number in the target local area network;
determining a target local area network data file corresponding to the data integrity check request according to the private key;
searching a target verification file sub-block corresponding to the data integrity verification request in the target local area network according to the target local area network data file.
Optionally, the calculating the verification information of the local area network data file according to the target verification file sub-block and the target public key includes:
extracting a target basic block file in the target verification file sub-block, and calculating a target identification tag of the target basic block file according to the target public key;
and generating verification information of the local area network data file according to the target identification tag.
In order to solve the above-mentioned problems, the present application also provides a data integrity protection detection device for a local area network, the device comprising:
the key construction module is used for acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to the randomly generated prime number pairs, and disclosing the public key to a target local area network where the local area network data file is located;
the local area network data file dividing module is used for dividing the local area network data file into a plurality of basic blocks to obtain basic block files of the local area network data file;
the detection information construction module is used for generating an identification tag of each basic block file based on the public key and constructing detection information of the local area network data file based on the identification tag;
the verification information generation module is used for receiving a data integrity verification request carrying the private key, searching a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculating the verification information of the local area network data file according to the target verification file sub-block and the target public key;
and the data integrity checking module is used for carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result.
In order to solve the above-mentioned problems, the present application also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data integrity protection detection method for a local area network described above.
According to the embodiment of the application, the local area network data file is divided into a plurality of basic blocks, and the data integrity of the local area network data file is determined according to the change of the basic block file; generating an identification tag of each basic block file through a public key disclosed in a target local area network, constructing detection information of a local area network data file based on the identification tag, and avoiding false basic blocks through the detection information to cause error judgment of data integrity check; and carrying out consistency check on the detection information corresponding to the data integrity check request and the check information of the constructed local area network data file, so that substitution disguise or deletion of the local area network data file can be avoided, and further, the accuracy of checking the data integrity of the local area network data file is improved. Therefore, the data integrity protection detection method and device for the local area network and the electronic equipment can solve the problem of low accuracy in data integrity verification.
Drawings
Fig. 1 is a flowchart of a data integrity protection detection method for a local area network according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a process for partitioning basic block files according to an embodiment of the present application;
FIG. 3 is a functional block diagram of a data integrity protection detection device for a local area network according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device implementing the data integrity protection detection method for a local area network according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a data integrity protection detection method for a local area network. The execution body of the data integrity protection detection method for the local area network comprises at least one of a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the application. In other words, the data integrity protection detection method for the local area network may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a method for detecting data integrity protection of a local area network according to an embodiment of the application is shown. In this embodiment, the method for detecting data integrity protection of a local area network includes:
s1, acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to randomly generated prime number pairs, and disclosing the public key to a target local area network where the local area network data file is located.
In the embodiment of the application, the local area network data file is a data file which needs to be stored in a target local area network, and then a private key and a public key of the local area network data file are generated through the prime number pair generated randomly so as to encrypt the local area network data file and generate verification information of a subsequent local area network file.
In the embodiment of the present application, the constructing the private key and the public key of the local area network data file according to the randomly generated prime number pair includes:
calculating the product between the prime number pairs, and generating public key numbers meeting preset conditions according to the prime number pairs;
and obtaining a public key of the local area network file according to the product and the public key combination, and taking the prime number pair as a private key of the local area network data file.
In the embodiment of the present application, the preset condition is expressed as:
gcd(e,(p-1)(q-1))=1
wherein gcd represents the greatest common divisor, e represents the public key number, p, q represents the prime number pair.
In the embodiment of the application, the public key number is generated through the preset condition, the product between the public key number and the prime number pair forms the public key, the prime number pair is used as the private key, the generated public key and private key are used as the identification of the local area network data file, the public key is stored in the target local area network where the local area network data file is located and used for generating the detection information of the local area network data file, the private key is sent to the user corresponding to the local area network data file, the private key is used for identifying the local area network data file, and therefore the private key is associated with the local area network data file and used for subsequently calling the local area network data file corresponding to the private key so as to detect the integrity of the local area network data file.
S2, dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file.
In the embodiment of the application, the splitting of the local area network data file is realized by dividing the local area network data file into a plurality of basic block files, and when the integrity of the local area network data file is changed, the corresponding basic block file is correspondingly changed, so that the data integrity of the local area network data can be checked according to the basic block files.
In an embodiment of the present application, referring to fig. 2, the dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file includes:
s21, identifying a data type in the local area network data file, and determining the data length of the local area network data file according to the data type;
s22, dividing the local area network data file into file sub-blocks with preset data length according to the data length;
s23, dividing each file sub-block into a preset number of basic blocks to obtain a basic block file of the local area network file.
In the embodiment of the application, since the local area network data file may contain multiple types of data, different data have different lengths in calculation, the data length is calculated according to the data type of the local area network data file, for example, an integer (int) data type occupies 4 bytes, a short integer (short) data type occupies 2 bytes, and a character (char) data type occupies 1 byte, so that the data length of the local area network data file can be calculated according to the data type. The local area network data file is divided into a plurality of files through the data length of the local area network data file, the size of each file sub-block can be ensured to be within a certain range, and therefore when the data in each file sub-block changes, the corresponding basic block file also changes, and the integrity of the local area network data file can be checked.
S3, generating an identification tag of each basic block file based on the public key, and constructing detection information of the local area network data file based on the identification tag.
In the embodiment of the application, the identification tag is the data identification of each basic block file, and the identification of the local area network data file can be generated by identifying each basic block file so as to obtain the detection information of the local area network data file, thereby realizing the uniqueness of the local area network data file.
In an embodiment of the present application, the generating an identification tag of each basic block file based on the public key includes:
extracting the public key number in the public key, and obtaining a file sequence of each basic block file;
and generating an identification tag of each basic block file based on the public key number and the file sequence.
In the embodiment of the application, the public key number in the public key is the public key number generated by meeting the preset condition, and the corresponding identification tag is generated according to the public key number and the file sequence corresponding to each basic block file, wherein the file sequence represents the file identification corresponding to each basic file block, for example, the 1 st sub-block of the file corresponds to the 3 rd basic block file, and the identification tag of each basic block file can be generated according to the public key number and the file sequence, so that each basic block file can be identified, and when the basic block file is changed, the corresponding identification tag is changed, so that the data integrity of the local area network file can be checked.
In the embodiment of the application, the identification label of each basic block file is generated by using the following formula:
wherein T is i,j The identification label corresponding to the j basic block file representing the file sequence as the i-th file sub-block, e represents the public key number, m i,j And (3) representing the file sequence as a j-th basic block file of an i-th file sub-block, h representing a homomorphic hash function, f representing a pseudo-random function, and generating a pseudo-random number for the j-th basic block file and the i-th file sub-block respectively.
In the embodiment of the application, the identification label of each file sub-block can be generated by generating the identification label for each basic block file, so that the detection information of the local area network data file is obtained, and the integrity protection of the local area network data file is realized.
In the embodiment of the present application, the constructing the detection information of the local area network data file based on the identification tag includes:
and constructing detection information of the local area network data file by using the following formula:
wherein H represents the detection information of the LAN file, e represents the public key number, T i,j The identification label corresponding to the j basic block file representing the file sequence as the i-th file sub-block, and n represents the total of the file sub-blocksThe number k represents the total number of basic block files in the ith file sub-block, and f represents a pseudo-random function.
In the embodiment of the application, the local area network file is stored in the storage space corresponding to the target local area network in the form that the sub-blocks of the file contain basic block files, and the identification label corresponding to each basic block file is associated with the basic block file, so that a basis is provided for data integrity verification of the follow-up local area network data file.
In the embodiment of the application, the detection information of the local area network data file is generated through the identification tag of the basic block file, so that the integrity of the local area network data file is protected, and further the integrity of the local area network data file can be checked through the detection information of the local area network data, thereby avoiding the deletion of the local area network data file or the addition of malicious data.
S4, receiving a data integrity check request carrying the private key, searching a target check file sub-block and a target public key corresponding to the data integrity check request in the target local area network according to the private key, and calculating check information of the local area network data file according to the target check file sub-block and the target public key.
In the embodiment of the application, because a plurality of local area network files are stored in the target local area network, a user initiates a data integrity check request corresponding to local area network data according to the stored private key so as to search a target check file sub-block corresponding to the data integrity check request and a target public key stored in the target local area network, and further judge whether basic block files in the target check file sub-block are changed according to the target check file sub-block and the public key, thereby checking the integrity of the local area network data files.
In the embodiment of the present application, the searching the target verification file sub-block and the target public key corresponding to the data integrity verification request in the target local area network according to the private key includes:
calculating a target public key number of the private key meeting a preset condition according to the private key, and searching a target public key corresponding to the target public key number in the target local area network;
determining a target local area network data file corresponding to the data integrity check request according to the private key;
searching a target verification file sub-block corresponding to the data integrity verification request in the target local area network according to the target local area network data file.
According to the embodiment of the application, the private key corresponding to the data integrity check request can calculate the corresponding target public key according to the algorithm for generating the public key, and the target local area network data corresponding to the private key is determined, so that the target check file sub-block corresponding to the data integrity check request can be searched in the target local area network.
In the embodiment of the application, the target public key containing the target public key number is searched in the target local area network according to the target public key number, and the associated target local area network data of the data integrity request is determined according to the local area network data identified by the private key, so that the data integrity of the target local area network file corresponding to the data integrity request carrying the private key can be checked in a targeted manner.
In the embodiment of the present application, the calculating the verification information of the local area network data file according to the target verification file sub-block and the target public key includes:
extracting a target basic block file in the target verification file sub-block, and calculating a target identification tag of the target basic block file according to the target public key;
and generating verification information of the local area network data file according to the target identification tag.
In the embodiment of the application, the method for generating the identification label of each basic block file can be utilized to calculate the target identification label of the generated target basic block file, and the verification information of the local area network data file is generated according to the target identification label so as to verify the data integrity of the local area network data file.
In the embodiment of the application, the integrity of the current basic block file of the local area network data can be checked by generating the check information through the target basic block file in the target file sub-block, and further the data integrity of the local area network data file can be accurately checked.
S5, carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result.
In the embodiment of the application, the consistency check is to check whether the detection information is consistent with the check information, if not, the quantity of basic block files representing the local area network data files is changed, or the basic block files of the local area network data files are replaced by disguised basic block files, so that the identification labels of the target basic block files of the target file sub-blocks in the check information are inconsistent with the identification labels in the detection information, and the incomplete local area network data files can be determined; if the detection information is consistent with the verification information, the target basic block file in the target file sub-block is unchanged, and the file sequence of the target file sub-block is unchanged, so that the completeness of the local area network data file can be determined to be unchanged.
According to the embodiment of the application, the local area network data file is divided into a plurality of basic blocks, and the data integrity of the local area network data file is determined according to the change of the basic block file; generating an identification tag of each basic block file through a public key disclosed in a target local area network, constructing detection information of a local area network data file based on the identification tag, and avoiding false basic blocks through the detection information to cause error judgment of data integrity check; and carrying out consistency check on the detection information corresponding to the data integrity check request and the check information of the constructed local area network data file, so that substitution disguise or deletion of the local area network data file can be avoided, and further, the accuracy of checking the data integrity of the local area network data file is improved. Therefore, the data integrity protection detection method for the local area network can solve the problem of lower accuracy in data integrity verification.
Fig. 3 is a functional block diagram of a data integrity protection detection device for a local area network according to an embodiment of the present application.
The data integrity protection detection apparatus 300 for a local area network according to the present application may be installed in an electronic device. The data integrity protection detection device 300 for a local area network may include a key construction module 301, a local area network data file division module 302, a detection information construction module 303, a verification information generation module 304, and a data integrity verification module 305 according to the implemented functions. The module of the application, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the key construction module 301 acquires a local area network data file, constructs a private key and a public key of the local area network data file according to the prime number pairs generated randomly, and discloses the public key on a target local area network where the local area network data file is located;
the local area network data file dividing module 302 is configured to divide the local area network data file into a plurality of basic blocks, so as to obtain a basic block file of the local area network data file;
the detection information construction module 303 is configured to generate an identification tag of each basic block file based on the public key, and construct detection information of the local area network data file based on the identification tag;
the verification information generating module 304 is configured to receive a data integrity verification request carrying the private key, search a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculate verification information of the local area network data file according to the target verification file sub-block and the target public key;
the data integrity checking module 305 is configured to perform consistency check on the detection information and the check information, and determine the integrity of the local area network data file according to the consistency check result.
In detail, each module in the data integrity protection detection device 300 for a local area network in the embodiment of the present application adopts the same technical means as the data integrity protection detection method for a local area network in the foregoing fig. 1 to 2, and can produce the same technical effects, which are not repeated here.
Fig. 4 is a schematic structural diagram of an electronic device implementing a data integrity protection detection method for a local area network according to an embodiment of the present application.
The electronic device 400 may comprise a processor 401, a memory 402, a communication bus 403 and a communication interface 404, and may further comprise a computer program stored in the memory 402 and executable on the processor 401, such as a data integrity protection detection program for a local area network.
The processor 401 may be composed of an integrated circuit in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 401 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules stored in the memory 402 (for example, executes a data integrity protection detection program for a local area network, etc.), and invokes data stored in the memory 402 to perform various functions of the electronic device and process data.
The memory 402 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 402 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 402 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like. Further, the memory 402 may also include both internal storage units and external storage devices of the electronic device. The memory 402 may be used to store not only application software installed in an electronic device and various types of data, such as code for a data integrity protection detection program for a local area network, but also temporarily store data that has been output or is to be output.
The communication bus 403 may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 402 and the at least one processor 401 etc.
The communication interface 404 is used for communication between the electronic device and other devices, including network interfaces and user interfaces. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Only an electronic device having components is shown, and it will be understood by those skilled in the art that the structures shown in the figures do not limit the electronic device, and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 401 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The data integrity protection detection program for local area networks stored in the memory 402 of the electronic device 400 is a combination of instructions that, when executed in the processor 401, may implement:
acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to a prime number pair generated randomly, and disclosing the public key to a target local area network where the local area network data file is located;
dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file;
generating an identification tag of each basic block file based on the public key, and constructing detection information of the local area network data file based on the identification tag;
receiving a data integrity verification request carrying the private key, searching a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculating verification information of the local area network data file according to the target verification file sub-block and the target public key;
and carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result.
In particular, the specific implementation method of the above instructions by the processor 401 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated by the electronic device 400 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. The computer readable storage medium may be volatile or nonvolatile. For example, 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).
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (9)

1. A method for data integrity protection detection for a local area network, the method comprising:
acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to a prime number pair generated randomly, and disclosing the public key to a target local area network where the local area network data file is located;
dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file;
generating an identification tag of each basic block file based on the public key, constructing detection information of the local area network data file based on the identification tag, and generating the identification tag of each basic block file based on the public key, wherein the identification tag comprises the following steps: extracting the public key number in the public key, and obtaining a file sequence of each basic block file; generating an identification tag of each basic block file based on the public key number and the file sequence;
generating an identification tag of each basic block file by using the following formula:
wherein T is i,j The identification label corresponding to the j basic block file representing the file sequence as the i-th file sub-block, e represents the public key number, m i,j The method comprises the steps of representing a j-th basic block file of which the file sequence is an i-th file sub-block, h representing a homomorphic hash function, f representing a pseudo-random function, and generating a pseudo-random number for the j-th basic block file and the i-th file sub-block respectively;
receiving a data integrity verification request carrying the private key, searching a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculating verification information of the local area network data file according to the target verification file sub-block and the target public key;
and carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to a consistency check result.
2. The method for protecting data integrity of a local area network as claimed in claim 1, wherein said constructing a private key and a public key of said local area network data file from a pair of randomly generated primes comprises:
calculating the product between the prime number pairs, and generating public key numbers meeting preset conditions according to the prime number pairs;
and obtaining a public key of the local area network data file according to the product and the public key combination, and taking the prime number pair as a private key of the local area network data file.
3. The method for detecting data integrity protection for a local area network according to claim 2, wherein the preset condition is expressed as:
wherein gcd represents the greatest common divisor, e represents the public key number, p, q represents the prime number pair.
4. The method for protecting and detecting data integrity of a local area network according to claim 1, wherein dividing the local area network data file into a plurality of basic blocks to obtain a basic block file of the local area network data file comprises:
identifying a data type in the local area network data file, and determining the data length of the local area network data file according to the data type;
dividing the local area network data file into file sub-blocks with preset data length according to the data length;
dividing each file sub-block into a preset number of basic blocks to obtain a basic block file of the local area network data file.
5. The method for detecting data integrity protection of a local area network according to claim 1, wherein said constructing detection information of the local area network data file based on the identification tag comprises:
and constructing detection information of the local area network data file by using the following formula:
wherein H represents detection information of the local area network data file, e represents public key number in the public key, and T represents i,j The file sequence of the basic block file is the identification label corresponding to the j basic block file of the i-th file sub-block, and n represents the file sub-blockThe total number, k, represents the total number of basic block files in the ith file sub-block, and f represents a pseudo-random function.
6. The method for detecting data integrity protection of local area network according to claim 1, wherein searching the target verification file sub-block and the target public key corresponding to the data integrity verification request in the target local area network according to the private key comprises:
calculating a target public key number of the private key meeting a preset condition according to the private key, and searching a target public key corresponding to the target public key number in the target local area network;
determining a target local area network data file corresponding to the data integrity check request according to the private key;
searching a target verification file sub-block corresponding to the data integrity verification request in the target local area network according to the target local area network data file.
7. The method for protecting data integrity of a local area network according to claim 1, wherein said calculating the verification information of the local area network data file according to the target verification file sub-block and the target public key comprises:
extracting a target basic block file in the target verification file sub-block, and calculating a target identification tag of the target basic block file according to the target public key;
and generating verification information of the local area network data file according to the target identification tag.
8. A data integrity protection detection apparatus for a local area network, the apparatus comprising:
the key construction module is used for acquiring a local area network data file, constructing a private key and a public key of the local area network data file according to the randomly generated prime number pairs, and disclosing the public key to a target local area network where the local area network data file is located;
the local area network data file dividing module is used for dividing the local area network data file into a plurality of basic blocks to obtain basic block files of the local area network data file;
the detection information construction module is configured to generate an identification tag of each basic block file based on the public key, construct detection information of the local area network data file based on the identification tag, and generate an identification tag of each basic block file based on the public key, where the detection information construction module includes: extracting the public key number in the public key, and obtaining a file sequence of each basic block file; generating an identification tag of each basic block file based on the public key number and the file sequence;
generating an identification tag of each basic block file by using the following formula:
wherein T is i,j The identification label corresponding to the j basic block file representing the file sequence as the i-th file sub-block, e represents the public key number, m i,j The method comprises the steps of representing a j-th basic block file of which the file sequence is an i-th file sub-block, h representing a homomorphic hash function, f representing a pseudo-random function, and generating a pseudo-random number for the j-th basic block file and the i-th file sub-block respectively;
the verification information generation module is used for receiving a data integrity verification request carrying the private key, searching a target verification file sub-block and a target public key corresponding to the data integrity verification request in the target local area network according to the private key, and calculating the verification information of the local area network data file according to the target verification file sub-block and the target public key;
and the data integrity checking module is used for carrying out consistency check on the detection information and the check information, and determining the integrity of the local area network data file according to the consistency check result.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the data integrity protection detection method for a local area network as claimed in any one of claims 1 to 7.
CN202310379050.4A 2023-04-10 2023-04-10 Data integrity protection detection method and device for local area network and electronic equipment Active CN116418580B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310379050.4A CN116418580B (en) 2023-04-10 2023-04-10 Data integrity protection detection method and device for local area network and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310379050.4A CN116418580B (en) 2023-04-10 2023-04-10 Data integrity protection detection method and device for local area network and electronic equipment

Publications (2)

Publication Number Publication Date
CN116418580A CN116418580A (en) 2023-07-11
CN116418580B true CN116418580B (en) 2023-11-24

Family

ID=87049241

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310379050.4A Active CN116418580B (en) 2023-04-10 2023-04-10 Data integrity protection detection method and device for local area network and electronic equipment

Country Status (1)

Country Link
CN (1) CN116418580B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067363A (en) * 2012-12-20 2013-04-24 华中科技大学 Index conversion method for public data integrity checking
CN104811450A (en) * 2015-04-22 2015-07-29 电子科技大学 Data storage method based on identity in cloud computing and integrity verification method based on identity in cloud computing
CN108476131A (en) * 2015-12-31 2018-08-31 华为技术有限公司 Data transmission method, device and equipment
CN108965258A (en) * 2018-06-21 2018-12-07 河南科技大学 A kind of cloud environment data integrity verification method based on full homomorphic cryptography
CN109063513A (en) * 2018-06-20 2018-12-21 北京航空航天大学 A kind of dynamic data integrity verification method based on Hadoop platform
CN111291046A (en) * 2020-01-16 2020-06-16 湖南城市学院 Computer big data storage control system and method
CN111709058A (en) * 2020-06-09 2020-09-25 陕西师范大学 Data integrity verification method based on identity and ring signature
CN111967060A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 Data file integrity verification method and device
CN112003692A (en) * 2020-07-08 2020-11-27 国网浙江省电力有限公司 Multi-user cloud data integrity protection method based on block chain

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067363A (en) * 2012-12-20 2013-04-24 华中科技大学 Index conversion method for public data integrity checking
CN104811450A (en) * 2015-04-22 2015-07-29 电子科技大学 Data storage method based on identity in cloud computing and integrity verification method based on identity in cloud computing
CN108476131A (en) * 2015-12-31 2018-08-31 华为技术有限公司 Data transmission method, device and equipment
CN109063513A (en) * 2018-06-20 2018-12-21 北京航空航天大学 A kind of dynamic data integrity verification method based on Hadoop platform
CN108965258A (en) * 2018-06-21 2018-12-07 河南科技大学 A kind of cloud environment data integrity verification method based on full homomorphic cryptography
CN111291046A (en) * 2020-01-16 2020-06-16 湖南城市学院 Computer big data storage control system and method
CN111709058A (en) * 2020-06-09 2020-09-25 陕西师范大学 Data integrity verification method based on identity and ring signature
CN112003692A (en) * 2020-07-08 2020-11-27 国网浙江省电力有限公司 Multi-user cloud data integrity protection method based on block chain
CN111967060A (en) * 2020-08-18 2020-11-20 中国银行股份有限公司 Data file integrity verification method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
云平台下数据完整性验证方案设计;周悦;王威;宋红波;何泾沙;;信息网络安全(第11期);全文 *

Also Published As

Publication number Publication date
CN116418580A (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN113806434B (en) Big data processing method, device, equipment and medium
CN115270193B (en) Data file secure sharing method and device based on block chain and collaborative synchronization
CN113704781A (en) File secure transmission method and device, electronic equipment and computer storage medium
CN113822675A (en) Block chain based message processing method, device, equipment and storage medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN116418580B (en) Data integrity protection detection method and device for local area network and electronic equipment
CN116910816A (en) Multiparty asset collaborative management method and device for improving privacy protection
CN114268559B (en) Directional network detection method, device, equipment and medium based on TF-IDF algorithm
CN114157634B (en) Unique account identification method, device, equipment and storage medium
CN113364848B (en) File caching method and device, electronic equipment and storage medium
CN115119197A (en) Wireless network risk analysis method, device, equipment and medium based on big data
CN112257078B (en) Block chain encryption and decryption service security trusted system based on TEE technology
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN115001768A (en) Data interaction method, device and equipment based on block chain and storage medium
CN114697132A (en) Method, device, equipment and storage medium for intercepting repeated access request attack
CN113987206A (en) Abnormal user identification method, device, equipment and storage medium
CN113918517A (en) Multi-type file centralized management method, device, equipment and storage medium
CN107277054A (en) A kind of method and system of data integrity validation
CN114095220A (en) Telephone communication verification method, device, equipment and storage medium
CN113626533B (en) Ultraviolet power detection method and device and electronic equipment
CN113703995B (en) Front-end and back-end data interaction method and device, electronic equipment and storage medium
CN113438221B (en) Local end file loading method and device, electronic equipment and medium
CN115630409B (en) Data storage control method and device
CN116225789B (en) Transaction system backup capability detection method, device, equipment and medium
CN114640666B (en) File sharing downloading method, electronic equipment and readable storage medium

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