A strong password generation method and device based on user personal information, an electronic device, and a storage medium

By generating strong passwords based on users' personal information while offline, the risk of man-in-the-middle attacks caused by server dependence in existing technologies is resolved, achieving high-security and complex password generation and enhancing the security of user accounts.

CN119865310BActive Publication Date: 2026-03-20NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Current mainstream strong password generation tools rely on server-side processing, which poses a risk of man-in-the-middle attacks and affects user account security.

Method used

In offline mode, a strong password is generated based on the user's personal information. By randomizing the user's personal information, a password with random case variations and special character substitutions, including the full name in Pinyin or English, is generated and saved on the local device to avoid server involvement.

Benefits of technology

It effectively reduces the risk of man-in-the-middle attacks and data breaches, improves account security, and generates passwords with high entropy and complexity, which can resist various password cracking attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865310B_ABST
    Figure CN119865310B_ABST
Patent Text Reader

Abstract

The application discloses a strong password generation method and device based on user personal information, electronic equipment and storage medium. The method comprises the following steps: in an offline state, obtaining a target website name and personal information of a password to be generated input by a user; based on the personal information, obtaining a pinyin full name or an English full name of the personal information; randomly selecting a preset first number of letters in the pinyin full name or the English full name, and performing random uppercase and lowercase conversion or special character replacement to obtain a first string; adding a preset second number of random digital characters before the first character or after the last character of the first string to generate a second string; and taking the second string as a generated strong password. The application adopts an offline mode to generate and store the strong password, effectively reduces the risk of man-in-the-middle attack and data leakage, and ensures that each generated password has high entropy and complexity by randomizing the personal information of the user, thereby effectively resisting various password cracking attacks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of password generation, and in particular to a strong password generation method and device based on user personal information, an electronic device and a storage medium. BACKGROUND

[0002] In the digital age, the network security threats faced by individuals and enterprises are becoming increasingly complex, and the demand for high-security passwords has become particularly urgent. Strong password generation algorithms provide an effective security measure for users by constructing complex and difficult-to-predict passwords. Strong passwords can significantly increase the difficulty of password cracking and effectively resist common network attack methods such as brute force cracking, dictionary attacks, and replay attacks. Strong passwords not only form the foundation of network security, but also play a key role in maintaining user privacy and data integrity, and play an indispensable role in the current network security field.

[0003] Currently, large technology companies such as Google and Microsoft are recommending the use of automatically generated strong passwords to improve the security of user accounts. These passwords usually contain a combination of uppercase and lowercase letters, numbers, and special characters to ensure complexity and unpredictability. The Google Chrome browser provides a built-in password generator that automatically suggests a strong password when the user creates a new account. This generator can create complex passwords containing special characters and mixed case letters, which the user can fill into the password field with one click. The browser's password manager can store these passwords online and automatically fill them in when needed, reducing the risk of forgetting passwords or reusing passwords to some extent.

[0004] With the popularity of Internet services, users' demand for protecting personal data on multiple platforms is growing. Passwords, as an identity verification mechanism, play a significant role in preventing unauthorized access and data breaches. However, users often choose easy-to-guess passwords for convenience, which reduces the security of passwords. Therefore, it is crucial to research algorithms that can assist users in generating complex and easy-to-remember passwords. Currently, mainstream password management tools such as Microsoft, Google, and LastPass, although they provide convenient password generation services, they rely on server-side processing, which may make the system vulnerable to man-in-the-middle attacks. If the security measures of the server are not sound, attackers have the opportunity to intercept and tamper with sensitive information including passwords. SUMMARY

[0005] To solve the technical problem that the mainstream strong password generation tools rely on server-side participation and have the risk of man-in-the-middle attack, embodiments of the present application provide a strong password generation method and device based on user personal information, electronic equipment and storage medium.

[0006] The technical solution of the embodiments of the present application is implemented as follows:

[0007] The embodiments of the present application provide a strong password generation method based on user personal information, which comprises: in an offline state, obtaining the target website name and personal information of the password to be generated input by the user; based on the personal information, obtaining the pinyin full name or English full name of the personal information; randomly selecting a preset first number of letters in the pinyin full name or English full name and performing random case conversion or special character replacement to obtain a first string; adding a preset second number of random numeric characters before the first character or after the last character of the first string to generate a second string; and taking the second string as a strong password generated for the target website name.

