Password leakage detection method to protect accounts from large-scale credential stuffing attacks
By using multiple hash functions to partition a large-scale leaked credential database and adopting a privacy set intersection protocol, the problems of password information leakage and high computational communication costs in the existing account leakage alarm service are solved, achieving more efficient account security protection.
Patent Information
- Application Number
- CN202411710304.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing account leak alert services have problems with password information leakage, high computing and communication costs, and are unable to effectively protect account security, especially in large-scale leaked credential databases.
By using multiple hash functions to generate multiple hash prefixes of usernames, the large-scale leaked credential database is divided into smaller blocks. By adopting the privacy set intersection protocol, the client and service provider operate between the credentials and small blocks, reducing the computational and communication costs.
It effectively protects account password security, reduces the computing and communication costs of account leak alert services, and provides better security and performance.
Smart Images

Figure CN119602937B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a password leakage detection method for protecting accounts from large-scale credential stuffing attacks. Background Art
[0002] The widespread availability of usernames and passwords from data breaches has made it easy for attackers to access billions of accounts. Despite the leak and public disclosure of these account data, some accounts remain active, even years after the initial breach. Due to a lack of account security verification technology, attackers can target users through credential stuffing attacks, where they attempt to log in using each compromised credential in order to gain access to vulnerable accounts.
[0003] While users can mitigate this hijacking risk by resetting their account passwords, in practice, discovering which accounts require attention remains a key obstacle. Consequently, several account leak alert services have been deployed that proactively search for leaked credentials to notify users of compromised accounts. Existing account leak alert services implicitly trust the service provider. They work by having the client and service provider share a username / a prefix of a hash of the username and password. The client and service provider then negotiate between the credentials to be checked and the bucket identified by the hash prefix. However, for schemes that include password information in the hash prefix, if the service provider is compromised or otherwise engages in malicious behavior, there is a risk of inferring password information from the prefix, raising concerns among users about the service provider's reliability. Furthermore, existing account leak alert services incur high computational and communication costs for large-scale leaked credential databases.
[0004] For large-scale leaked credential databases, existing account leak alert services have problems such as password information leakage, high computing and communication costs. Summary of the Invention
[0005] In view of this, the present invention provides a password leakage detection method for protecting accounts from large-scale credential stuffing attacks. By utilizing multiple hash functions to generate multiple hash prefixes of user names, the large-scale leaked credential database is divided into smaller blocks using multiple hash prefixes. This effectively protects the password security of accounts and reduces the computational and communication costs of account leakage alert services, providing better security and performance.
[0006] The present invention discloses a password leakage detection method for protecting accounts from large-scale credential stuffing attacks, comprising:
[0007] Step 1: The client selects the prefix of the hash value of the credential to be tested and its corresponding blinded value to form a request report, and sends the request report to the service provider;
[0008] Step 2: After receiving the request report, the service provider performs a modular exponential operation on the blinded value in the request report. It then uses the prefixes of all hash values in the request report to search the database for the corresponding block. It then combines the modular exponential operation result with the block to form a reply report and sends it back to the client.
[0009] Step 3: After receiving the reply report, the client performs a modular exponential operation on the result of the modular exponential operation in the reply report. If the result of the modular exponential operation is equal to the blinded value in the database establishment phase, the output of the credential to be detected is leaked; otherwise, the output is not leaked.
[0010] Furthermore, before step 1, the method further includes:
[0011] Database establishment phase: The service provider has multiple databases of leaked credentials, each of which includes a username and its corresponding password. A hash function is selected to calculate the hash value of each username in the database, as well as the blinded value of the username and its password. A matching relationship is established between the prefix of the hash value of each username and the blinded value of the username. The database is divided into multiple blocks based on the prefix of the hash value corresponding to all usernames in the database.
[0012] Furthermore, the step 1 includes:
[0013] Request generation phase: The client uses a hash function to calculate the hash value of the credential to be tested, as well as the blinded value of the concatenation of the test username and its password. It selects the prefix of the hash value of the credential to be tested and its corresponding blinded value to form a request report, and sends the request report to the service provider.
[0014] Furthermore, the service provider has a database D={(u0, v0), ..., (u m-1 , v m-1 )}, where u i and v i Represents the user name and password respectively. Each leaked credential includes a user name and its corresponding password. The client has a credential to be tested, which includes the user u to be tested. * and its corresponding password v * .
[0015] Furthermore, during the database establishment phase:
[0016] Service providers choose to operate in a limited domain Elliptic curve E:y on 2 =x 3 +ax+b parameters (p, a, b, g, n), where p is a large prime number, 4a 3 +24b2 ≠0, g is a group A generator of , the large prime number n is The service provider randomly selects a positive integer less than n as the key s;
[0017] The service provider chooses the hash functions h0,…,h α-1 ,h, calculate the hash value of each user name in database D and blinded values And select each hash value p i,j The β-bit prefix is used as an identifier u i ||v i Represents the concatenation operation of the i-th user name and password; (h(u i ||v i )) s It means that after the concatenation operation, the hash value is obtained and then the modular exponential operation is performed to obtain the blinded value, where s is the exponent;
[0018] Establishing an identity and Match between and use Divide the database D into multiple blocks where i∈{1, 2, …, m}, j∈{1, 2, …, α}, {h j : {0, 1} * →{0, 1} l |j∈{1, 2, …, α}}, is the group, l is the length of the bit string output by the hash function, h j : {0, 1} * →{0, 1} l is a bit string of arbitrary length {0, 1} * to l-length bit string {0, 1} l 's mapping.
[0019] Furthermore, the step 1 specifically includes:
[0020] The client uses hash functions h0,…,h α-1 , h calculates the user u to be detected * Hash value and blinded values and select each hash value The β-bit prefix is and send a request report to the service provider; r is the index.
[0021] Furthermore, the step 2 includes:
[0022] In the reply generation phase, after receiving the request report Q, the service provider calculates Use logo Search database D and get a block containing multiple blinded certificates And return the response report To the client.
[0023] Furthermore, the step 3 includes:
[0024] In the result export phase, after receiving the reply report R, the client calculates And for each Determine whether If so, output that its credentials have been leaked, otherwise, output that they have not been leaked.
[0025] Furthermore, the hash function used in step 1 is the same as the hash function used in the database establishment phase.
[0026] By adopting the above-mentioned technical solution, the present invention has the following advantages: To address the password information leakage risks of existing account leak alert services and the high computational and communication costs associated with large-scale leaked credential databases, the present invention designs a password leak detection method that protects accounts from large-scale credential stuffing attacks based on hash functions and a privacy set intersection protocol. This method utilizes multiple hash functions to generate multiple hash prefixes for usernames, which are then used to partition the large-scale leaked credential database into smaller buckets. The client and service provider then perform a privacy set intersection protocol between the credentials to be checked and the smaller buckets. This effectively ensures the security of account passwords and reduces the computational and communication costs of the account leak alert service, providing improved security and performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments described in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0028] Figure 1 A flowchart of a password leakage detection method for protecting accounts from large-scale credential stuffing attacks according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention will be further described with reference to the accompanying drawings and embodiments. The embodiments described are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by those skilled in the art should fall within the scope of protection of the embodiments of the present invention.
[0030] See also Figure 1 , the service provider has a database D = {(u0, v0), ..., (u m-1 , v m-1 )}, where u i and v i Represents the user name and password respectively. The client has a credential (u * , v * ) and want to check if the credentials have been compromised.
[0031] The password leak warning framework model for protecting accounts from large-scale credential stuffing attacks consists of four stages: database establishment stage, request generation stage, response generation stage, and result export stage.
[0032] In the database establishment phase, the service provider first initializes the system parameters (p, a, b, g, n) and the key s; then selects the hash function h0, ..., h α-1 ,h, calculate the hash value and blinded values And select each hash value p i,j The β-bit prefix is Finally create the logo and Match between and use Divide the database D into multiple blocks where i∈[m], j∈[α], {h j : {0, 1} * →{0, 1} l |j∈[α]},
[0033] During the request generation phase, the client uses hash functions h0,…,h α-1 , h calculates the hash value and blinded values and select each hash value The β-bit prefix is and send a request report To service providers.
[0034] In the response generation phase, after receiving the request report Q, the service provider calculates Use logo Look up database D to get a block containing multiple blinded certificates And return the response report To the client.
[0035] In the result export phase, after receiving the reply report R, the client calculates And for each Determine whether If so, output that its credentials have been leaked, otherwise, output that they have not been leaked.
[0036] More specifically, this application assumes that the service provider has a database D = {(u0, V0), ..., (u m-1 , v m-1 )}, where u i and v i Represents the user name and password respectively. The client has a credential (u * , v * ) and want to check whether the credentials have been leaked. Based on hash functions and the privacy set intersection protocol, this application's solution consists of four phases: database establishment, request generation, response generation, and result export. The details are as follows:
[0037] The first stage: database establishment stage
[0038] (1) Service providers choose to operate in a limited domain Elliptic curve E:y on 2 =x 3 +ax+b parameters (p, a, b, g, n), where p is a large prime number, 4a 3 +27b 2 ≠0, g is a group A generator of , the large prime number n is Then, the service provider randomly selects a positive integer less than n as the key s.
[0039] (2) The service provider selects the hash functions h0,…,h α-1 ,h, for each leaked credential (u i , v i ), calculate the hash value and x i =h(u i ||v i ). The service provider then calculates the blinding value Finally, let each It is p i,j The first β bits of and The service provider can divide the database D into multiple blocks where i∈[m], j∈[α], {h j : {0, 1} * →{0, 1} l |j∈[α]}, l ≥ (log n + λ), β << l, β is usually in bytes. l is the length of the bit string output by the hash function, h j : {0, 1} * → {0, 1}l is a mapping from any bit string of length {0, 1} * to a bit string of length l {0, 1} l of the mapping.
[0040] The second stage: Request generation stage
[0041] (1) For a credential (u * , v * ) that the client wants to check, the client uses hash functions h0,..., h α-1 , h, to calculate the hash value and x * = h(u * ||v * ). Then, the client selects the first β bits of each as the identifier randomly selects a positive integer r less than n, and calculates where j ∈ [α], {h j : {0, 1} * → {0, 1} l | j ∈ [α]}, l ≥ (log n + λ), β << l, β is usually in bytes.
[0042] (2) The client sends a request report to the service provider.
[0043] The third stage: Reply generation stage
[0044] (1) After receiving the request report , the service provider calculates Then, the service provider uses the identifier to look up the database D to obtain a block containing multiple blinded credentials where
[0045] (2) The service provider returns a reply report to the client.
[0046] The fourth stage: Result derivation stage
[0047] (1) After receiving the reply report , the client calculates < If so, output that its credentials have been leaked, otherwise, output that they have not been leaked.
[0049] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A password leak detection method for protecting accounts from large-scale credential stuffing attacks, characterized by: include: Step 1: The client selects the prefix of the hash value of the credential to be tested and its corresponding blinded value to form a request report, and sends the request report to the service provider; Step 2: After receiving the request report, the service provider performs a modular exponential operation on the blinded value in the request report; Use the prefix of all hash values in the request report to find the corresponding block from the database, combine the result of the modular exponential operation with the block to form a reply report and feed it back to the client; Step 3: After receiving the reply report, the client performs a modular exponential operation on the result of the modular exponential operation in the reply report. If the result of the modular exponential operation is equal to the blinded value in the database establishment phase, the client outputs that the credential to be tested has been leaked; otherwise, the client outputs that the credential has not been leaked. Before step 1, the method further includes: Database creation phase: The service provider has multiple databases of leaked credentials, each of which includes a username and its corresponding password. A hash function is selected to calculate the hash value of each username in the database, as well as the blinded concatenation of the username and its password. A matching relationship is established between the prefix of each username's hash value and the blinded concatenation value. The database is then divided into multiple blocks based on the prefix of the hash values corresponding to all usernames in the database. Service provider owns storage Database of leaked credentials ,in and Represents the user name and password respectively. Each leaked credential includes a user name and its corresponding password. The client has a credential to be tested, which includes the user to be tested. and its corresponding password ; During the database establishment phase: Service providers choose to operate in a limited domain Elliptic curve on Parameters ,in, p is a large prime number, , , g is the group A generator of , a large prime number n yes The service provider randomly selects a n A positive integer as the key s; Service provider chooses hash function , computing database The hash value of each username in and blinded values , and select each hash value of Bit prefix as identifier ; Represents the concatenation operation of the i-th username and password; It means that after the concatenation operation, the hash value is obtained and then the modular exponential operation is performed to obtain the blinded value, where s is the exponent; Establishing an identity and Match between and use The database Divided into multiple blocks ,in , , , ; For the group, is the length of the bit string output by the hash function, Any length bit string arrive Length bit string 's mapping.
2. The method according to claim 1, characterized in that The step 1 comprises: Request generation phase: The client uses a hash function to calculate the hash value of the credential to be tested and the blinded value of the concatenation of the username to be tested and its password. It selects the prefix of the hash value of the credential to be tested and its corresponding blinded value to form a request report, and sends the request report to the service provider.
3. The method according to claim 1, characterized in that The step 1 specifically includes: The client uses a hash function Calculate users to be detected Hash value and blinded values , and select each hash value of Bit prefix as , and send a request report to service providers; r is the index.
4. The method according to claim 3, characterized in that The step 2 includes: During the response generation phase, the service provider receives the request report After that, calculate , use the logo Search Database , and obtain a block containing multiple blinded certificates , and return a response report To the client.
5. The method according to claim 1, wherein The step 3 includes: During the result export phase, the client receives the response report. After that, calculate , and for each , determine whether If so, output that its credentials have been leaked, otherwise, output that they have not been leaked.
6. The method according to any one of claims 2 to 5, characterized in that: The hash function used in step 1 is the same as the hash function used in the database establishment phase.
Citation Information
Patent Citations
Method and device for determining message forwarding paths in multi-protocol label switching network
CN104283782A
Password leakage query system based on honeyword
CN116204862A