Data processing method, system, device and storage medium based on dual-factor protection
The method of generating and sending dynamic verification factors by the client and sending two-factor verification on the server solves the problem of insufficient effectiveness in preventing playback attacks in the existing technology, and achieves more efficient interface communication security.
Patent Information
- Application Number
- CN202211708701.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The existing anti-replay attack methods are insufficient in network communication, making it difficult to effectively identify and prevent replay attacks.
Using a data processing method based on two-factor protection, the client generates dynamic verification factors for verification values and encrypted digests, and the server verifies request information through verification values and encrypted digests, and builds an interface verification mechanism for two-factor protection.
Effectively prevent replay attacks, improve interface communication security, and enhance the intelligence level of application security protection.
Smart Images

Figure CN116094786B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, system, device and storage medium based on double-factor protection. Background Art
[0002] A replay attack, also known as a replay attack, playback attack, or freshness attack, occurs when an attacker steals messages or message fragments from a previously executed or currently executed protocol and uses them to deceive the current protocol, thereby compromising network protocol security, hindering normal communication, and consuming network resources. Replay attacks can occur during any network communication process, making replay attack prevention imperative. Replay attacks are typically prevented by setting freshness in request messages to identify replayed messages. Common methods for setting freshness in request messages include timestamp-based and sequence number-based methods. However, these methods all contain loopholes, and the effectiveness of replay attack prevention needs to be improved. Summary of the Invention
[0003] In view of this, an object of the embodiments of the present invention is to provide a data processing method, system, device and storage medium based on dual-factor protection, which can improve the effectiveness of preventing replay attacks.
[0004] In a first aspect, an embodiment of the present invention provides a data processing method based on dual-factor protection, which is applied to a client and includes:
[0005] Generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm;
[0006] Sorting the request parameters according to preset rules to generate a parameter string;
[0007] generating an encrypted digest from the parameter string and the check value according to an encryption function, and generating a dynamic check factor according to the check value and the encrypted digest; wherein the encryption function is an irreversible encryption function;
[0008] Generate request information based on the dynamic check factor and send the request information to the server, so that the server verifies the request information based on the check value and the encryption summary to determine whether the request information is a replay attack; wherein, when the request is successful, save the check value to the cache.
[0009] Optionally, the generating a checksum value using the request protocol packet as a request parameter according to a preset algorithm specifically includes:
[0010] Generate a hash value using the request protocol packet as a request parameter according to the hash algorithm.
[0011] Optionally, the request parameters are sorted according to preset rules, specifically including:
[0012] Sort the request parameters in alphabetical order or ASCII code order.
[0013] In a second aspect, an embodiment of the present invention provides a data processing method based on two-factor protection, which is applied to a server and includes:
[0014] Receive a request message sent by a client, and determine a dynamic check factor according to the request message; the dynamic check factor includes a check value and an encrypted digest;
[0015] Checking whether the checksum value exists in the cache;
[0016] If the checksum value exists in the cache, the request information is a replay attack;
[0017] If the check value does not exist in the cache, the encrypted summary is verified, and it is determined whether the request information is a replay attack based on the verification result.
[0018] Optionally, verifying the encrypted digest and determining whether the request information is a replay attack based on the verification result specifically includes:
[0019] Determine a parameter string and a check value according to the request information, and generate a verification digest from the parameter string and the check value according to an encryption algorithm;
[0020] comparing the verification digest with the encryption digest;
[0021] If the verification digest is consistent with the encryption digest, the request information is not a replay attack;
[0022] If the verification digest is inconsistent with the encryption digest, the request information is a replay attack.
[0023] In a third aspect, an embodiment of the present invention provides a data processing system based on dual-factor protection, which is applied to a client and includes:
[0024] The first module is used to generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm;
[0025] The second module is used to sort the request parameters according to preset rules to generate a parameter string;
[0026] A third module is configured to generate an encrypted digest from the parameter string and the check value according to an encryption function, and to generate a dynamic check factor according to the check value and the encrypted digest; the encryption function is an irreversible encryption function;
[0027] The fourth module is used to generate a request message based on the dynamic check factor and send the request message to the server, so that the server verifies the request message based on the check value and the encryption summary to determine whether the request message is a replay attack; wherein, when the request is successful, the check value is saved in the cache.
[0028] In a fourth aspect, an embodiment of the present invention provides a data processing system based on two-factor protection, which is applied to a server and includes:
[0029] The fifth module is configured to receive a request message sent by a client and determine a dynamic check factor according to the request message; the dynamic check factor includes a check value and an encrypted digest;
[0030] The sixth module is used to query whether the check value exists in the cache;
[0031] A seventh module is configured to determine, if the check value exists in the cache, that the request information is a replay attack;
[0032] The eighth module is configured to verify the encrypted digest if the check value does not exist in the cache, and determine whether the request information is a replay attack based on the verification result.
[0033] In a fifth aspect, an embodiment of the present invention provides a data processing device based on two-factor protection, comprising:
[0034] at least one processor;
[0035] at least one memory for storing at least one program;
[0036] When the at least one program is executed by the at least one processor, the at least one processor implements the method described in the first aspect embodiment or the second aspect embodiment.
[0037] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a program executable by a processor, which is used to execute the method described in the above-mentioned first aspect embodiment or second aspect embodiment when executed by the processor.
[0038] In a seventh aspect, an embodiment of the present invention provides a data processing system based on dual-factor protection, comprising a client and a server, wherein the client and the server are in communication connection, wherein:
[0039] The client is used to implement the method described in the embodiment of the first aspect;
[0040] The server is used to implement the method described in the embodiment of the second aspect.
[0041] The implementation of the embodiment of the present invention includes the following beneficial effects: in this embodiment, the client first generates a check value for the request parameter according to a preset algorithm, and generates a parameter string for the request parameter, then generates an encrypted digest for the parameter string and the check value according to an encryption function, and generates a dynamic check factor based on the check value and the encrypted digest, and adds the dynamic check factor to the request information and sends it to the server; after receiving the request information, the server parses the dynamic check factor in the request information, and verifies the check value and the encrypted digest in the dynamic check factor respectively to determine whether the request information is a replay attack; therefore, the interface verification method with dual-factor protection is formed between the client and the server through the check value and the encrypted digest, constructs a defense mechanism to prevent replay attacks, effectively prevents replay attacks, improves the security of interface communication, and greatly improves the intelligence level of application security protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a structural block diagram of a data processing system based on dual-factor protection provided by an embodiment of the present invention;
[0043] Figure 2 This is a schematic flow chart of the steps of a data processing method applied to a client provided by an embodiment of the present invention;
[0044] Figure 3 This is a structural block diagram of a data processing system applied to a client provided by an embodiment of the present invention;
[0045] Figure 4 This is a schematic flow chart of the steps of a data processing method applied to a server provided by an embodiment of the present invention;
[0046] Figure 5 This is a structural block diagram of a data processing system applied to a server provided by an embodiment of the present invention;
[0047] Figure 6 This is a structural block diagram of a data processing device based on dual-factor protection provided by an embodiment of the present invention;
[0048] Figure 7 This is a flowchart of another data processing method based on dual-factor protection provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0050] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0051] In the following description, the terms "first\second\third" are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0052] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention pertains. The terms used in the embodiments of the present invention are for the purpose of describing the embodiments of the present invention only and are not intended to limit the present invention.
[0053] Before further explaining the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0054] See Figure 1 In the embodiment of the present invention, the client and the server communicate through an interface. The communication method can be wired communication or wireless communication. The client sends a request message to the server. The server determines whether it is a replay attack based on the request message, thereby determining the validity of the request message.
[0055] like Figure 2 As shown, an embodiment of the present invention provides a data processing method based on dual-factor protection, which is applied to a client and includes steps S100 to S400.
[0056] S100: Generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm.
[0057] It should be noted that the preset algorithm is determined according to the actual application and is not specifically limited in this embodiment. The check value is determined by the request parameters and the selected preset algorithm. Different preset algorithms correspond to different check values. For example, the check value corresponding to the hash algorithm is the hash value.
[0058] Optionally, the generating a checksum value using the request protocol packet as a request parameter according to a preset algorithm specifically includes:
[0059] S110 : Generate a hash value using the request protocol packet as a request parameter according to a hash algorithm.
[0060] Specifically, when the preset algorithm selects a hash algorithm, the client calculates a hash value using the hash algorithm for each requested protocol packet.
[0061] S200: Sort the request parameters according to preset rules to generate a parameter string.
[0062] It should be noted that the preset rule is a certain agreed sorting rule, which is determined according to actual application and is not specifically limited in this embodiment.
[0063] Optionally, the request parameters are sorted according to preset rules, specifically including:
[0064] S210: Sort the request parameters in alphabetical order or ASCII code order.
[0065] Specifically, the request parameters are sorted in alphabetical order, ASCII code order, or a specific agreed order.
[0066] S300 , generating an encrypted digest from the parameter string and the check value according to an encryption function, and generating a dynamic check factor according to the check value and the encrypted digest; the encryption function is an irreversible encryption function.
[0067] It should be noted that the encryption function is an irreversible encryption function agreed upon by the client and the server, including but not limited to the commonly used MD5 encryption function.
[0068] Specifically, each time a request is made, the client uses an encryption function to encrypt the sorted client request parameters + Hash value string to generate an encrypted digest, and generates a dynamic check factor based on the check value and the encrypted digest.
[0069] S400. Generate request information based on the dynamic check factor, and send the request information to the server, so that the server verifies the request information based on the check value and the encryption summary to determine whether the request information is a replay attack; wherein, when the request is successful, save the check value to the cache.
[0070] Specifically, the dynamic check factor is located in the request message, including but not limited to the request message header and request message body. The client adds the dynamic check factor to the original request message to obtain the request information, and sends the request information to the server. After receiving the request information, the server verifies the checksum value and encryption digest based on the dynamic check factor in the request information to determine whether the request information has been replayed.
[0071] It should be noted that after each successful request, the server saves the hash value to the Redis cache. The Redis cache is used to store the hash value of the dynamic check factor of the verified request information.
[0072] The implementation of the embodiment of the present invention includes the following beneficial effects: In this embodiment, the client first generates a check value for the request parameter according to a preset algorithm, and generates a parameter string for the request parameter, then generates an encrypted digest for the parameter string and the check value according to an encryption function, and generates a dynamic check factor based on the check value and the encrypted digest, and adds the dynamic check factor to the request information and sends it to the server, so that the server verifies the dynamic check factor in the request information to determine whether the request information is a replay attack; therefore, a dual-factor protection interface verification method is formed between the client and the server through the check value and the encrypted digest, a defense mechanism to prevent replay attacks is constructed, replay attacks are effectively prevented, the interface communication security is improved, and the intelligence level of application security protection is greatly improved.
[0073] See Figure 3 The embodiment of the present invention provides a data processing system based on dual-factor protection, which is applied to a client and includes:
[0074] The first module is used to generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm;
[0075] The second module is used to sort the request parameters according to preset rules to generate a parameter string;
[0076] A third module is configured to generate an encrypted digest from the parameter string and the check value according to an encryption function, and to generate a dynamic check factor according to the check value and the encrypted digest; the encryption function is an irreversible encryption function;
[0077] The fourth module is used to generate a request message based on the dynamic check factor and send the request message to the server, so that the server verifies the request message based on the check value and the encryption summary to determine whether the request message is a replay attack; wherein, when the request is successful, the check value is saved in the cache.
[0078] It can be seen that the contents of the above-mentioned method embodiments applied to the client are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above-mentioned method embodiments applied to the client, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiments applied to the client.
[0079] See Figure 4 , an embodiment of the present invention provides a data processing method based on double-factor protection, which is applied to a server and includes steps S500 to S800.
[0080] S500: Receive request information sent by the client, and determine a dynamic check factor according to the request information; the dynamic check factor includes a check value and an encrypted digest.
[0081] Specifically, after receiving the request information sent by the client, the server extracts the dynamic check factor from the request information. The dynamic check factor includes a check value and an encrypted digest.
[0082] S600: Check whether the verification value exists in the cache.
[0083] Specifically, the server queries the Redis cache for the existence of the checksum value, and determines whether the request is a replay attack based on the existence of the checksum value in the Redis cache. The query method can be verified by matching.
[0084] S700: If the check value exists in the cache, the request information is a replay attack.
[0085] Specifically, if the above-mentioned checksum value exists in the Redis cache, the request information is a replay attack and the request information is invalid; if the above-mentioned checksum value does not exist in the Redis cache, the request information is not a replay attack, which means that the request information is valid and the encrypted summary needs to be further verified.
[0086] S800: If the check value does not exist in the cache, verify the encrypted digest, and determine whether the request information is a replay attack based on the verification result.
[0087] Specifically, when it is impossible to determine whether the request information is a replay attack based on the checksum value, the server generates an encrypted digest of the server according to the client's encryption digest generation rules, and then compares it with the encrypted digest sent by the client, and determines whether the request information is a replay attack based on the comparison result.
[0088] Optionally, verifying the encrypted digest and determining whether the request information is a replay attack based on the verification result specifically includes:
[0089] S810: Determine a parameter string and a check value according to the request information, and generate a verification digest from the parameter string and the check value according to an encryption algorithm;
[0090] S820, comparing the verification digest with the encryption digest;
[0091] S830: If the verification digest is consistent with the encryption digest, the request information is not a replay attack;
[0092] S840: If the verification digest is inconsistent with the encryption digest, the request information is a replay attack.
[0093] Specifically, the server receives the hash value and request parameters in the dynamic check factor; then the server sorts the parameters in the client request according to the sorting rules to obtain the sorted parameter string, and then the server generates the server's encrypted digest according to the encryption algorithm based on the parameter string, timestamp and random number hash value according to the encryption function, and compares it with the encrypted digest in the dynamic check factor. If they are inconsistent, it means that the request has been tampered with and the request is judged to be an information tampering attack. If they are consistent, it means that the request is valid, the anti-replay check is passed, and the server can process the business.
[0094] It should be noted that if the request passes the above hash value and encrypted digest verification, the server stores the hash value in the dynamic check factor in the Redis cache. Hash value verification: The server matches the hash value in the cache. If no identical value is found, the verification passes. Encrypted digest verification: The server generates its own encrypted digest according to the client's encryption digest generation rules and compares it with the client's encrypted digest. If they match, the verification passes.
[0095] The implementation of the embodiment of the present invention includes the following beneficial effects: in this embodiment, the client first generates a check value for the request parameter according to a preset algorithm, and generates a parameter string for the request parameter, then generates an encrypted digest for the parameter string and the check value according to an encryption function, and generates a dynamic check factor based on the check value and the encrypted digest, and adds the dynamic check factor to the request information and sends it to the server; after receiving the request information, the server parses the dynamic check factor in the request information, and verifies the check value and the encrypted digest in the dynamic check factor respectively to determine whether the request information is a replay attack; therefore, the interface verification method with dual-factor protection is formed between the client and the server through the check value and the encrypted digest, constructs a defense mechanism to prevent replay attacks, effectively prevents replay attacks, improves the security of interface communication, and greatly improves the intelligence level of application security protection.
[0096] See Figure 5 The embodiment of the present invention provides a data processing system based on dual-factor protection, which is applied to a server and includes:
[0097] The fifth module is configured to receive a request message sent by a client and determine a dynamic check factor according to the request message; the dynamic check factor includes a check value and an encrypted digest;
[0098] The sixth module is used to query whether the verification value exists in the cache;
[0099] A seventh module is configured to determine, if the check value exists in the cache, that the request information is a replay attack;
[0100] The eighth module is configured to verify the encrypted digest if the check value does not exist in the cache, and determine whether the request information is a replay attack based on the verification result.
[0101] It can be seen that the contents of the above-mentioned method embodiments applied to the server are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above-mentioned method embodiments applied to the server, and the beneficial effects achieved are also the same as those achieved by the method embodiments applied to the server.
[0102] In a fifth aspect, an embodiment of the present invention provides a data processing device based on two-factor protection, comprising:
[0103] at least one processor;
[0104] at least one memory for storing at least one program;
[0105] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method applied to the client or the method applied to the server.
[0106] Among them, the memory is a non-transient computer-readable storage medium that can be used to store non-transient software programs and non-transient computer executable programs. The memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory optionally includes a remote memory remotely arranged relative to the processor, and these remote memories can be connected to the processor via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0107] It can be seen that the contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0108] In addition, the embodiments of the present application further disclose a computer program product or computer program, which is stored in a computer-readable storage medium. The processor of a computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above-mentioned method. Similarly, the contents of the above-mentioned method embodiment are all applicable to the present storage medium embodiment, and the functions specifically implemented by the present storage medium embodiment are the same as those of the above-mentioned method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiment.
[0109] An embodiment of the present invention further provides a computer-readable storage medium, which stores a program executable by a processor. The program executable by the processor is used to implement the above method when executed by the processor.
[0110] It is understood that all or some steps, systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data) and is volatile and non-volatile, removable and non-removable. Computer storage media includes but is not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0111] See Figure 1 The embodiment of the present invention provides a data processing system based on dual-factor protection, including a client and a server, wherein the client and the server are in communication connection,
[0112] The client is used to implement Figure 2 The method described;
[0113] The server is used to implement Figure 4 The method described.
[0114] The following is a specific example to illustrate the above-mentioned data processing method based on dual-factor protection. Figure 7 , the specific data processing process is as follows:
[0115] Step 1: The client generates a hash value using the request protocol packet as a parameter through a hash algorithm;
[0116] Step 2: The client sorts the request parameters in ASCII order to generate a parameter string;
[0117] Step 3: The client uses the encryption function MD5 (parameter string + hash value) to generate the encryption summary sign;
[0118] Step 4: Before initiating a request, the client puts the dynamic verification factors such as the hash value and sign into the header of the request parameters and initiates a request to the server.
[0119] Step 5: After receiving the client request, the server extracts the dynamic check factors in the request header one by one; first, the hash value is judged and the server queries the obtained hash value in the Redis cache. If no result is found, it means that the request is valid and needs to be verified by the encrypted digest. If a result is found, it means that the request is a replay attack and the request is invalid.
[0120] Step 6: The server sorts the received request parameters in ASCII code order. For example, if the request parameters are c=3&b=2&a=1, the sorted parameter string is a=1&b=2&c=3.
[0121] Step 7: The server uses the encryption function to generate the encrypted digest sign_server: sign_server = MD5('a = 1 & b = 2 & c = 3' + Hash value), and compares the encrypted digest sign_server of the server with the encrypted digest sign of the client. If they are consistent, it means that the request is valid, the anti-replay check has passed, and the server can process the business. If they are inconsistent, it means that the request has been tampered with and the request is invalid.
[0122] Step 8: After the anti-replay check passes, the server stores the hash value in the Redis cache.
[0123] The embodiments of the present invention have the following specific beneficial effects: 1. The interface security method defense mechanism based on dual-factor protection can effectively defend against various types of Web application layer attacks such as replay attacks, information tampering attacks, and man-in-the-middle attacks, effectively ensuring the smooth operation of the system; 2. The overhead of server-side database storage space is reduced, and only the server-side memory needs to be accessed without accessing the server-side database, effectively improving the efficiency of verification; the use of hash algorithms, encrypted digests and other verification methods is suitable for most communication scenarios in the field of network security technology, greatly improving the system's anti-replay defense capabilities.
[0124] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A data processing method based on dual-factor protection, characterized in that: Applied to the client, including: Generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm; Sorting the request parameters according to preset rules to generate a parameter string; generating an encrypted digest from the parameter string and the check value according to an encryption function, and generating a dynamic check factor according to the check value and the encrypted digest; wherein the encryption function is an irreversible encryption function; Generate request information based on the dynamic check factor and send the request information to the server, so that the server verifies the request information based on the check value and the encryption summary to determine whether the request information is a replay attack; wherein, when the request is successful, save the check value to the cache.
2. The method according to claim 1, characterized in that The step of generating a checksum value by using the request protocol packet as a request parameter according to a preset algorithm specifically includes: Generate a hash value using the request protocol packet as a request parameter according to the hash algorithm.
3. The method according to claim 1, characterized in that Sorting the request parameters according to preset rules, specifically including: Sort the request parameters in alphabetical order or ASCII code order.
4. A data processing method based on dual-factor protection, characterized in that: A server corresponding to the client according to any one of claims 1 to 3, comprising: Receive a request message sent by a client, and determine a dynamic check factor according to the request message; the dynamic check factor includes a check value and an encrypted digest; Check whether the checksum value exists in the cache; If the checksum value exists in the cache, the request information is a replay attack; If the check value does not exist in the cache, the encrypted summary is verified, and it is determined whether the request information is a replay attack based on the verification result.
5. The method according to claim 4, characterized in that The verifying the encrypted digest and determining whether the request information is a replay attack based on the verification result specifically includes: Determine a parameter string and a check value according to the request information, and generate a verification digest from the parameter string and the check value according to an encryption algorithm; comparing the verification digest with the encryption digest; If the verification digest is consistent with the encryption digest, the request information is not a replay attack; If the verification digest is inconsistent with the encryption digest, the request information is a replay attack.
6. A data processing system based on dual-factor protection, characterized in that: Applied to the client, including: The first module is used to generate a checksum value using the request protocol packet as a request parameter according to a preset algorithm; The second module is used to sort the request parameters according to preset rules to generate a parameter string; A third module is configured to generate an encrypted digest from the parameter string and the check value according to an encryption function, and to generate a dynamic check factor according to the check value and the encrypted digest; the encryption function is an irreversible encryption function; The fourth module is used to generate a request message based on the dynamic check factor and send the request message to the server, so that the server verifies the request message based on the check value and the encryption summary to determine whether the request message is a replay attack; wherein, when the request is successful, the check value is saved in the cache.
7. A data processing system based on a two-factor method, characterized in that: A server corresponding to the client according to claim 6, comprising: The fifth module is configured to receive a request message sent by a client and determine a dynamic check factor according to the request message; the dynamic check factor includes a check value and an encrypted digest; The sixth module is used to query whether the verification value exists in the cache; A seventh module is configured to determine, if the check value exists in the cache, that the request information is a replay attack; The eighth module is configured to verify the encrypted digest if the check value does not exist in the cache, and determine whether the request information is a replay attack based on the verification result.
8. A data processing device based on double-factor protection, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 3 or 4 to 5.
9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to perform the method according to any one of claims 1 to 3 or 4 to 5 when executed by the processor.
10. A data processing system based on dual-factor protection, characterized in that: It includes a client and a server, wherein the client and the server are connected in communication, The client is used to implement the method according to any one of claims 1 to 3; The server is used to implement the method according to any one of claims 4-5.
Citation Information
Patent Citations
User data signature verification method with time effectiveness
CN106571923A
Anti-replay attack authentication protocol
CN111066046A
Security verification method and security verification system for network service request, and storage medium
CN111917557A