[0008] In an embodiment, obtaining the pinyin full name or English full name of the personal information comprises: if the personal information is an ID number, obtaining the first two digits of the ID number; determining the province information according to the first two digits of the ID number; and obtaining the pinyin full name of the province information according to the province information.

[0009] In an embodiment, obtaining the pinyin full name or English full name of the personal information comprises: if the personal information is an ID number, obtaining the eleventh digit to the twelfth digit of the ID number; determining the birth month information according to the eleventh digit to the twelfth digit of the ID number; and obtaining the English full name of the birth month information according to the birth month information.

[0010] In an embodiment, before obtaining the target website name and personal information of the password to be generated input by the user, the method further comprises: obtaining a master password created by the user; processing the master password using a SHA-256 hash function to obtain a first hash value, storing the first hash value into a first file; reading the content in the first file in binary read mode and encrypting the master password using a self-defined encryption algorithm to obtain a third string, encrypting the content in the first file using an AES encryption algorithm with the third string as an encryption key, and storing the encryption result into a second file and deleting the first file.

[0011] In an embodiment, after storing the encryption result into the second file and deleting the first file, the method further comprises: obtaining a user-input main password to be verified; encrypting the main password to be verified using a custom encryption algorithm to obtain a fourth string, using the fourth string as a decryption key to decrypt data in the second file through an AES decryption algorithm to obtain a first decryption result; processing the main password to be verified using a SHA-256 hash function to obtain a second hash value; comparing the second hash value with the first decryption result, and if the comparison result is the same, performing a subsequent operation.

[0012] In an embodiment, after using the second string as a strong password generated for the target website name, the method further comprises: processing the target website name using an MD5 hash operation to obtain a third hash value; reading content in the third file in binary read mode, and encrypting the main password through a custom encryption algorithm to obtain a fifth string, using the fifth string as an encryption key to perform AES encryption on the content in the third file, storing the encryption result into a fourth file, and deleting the third file.

[0013] In an embodiment, after storing the encryption result into the fourth file and deleting the third file, the method further comprises: after receiving a password search instruction initiated by a user, obtaining a website name input by the user; processing the website name input by the user using an MD5 hash operation to obtain a fourth hash value; encrypting the main password using a custom encryption algorithm to obtain a sixth string, using the sixth string as a decryption key to perform AES decryption on data in the fourth file to obtain a second decryption result; searching for a line containing the fourth hash value by traversing the second decryption result line by line; after searching for the line containing the fourth hash value, searching for a strong password in the line, and feeding back the strong password as a search result of the password search instruction.

[0014] The embodiment of the present application also provides a strong password generation device based on user personal information, which comprises: an input module, configured to obtain a target website name and personal information of a password to be generated input by a user in an offline state; an obtaining module, configured to obtain a pinyin full name or an English full name of the personal information based on the personal information; a conversion module, configured to randomly select a preset first number of letters in the pinyin full name or the English full name, and perform random case conversion or special character replacement to obtain a first string; an adding module, configured to add a preset second number of random digital characters before a first character or after a last character of the first string to generate a second string; and a generation module, configured to use the second string as a strong password generated for the target website name.

[0015] The embodiment of the present application also provides an electronic device, comprising a processor and a memory for storing a computer program capable of running on the processor; wherein the processor is used to run the computer program, and the steps of the method described in any of the above are executed.

[0016] The embodiment of the present application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method described in any of the above.

[0017] The method, device, electronic device and storage medium for generating a strong password based on user personal information provided by the embodiment of the present application are used to obtain a target website name and personal information of a password to be generated input by a user in an offline state; based on the personal information, a pinyin full name or an English full name of the personal information is obtained; a first string is obtained by randomly selecting a preset first number of letters in the pinyin full name or the English full name and performing random case conversion or special character replacement; a second string is generated by adding a preset second number of random digital characters before the first character or after the last character of the first string; and the second string is used as a strong password generated for the target website name. The scheme provided by the present application generates and stores a strong password in an offline manner, effectively reduces the risk of man-in-the-middle attack and data leakage, and improves the security of an account. Moreover, the scheme provided by the present embodiment ensures that each generated password has a high entropy value and complexity by randomizing the personal information of the user, thereby effectively resisting various password cracking attacks and enhancing the security of the password. BRIEF DESCRIPTION OF DRAWINGS

[0018] Figure 1 FIG. 1 is a flowchart of the method for generating a strong password based on user personal information according to the embodiment of the present application;

[0019] Figure 2 FIG. 4 is a user login interface according to the embodiment of the present application;

