A password leakage detection method and system based on privacy information retrieval
By integrating fully homomorphic encryption and unintentional key-value storage technology into the password leakage detection system, the problems of inefficiency and insufficient security caused by the imbalance of data volume between the client and the server are solved, and efficient and secure password leakage detection is achieved.
Patent Information
- Application Number
- CN202511438774.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-10
AI Technical Summary
Existing password leakage detection systems are inefficient and have high communication overhead in scenarios with unbalanced data volumes between clients and servers. Furthermore, traditional privacy information retrieval technologies only protect client data security without considering server security, leading to an increase in the secondary risk of password leakage.
By employing Unintentional Key-Value Store (OKVS) based on fully homomorphic encryption and privacy information retrieval technology, the system preprocesses, bins, and cleans the server database, uses the OKVS data structure for encoding and decoding, and employs fully homomorphic encryption for data interaction, thereby achieving efficient password leakage detection.
It improves the efficiency of password leakage detection, reduces the number of interaction rounds, enhances the system's security and adaptability, and protects the data security of both the client and the server.
Smart Images

Figure CN120934901B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of password leakage detection technology, specifically relating to a password leakage detection method and system based on privacy information retrieval. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Passwords are playing an increasingly important role in daily life, serving as the most widely used authentication mechanism. They function crucially in everything from unlocking phone screens and powering on personal computers to protecting confidential information, from personal accounts to institutional data. Attackers prioritize obtaining user credentials to gain unauthorized access to sensitive data. To manage numerous accounts, users often choose weak passwords that are easy to remember or use the same password across multiple websites. This user insecurity, coupled with websites' failure to promptly address database breaches, provides attackers with ample opportunities for credential stuffing attacks and other offensive maneuvers. A viable solution to address this widespread threat is password leak detection. This system proactively collects leaked data and allows users to check if their passwords have been compromised.
[0004] In the practical deployment of password leakage detection systems, researchers both domestically and internationally face numerous challenges. First, secondary leakage of a leaked database is a significant problem. Multiple leaks make it easier for attackers to quickly acquire large amounts of data, enabling more threatening attacks. Second, most existing password leakage detection systems are based on privacy set intersection techniques. However, the difference in data size between the client and server is a significant issue in password leakage detection. This imbalance exposes the shortcomings of privacy set intersection in this scenario: its communication overhead is typically positively correlated with the server's dataset size, leading to low efficiency in password leakage detection services based on privacy set intersection. Third, while keyword-based privacy information retrieval techniques are naturally suited for password leakage detection, this approach generally requires a large number of interaction rounds. Index-based privacy information retrieval systems incur significant interaction and computational overhead during index location. Finally, traditional privacy information retrieval techniques only protect the client's data security, neglecting the simultaneous security of both the client and server, which also poses a challenge to secondary password leakage. Summary of the Invention
[0005] This invention proposes a password leakage detection method and system based on privacy information retrieval. This invention can improve the efficiency of password leakage detection by addressing the problems of low efficiency, insufficient security, and limited integration effects in existing password leakage detection methods.
[0006] According to some embodiments, the present invention adopts the following technical solution:
[0007] A password leakage detection method based on privacy information retrieval, executed from the client, includes the following steps:
[0008] To perform password leakage detection, obtain username and password pairs, encode them, and interact with the server to obtain the unintentional key-value storage data structure stored on the server. Use the unintentional key-value storage data structure to decode the encoded username and password pairs to obtain the specific location index of the data bucket where the username and password pairs are located.
[0009] By using the obtained specific location index to perform privacy information retrieval with the server, the dataset containing the username and password pairs to be detected is obtained.
[0010] The system searches the obtained dataset for a matching encoded value to be detected for the username and password pair. If a match is found, it indicates that the username and password pair has been leaked; otherwise, it indicates that no leaked information has been detected in the database.
[0011] As an alternative implementation, before obtaining the unintentional key-value storage data structure stored on the server, the server preprocesses the obtained publicly disclosed password leakage database, and performs unintentional key-value storage in buckets on the preprocessed database to obtain the unintentional key-value storage data structure for each bucket.
[0012] As a further implementation, the server preprocesses the obtained publicly available password leak database by: protecting the publicly available password leak database from secondary leakage, cleaning unusable data, deduplicating duplicate data, and storing the following encoded hash function value of the username and password pairs:
[0013]
[0014] in Indicates username. Indicates the password. It is a secure hash algorithm that takes a bit string of arbitrary length as input and outputs a 256-bit bit string.
[0015] As a further implementation, the process of unintentionally storing bucketed key-value pairs in the preprocessed database includes: bucketing the entire database, and storing the corresponding key-value pairs... The bucket identifier represents the bucket whose length is determined by the number of bits before its value is given. In, that is: ;
[0016] in Indicates the length of the identifier. express The former Bit;
[0017] Each bucket is a two-dimensional data structure with a variable number of rows and a fixed number of columns. Randomly generate stored values Number of existing columns For each bucket, all its stored values and their column numbers are used as key-value pairs. By performing unintentional key-value storage, the corresponding data structure can be obtained. .
[0018] As a further implementation, all its stored values and their column numbers are used as key-value pairs. The process of performing unintentional key-value storage includes: selecting three hash functions. , Each key is assigned a hash function. Mapped to Generate a Bit position vector function The key is 1 at the position mapped by the three hash functions and 0 at the other positions. The isolated keys are identified and pushed onto the stack in sequence.
[0019] Choose one to generate based on input The random vector function of bit random vectors constructs a vector for each key-value pair. The constructed matrix is as follows:
[0020] ;
[0021] in Indicates the first One key, Indicates the first One value, i =1, 2, ..., n;
[0022] Construct a system of equations in the domain Solve above Make ;
[0023] in, It is a length of The matrix, take its first... Bits form a vector ,back Bits form a vector If the solution fails, modify the parameters. and Repeatedly construct the matrix and repeatedly solve the system of equations;
[0024] To handle isolated keys, pop isolated keys from the top of the stack one by one, and then assign values to the vector. Filling for undefined positions, assuming If this is the exclusive position matched by the isolated key, then:
[0025] ;
[0026] in Representing vectors The One location, This represents the dot product of vectors, and finally the vectors are combined. sum vector Unassigned positions are filled with fields. Random numbers in the array.
[0027] As an alternative implementation, the process of decoding the encoded username and password pair using an inadvertent key-value storage data structure includes: providing the username and password pair when performing password leakage service detection. The stored hash function value is obtained by calculating the encoded hash function. By the bit length of the identifier and Determine the bucket number where the stored value is located. The above information is interacted with the server to obtain the corresponding unintentional key-value storage data structure, and then the decoding algorithm of the unintentional key-value storage is used to obtain... Number of existing columns .
[0028] As an alternative implementation, the process of retrieving privacy information between the server and the obtained specific location index includes: the server performing fully homomorphic encryption batch encoding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure, and encoding the one-dimensional structure to obtain a two-dimensional data structure.
[0029] The client maps the obtained index to the row and column indexes of the server's two-dimensional data structure, and forms a fully homomorphic encrypted query ciphertext based on the row and column indexes, which is then sent to the server.
[0030] The server receives the fully homomorphic encrypted query ciphertext, performs a homomorphic operation with the stored two-dimensional data structure to obtain the encrypted result of the retrieved dataset, and sends the result to the client.
[0031] The client receives the encrypted dataset and then decrypts it.
[0032] As a further implementation, the server performs fully homomorphic encryption batch encoding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure. The process of encoding the one-dimensional structure to obtain the two-dimensional data structure includes:
[0033] The server performs fully homomorphic encryption batch encoding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure. Each column of the two-dimensional bucket data structure stores... 256 bits Break it down into Each 64-bit data point is processed using batch processing technology, dividing each column... Encoding each piece of data into a fully homomorphic encrypted plaintext transforms a two-dimensional data structure into a single row. The column has a one-dimensional structure, which is then encoded to obtain a two-dimensional data structure. The structure is encoded according to the line-major order principle. Two-dimensional data structure .
[0034] As a further implementation, the process of the client mapping the obtained index to the row and column indexes of the server's two-dimensional data structure, and forming a fully homomorphic encrypted query ciphertext based on the row and column indexes includes:
[0035] The client obtains the index The row and column indexes corresponding to the two-dimensional data structure of the server , ;
[0036] Create a ciphertext query vector based on the row and column indexes, and then use the row indexes... Forming line query ciphertext ,for ,
[0037] ;
[0038] Based on column index Forming a query ciphertext ,for , ;
[0039] in, Indicates to Perform fully homomorphic encryption and query the ciphertext. Send to the server.
[0040] As a further implementation, the process of the server receiving the fully homomorphically encrypted query ciphertext and performing homomorphic operations with the stored two-dimensional data structure includes:
[0041] Server resolution Obtain the encrypted query text Query ciphertext ;
[0042] Data Structures Matrix multiplication yields :
[0043]
[0044] This includes scalar multiplication ciphertext with fully homomorphic encryption and ciphertext addition;
[0045] Data Structures and The result of matrix multiplication Treat it as a vector and combine it with Perform a vector dot product:
[0046] ;
[0047] This includes fully homomorphic encryption of ciphertext multiplication and ciphertext addition. Send to the client.
[0048] A password leakage detection system based on privacy information retrieval includes a server and a client, wherein:
[0049] The server is used to preprocess the obtained publicly disclosed password database, and to perform unintentional key-value storage in buckets on the preprocessed database to obtain the unintentional key-value storage data structure for each bucket.
[0050] The client is used to perform password leakage detection, obtain username and password pairs, encode them, and interact with the server to obtain the unintentional key-value storage data structure stored on the server. It then uses the unintentional key-value storage data structure to decode the encoded username and password pairs and obtain the specific location index of the data bucket where the username and password pairs are located.
[0051] By using the obtained specific location index to perform privacy information retrieval with the server, the dataset containing the username and password pairs to be detected is obtained.
[0052] The system searches the obtained dataset for a matching encoded value to be detected for the username and password pair. If a match is found, it indicates that the username and password pair has been leaked; otherwise, it indicates that no leaked information has been detected in the database.
[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0054] This invention provides an index-based privacy information retrieval technology based on fully homomorphic encryption to detect password leaks. It can maintain high efficiency in scenarios where the data volume on the client and server is unbalanced, and does not generate a large number of interaction rounds, thus improving the efficiency of password leak detection.
[0055] This invention uses an unintentional key-value storage technique during the process of the client obtaining the index from the server. It does not require protection of the temporary key, and the generated data structure can be made public without causing additional security problems, thus improving the security of password leakage detection.
[0056] This invention integrates two emerging technologies—unintentional key-value storage and privacy information retrieval—into a password leakage detection system. Different unintentional key-value storage frameworks and privacy information retrieval frameworks can be used for different database types and query requirements, enhancing the system's adaptability to different environments.
[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0058] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0059] Figure 1 This is a schematic diagram of a password leakage detection process based on privacy information retrieval, according to one embodiment.
[0060] Figure 2 This is a data storage bucketing diagram of one embodiment;
[0061] Figure 3 An example diagram of a random number generator according to one embodiment;
[0062] Figure 4 This is a database encoding diagram of one embodiment;
[0063] Figure 5 An example of an unintentional key-value storage encoding / decoding diagram;
[0064] Figure 6 This is a diagram illustrating the construction of encrypted data for a privacy information query, as shown in one embodiment.
[0065] Figure 7 This is a diagram of homomorphic operations in one embodiment;
[0066] Figure 8 This is a schematic diagram of bit matching in one embodiment. Detailed Implementation
[0067] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0068] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0069] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0070] Where there is no conflict, the embodiments and features described in this application may be combined with each other.
[0071] Example 1
[0072] As described in the background section, existing privacy information retrieval methods have certain problems: most existing technologies are based on privacy set intersection schemes, which are difficult to efficiently handle scenarios where the amount of data between the client and the server is unbalanced in password leakage detection, resulting in low efficiency. Keyword-based privacy information retrieval schemes lead to a large number of interaction rounds, resulting in low efficiency.
[0073] Existing index-based privacy information retrieval technologies use unintentional pseudo-random functions to generate temporary keys during the index acquisition process. Protecting these temporary keys introduces additional security challenges and computational overhead, resulting in reduced security and lower efficiency.
[0074] Existing technologies that only integrate the privacy information retrieval module into password leakage detection services are difficult to adapt to complex and ever-changing scenarios.
[0075] To address the aforementioned issues, this embodiment provides a password leakage detection method based on privacy information retrieval, such as... Figure 1 As shown, it includes the following steps:
[0076] Step S1: The server preprocesses the collected publicly available password leak database by cleaning, deduplication, and encoding to obtain a preprocessed database. The entire database is then divided into buckets using an Oblivious key-value store (OKVS) to obtain the OKVS data structure for each bucket.
[0077] Step S2: The client performs password leakage detection, provides a username and password pair, encodes it, and obtains the corresponding OKVS data structure through interaction with the server. The client then uses the OKVS data structure to decode the encoded username and password pair to obtain the specific location index of the data bucket where the username and password pair exists.
[0078] Step S3: The client uses the obtained index to perform privacy information retrieval with the server to obtain the existing dataset containing the username and password pairs to be detected.
[0079] Step S4: The client searches the obtained dataset for an encoded value that matches the encoded value of the username and password pair to be detected. If a match is found, the client prompts the user that the username and password pair has been leaked; otherwise, the client prompts that no leak has been detected in the database.
[0080] In step S1 of this embodiment, as follows Figure 2 As shown, while protecting the publicly disclosed password database from secondary leakage, unusable data is cleaned, duplicate data is deduplicated, and the following encoded hash function value of the username and password pairs is stored:
[0081] ;
[0082] in Indicates username. Indicates the password.
[0083] In step S1 of this embodiment, the entire database is bucketed, and the corresponding stored values are... The bucket identifier represents the bucket whose length is determined by the number of bits before its value is given. middle:
[0084] ;
[0085] in Indicates the length of the identifier. express The former Bit.
[0086] Each bucket is a two-dimensional data structure with a variable number of rows and a fixed number of columns. Stored value Number of existing columns Randomly generated by a random number generator:
[0087] Set parameters It is two satisfactions prime numbers, defined Modulus The set of quadratic residues, seeds yes For any element, ,definition:
[0088] ;
[0089] definition:
[0090] ;
[0091] Where mod represents the modulo operation. For the generated intermediate auxiliary variables, For the corresponding generated number Bit.
[0092] function Used to generate random numbers, parameters Not transmitting means only generating the corresponding number of bits. The random number, where Indicates the bit length used to generate random numbers. This represents the maximum value of the generated random number.
[0093] like Figure 3 As shown, a specific example of random number generation is given, in which... The first 5 bits obtained are: 11001.
[0094] For each bucket, store all its values and their column numbers as key-value pairs. Perform OKVS to obtain the corresponding data structure .
[0095] key-value pairs Perform OKVS to obtain the corresponding data structure The process includes the following steps: The server selects three hash functions. , each key Mapped to Generate a Bit position vector function The key is 1 at the position mapped by the three hash functions, and 0 at the other positions. Isolated keys are identified and pushed onto the stack sequentially. An isolated key is a key that is the only key mapped to a position by a given hash function.
[0096] The server selects a generator based on the input. Random vector function of bit random vector Construct a vector for each key-value pair .
[0097] The constructed matrix is as follows:
[0098] ;
[0099] in Indicates the first One key, Indicates the first Values.
[0100] The server construction equations are as follows, in the domain Solve above Make:
[0101] ;
[0102] in It is a length of The matrix, take its first... Bits form a vector ,back Bits form a vector If the solution fails, modify the parameters. and Repeatedly construct the matrix and repeatedly solve the system of equations.
[0103] The server processes orphaned keys by popping them from the top of the stack one by one and assigning values to them. Filling for undefined positions, assuming If this is the exclusive position matched by the isolated key, then:
[0104] ;
[0105] in Representing vectors The One location, This represents the vector dot product. Finally, ... and Unassigned positions are filled with fields. Random numbers in the array.
[0106] In step S2 of this embodiment, when the client performs password leakage detection, it provides a username and password pair. The stored hash function value is obtained by calculating the encoded hash function. By the bit length of the identifier and Determine the bucket number where the stored value is located. This information is exchanged with the server to obtain the corresponding OKVS data structure, which is then used to obtain the OKVS decoding algorithm. Number of existing columns .
[0107] The decoding algorithm is as follows:
[0108]
[0109] In step S3 of this embodiment, the process of the client using the obtained index to retrieve privacy information from the server includes the following steps:
[0110] Step S3-1: The server performs fully homomorphic encryption (Brakerski-Fan-Vercauteren, BFV) batch encoding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure. This one-dimensional structure is then encoded to obtain a two-dimensional data structure, such as... Figure 4 As shown.
[0111] Step S3-2: The client maps the obtained index to the row and column indexes of the server's two-dimensional data structure, forms the BFV query ciphertext based on the row and column indexes, and sends it to the server.
[0112] Step S3-3: The server receives the BFV query ciphertext, performs a homomorphic operation with the stored two-dimensional data structure to obtain the encrypted result of the retrieved dataset, and sends the result to the client.
[0113] Step S3-4: The client receives the encrypted dataset and decrypts it.
[0114] Furthermore, in step S3-1, the server performs BFV batch encoding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure. Each column of the two-dimensional bucket data structure stores... 256 bits Break it down into Each 64-bit data point is processed using batch processing technology, dividing each column... Encoding each data point into a BFV plaintext transforms a two-dimensional data structure into a single row. The column has a one-dimensional structure, which is then encoded to obtain a two-dimensional data structure. The structure is encoded according to the line-major order principle. Two-dimensional data structure .
[0115] In step S3-2, the client processes the obtained index. Corresponding to row and column indexes in the server's two-dimensional data structure , ;
[0116] A ciphertext query vector is formed based on the row and column indexes, such as... Figure 6 As shown, based on the row index Forming a ciphertext for line queries, for ,
[0117] ;
[0118] Based on column index Forming a column query ciphertext, for , ;
[0119] in Indicates to Perform BFV encryption. Retrieve ciphertext. Send to the server.
[0120] In step S3-3, the server receives the BFV query ciphertext and performs a homomorphic operation with the stored two-dimensional data structure, such as... Figure 7 As shown, it includes the following steps:
[0121] Analysis get .
[0122] Data Structures Matrix multiplication yields :
[0123] ;
[0124] This includes scalar multiplication ciphertext and ciphertext addition in BFV.
[0125] Data Structures and The result of matrix multiplication Treat it as a vector and combine it with Perform a vector dot product:
[0126] ;
[0127] This includes BFV's ciphertext multiplication and ciphertext addition. Send to the client. In BFV homomorphic operations: ciphertext addition means that two ciphertexts are input... and These are respectively for polynomials and Encryption, output a ciphertext Indicates to Encryption. Ciphertext multiplication refers to the process of inputting two ciphertexts... and These are respectively for polynomials and Encryption, output a ciphertext Indicates to Encryption.
[0128] In step S4, the client receives After decryption, we obtain The encoded stored value is determined based on the username and password to be detected. Perform matching, such as Figure 8 As shown. Starting with the first bit, each adjacent 256 bits are divided, and... If the comparison is complete and the username and password are completely identical, a message will be given indicating that the username and password have been leaked in this database, and the user will be prompted to change the username and password immediately. If no complete matching 256 bits are found, a message will be given indicating that the username and password have not been leaked.
[0129] Example 2
[0130] A password leakage detection system based on privacy information retrieval includes a server and a client, wherein:
[0131] The server is used to preprocess the obtained publicly disclosed password database, and to perform unintentional key-value storage in buckets on the preprocessed database to obtain the unintentional key-value storage data structure for each bucket.
[0132] The client is used to perform password leakage detection, obtain username and password pairs, encode them, and interact with the server to obtain the unintentional key-value storage data structure stored on the server. It then uses the unintentional key-value storage data structure to decode the encoded username and password pairs and obtain the specific location index of the data bucket where the username and password pairs are located.
[0133] By using the obtained specific location index to perform privacy information retrieval with the server, the dataset containing the username and password pairs to be detected is obtained.
[0134] The system searches the obtained dataset for a matching encoded value to be detected for the username and password pair. If a match is found, it indicates that the username and password pair has been leaked; otherwise, it indicates that no leaked information has been detected in the database.
[0135] This embodiment also demonstrates this through experimental data. The experimental dataset contains 1 million usernames and passwords. The data was deduplicated, organized, and cleaned. Merging the record "Bob@gmail.com" with the password "1L0veu4ever" and the record "bob1@yahoo.com" with the password "L0veu4ever" into "bob1L0veu4ever" would cause a merge conflict. This conflict was reduced by adding fixed padding.
[0136] The method was implemented. This embodiment uses an Intel 64 Family 6 Model 170 Stepping 4 Genuine Intel 1400 MHz processor, without employing any Graphics Processing Unit (GPU) acceleration. Various cryptographic components, including hash functions and fully homomorphic encryption, are implemented using existing open-source libraries.
[0137] The server-side data preprocessing stage takes 40 minutes, while the entire interaction between the client and server takes less than 1 second.
[0138] OKVS constants include: 100 columns, and the length of the random vector. , The number field is chosen to be a finite field modulo 4294967291.
[0139] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of one or more computer-usable storage media (including, but not limited to, disk storage, etc.) containing computer-usable program code. CD - ROM It takes the form of a computer program product implemented on (such as optical memory, etc.).
[0140] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0143] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art without creative effort within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A password leakage detection method based on privacy information retrieval, characterized by, The method comprises the following steps: The password leakage service detection is performed to obtain a username and password pair, the username and password pair is encoded, and the server is interacted with to obtain an unintentional key-value storage data structure stored by the server, the unintentional key-value storage data structure is used to decode the encoded username and password pair to obtain a specific location index of a data bucket in which the username and password pair exists; The specific location index is used to perform privacy information retrieval between the server to obtain a data set in which the username and password pair to be detected exists; The process of performing privacy information retrieval between the server by using the specific location index comprises the following steps: The server performs full homomorphic encryption batch coding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure, and performs coding on the one-dimensional structure to obtain a two-dimensional data structure; The client corresponds the obtained index to a row and column index of the two-dimensional data structure of the server, forms full homomorphic encryption query ciphertext according to the row and column index, and sends the full homomorphic encryption query ciphertext to the server; The server receives the full homomorphic encryption query ciphertext, performs homomorphic operation on the stored two-dimensional data structure, obtains an encryption result of the searched data set, and sends the encryption result to the client; The client receives the encryption result of the data set, and decrypts the encrypted data set; The client obtains the index The row and column indices corresponding to the two-dimensional data structure of the server , ; The ciphertext query vector is formed according to the row index The row query ciphertext is formed , for , ; According to column index Forming column query ciphertext , for , ; wherein, represents a homomorphic encryption of to the server; and sending to the server; The process of forming full homomorphic encryption query ciphertext by the client according to the row and column index of the two-dimensional data structure of the server comprises the following steps:
2. The password leakage detection method based on privacy information retrieval as described in claim 1, characterized in that, In the obtained data set, it is searched whether there is an encoded value matching the encoded value of the username and password pair to be detected, if there is, information that the username and password pair has been leaked is prompted, otherwise information that no leakage is detected in the owned database is prompted.
3. The password leakage detection method based on privacy information retrieval as described in claim 2, characterized in that, Before the process of obtaining the unintentional key-value storage data structure stored by the server, the server performs preprocessing on the obtained public password leakage database, and performs unintentional key-value storage on the bucketed database after preprocessing to obtain an unintentional key-value storage data structure of each bucket. wherein denotes a username, denotes a password, is a secure hash algorithm with an input of an arbitrary length bit string and an output of a 256-bit bit string.
4. The password leakage detection method based on privacy information retrieval as described in claim 2, characterized in that, The process of bucketizing the pre-processed database includes: taking measures of bucketizing the whole database, and the corresponding storage value The bucket represented by the bucket identifier determined by the value prefix identifier length bit bit In other words: ; wherein represents the identifier length, represents the first bit; Each bucket is a two-dimensional data structure with an indefinite number of rows and a fixed number of columns , randomly generate storage values The number of columns present For each bucket, all the storage values it has and the number of columns it is in as key-value pairs Unintentional key-value storage is performed to obtain the corresponding data structure .
5. The password leakage detection method based on privacy information retrieval as described in claim 4, characterized in that, Use all its stored values and their column numbers as key-value pairs. The process of performing unintentional key-value storage includes: selecting three hash functions. , Each key is assigned a hash function. Mapped to Generate a Bit position vector function The key is 1 at the position mapped by the three hash functions and 0 at the other positions. The isolated keys are identified and pushed onto the stack in sequence. Selecting a random vector function of a random vector of bits generated from an input A random vector function of a random vector of bits, constructing a vector for each key-value pair , constructing a matrix as follows: ; wherein represents the key, represents the value, i = 1, 2,..., n; Constructing a system of equations, in a field Solve for So that ; Wherein, is a matrix with length , taking the first bits to form a vector , and the last bits to form a vector , and if the solution fails, modifying the parameters and , repeatedly constructing the matrix and repeatedly solving the equation set; To handle isolated keys, pop isolated keys from the top of the stack one by one, and then assign values to the vector. Filling for undefined positions, assuming If this is the exclusive position matched by the isolated key, then: ; wherein denotes the vector denotes the first position of the vector denotes the vector inner product, and finally the unassigned positions in the vector and the vector are filled with random numbers from the field .
6. The method of claim 1, wherein the method is characterized by, The process of decoding encoded username and password pairs using an unintentional key-value storage data structure includes: when performing password leakage service detection, providing username and password pairs... The stored hash function value is obtained by calculating the encoded hash function. By the bit length of the identifier and Determine the bucket number where the stored value is located. The above information is interacted with the server to obtain the corresponding unintentional key-value storage data structure, and then the decoding algorithm of the unintentional key-value storage is used to obtain... Number of existing columns .
7. The method of claim 1, wherein the method is characterized by, The process of preprocessing the obtained public password leakage database by the server comprises the following steps: The server performs full homomorphic encryption batch processing coding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure, each column of the two-dimensional bucket data structure stores 256-bit , which is split into 64-bit data, and each column of data is coded into a full homomorphic encryption plaintext by using a batch processing technique, so that the two-dimensional data structure becomes a one-dimensional structure with only one row column, the one-dimensional structure is coded to obtain a two-dimensional data structure, and the structure of is coded into a two-dimensional data structure of according to the row-first principle .
8. The method of claim 1, wherein the method is characterized by, The process of performing full homomorphic encryption batch coding on the obtained two-dimensional bucket data structure by the server to obtain a one-dimensional structure, and performing coding on the one-dimensional structure to obtain a two-dimensional data structure comprises the following steps: Server parses Obtains row query ciphertext , column query ciphertext ; Data structures are created Matrix multiplication is performed to obtain : The process of receiving the full homomorphic encryption query ciphertext by the server and performing homomorphic operation on the stored two-dimensional data structure comprises the following steps: Data structure with the result of matrix multiplication treat it as a vector and take its inner product with the vector ; Among them include the homomorphic encryption of ciphertext multiplication, ciphertext addition, will Sent to the client.
9. A password leakage detection system based on privacy information retrieval, characterized by, The process of receiving the full homomorphic encryption query ciphertext by the server and performing homomorphic operation on the stored two-dimensional data structure comprises the following steps: The process of receiving the full homomorphic encryption query ciphertext by the server and performing homomorphic operation on the stored two-dimensional data structure comprises the following steps: The process of receiving the full homomorphic encryption query ciphertext by the server and performing homomorphic operation on the stored two-dimensional data structure comprises the following steps: The process of receiving the full homomorphic encryption query ciphertext by the server and performing homomorphic operation on the stored two-dimensional data structure comprises the following steps: The client is used for password leakage service detection, obtaining a username and password pair, encoding, and interacting with the server to obtain an unintentional key-value storage data structure stored by the server, decoding the encoded username and password pair by using the unintentional key-value storage data structure, and obtaining a specific location index of a data bucket in which the username and password pair exists; Privacy information retrieval between the obtained specific location index and the server is performed to obtain a data set in which the username and password pair to be detected exists; The process of privacy information retrieval between the obtained specific location index and the server includes: the server performs full-homomorphic encryption batch coding on the obtained two-dimensional bucket data structure to obtain a one-dimensional structure, and performs coding on the one-dimensional structure to obtain a two-dimensional data structure; The client corresponds the obtained index to row and column indexes of the two-dimensional data structure of the server, forms full-homomorphic encryption query ciphertext according to the row and column indexes, and sends the full-homomorphic encryption query ciphertext to the server; The server receives the full-homomorphic encryption query ciphertext, performs homomorphic operation on the stored two-dimensional data structure, obtains an encryption result of the searched data set, and sends the encryption result to the client; The client receives the encryption result of the data set, and decrypts the encrypted data set; The process of the client corresponding the obtained index to row and column indexes of the two-dimensional data structure of the server and forming full-homomorphic encryption query ciphertext according to the row and column indexes includes: The client obtains the index The row and column indices corresponding to the two-dimensional data structure of the server , ; The ciphertext query vector is formed according to the row index The row query ciphertext is formed , for , ; According to column index Forming column query ciphertext , for , ; wherein, represents a homomorphic encryption of to a server; and sending the query ciphertext searching whether there is an encoded value matching the encoded value of the username and password pair to be detected in the obtained data set, if there is, prompting information that the username and password pair has been leaked, and otherwise, prompting information that no leakage is detected in the owned database.
Citation Information
Patent Citations
Homomorphic encryption-based account password similarity leakage detection method, system and equipment, medium and program product
CN119814273A