Homomorphic encryption-based account password similarity leakage detection method, system and equipment, medium and program product
By using homomorphic encryption methods in account password leakage detection, similar variants of account passwords are generated and detected, and problems of large communication volume, low computing efficiency and insufficient quantum security resistance in the prior art are solved, and efficient and secure leakage detection of similar variants of account passwords are achieved.
Patent Information
- Application Number
- CN202411948924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The existing account password leakage detection protocol has problems such as large traffic volume, low computing efficiency and insufficient quantum security resistance, and it is particularly difficult to effectively detect similar variant leakage of account passwords.
Using a method based on homomorphic encryption, similar variants of the account leaked database are generated in the offline stage and hash calculations and horizontal homomorphic packaging encoding are performed. In the online stage, users generate similar variants of the account password to be detected, and detect and calculate through homomorphic encryption, reducing the traffic volume and calculation depth, and improving response speed and security.
It realizes the traffic volume of detection requests and responses, improves the efficiency of detection and calculation, and has the ability to resist quantum computing security, and effectively detects the leakage of similar variants of account passwords.
Smart Images

Figure CN119814273A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network information security technology, and in particular to an account password similarity leakage detection method, system, device, medium and program product based on homomorphic encryption. Background Art
[0002] With the development of network information technology, people have more convenient ways to obtain information services. Every day, people use "account + password" to log in to various websites, software, mobile apps and other applications to enjoy a variety of services such as e-shopping, instant messaging, information processing, financial insurance, etc. Account passwords are very important for individuals and enterprises. Once leaked, it will lead to personal privacy leakage, property loss, reputation damage and other problems, and cause data leakage, business interruption, market obstruction and other hazards to enterprises. Account passwords are often the focus of hacker attacks and theft, and are also the objects of dark web black market transactions. Due to the variety of network attack methods and software vulnerabilities, account password leaks occur frequently. During the attack process, hackers often use social engineering methods to generate a large number of similar passwords to successfully crack user passwords. Therefore, preventing the leakage of account passwords and their similar variants has become an urgent challenge to be addressed.
[0003] In order to reduce the risk of account password leakage, users can set more complex passwords and use different passwords for different web services. Another way is to use password leakage detection technology to check whether the user's account password has been leaked. If it happens, the user will be reminded to change the password in time. At present, password detection services such as Google's Google Password Checkup and Microsoft's Password Monitor have been established.
[0004] In 2021, Microsoft designed a password monitor based on the privacy set intersection protocol, which enables the Edge browser to check whether its password is found in leaked accounts, but the encryption request matching circuit has a high computational complexity. In 2022, Huawei's Li et al. constructed a password detection protocol Pipa using homomorphic encryption, but the query size is proportional to the output length of the hash, and the query communication cost is high. These schemes cannot support the detection of similar variants of account passwords. In 2022, Pal et al. proposed a method to evaluate the strength of passwords by the similarity of the selected password to other passwords. When the overall security of the scheme is weak.
[0005] In view of this, the following technical problems of account password leakage detection need to be solved:
[0006] (1) Compress the traffic of detection requests and responses. The request size of the existing account and password leakage detection protocol is linearly related to the hash value of the account and password, which results in the need to generate multiple ciphertexts for the detection request, occupying a large amount of bandwidth. Therefore, it is necessary to reduce the traffic of requests and responses and improve the response speed.
[0007] (2) Improve the efficiency of detection calculation. The existing account password leakage detection protocol uses homomorphic encryption to calculate the detection function in a secret state. However, the multiplication depth of this function is large, and a homomorphic encryption scheme with large parameters is required, which makes the detection calculation efficiency low. Therefore, it is necessary to reduce the multiplication depth of the detection function to improve the calculation efficiency.
[0008] (3) Quantum-resistant security. At present, the development of quantum computing has exceeded expectations. The United States has established quantum-resistant cryptographic algorithm standards to deal with the threat of quantum computing attacks. It is very necessary to design an account password detection protocol that is quantum-resistant. Summary of the invention
[0009] The present invention aims to provide an account password similarity leakage detection method, system, device, medium and program product based on homomorphic encryption to solve the problems existing in the above-mentioned account password leakage detection.
[0010] The present invention provides an account password similarity leakage detection method based on homomorphic encryption, comprising:
[0011] In the offline phase, the service center Server generates similar variants of each account password in the account leakage database, and then performs hash calculations on each account password and its similar variants, and stores them in the form of hash values as the account leakage hash value database. According to the hash prefix of the user name, the account leakage hash value database is split into several sub-databases, and horizontal homomorphic packaging encoding is used to encode the data in the sub-database into plain text;
[0012] In the online stage, the user User generates a similar variant of the password of the account to be tested, performs hash calculation, horizontal homomorphic packaging encoding, and encryption operations to obtain the query ciphertext, and sends the hash prefix of the username and the query ciphertext to the service center Server; the service center searches the corresponding sub-database according to the hash prefix of the username, performs detection calculation to obtain the response ciphertext group, and sends it to the user User; the user User decrypts the response ciphertext group, then multiplies all the decrypted plaintexts together, decodes the product result, and outputs the judgment result.
[0013] In some embodiments, the offline stage specifically includes the following steps:
[0014] Step 101: User User applies for registration at the service center Server; wherein the service center Server selects an account password variant generation function f, and sends the output number α in the account password variant generation function to the user User;
[0015] Step 102: Analyze each account password (uid i , pwd i ), the service center Server calls the similar password variant function f to generate α variant passwords Get account password variant vector
[0016] Step 103: The service center Server calls the hash function to calculate v i The account password variant vector v containing α variant passwords is converted into the hash value of each element in i Change the hash value storage format Get the new database vDB;
[0017] Step 104: Use the b-bit prefix of the username hash value as the index value; Put together, the database vDB is split into 2 b Sub-database
[0018] Step 105: Perform horizontal homomorphic packaging encoding on the data in the sub-database to obtain a homomorphic packaged encoded sub-database
[0019] In some embodiments, in step 103, the service center Server uses a larger a to represent each hash value in the database vDB.
[0020] In some embodiments, the online stage specifically includes the following steps:
[0021] Step 201: User User inputs the account password (uid*, pwd*) to be tested, performs hash calculation, horizontal homomorphic packaging encoding, and encryption operations, and obtains the query ciphertext ct Query , and prefix the username's hash with μ * and query ciphertext ct Query It is sent to the service center Server as a query; the hash function used in hash calculation is the same as the hash function in the offline stage;
[0022] Step 202: The service center Server receives a query from the user Query = (μ * , ct Query ), followed by the hash prefix μ* Find the corresponding subdatabase for the index Then randomly select γ plaintexts pt in the plaintext space r, 0pt r,1 , ..., pt r,γ-1 As a random mask, according to the sub-database Query ciphertext ct Query , random mask, perform secret detection calculation, and obtain γ ciphertexts ct res,0 , ct res,1 ,...,ct res,γ-1 The response ciphertext group is sent to the user User;
[0023] Step 203: User User decrypts the γ ciphertexts to obtain the corresponding γ plaintexts pt res,0 , pt res,1 , ..., pt res,γ-1 , and then calculate the product of these γ plaintexts in the plaintext space to get pt res , decode it to get an n-dimensional vector a res , according to the n-dimensional vector a res Output the judgment result.
[0024] In some embodiments, in step 202, the response ciphertext group is calculated by a polynomial partitioning optimization method.
[0025] In some embodiments, in step 203, according to the n-dimensional vector a res Output judgment results, including:
[0026] Observe the n-dimensional vector a res If a certain number of consecutive elements in the value of the element are zero under the set conditions, it means that the user User's account password has been leaked, otherwise the account password has not been leaked.
[0027] In a second aspect, the present invention also provides an account password similarity leakage detection system based on homomorphic encryption, including a service center Server and a user User; the service center Server and the user User are used to execute the above-mentioned account password similarity leakage detection method based on homomorphic encryption.
[0028] In a third aspect, the present invention further provides an electronic device, comprising:
[0029] at least one processor; and a memory communicatively coupled to the at least one processor;
[0030] Among them, the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the account password similarity leakage detection method based on homomorphic encryption by executing the instructions stored in the memory.
[0031] In a fourth aspect, the present invention further provides a computer-readable storage medium, which is used to store instructions. When the instructions are executed, the above-mentioned account password similarity leakage detection method based on homomorphic encryption is implemented.
[0032] In a fifth aspect, the present invention also provides a computer program product, which, when called by a computer, enables the computer to execute the above-mentioned account password similarity leakage detection method based on homomorphic encryption.
[0033] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0034] (1) Low communication overhead for inquiries and responses. The present invention adopts a horizontal homomorphic packaging encoding method, which can package the user account password into a plaintext, and the detection query only contains a homomorphic ciphertext and a username hash prefix. Similarly, homomorphic packaging encoding is used on the service side, so that the number of ciphertexts in the detection calculation result is also small. Reduce the communication overhead of inquiries and responses.
[0035] (2) High efficiency of detection calculation. The present invention adopts a polynomial segmentation optimization method, which greatly reduces the homomorphic multiplication depth of detection calculation and improves the detection calculation efficiency.
[0036] (3) High security. The present invention adopts the lattice-based BFV homomorphic encryption scheme, which has anti-quantum computing security capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 The present invention is a flowchart of a method for detecting similar leakage of account and password based on homomorphic encryption in an embodiment of the present invention.
[0038] Figure 2 The present invention is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] Example
[0042] The embodiment of the present invention adopts homomorphic encryption and horizontal homomorphic packaging coding technology to propose an account password similarity leakage detection method based on homomorphic encryption, such as Figure 1 As shown,
[0043] The service center Server has an account leakage database leakedDB. User User wants to check the account password (uid * , pwd * ) is leaked. This method is divided into offline stage and online stage:
[0044] In the offline phase, the service center Server generates similar variants of the passwords of each account in the account leakage database, and then splits the account leakage database into several sub-databases by performing hash calculations on the similar variants of the passwords of each account. It then uses homomorphic packaging encoding to encode the data in the sub-databases into plain text.
[0045] In the online stage, the user User generates similar variants of the password of the account to be tested, performs hash calculation, homomorphic packaging encoding, and encryption operations to obtain the query ciphertext, and sends the hash prefix of the username and the query ciphertext to the service center Server; the service center searches the corresponding sub-database according to the hash prefix of the username, performs detection calculation to obtain the response ciphertext group, and sends it to the user User; the user User decrypts and decodes the response ciphertext group and outputs the judgment result.
[0046] 1. Symbols
[0047] This embodiment uses italic bold lowercase letters to represent vectors (eg, u, v), and uses italic bold uppercase letters to represent matrices (eg, A, B). represents the ring of integers, represents the set of natural numbers. For positive integers Let [n] denote the set {1, 2, ..., n}. For positive integers make Represents the residue class of integers modulo q.
[0048] When A is a set, x←A means randomly selecting an element x from the set A; when χ is a probability distribution, x←χ means randomly sampling an element x from the probability distribution χ; when f is a function, x←f means the output of function f.
[0049] If the positive integer N is a power of 2, then x N +1 is a 2N-order cyclotomic polynomial, then the ring is a cyclotomic polynomial ring. Any element a on the ring R can be regarded as a unique polynomial with a degree less than N and x N +1. For convenience, this embodiment uses the polynomial represents an element on the integral ring R, whose coefficient vector is (a0, a1, ..., a N-1 ). For any integer There is a business ring
[0050] 2. Description of BFV homomorphic encryption scheme
[0051] In 2012, Fan et al. published the paper "Somewhat Practical Fully Homomorphic Encryption" in eprint, transplanting the homomorphic encryption scheme designed by Zvika Brakerski based on LWE to RLWE, and proposed the famous BFV scheme. The famous SEAL and OpenFHE homomorphic encryption software implementation open source libraries have implemented the BFV scheme, which is widely used in research in statistical analysis, privacy information retrieval, and privacy set intersection. This example gives a brief description of the BFV scheme.
[0052] Params←BFV.Setup(1 λ ): Input security parameter λ. Select N, P, q and error distribution Private key distribution Make The problem solving complexity is not less than 2 λ . Select the plaintext modulus value t, let . Let the ring of circular polynomials be Q=Pq. Output common parameters
[0053] (sk, evk) ← BFV.KeyGen(Params): Outputs the common parameters Params, in the distribution Randomly sample an element s from R as the secret information. Q An element a′ is randomly selected uniformly from the distribution Randomly sample an element e′ from the top and calculate b′=-a′s+e′+Ps 2 mod Pq. Set the private key sk = (1, s) and calculate the public key evk = (b', a').
[0054] ct←BFV.Enc(sk,pt): Input plaintext pt∈R t , R q Randomly select an element c1 uniformly on Randomly sample an element e0 from Randomly sample an element r from the above, calculate c0=c1r+e0+Δ·ptmod q and output the ciphertext ct=(c0,c1).
[0055] m←BFV.Dec(sk,ct): Input ciphertext ct = (c0,c1) and decryption key sk = (1,s), calculate and output
[0056] ct Add ←BFV.Add(ct, ct′): Input two ciphertexts ct = (c0, c1) and ct′ = (c′0, c′ i ). Calculate and output ct Add =(c0+c′0mod q, c1+c′ i mod q).
[0057] ct Add ←BFV.AddPlain(ct,pt′): Input ciphertext ct = (c0, c1), plaintext pt′∈R q . Calculate and output ct AddPlain =(c0+Δ·pt'mod q, c1).
[0058] ct Mult ←BFV.Mult(ct, ct′, evk): Input two ciphertexts ct = (c0, c1) and ct′ = (c′0, c′ i ) and calculate the public key evk = (b', a'). Calculate Then calculate and output
[0059] ct Mult ←BFV.MultPlain(ct,pt′): Input ciphertext ct = (c0, c1), plaintext pt′∈R t . Calculate and output ct AddPlain =(c0·pt′mod q, c1·pt′mod q).
[0060] For convenience, this embodiment uses the symbol "+" to represent BFV.Add and BFV.AddPlain, and uses the symbol "×" to represent BFV.Mult and BFV.MultPlain. That is, if the operand in the expression is a homomorphic ciphertext, the operator is automatically overloaded to the corresponding homomorphic operation.
[0061] In many applications, SIMD technology is generally used to accelerate the performance of homomorphic operations, which mainly encodes an n-dimensional vector into a plaintext, where n is called the number of plaintext slots and its value is related to t. The functional description is as follows:
[0062] pt←BFV.BatchEncode(a): Input an n-dimensional vector a=(a0,a1,...,a n-1 )∈ , run the packing encoding algorithm to generate a plaintext pt∈R t .
[0063] a←BFV.BatchDecode(pt): Input a plaintext pt∈R t , run the packing decoding algorithm to generate a dimension vector
[0064] Put two vectors a=(a0, a1, ..., a n-1 )、b=(b0,b1,...,b n-1 ) After being packaged, encoded and encrypted, homomorphic addition is equivalent to executing (a0+b0mod t, a1+b1mod t, ..., a n-1 +b n-1 mod t), homomorphic multiplication is equivalent to executing (a0×b0mod t, a1×b1mod t, ..., a n-1 ×b n-1 mod t).
[0065] 3. The account password similarity leakage detection method based on homomorphic encryption proposed in this embodiment is as follows:
[0066] The participants of this method are the user User and the service center Server. The user User needs to check the account password (uid * , pwd * ) is leaked, the service center Server stores the account leak database leakedDB. The database stores m account passwords (uid i , pwd i ), i = 0, 1, ..., m-1. The method includes an offline phase and an online phase.
[0067] 3.1 Offline Phase
[0068] Step 101: User registration. User User applies for registration at the service center Server. The service center Server enters the security parameter λ and runs BFV.Setup(1 λ ), generate the public parameters of the BFV homomorphic encryption scheme A hash function h: {0, 1} * →{0, 1} s After receiving the parameter Params, the user runs (sk u ,evk u )←BFV.KeyGen(Params), will evk u Sent to the service center server. The service center server selects the account password variant generation function f on the service side: And send the output number α to user User.
[0069] The password variant generation function f may use the Das-R and wEdit algorithms provided by Bijeeta Pal et al. in the academic paper “Might I GetPwned: A Second Generation Compromised Credential Checking Service”.
[0070] Step 102: Generate password variants. Generate password variants for each account in the leaked account database leakedDB (uid i , pwd i ), i = 0, 1, ..., m-1, the service center Server calls the similar password variation function f to generate α variant account passwords get:
[0071]
[0072] Step 103: Database hash processing. The service center Server calls the hash function h and calculates:
[0073] u i =h(uid i )=[u i,0 ,u i,1 , ..., u i,s-1 ]∈{0,1} s
[0074] v i =h(uid i ||pwd i )=[v i,0 , v i,1, ..., v i,s-1 ]∈{0,1} s
[0075]
[0076] This will v i Change the hash value storage format Get a new database
[0077] The service center Server uses a larger a to represent each hash value in the database vDB. Then each hash value can be expressed as s a digits.
[0078]
[0079] The field of real numbers satisfies
[0080] Step 104: Split the database. Hash the username u i The b-bit prefix [u i,0 ,u i,1 , ..., u i,b-1 ]∈{0,1} b As index value The same index value Put together, the database vDB is split into 2 b Sub-database in,
[0081] Step 105: Horizontally homomorphic packaging encoding. vDB μ In each paragraph consecutive records are encoded into one plaintext, then vDB μ A total of can be coded as plaintext, namely:
[0082]
[0083] Then we get the homomorphically packed encoded sub-database
[0084] 3.2 Online stage
[0085] Step 201: Query generation. User User enters the account password (uid * , pwd * ).
[0086] (1) Hash processing. Calculate u* =h(uid * ), v*=h(uid * ||pwd * ).Pick The b-bit prefix Also use a to represent v * , that is, similar variants of the account password to be detected.
[0087] (2) Horizontally homomorphic packaging. Let Encode this into plaintext:
[0088]
[0089] (3) Generate a query. User User executes the encryption ct Query =BFV.Enc(sk,pt * ), query Query = (μ * , ct Query ) is sent to the service center Server.
[0090] Step 202: Detection calculation. The service center Server receives the query from the user Query = (μ * , ct Query ), according to the index μ * Find the corresponding sub-database make Then, in the plaintext space, randomly select γ plaintexts pt r,i , i = 0, 1, ..., γ-1, calculated by the following polynomial segmentation optimization method:
[0091]
[0092] The service center Server sends this γ ciphertext CT res =(ct res,0 , ct res,1 ,...,ct res,γ-1 ) is sent to user User.
[0093] Step 203: Decrypt the response result. The user User receives the response CT from the user service center Server res =(ct res,0 , ct res,1 ,...,ct res,γ-1 ), decrypt the γ ciphertext pt res,i =BFV.Dec(sk,ct res,i ), i = 0, 1, ..., γ-1, and calculate the product of the plaintext: Decoding gets an n-dimensional vector a res =BFV.BatchDecode(pt res ). Then observe the n-dimensional vector a res =(a res,0 , a res,1 , ..., a res,n-1 ) from 0 to Let θ = (α + 1), if there exists a non-negative integer k0, k1 such that the (k0θ + k1)th element a To (k0θ+k1+1)th a Continuous a If the vector element is zero, it means that the user User's account password (uid * , pwd * ) has been leaked, output "YES"; otherwise the account password (uid * , pwd * ) is not leaked, output "NO".
[0094] Based on the same technical concept, an embodiment of the present invention also provides an account password similarity leakage detection system based on homomorphic encryption, including a service center Server and a user User; the service center Server and the user User are used to execute the above-mentioned account password similarity leakage detection method based on homomorphic encryption. The specific execution method is referred to above and will not be repeated here.
[0095] Based on the same technical concept, an embodiment of the present invention further provides an electronic device, which can implement the account password similarity leakage detection method based on homomorphic encryption provided in the above embodiment of the present invention. In one embodiment, the electronic device can be a server, or a terminal device or other electronic device. Figure 2 As shown, the electronic device may include:
[0096] At least one processor, and a memory connected to the at least one processor. The specific connection medium between the processor and the memory is not limited in the embodiment of the present invention. Figure 2 The example in this article is that the processor and memory are connected through a bus. Figure 2 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into address bus, data bus, control bus, etc. Figure 2 In the diagram, only one thick line is used, but this does not mean that there is only one bus or only one type of bus. Alternatively, a processor can also be called a controller, and there is no limitation on the name.
[0097] In an embodiment of the present invention, the memory stores instructions that can be executed by at least one processor. By executing the instructions stored in the memory, at least one processor can execute the account password similarity leakage detection method based on homomorphic encryption discussed above. The processor can implement Figure 2 The functions of each module in the device shown.
[0098] Among them, the processor is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory and calling data stored in the memory, various functions of the device and processing data.
[0099] In an optional design, the processor may include one or more processing units, and the processor may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor. In some embodiments, the processor and the memory may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0100] The processor may be a general-purpose processor, such as a CPU, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of a method for detecting similar leakage of an account password based on homomorphic encryption disclosed in an embodiment of the present invention may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0101] As a non-volatile computer-readable storage medium, the memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. The memory is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory in the embodiment of the present invention can also be a circuit or any other device that can realize a storage function, used to store program instructions and / or data.
[0102] By designing and programming the processor, the code corresponding to the account password similarity leakage detection method based on homomorphic encryption introduced in the above embodiment can be fixed into the chip, so that the chip can perform the steps of the account password similarity leakage detection method based on homomorphic encryption in the above embodiment when running. How to design and program the processor is a technology known to those skilled in the art and will not be repeated here.
[0103] Based on the same inventive concept, an embodiment of the present invention also provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes an account password similarity leakage detection method based on homomorphic encryption discussed above.
[0104] In some optional embodiments, the present invention also provides various aspects of an account password similar leakage detection method based on homomorphic encryption, which can also be implemented in the form of a program product, which includes program code. When the program product is run on an apparatus, the program code is used to enable the control device to execute the steps of an account password similar leakage detection method based on homomorphic encryption according to various exemplary embodiments of the present invention described above in this specification.
[0105] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of a unit described above can be further divided into multiple units to be embodied. In addition, although the operation of the method of the present invention is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution.
[0106] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a server, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] Program code for performing the operations of the present invention may be written using any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user equipment, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0109] Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting similar leakage of account passwords based on homomorphic encryption, characterized in that: include: In the offline phase, the service center Server generates similar variants of each account password in the account leakage database, and then performs hash calculations on each account password and its similar variants, and stores them in the form of hash values as the account leakage hash value database. According to the hash prefix of the user name, the account leakage hash value database is split into several sub-databases, and horizontal homomorphic packaging encoding is used to encode the data in the sub-database into plain text; In the online stage, the user User generates a similar variant of the password of the account to be tested, performs hash calculation, horizontal homomorphic packaging encoding, and encryption operations to obtain the query ciphertext, and sends the hash prefix of the username and the query ciphertext to the service center Server; the service center searches the corresponding sub-database according to the hash prefix of the username, performs detection calculation to obtain the response ciphertext group, and sends it to the user User; the user User decrypts the response ciphertext group, then multiplies all the decrypted plaintexts together, decodes the product result, and outputs the judgment result.
2. According to the method for detecting similar leakage of account passwords based on homomorphic encryption according to claim 1, it is characterized in that: The offline stage specifically includes the following steps: Step 101: User User applies for registration at the service center Server; wherein the service center Server selects an account password variant generation function f, and sends the output number α of the account password variant generation function to the user User; Step 102: Analyze each account password (uid i ,pwd i ), the service center Server calls the similar password variation function f to generate α variant passwords Get account password variant vector Step 103: The service center Server calls the hash function to calculate the account password variant vector v i The account password variant vector v containing α variant passwords is converted into the hash value of each element in i Change the hash value storage format Get the new database vDB; Step 104: Use the b-bit prefix of the username hash value as the index value; Put together, the database vDB is split into 2 b Sub-database Step 105: Perform horizontal homomorphic packaging encoding on the data in the sub-database to obtain a homomorphic packaged encoded sub-database 3. According to the method for detecting similar leakage of account passwords based on homomorphic encryption according to claim 2, it is characterized in that: In step 103, the service center Server uses a larger a to represent each hash value in the database vDB.
4. According to claim 2, the method for detecting similar leakage of account passwords based on homomorphic encryption is characterized in that: The online stage specifically includes the following steps: Step 201: User User enters the account password (uid * ,pwd * ), perform hash calculation, horizontal homomorphic packaging encoding, and encryption operations to obtain the query ciphertext ct Query , and prefix the username's hash with μ * and query ciphertext ct Query It is sent to the service center Server as a query; the hash function used in performing hash calculation is the same as the hash function in the offline stage; Step 202: The service center Server receives a query from the user Query = (μ * ,ct Query ), followed by the hash prefix μ * Find the corresponding subdatabase for the index Then randomly select γ plaintexts pt in the plaintext space r,0 pt r,1 ,…,pt r,γ-1 As a random mask, according to the sub-database Query ciphertext ct Query , random mask, perform secret detection calculation, and obtain γ ciphertexts ct res,0 ,ct res,1 ,…,ct res,γ-1 The response ciphertext group is sent to the user User; Step 203: User User decrypts the γ ciphertexts to obtain the corresponding γ plaintexts pt res,0 ,pt res,1 ,…,pt res,γ-1 , and then calculate the product of these γ plaintexts in the plaintext space to get py res , decode it to get an n-dimensional vector a res , according to the n-dimensional vector a res Output the judgment result.
5. According to the method for detecting similar leakage of account passwords based on homomorphic encryption according to claim 4, it is characterized in that: In step 202, a response ciphertext group is calculated by a polynomial segmentation optimization method.
6. The method for detecting similar leakage of account passwords based on homomorphic encryption according to claim 4 is characterized in that: In step 203, according to the n-dimensional vector a res Output judgment results, including: Observe the n-dimensional vector a res =(a res,0 ,a res,1 ,…,a res,n-1 ), if a certain number of consecutive elements in the set condition are zero, it means that the user User's account password has been leaked, otherwise the account password has not been leaked.
7. An account password similarity leakage detection system based on homomorphic encryption, characterized in that: It includes a service center Server and a user User; the service center Server and the user User are used to execute the account password similarity leakage detection method based on homomorphic encryption as described in any one of claims 1-6.
8. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; Among them, the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the account password similarity leakage detection method based on homomorphic encryption as described in any one of claims 1-6 by executing the instructions stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store instructions. When the instructions are executed, the account password similarity leakage detection method based on homomorphic encryption as described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the computer program product is called by a computer, the computer executes the account password similarity leakage detection method based on homomorphic encryption as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for authentication for resisting secrete data disclosure and key exchange based on passwords
CN101626364A
Document similarity calculation method facing cloud storage based on fully homomorphic password technology
CN104967693A
Password authentication method for preventing password certificate from being leaked
CN113949584A
Password security acquisition method and device based on differential privacy and homomorphic encryption, and storage medium
CN114866256A
Privacy information retrieval protocol making method, storage medium and device
CN115378573A
Cited By
Password leakage detection method and system based on privacy information retrieval
CN120934901A
A password leakage detection method and system based on privacy information retrieval
CN120934901B