[0020] Figure 3 FIG. 5 is a tool main interface according to the embodiment of the present application;

[0021] Figure 4 FIG. 6 is a strong password generation interface according to the embodiment of the present application;

[0022] Figure 5 FIG. 7 is a password search interface according to the embodiment of the present application;

[0023] Figure 6 FIG. 8 is a password modification interface according to the embodiment of the present application;

[0024] Figure 7 FIG. 9 is a strong password generation algorithm flowchart according to the embodiment of the present application;

[0025] Figure 8 This is a schematic diagram of the structure of a strong password generation device based on user personal information according to an embodiment of the present invention;

[0026] Figure 9 This is an internal structural diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0027] Before introducing the solution of this embodiment, the following content will be introduced first:

[0028] PII: Personally Identifiable Information (PII) refers to any data that can be used to identify, distinguish, or track an individual. This includes direct identifiers such as names, Social Security numbers, email addresses, phone numbers, passport numbers, driver's license numbers, and biometric data.

[0029] Strong password: A highly secure password that typically contains at least 12 characters, combining uppercase and lowercase letters, numbers, and special symbols. It has a high entropy value, no obvious pattern, and is difficult to predict and crack. It can effectively resist common password attack methods such as dictionary attacks, brute force attacks, rainbow table attacks, keyboard pattern attacks, social engineering, time attacks, and phishing.

[0030] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.

[0031] This invention provides a method for generating strong passwords based on user personal information, such as... Figure 1 As shown, the method includes:

[0032] Step 101: In offline mode, obtain the target website name and personal information entered by the user for the password to be generated;

[0033] Step 102: Based on the personal information, obtain the full name of the personal information in Pinyin or English;

[0034] Step 103: Randomly select a preset first number of letters from the full Pinyin or full English name and perform random case transformation or special character replacement to obtain the first string;

[0035] Step 104: Add a preset second number of random numeric characters before the first character or after the last character of the first string to generate a second string;

[0036] Step 105: Use the second string as a strong password generated for the target website name.

[0037] The embodiment is based on user input personal information, and the personal information is identified, and a strong password is generated through character conversion, special character insertion and number mixing. The scheme does not depend on a server, and the generated strong password is stored in a user host, so that the risk of man-in-the-middle attack and data leakage is reduced, and the account security is improved.

[0038] Compared with the prior art, the embodiment has the following distinguishing points:

[0039] (1), the implementation logic of the strong password generation algorithm is different.

[0040] (2), the strong password is generated and stored in an offline manner, so that the risk of man-in-the-middle attack and data leakage is effectively reduced, and the account security is improved.

[0041] The embodiment will be described below with a specific embodiment.

[0042] Participation Figure 2 , the embodiment requires the user to pass the identity verification before any operation. The master password created by the user for the first time is encrypted by an advanced encryption standard (AES) algorithm and stored in a file named mp.txt.aes (i.e. the second file). In the subsequent use process, the user must input the master password to complete the identity verification, so as to ensure the security of the tool and the confidentiality of the user data.

[0043] As Figure 3 shown, the embodiment is composed of four core modules: a password generation module, a password search module, a password modification module and a file modification record module. The core function of the password generation module is to customize a password with high security according to the personal information input by the user; the password search module allows the user to quickly search and obtain the strong password corresponding to the website by inputting the name of the specific website; the password modification module is used to realize the modification of the password by the user; and the file modification record module is responsible for tracking the modification history of the password storage file and the specific time point of each modification.

[0044] As Figure 4 shown. The strong password contains two main text input areas. The user first inputs the target website name for which the user wants to generate a password in the first text box, and inputs the personal identity information of the user in the second text box. The algorithm of the embodiment can automatically generate a strong password meeting the security standard according to the personal information input by the user.

[0045] In order to further enhance the security, the strong password generated by the embodiment is combined with the target website name input by the user, and is processed by using an MD5 hash function. The specific processing process will be introduced in detail later.

[0046] The password search interface of the embodiment is as Figure 5 As shown, the user only needs to input the target website name, and the system will automatically retrieve the password information related to the website.

[0047] The password modification interface of this embodiment is shown as Figure 6 As shown, the user needs to input the target website name and provide personal information, and the system will automatically modify the password information related to the website.

[0048] The password construction algorithm proposed in this embodiment is shown as Figure 7 The algorithm aims to generate passwords with personalization and complexity, combining user's personal information and randomization techniques to improve the security and unpredictability of the password. The following are the detailed steps of the algorithm:

