Account password similarity leakage detection method, system, equipment, medium and program product based on homomorphic encryption
Through homomorphic encryption and horizontal homomorphic packaging coding technology, the problems of large communication volume and low computing efficiency in account and password leakage detection are solved, and efficient and quantum-resistant account and password similarity leakage detection is achieved.
Patent Information
- Application Number
- CN202411948924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing account and password leakage detection protocols have problems such as large communication volume, low computational efficiency, and insufficient quantum security, and are unable to effectively detect the leakage of similar variants of account and passwords.
A method based on homomorphic encryption is used. In the offline stage, similar variants of the account leakage database are generated and hash calculations are performed. The database is split into sub-databases and horizontally homomorphically packaged and encoded. In the online stage, users generate query ciphertexts and perform detection calculations. The polynomial segmentation optimization method is combined to determine whether the account password has been leaked.
It reduces the detection communication overhead and computational complexity, improves detection efficiency, and has the security of resisting quantum computing, realizing efficient account password similarity leakage detection.
Smart Images

Figure CN119814273B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network information security technology, and in particular to a method, system, device, medium and program product for detecting similar leakage of account numbers and passwords based on homomorphic encryption. Background Art
[0002] With the development of network information technology, people have more convenient ways to access information services. Every day, people use "accounts and passwords" to log in to websites, software, mobile apps, and other applications, enjoying a wide range of services, including e-shopping, instant messaging, information processing, and financial insurance. Accounts and passwords are crucial for both individuals and businesses. Leakage of these passwords can lead to privacy breaches, financial loss, and reputational damage, while businesses can suffer data breaches, business interruptions, and market disruptions. Accounts and passwords are often targeted by hackers and traded on the dark web. Due to diverse cyberattack methods and software vulnerabilities, account and password leaks are frequent. During attacks, hackers often employ social engineering techniques to generate large numbers of similar passwords in order to successfully crack user passwords. Therefore, preventing the leakage of account and passwords, including their variants, has become a pressing challenge.
[0003] To reduce the risk of password leaks, users can set complex passwords and use different passwords for different web services. Another approach is to use password leak detection technology to check whether a user's account password has been leaked. If so, the user is promptly prompted to change their password. Currently, 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, enabling the Edge browser to check whether its passwords were found in leaked accounts, but the encryption request matching circuit has a high computational complexity. In 2022, Huawei's Li et al. used homomorphic encryption to construct a password detection protocol Pipa, 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 password strength by the similarity between the selected password and other passwords, when the overall scheme security is weak.
[0005] In view of this, the following technical issues need to be solved for account password leakage detection:
[0006] (1) Compress the traffic of detection requests and responses. The request size of existing account and password leakage detection protocols is linearly related to the hash value of the account and password. This results in the detection request needing to generate multiple ciphertexts, which consumes 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 calculations. Existing account password leakage detection protocols use homomorphic encryption to calculate the detection function in a secret state. However, the multiplication depth of this function is large, requiring a homomorphic encryption scheme with large parameters, which makes the detection calculation inefficient. Therefore, it is necessary to reduce the multiplication depth of the detection function to improve the calculation efficiency.
[0008] (3) Quantum-resistant security. Currently, quantum computing has developed faster than expected, and the United States has established standards for quantum-resistant cryptographic algorithms to address the threat of quantum computing attacks. It is imperative to design an account and password detection protocol that is quantum-resistant. Summary of the Invention
[0009] The present invention aims to provide a method, system, device, medium and program product for detecting similar leakage of account and password based on homomorphic encryption to solve the problems existing in the above-mentioned account and password leakage detection.
[0010] The present invention provides a method for detecting similar leakage of account and password based on homomorphic encryption, comprising:
[0011] During the offline phase, the service center server generates similar variants of each account password in the account leakage database. It then performs hash calculations on each account password and its similar variants, and stores them as a hash value database. Based on the hash prefix of the username, the account leakage hash value database is split into several sub-databases, and horizontally homomorphic packaging encoding is used to encode the data in the sub-databases into plaintext.
[0012] In the online phase, the 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 based on the hash prefix of the username, performs detection calculation to obtain a 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 phase specifically includes the following steps:
[0014] Step 101: User User applies for registration at the service center Server; 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 user User;
[0015] Step 102: Leak the password of each account in the account database (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 hash value of each element in the account password variant vector v containing α variant passwords 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-databases
[0018] Step 105: Perform horizontal homomorphic packaging encoding on the data in the sub-database to obtain a homomorphically packaged and 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 enters the account password (uid*, pwd*) to be tested, performs 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 The query is sent to the server at the service center. The hash function used in the hash calculation is the same as that in the offline phase.
[0022] Step 202: The service center Server receives the query from the user Query = (μ * , ct Query ), followed by the hash prefix μ* Find the corresponding sub-database 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 the detection calculation of the secret state, and obtain the γ ciphertexts ct res,0 , ct res,1 ,...,ct res,γ-1 The response ciphertext group is sent to the user User;
[0023] Step 203: 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 using a polynomial segmentation 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 the value of the elements in a certain section is zero under the set conditions, it means that the 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] The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory, so that the at least one processor executes the account password similarity leakage detection method based on homomorphic encryption.
[0031] In a fourth aspect, the present invention also 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 queries and responses. This invention uses a horizontal homomorphic packaging encoding method to package user account passwords into a plaintext. The detection query only contains a homomorphic ciphertext and a username hash prefix. Similarly, homomorphic packaging encoding is applied on the service side, which reduces the number of ciphertexts in the detection calculation results. This reduces the communication overhead for queries 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. This invention adopts the lattice-based BFV homomorphic encryption scheme, which has anti-quantum computing security capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This 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 figure is a schematic structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only 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 herein 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 as claimed, but merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall 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 leak database leakedDB. User User wants to check the account password (uid * , pwd * ) is leaked. This method is divided into offline and online stages:
[0044] During 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 hashing the similar variants of the passwords of each account. It then uses homomorphic packaging encoding to encode the data in the sub-databases into plaintext.
[0045] In the online phase, the user generates a similar variant 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 based on the hash prefix of the username, performs detection calculation to obtain a 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. Symbol related instructions
[0047] In this embodiment, italic bold lowercase letters are used to represent vectors (eg, u, v), and italic bold uppercase letters are used to represent matrices (eg, A, B). represents the ring of integers, represents the set of natural numbers. 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 the 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 multiples. For convenience, this embodiment uses the polynomial Represents an element on the 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" on eprint. They ported Zvika Brakerski's homomorphic encryption scheme based on LWE to RLWE, proposing the well-known BFV scheme. Well-known open-source homomorphic encryption libraries such as SEAL and OpenFHE have implemented the BFV scheme, which is widely used in research areas such as statistical analysis, private information retrieval, and intersection of private sets. This example provides 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 cyclotomic polynomial ring be Q=Pq. Output common parameters
[0053] (sk, evk) ← BFV.KeyGen(Params): Output public parameters Params, in the distribution Randomly sample an element s as the secret information. Q An element a′ is randomly selected uniformly on 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 1 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'). Calculation 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 the symbol "×" to represent BFV.Mult and BFV.MultPlain. That is, if the operands in the expression are homomorphic ciphertexts, the operators are automatically overloaded to the corresponding homomorphic operations.
[0061] In many applications, SIMD technology is generally used to accelerate the performance of homomorphic operations. This 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 packaging, encoding and encryption, 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 following is a method for detecting similar account and password leaks based on homomorphic encryption proposed in this embodiment:
[0066] The participants of this method are user User and service center Server. 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. 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, so 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-databases in,
[0081] Step 105: Horizontally homomorphic packaging encoding. vDB μ Each paragraph consecutive records are encoded into a plaintext, then vDB μ A total of can be coded as plaintext, namely:
[0082]
[0083] Then we get the homomorphically packaged 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 it as plaintext:
[0088]
[0089] (3) Generate a query. User User executes the encrypted 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, is calculated by the following polynomial segmentation optimization method:
[0091]
[0092] The service center Server will send 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 ) in the 0th to Let θ=(α+1), if there exists a non-negative integer k0, k1, such that the (k0θ+k1)th element a to (k0θ+k1+1)s a Continuous s 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, embodiments of the present invention also provide a homomorphic encryption-based account and password similarity leakage detection system, comprising a service center server and a user user. The service center server and user user are configured to execute the aforementioned homomorphic encryption-based account and password similarity leakage detection method. The specific implementation method is described above and will not be further elaborated here.
[0095] Based on the same technical concept, an embodiment of the present invention also provides an electronic device that 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 embodiment of the present invention does not limit the specific connection medium between the processor and the memory. Figure 2 The example in this article is that the processor and memory are connected via a bus. Figure 2 The connections between the other components are shown in bold lines, which are only for illustration and not intended to be limiting. The bus can be divided into address bus, data bus, control bus, etc. Figure 2 The processor is represented by a single thick line, but this does not mean that there is only one bus or only one type of bus. Alternatively, the processor can also be called a controller, without any 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. The at least one processor can execute the account password similarity leakage detection method based on homomorphic encryption discussed above by executing the instructions stored in the memory. 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, the 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 primarily processes the operating system, user interface, and application programs, and the modem processor primarily processes wireless communications. It is understood that the modem processor may not be integrated into the processor. In some embodiments, the processor and memory may be implemented on the same chip, or in some embodiments, they may be implemented on separate chips.
[0100] The processor can 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 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor can be a microprocessor or any conventional processor. In conjunction with the steps of the method for detecting similar leakage of account passwords based on homomorphic encryption disclosed in the embodiments of the present invention, the steps can be directly implemented as execution by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0101] As a non-volatile computer-readable storage medium, memory can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory can include at least one type of storage medium, for example, can include 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. Memory is any other medium that can be used to carry or store 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, for storing 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 described 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 described in the above embodiment during operation. How to design and program the processor is a technology well known to those skilled in the art and will not be detailed 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 run on a computer, the computer executes the 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 similarity 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 the device, the program code is used to enable the control device to execute the steps of an account password similarity 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 detailed description above, 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 operations of the method of the present invention are 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, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0106] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, 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 magnetic 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 a 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 process 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++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's device, as a stand-alone software package, partially on the user's 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., through the Internet using an Internet service provider).
[0110] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work 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 The 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 the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0112] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for detecting similar leakage of account and password based on homomorphic encryption, characterized in that: include: Offline stage, service center Generate similar variants of each account password in the account leakage database, then perform hash calculations on each account password and its similar variants, and store them as a hash value database. Split the account leakage hash value database into several sub-databases based on the hash prefix of the username, and use horizontal homomorphic packaging encoding to encode the data in the sub-databases into plaintext; In the online stage, users Generate a similar variant of the account password to be tested, perform hash calculation, horizontal homomorphic packaging encoding, and encryption operations to obtain the query ciphertext, and send the username hash prefix and query ciphertext to the service center The service center searches for the corresponding sub-database based on the hash prefix of the user name, performs detection calculations to obtain the response ciphertext group, and sends it to the user. ;user Decrypt the response ciphertext group, then multiply all the decrypted plaintexts together, decode the product, and output the judgment result; The offline stage specifically includes the following steps: Step 101: User At the service center Application for registration; among them, service center Select the account password variant generation function And the number of outputs of the account password variant generation function Sent to user ; Step 102: Leak the password of each account in the account database , Service Center Call similar password variant function produce Password variants , get the account password variant vector ; Step 103: Service Center Call the hash function to calculate the account password variant vector The hash value of each element in will contain the Account password variant vectors of variant passwords Change the hash value storage format , get a new database ; Step 104: Hash the username bit prefix as the index value; the same index value Put together, the database Split into Sub-databases ; Step 105: Perform horizontal homomorphic packaging encoding on the data in the sub-database to obtain a homomorphically packaged and encoded sub-database ; The online stage specifically includes the following steps: Step 201: User Enter the account password that needs to be tested , perform hash calculation, horizontal homomorphic packaging encoding, encryption operation, and obtain the query ciphertext , and prefix the username with a hash and query ciphertext As an inquiry Send to service center The hash function used in the hash calculation is the same as the hash function used in the offline phase. Step 202: Service Center Receive an inquiry from the user After that, prefix it with a hash Find the corresponding sub-database for the index ; Then randomly select plaintext As a random mask, according to the sub-database , Query ciphertext , random mask, perform the detection calculation of the secret state, and obtain ciphertext Sent to the user as a response ciphertext group ; Step 203: User right The ciphertext is decrypted to obtain the corresponding plaintext , and then calculate this in the plaintext space The product of the plaintexts is , decoding it to get 1 dimensional vector , according to the dimensional vector Output the judgment result; In step 203, according to the dimensional vector Output judgment results, including: Observe the dimensional vector If the value of the elements in a certain section is zero under the set conditions, it means that the user The account password has been leaked, otherwise the account password has not been leaked.
2. The method for detecting similar leakage of account and password based on homomorphic encryption according to claim 1 is characterized in that: In step 103, the service center Use a larger To represent the database Each hash value in .
3. The method for detecting similar leakage of account and password based on homomorphic encryption according to claim 1 is characterized in that: In step 202, a response ciphertext group is calculated using a polynomial segmentation optimization method.
4. An account password similarity leakage detection system based on homomorphic encryption, characterized in that: Including service center and users The service center and users Used to execute the account password similarity leakage detection method based on homomorphic encryption as described in any one of claims 1-3.
5. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; In which, the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory, so that 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-3.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store instructions, and 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 3 is implemented.
7. 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 3.
Citation Information
Patent Citations
Low-communication multi-index privacy protection password checking method
CN119602967A