[0049] (1) Determination and conversion of province information: The algorithm first extracts the first two digits from the user's ID number to determine the user's province. Taking Shanghai as an example, the first two digits of the ID number are "31". Then, the name of the province is converted to pinyin form, i.e. "shanghai", as the basic element of password construction.

[0050] (2) English representation of birthday information: The user's birthday month information is converted to its corresponding English month name. For example, if the user was born in February, the number "2" is converted to "february".

[0051] (3) Randomization processing: In order to increase the complexity of the password, the algorithm will perform randomization processing on the combined English string. This includes randomly selecting some letters to change their case and replacing certain letters with special characters. For example, "shanghai" may be randomly converted to "$Han9_ha!", and "february" may be converted to "43bru@rY".

[0052] (4) Addition of random numbers: Finally, the algorithm will append a randomly generated four-digit number to the string after randomization processing to further enhance the randomness and security of the password. For example, the final recommended password may be "$Han9_ha! 6462" and "43bru@rY 5964".

[0053] Through this series of steps, the constructed password not only integrates the user's personal information, but also increases its complexity through randomization techniques, thus achieving a balance between memorability and security. This algorithm provides an effective method for generating strong passwords for users, helping to improve the security of personal accounts.

[0054] In addition, based on the above content, the following will introduce the process of password encryption and decryption of this embodiment.

[0055] First, about the master password, this embodiment will customize the encryption process, denoted as E transform

[0056] The second file mp.txt.aes is only used for user authentication.

[0057] Creation process (first login)

[0058] 1. When the user first uses the program, it is required to create a master password (eg. 123456), and the password is protected by SHA-256 hash function, and the hash value is written into a file named mp.txt (i.e. the first file). (The mp.txt only saves the hash value of the master password).

[0059] 2. Open mp.txt in binary read mode, and the master password (eg. 123456) will be transformed by the above E transform as an encryption key, and encrypted by AES algorithm to get the mp.txt.aes file (i.e. the second file).

[0060] 3. Delete the original mp.txt, only keep mp.txt.aes.

[0061] Authentication process (normal login)

[0062] 1. Enter the master password (eg. 123456), and perform E transform on the master password as the decryption key of mp.txt.aes, and the decrypted result is placed in a temporary file tmp.txt.

[0063] 2. Perform SHA-256 hash function on the master password (eg. 123456), denoted as Hash1.

[0064] 3. Read the data in tmp.txt and compare it with Hash1. If they match, it proves that the authentication is passed, and the subsequent functions can be used, otherwise the program terminates.

[0065] 4. Delete the temporary file tmp.txt.

[0066] Password generation and search

[0067] In this process, all operations related to the master password are not interacted with mp.txt.aes. Since the computer allocates a memory space for the user's input data when the user enters the master password for authentication, the space stores the plaintext master password (eg. 123456), and all subsequent operations are based on the data in this memory space.

[0068] Password generation

[0069] 1. Get the website name and the first 10 digits of the ID number from the input box.

[0070] 2. Perform E transformation on the master password (eg. 123456) to get the decryption key, and decrypt the file secret.txt.aes. The decrypted content is saved in the temporary file secret.txt.

[0071] 3. Check if a password has been created for this website.

[0072] 4. If no password has been created for this website, generate a new password based on the ID information.

[0073] 5. Write the generated password and website name in a specific format in the temporary file secret.txt (i.e. the third file), format: website + "\t" + password, then rename and encrypt the file.

[0074] 6. Open secret.txt in binary read mode, perform E transformation on the master password (eg. 123456) to get the encryption key, and encrypt it using the AES algorithm to get the secret.txt.aes file (i.e. the fourth file).

[0075] 7. Delete the temporary file secret.txt.

[0076] Find password

[0077] 1. Get the website entered by the user.

[0078] 2. Calculate the MD5 hash value of the website name.

[0079] 3. Perform E transformation on the master password (eg. 123456) to get the decryption key, and decrypt the file secret.txt.aes. The decrypted content is saved in the temporary file temp.txt.

[0080] 4. Find the password matching the hash value in the decrypted temporary file temp.txt.

[0081] 5. Delete the decrypted temporary file temp.txt.

[0082] In addition, the process of modifying the user's password is roughly as follows:

[0083] 1. The user inputs the target website whose password needs to be modified and the personal information needed to generate the password.

[0084] 2. Use the master password after E transformation as the decryption key to decrypt secret.txt.aes, and save the decryption result in the temporary file secret.txt.

[0085] 3. Traverse secret.txt to find out if the target website has a password, and delete the old password line;

[0086] 4. Regenerate the password according to the obtained user personal information;

[0087] 5. Write the modified password information into the secret.txt file in a fixed format (website + "\t" + password);

[0088] 6. Use the main password after E transformation as the encryption key to encrypt the temporary file secret.txt to obtain secret.txt.aes;

[0089] 7. Delete the temporary file secret.txt;

[0090] 8. Prompt the user that the password has been modified, and show the comparison of the password before and after modification.

[0091] The strong password generation algorithm of the embodiment aims to realize offline generation of passwords through user local running. The strong password generation tool of the embodiment runs on the user local device, effectively avoiding the security risks that may be brought by server participation. By generating strong passwords on the user side, the tool not only can resist man-in-the-middle attacks, but also can reduce the risk of data leakage, thereby significantly improving the security of user accounts.

[0092] Technical effects and advantages of the embodiment:

[0093] 1. The proposal can effectively resist common password attack methods such as dictionary attack, brute force attack, rainbow table attack, keyboard pattern attack, social engineering, time attack and phishing through the strong password generation algorithm based on user personal information.

[0094] 2. All functions of the proposal are completed under offline conditions, effectively avoiding server participation, reducing the risk of man-in-the-middle attacks and data leakage, and thereby improving the overall security of user accounts.

[0095] Protection points of the embodiment:

[0096] 1. A strong password generation algorithm is proposed, which randomizes user personal information to ensure that each generated password has high entropy and complexity, thereby effectively resisting various password cracking attacks and enhancing the security of passwords.

[0097] 2. All functions are realized in an offline manner. All data are processed on a user's local device, without relying on external servers, which significantly reduces the risk of privacy leakage and data security, improves the reliability of the system and the autonomy of user data, and provides a more secure and private password generation environment for users.

[0098] To implement the method of the embodiments of the present application, the embodiments of the present application also provide a strong password generation device based on user personal information, as shown in Figure 8 The strong password generation device based on user personal information 800 comprises an input module 801, an acquisition module 802, a conversion module 803, an addition module 804 and a generation module 805, wherein,

[0099] The input module 801 is configured to acquire a target website name and personal information of a password to be generated input by a user in an offline state.

[0100] The acquisition module 802 is configured to acquire a pinyin full name or an English full name of the personal information based on the personal information.

[0101] The conversion module 803 is configured to perform random case conversion or special character replacement on part of the letters in the pinyin full name or the English full name to obtain a first string.

[0102] The addition module 804 is configured to add a random number of digital characters before the first character or after the last character of the first string to generate a second string.

[0103] The generation module 805 is configured to take the second string as a strong password generated for the target website name.

[0104] In actual application, the input module 801, the acquisition module 802, the conversion module 803, the addition module 804 and the generation module 805 can be realized by a processor in the strong password generation device based on user personal information.

[0105] It should be noted that: when the above device provided by the above embodiments is executed, only the division of the above program modules is exemplified, and in actual application, the above processing can be completed by different program modules according to the needs, that is, the internal structure of the terminal is divided into different program modules to complete all or part of the above processing. In addition, the above device and the above method embodiments provided by the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.

[0106] To implement the method of the embodiments of the present invention, the present invention also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of the above-described method.

[0107] Based on the hardware implementation of the above-described program modules, and in order to implement the method of this embodiment of the invention, this embodiment also provides an electronic device (computer device). Specifically, in one embodiment, the computer device may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05, and a memory (not shown) connected via a system bus. The processor A01 provides computing and control capabilities. The memory includes internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 stored in the non-volatile storage medium A06. The network interface A02 is used for communication with external terminals via a network connection. When the computer program is executed by the processor A01, it implements the method of any of the above embodiments. The display screen A04 can be a liquid crystal display or an electronic ink display. The input device A05 can be a touch layer covering the display screen, a button, trackball, or touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0108] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0109] The device provided in the embodiments of the present invention includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the method of any of the above embodiments.

[0110] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0111] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.

[0112] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.

[0113] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.

[0114] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0115] The memory can include non-persistent memory and / or volatile memory, such as a random access memory (RAM) including a cache area for the temporary storage of data. A

[0116] Computer-readable media includes permanent and non-permanent, moveable and non- moveable media that can be implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, without limitation, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disks (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computing device. According to the definitions provided herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0117] It can be understood that the memory of the embodiments of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not be limited to, the memory of these and any other suitable type of memory.

[0118] It should also be noted that the terms "comprising", "comprises", "including", "includes" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0119] The above only describes the embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for generating strong passwords based on user personal information, characterized in that, The method includes: In offline mode, obtain the target website name and personal information of the user who inputs the password to be generated; Based on the personal information, obtain the full name of the personal information in Pinyin or English. Randomly select a preset first number of letters from the full Pinyin or full English name and perform random case transformation or special character replacement to obtain a first string; A second string is generated by adding a predetermined number of random numeric characters before the first character or after the last character of the first string. The second string is used as a strong password generated for the target website name; Before obtaining the target website name and personal information of the user-inputted password to be generated, the method further includes: Retrieve the master password created by the user; The master password is processed using the SHA-256 hash function to obtain a first hash value, and the first hash value is stored in a first file; The contents of the first file are read in binary read mode, and the master password is encrypted using a custom encryption algorithm to obtain a third string. The third string is used as the encryption key to encrypt the contents of the first file using the AES encryption algorithm. The encryption result is stored in the second file, and the first file is deleted. The method further includes storing the encryption result in a second file and deleting the first file, wherein the method further includes: Retrieve the master password to be verified entered by the user; The master password to be verified is encrypted using a custom encryption algorithm to obtain a fourth string. The fourth string is then used as the decryption key to decrypt the data in the second file using the AES decryption algorithm to obtain a first decryption result. The master password to be verified is processed using the SHA-256 hash function to obtain a second hash value; The second hash value is compared with the first decryption result. If the comparison result is the same, the subsequent operation is performed. The generation of the third file includes: creating a temporary file named secret.txt as the third file.

2. The method for generating a strong password based on user personal information according to claim 1, characterized in that, Obtain the full name (in pinyin or English) of the personal information, including: If the personal information is an ID card number, obtain the first two digits of the ID card number; The province information is determined based on the first two digits of the ID number; Obtain the full pinyin name of the province based on the province information.

3. The method for generating a strong password based on user personal information according to claim 1, characterized in that, Obtain the full name (in pinyin or English) of the personal information, including: If the personal information is an ID card number, obtain the eleventh and twelfth digits of the ID card number; The birth month information is determined based on the eleventh and twelfth digits of the ID number; Obtain the full English name of the birth month information based on the birth month information.

4. The method for generating a strong password based on user personal information according to claim 1, characterized in that, After using the second string as a strong password generated for the target website name, the method further includes: The target website name is processed using MD5 hashing to obtain a third hash value; The contents of the third file are read in binary read mode, and the master password is encrypted using a custom encryption algorithm to obtain a fifth string. The fifth string is used as the encryption key to encrypt the contents of the third file using AES, and the encryption result is stored in the fourth file. The third file is then deleted.

5. The method for generating a strong password based on user personal information according to claim 4, characterized in that, After storing the encryption result in a fourth file and deleting the third file, the method further includes: After receiving a password search command from a user, retrieve the website name entered by the user; The website name entered by the user is processed using MD5 hashing to obtain a fourth hash value; The master password is encrypted using a custom encryption algorithm to obtain a sixth string. The sixth string is then used as the decryption key to decrypt the data in the fourth file using AES to obtain a second decryption result. Iterate through the second decryption result line by line, searching for the line containing the fourth hash value; After finding a row containing the fourth hash value, a strong password is searched in that row, and the strong password is returned as the search result of the password search instruction.

6. A strong password generation device based on user's personal information, characterized in that, The method described in claim 1, wherein the strong password generation device based on user personal information comprises: The input module is used to obtain the target website name and personal information of the user, which is the password to be generated, when the user is offline. The acquisition module is used to acquire the full name of the personal information in Pinyin or in English based on the personal information. The conversion module is used to randomly select a preset first number of letters from the full Pinyin or full English name and perform random case transformation or special character replacement to obtain a first string; An add module is used to add a preset second number of random numeric characters before the first character or after the last character of the first string to generate a second string; A generation module is used to generate a strong password for the target website name using the second string.

7. An electronic device, characterized in that, include: A processor and memory for storing computer programs that can run on the processor; wherein, When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 5.

8. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data analysis method, system and equipment and storage medium

    CN117573112A

  • Data protection method and device for online shopping mall system, electronic equipment and medium

    CN118395479A