WO2013170822A2 - 处理登陆服务器的密码的方法和装置 - Google Patents

处理登陆服务器的密码的方法和装置 Download PDF

Info

Publication number
WO2013170822A2
WO2013170822A2 PCT/CN2013/079422 CN2013079422W WO2013170822A2 WO 2013170822 A2 WO2013170822 A2 WO 2013170822A2 CN 2013079422 W CN2013079422 W CN 2013079422W WO 2013170822 A2 WO2013170822 A2 WO 2013170822A2
Authority
WO
WIPO (PCT)
Prior art keywords
password
index
record
string
generate
Prior art date
Application number
PCT/CN2013/079422
Other languages
English (en)
French (fr)
Other versions
WO2013170822A3 (zh
Inventor
陈昌乾
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013170822A2 publication Critical patent/WO2013170822A2/zh
Publication of WO2013170822A3 publication Critical patent/WO2013170822A3/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords

Definitions

  • the present invention relates to the field of network security technologies, and more particularly to a method and apparatus for processing a password of a login server. Background technique
  • a user usually has multiple network accounts at the same time, such as online game accounts, online banking accounts, instant messaging accounts, email accounts, etc. These accounts represent even more value than people's physical property.
  • network thieves are difficult to detect, so the phenomenon of network theft is extremely serious, and the network account security technology is particularly important.
  • the user account information is stored in the database table of the server.
  • the table has two fields, one field holds the user account, one field stores the user password, and one user occupies one line of the user information table, that is, a data record.
  • the program compares the information filled in by the user with the information in the database table. If the user account and password are accurate, then the user is a legitimate user and logs in; otherwise, it is an illegal user, and the user is not allowed to pass.
  • the user account and password are saved directly in a database table, and no security measures are taken. If the illegal user gets the file, the user account and password can be easily obtained. If it is an irresponsible server administrator, you can view the user account information in the server without any technical means. Summary of the invention
  • the technical problem to be solved by the embodiment of the present invention is to provide a password for processing a login server.
  • the method and apparatus are capable of providing the security of the storage of the server's password.
  • a method of processing a password for logging in to a server including:
  • the first index is a cipher table index
  • the second index is a record index.
  • the searching for the first record in the first cipher list according to the first index and the second index includes: a first password table corresponding to the first index; in the first password table, searching for a first record corresponding to the second index; or
  • the first index is a record index
  • the second index is a cipher table index
  • the searching for the first record in the first cipher list according to the first index and the second index includes:
  • the generating the first index according to the first account and the first password includes: generating a first character string according to the first account and the first password;
  • the generating the first character string according to the first account and the first password comprises: forming the first account and the first password into a second character string;
  • the method further includes:
  • the comparing the second password with the first password to generate a comparison result comparing the second password with the encrypted first password to generate a comparison result.
  • the encrypting the first password according to a predetermined algorithm includes:
  • the first password is encrypted according to the encryption algorithm.
  • the method further includes: before obtaining the account and the first password that are input when the user logs in to the server, the method further includes:
  • the method further includes: before obtaining the first account and the first password that are input when the user logs in to the server, the method further includes:
  • the generating the third character string according to the second account and the third password comprises: forming the second account and the third password into a fourth character string;
  • a third character string is generated according to the fourth character string by an encryption algorithm.
  • the method further includes: encrypting the third password according to a predetermined algorithm; and correspondingly, saving the third password in the second record is:
  • the encrypted third password is saved in the second record.
  • the encrypting the third password according to a predetermined algorithm includes:
  • the third password is encrypted according to the encryption algorithm.
  • an apparatus for processing a password for logging in to a server including:
  • the first obtaining unit is configured to obtain a first account and a first password that are input when the user logs in to the server;
  • a first generating unit configured to generate a first index according to the first account and the first password
  • a first searching unit configured to search for a second index corresponding to the first account
  • a second searching unit configured to search for the first record in the first password table according to the first index and the second index
  • the device for processing a password of the login server further includes: a first encryption unit configured to encrypt the first password according to a predetermined algorithm;
  • the comparing unit is configured to: compare the second password with the encrypted first password to generate a comparison result.
  • the device for processing a password for logging in to the server further includes:
  • a third acquiring unit configured to acquire a second account and a third password that are input when the user registers
  • a second generating unit configured to generate a third character string according to the second account and the third password
  • a third generating unit configured to acquire at least one character in the third string, and combine to generate a third index
  • a first saving unit configured to acquire a second password table according to the third index, and save the third password in a second record in the second password table;
  • a fourth acquiring unit configured to acquire a record sequence number of the second record, as a fourth index, where the first establishing unit is configured to establish a correspondence between the second account and the fourth index.
  • the device for processing a password for logging in to the server further includes:
  • a fifth acquiring unit configured to acquire a second account and a third password that are input when the user registers
  • a fourth generating unit configured to generate a third character string according to the second account and the third password
  • a fifth generating unit configured to acquire at least one character in the third string, and combine to generate a third index
  • a second saving unit configured to acquire a second record according to the third index, in the second Saving the third password in the record
  • a sixth obtaining unit configured to obtain a password table number of the third password table where the second record is located, as a fourth index
  • the second establishing unit is configured to establish a correspondence between the second account and the fourth index.
  • the password is stored in a record of the password table, and the storage location of the password needs to be obtained through the first index and the second index. Therefore, the user account and password are not simply stored in a database table, and the password is added. Password security. DRAWINGS
  • FIG. 1 is a schematic flow chart of an embodiment of a method for processing a password of a login server according to the present invention
  • FIG. 2 is a schematic flow chart of another embodiment of a method for processing a password of a login server according to the present invention
  • FIG. 3 is a schematic flow chart of still another embodiment of a method for processing a password of a login server according to the present invention.
  • FIG. 4 is a schematic flowchart of a method for processing a password of a login server according to an embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a method for processing a password of a login server according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an apparatus for processing a password of a login server according to the present invention. detailed description
  • an embodiment of a method for processing a password of a login server according to the present invention includes:
  • Step 11 Acquire a first account and a first password that are input when the user logs in to the server.
  • Step 12 Generate a first index according to the first account and the first password.
  • Step 12 includes:
  • Step 121 Generate a first character string according to the first account and the first password.
  • Step 122 Acquire at least one character in the first string, and combine to generate a first index.
  • step 121 includes:
  • Step 1211 The first account and the first password are combined into a second character string.
  • Step 1212 Generate a first character string according to the second string by using an encryption algorithm.
  • Step 13 Find a second index corresponding to the first account.
  • Step 14 Search for the first record in the first password table according to the first index and the second index.
  • the first index is a password table index
  • the second index is a record index
  • Step 141A Search for a first password table corresponding to the first index.
  • Step 142A In the first password table, search for a first record corresponding to the second index; or, in an application scenario, the first index is a record index, and the second index is a password table index.
  • Step 14 includes:
  • Step 141B Find a first password table corresponding to the second index.
  • Step 142B In the first password table, search for a first record corresponding to the first index.
  • Step 15 Obtain a second password saved in the first record.
  • Step 16 comparing the second password with the first password to generate a comparison result; Step 17, if the comparison result is the same, the user is allowed to log in.
  • the method further includes:
  • Step 16 A encrypt the first password according to a predetermined algorithm
  • step 16 is specifically: comparing the second password with the encrypted first password to generate a comparison result.
  • step 16 A includes:
  • Step 16 A1 Generate a first character string according to the first account number and the first password, and obtain a predetermined bit character of the first character string according to step 16A2;
  • Step 16 A3 Obtain an encryption algorithm corresponding to the character of the predetermined bit
  • Step 16 A4 Encrypt the first password according to the encryption algorithm.
  • the password is stored in a record of the password table, and the storage location of the password needs to be obtained through the first index and the second index. Therefore, the user account and password are not simply stored in a database table, and the password is added. Password security.
  • another embodiment of a method for processing a password of a login server according to the present invention includes:
  • Step 21 Obtain a second account and a third password that are input when the user registers;
  • Step 22 Generate a third character string according to the second account and the third password.
  • Step 23 Acquire at least one character in the third string, and combine to generate a third index.
  • Step 24 Acquire a second password table according to the third index, and save the third password in a second record in the second password table.
  • Step 25 Obtain a record sequence number of the second record as a fourth index
  • Step 26 Establish a correspondence between the second account and the fourth index.
  • Steps 21-26 above are the steps when the user registers.
  • Step 27 Obtain a first account and a first password that are input when the user logs in to the server;
  • Step 28 Generate a first index according to the first account and the first password.
  • Step 29 Search for a second index corresponding to the first account.
  • Step 210 Search for the first record in the first cipher table according to the first index and the second index.
  • the fourth index and the second index are the same, and have a corresponding relationship with the record.
  • the index is the same as the third index and has a correspondence with the password table.
  • the step 210 includes: Step 2101: Search for a first password table corresponding to the first index.
  • Step 2102 Search, in the first password table, a first record corresponding to the second index.
  • Step 211 Obtain a second password saved in the first record.
  • Step 212 Compare the second password with the first password to generate a comparison result.
  • Step 213 If the comparison result is the same, allow the user to log in.
  • the above steps 27-213 are steps when the user logs in.
  • step 22 includes:
  • Step 221 Form the fourth account and the third password into a fourth character string.
  • Step 222 Generate a third character string according to the fourth character string by using an encryption algorithm.
  • step 28 includes:
  • Step 281 Generate a first character string according to the first account and the first password.
  • Step 282 Acquire at least one character in the first string, and combine to generate a first index.
  • step 281 includes:
  • Step 2811 The first account and the first password are combined into a second character string.
  • Step 2812 Generate a first character string according to the second string by using an encryption algorithm.
  • the step of saving the third password in a second record in the second password table in step 24 includes:
  • Step 241 Encrypt the third password according to a predetermined algorithm.
  • Step 242 Save the encrypted third password in the second record.
  • the method further includes: Step 212A, encrypting the first password according to a predetermined algorithm;
  • Step 212 is specifically: comparing the second password with the encrypted first password to generate a comparison result.
  • step 241 includes:
  • Step 2411 Generate a third character string according to the second account and the third password.
  • Step 2412 Obtain a predetermined bit character of the third character string.
  • Step 2413 Acquire an encryption algorithm corresponding to the character of the predetermined bit; that is, set a plurality of encryption algorithms in advance, and establish a correspondence between different characters and different encryption algorithms.
  • Step 2414 Encrypt the third password according to the encryption algorithm.
  • the step 212A includes:
  • Step 212A1 Generate a first character string according to the first account and the first password.
  • Step 212A2 acquire a character of a predetermined bit of the first character string;
  • Step 212A3 Obtain an encryption algorithm corresponding to the character of the predetermined bit
  • Step 212A4 Encrypt the first password according to the encryption algorithm.
  • a further embodiment of a method for processing a password of a login server according to the present invention includes:
  • Step 31 Obtain a second account and a third password that are input when the user registers;
  • Step 32 Generate a third character string according to the second account and the third password.
  • Step 33 Acquire at least one character in the third string, and combine to generate a third index.
  • Step 34 Acquire a second record according to the third index, and save the third password in the second record.
  • Step 35 Obtain a password table serial number of the third password table where the second record is located, as a fourth index;
  • Step 36 Establish a correspondence between the second account and the fourth index.
  • Steps 31 - 36 are the steps when the user registers.
  • Step 37 Acquire a first account and a first password that are input when the user logs in to the server.
  • Step 38 Generate a first index according to the first account and the first password.
  • Step 39 Search for the first account Second index;
  • Step 310 Search for the first record in the first cipher table according to the first index and the second index.
  • the fourth index and the second index are the same, and have a corresponding relationship with the password table.
  • An index is the same as the third index and has a correspondence with the record.
  • the step 310 includes: Step 3101: Search for a first password table corresponding to the second index.
  • Step 3102 Search, in the first password table, a first record corresponding to the first index.
  • Step 311 Obtain a second password saved in the first record.
  • Step 312 Compare the second password with the first password to generate a comparison result.
  • Step 313 If the comparison result is the same, allow the user to log in.
  • Steps 37-313 are the steps when the user logs in.
  • step 32 includes:
  • Step 321 Form the fourth account and the third password into a fourth character string
  • Step 322 Generate a third string according to the fourth string by using an encryption algorithm.
  • step 38 includes:
  • Step 381 Generate a first character string according to the first account and the first password.
  • Step 382 Acquire at least one character in the first string, and combine to generate a first index.
  • step 381 includes:
  • Step 3811 The first account and the first password are combined into a second character string.
  • Step 3812 Generate a first character string according to the second character string by using an encryption algorithm. In an application scenario, the saving of the third password in the second record in step 34 The steps include:
  • Step 341 Encrypt the third password according to a predetermined algorithm.
  • Step 342 Save the encrypted third password in the second record.
  • the method further includes: Step 312A: Encrypt the first password according to a predetermined algorithm;
  • Step 312 is specifically: comparing the second password with the encrypted first password to generate a comparison result.
  • step 341 includes:
  • Step 3411 Generate a third character string according to the second account and the third password.
  • Step 3412 Acquire a predetermined digit of the third character string.
  • Step 3413 Acquire an encryption algorithm corresponding to the character of the predetermined bit.
  • Step 3414 Encrypt the third password according to the encryption algorithm.
  • the step 312A includes:
  • Step 212A1 Generate a first character string according to the first account number and the first password, and obtain a predetermined bit character of the first character string according to step 312A2;
  • Step 312A3 Obtain an encryption algorithm corresponding to the character of the predetermined bit
  • Step 312A4 Encrypt the first password according to the encryption algorithm.
  • the embodiment of the present invention uses the following technical solution:
  • the server has a user table, a cryptographic algorithm table, and a plurality of cipher tables.
  • the account table contains two fields, usemame and password-table.
  • the usemame field stores the user's account information
  • the password-table stores the user's password table index
  • the password table index indicates which table the password is stored in.
  • the cryptographic algorithm table holds the cryptographic algorithms supported by the server.
  • the password table contains only one field password, which stores the encrypted password of the user.
  • the account and password are sent to the server through a predetermined protocol.
  • Service After receiving the message, the first form the account and the password into the first character string; through the MD5 encryption algorithm, generate the second string according to the first string; then take the first bit of the string, according to the first bit of the string
  • the value of the corresponding encryption algorithm is obtained from the cryptographic algorithm table; then the user's password is encrypted. Then take the first four digits of the string as the record index of the user password.
  • the index corresponding to the index in the first password table is not empty, check whether the index corresponds to whether the record already exists in the second password table until If the record of the generated record index in the nth password table is empty, the encrypted password of the user is inserted into the record corresponding to the record index of the nth password table.
  • the record index indicates which record is stored in the password table. Finally, the account index and the table index n of the corresponding password table are inserted into the account table.
  • the server After the user logs in each time, after the server receives the user's account and password, the server first forms the first character string and the password, and generates a second character string according to the first character string through the MD5 encryption algorithm; The first value of the first bit, obtain the corresponding encryption algorithm from the cryptographic algorithm table, encrypt the user password; then take the first four digits of the second string as the user's record index, and then obtain the user's account information from the user table. And the password table index; according to the record index, the password stored in the server is obtained from the password table corresponding to the password table index; and the password in the login message is compared; if the same, the user is legal, and the login ends.
  • the server-side database contains a user account table, a cryptographic algorithm table, and several password tables.
  • the user's long list contains two fields, username and password-table.
  • the username field holds the user's account information
  • the password-table stores the user's password table index
  • the password table index indicates which password table the user's password is stored in.
  • the cryptographic algorithm table holds the cryptographic encryption algorithm that the user can use.
  • FIG. 4 shows the process for the terminal (UE) to register the server for the first time, including:
  • Step 201 The UE sends a registration message to the server, where the registration message includes a user account and a password.
  • Step 202 The server encrypts the string composed of the account number and the password by using the MD5 algorithm to obtain a 128-bit string S. According to the characteristics of the MD5 algorithm, the string S is unique.
  • Step 203 Take the first bit of the string S, as an index of the cryptographic algorithm, obtain an encryption algorithm from the algorithm table, and encrypt the password.
  • a hash function is used to map to the cryptographic algorithm table. If there are five encryption algorithms in the cryptographic algorithm table, and the first digit of the string may be 0-9 and az a total of thirty-six cases, then a hash function is used to calculate the first bit of the string, mapping to The cryptographic algorithm table.
  • Step 204 Take the first four digits of the string as the record index (password-index) of the user in the password table, first check whether the record corresponding to the password-index is empty in the first password table, if not, then Check whether the record corresponding to the password-index in the second password table is empty until the record corresponding to the password-index in the password table is empty.
  • Step 205 Insert the encrypted password into the record corresponding to the password-index in the password table, and use the password table as the user's password table index (table-index).
  • Step 206 Insert the account and table-index into the user account table, and use the user of the UE to complete the registration.
  • Figure 5 shows the process of the UE logging in to the server, including:
  • Step 301 The UE sends a registration message to the server, where the registration message includes an account and a password.
  • Step 303 The process of obtaining the user password algorithm is the same as the process of registering the server for the first time.
  • Step 305 Take the first four digits of the string as the user's record index (password-index), and obtain the user password from the record corresponding to the user's password-index in the password table corresponding to the user's table-index.
  • Step 306 Compare whether the password obtained from the password table and the password in the login message are the same.
  • Step 307 If the two passwords are the same, the user who uses the UE is a legitimate user, and the login ends.
  • an embodiment of an apparatus for processing a password of a login server according to the present invention includes:
  • the first obtaining unit 41 is configured to obtain a first account and a first password that are input when the user logs in to the server;
  • the first generating unit 42 is configured to generate a first index according to the first account and the first password;
  • the first searching unit 43 is configured to search for a second index corresponding to the first account.
  • the second searching unit 44 is configured to search for the first one in the first password table according to the first index and the second index.
  • the second obtaining unit 45 is configured to acquire the second password saved in the first record, and the comparing unit 46 is configured to compare the second password with the first password to generate a comparison result;
  • the management unit 47 is configured to allow the user to log in if the comparison result is the same.
  • the device for processing a password for logging in to the server further includes:
  • the first encryption unit 48 is configured to encrypt the first password according to a predetermined algorithm.
  • the comparing unit 46 is specifically configured to: perform the second password and the encrypted first password. Compare and generate comparison results.
  • the device for processing a password for logging in to the server further includes: a third acquiring unit, configured to acquire a second account and a third password that are input when the user registers; the second generating unit is configured to generate a third character string according to the second account and the third password;
  • a third generating unit configured to acquire at least one character in the third string, and combine to generate a third index
  • a first saving unit configured to acquire a second password table according to the third index; and save the third password in a second record in the second password table;
  • a fourth acquiring unit configured to acquire a record sequence number of the second record, as a fourth index, where the first establishing unit is configured to establish a correspondence between the second account and the fourth index.
  • the device for processing a password for logging in to the server further includes:
  • a fifth acquiring unit configured to acquire a second account and a third password that are input when the user is registered; and a fourth generating unit, configured to generate a third character string according to the second account and the third password;
  • a fifth generating unit configured to acquire at least one character in the third string, and combine to generate a third index
  • a second saving unit configured to acquire a second record according to the third index; and save the third password in the second record;
  • a sixth obtaining unit configured to obtain a password table number of the third password table where the second record is located, as a fourth index
  • the second establishing unit is configured to establish a correspondence between the second account and the fourth index.
  • the embodiment of the invention provides a method for saving a password of a server user, storing the account and the password in two different database tables, and randomly acquiring an algorithm from the cryptographic algorithm table, encrypting the password, and then according to the hash algorithm. , randomly insert the encrypted password into the password table.
  • the password of the user in the password table cannot be viewed, thereby preventing the leakage of the user information, and preventing the illegal user from obtaining the user password from the server, thereby improving The security of the server.
  • the password is stored in a record of a password table, and the storage location of the password needs to be obtained through the first index and the second index, therefore, the user account and the password It is not simply stored in a database table, but saved to two different data tables, thus increasing the security of the password.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明提供一种处理登陆服务器的密码的方法和装置。所述处理登陆服务器的密码的方法,包括:获取用户登录服务器时输入的第一账号和第一密码;根据所述第一账号和所述第一密码,生成第一索引;查找所述第一账号对应的第二索引;根据所述第一索引和所述第二索引,查找第一密码表中的第一记录;获取所述第一记录中保存的第二密码;将所述第二密码和所述第一密码进行比较,生成比较结果;如果所述比较结果为相同,则允许所述用户登录,采用本发明,能够提高保存密码的安全性。

Description

处理登陆服务器的密码的方法和装置 技术领域
本发明涉及网络安全技术领域, 特别是指一种处理登陆服务器的密码 的方法和装置。 背景技术
随着网络应用的快速发展, 网络用户的账号信息被盗现象也日趋严重, 网络安全成为一个不容忽视的问题。 一个用户通常同时拥有多个网络账号, 如网络游戏账号、 网上银行账户、 即时通信账号、 电子邮箱账号等等, 这 些账号所代表的价值甚至超过人们的实物财产。 但由于网络的虚拟性, 网 络窃贼难以被发现, 因此网络盗窃现象极其严重, 网络账号防盗技术就显 得尤其重要。
通常, 用户账号信息保存在服务器的数据库表中, 这个表有个两个字 段, 一个字段保存用户账号, 一个字段保存用户密码, 一个用户占用用户 信息表的一行, 也就是一个数据记录。 当用户登录时, 程序将用户填写的 信息与数据库表中的信息对照, 如果用户账号和密码都准确无误, 那么说 明这个用户是合法用户, 通过登录; 反之, 则是非法用户, 不许用户通过。
将用户账号和密码直接保存在一张数据库表中, 并没有进行任何保密 措施, 如果非法用户得到这个文件, 轻易就能获取用户账号和密码。 如果 是一个不负责的服务器管理员, 则不需要任何技术手段, 就可以查看服务 器中的用户账号信息。 发明内容
本发明实施例要解决的技术问题是提供一种处理登陆服务器的密码的 方法和装置, 能够提供服务器的密码的保存的安全性。
为解决上述技术问题, 本发明的实施例提供技术方案如下:
一方面, 提供一种处理登陆服务器的密码的方法, 包括:
获取用户登录服务器时输入的第一账号和第一密码;
根据所述第一账号和所述第一密码, 生成第一索引;
查找所述第一账号对应的第二索引;
根据所述第一索引和所述第二索引, 查找第一密码表中的第一记录; 获取所述第一记录中保存的第二密码;
将所述第二密码和所述第一密码进行比较, 生成比较结果;
如果所述比较结果为相同, 则允许所述用户登录。
其中, 所述第一索引为密码表索引, 所述第二索引为记录索引; 所述 根据所述第一索引和所述第二索引, 查找第一密码表中的第一记录包括: 查找所述第一索引对应的第一密码表; 在所述第一密码表中, 查找所 述第二索引对应的第一记录; 或者,
所述第一索引为记录索引, 所述第二索引为密码表索引; 所述根据所 述第一索引和所述第二索引, 查找第一密码表中的第一记录包括:
查找所述第二索引对应的第一密码表; 在所述第一密码表中, 查找所 述第一索引对应的第一记录。
其中, 所述根据所述第一账号和所述第一密码, 生成第一索引包括: 根据所述第一账号和所述第一密码, 生成第一字符串;
获取所述第一字符串中的至少一位字符, 并组合, 生成第一索引。 其中, 所述根据所述第一账号和所述第一密码生成第一字符串包括: 将所述第一账号和所述第一密码组成第二字符串;
通过加密算法, 根据所述第二字符串生成所述第一字符串。
其中, 将所述第二密码和所述第一密码进行比较, 生成比较结果之前, 所述方法还包括:
根据预定算法, 对所述第一密码进行加密;
相应地, 所述将所述第二密码和所述第一密码进行比较, 生成比较结 果, 为: 将所述第二密码和加密后的所述第一密码进行比较, 生成比较结 果。
其中, 所述根据预定算法, 对所述第一密码进行加密包括:
根据所述第一账号和所述第一密码, 生成第一字符串;
获取所述第一字符串的预定位的字符;
获取所述预定位的字符对应的加密算法;
根据所述加密算法, 对所述第一密码进行加密。
其中, 获取用户登录服务器时输入的账号和第一密码之前, 所述方法 还包括:
获取所述用户注册时输入的第二账号和第三密码;
根据所述第二账号和所述第三密码, 生成第三字符串;
获取所述第三字符串中的至少一位字符, 并组合, 生成第三索引; 根据所述第三索引获取第二密码表, 在所述第二密码表中的第二记录 中保存所述第三密码;
获取所述第二记录的记录序号, 作为第四索引;
建立所述第二账号和所述第四索引之间的对应关系。
其中, 获取用户登录服务器时输入的第一账号和第一密码之前, 所述 方法还包括:
获取所述用户注册时输入的第二账号和第三密码;
根据所述第二账号和所述第三密码, 生成第三字符串;
获取所述第三字符串中的至少一位字符, 并组合, 生成第三索引; 根据所述第三索引获取第二记录, 在所述第二记录中保存所述第三密 码;
获取所述第二记录所在的第三密码表的密码表序号, 作为第四索引; 建立所述第二账号和所述第四索引之间的对应关系。
其中, 所述根据所述第二账号和所述第三密码生成第三字符串包括: 将所述第二账号和所述第三密码组成第四字符串;
通过加密算法, 根据所述第四字符串生成第三字符串。
其中, 所述方法还包括: 根据预定算法, 对所述第三密码进行加密; 相应地, 所述述在所述第二记录中保存所述第三密码为:
在所述第二记录中保存加密后的所述第三密码。
其中, 所述根据预定算法, 对所述第三密码进行加密包括:
根据所述第二账号和所述第三密码, 生成第三字符串;
获取所述第三字符串的预定位的字符;
获取所述预定位的字符对应的加密算法;
根据所述加密算法, 对所述第三密码进行加密。
另一方面, 提供一种处理登陆服务器的密码的装置, 包括:
第一获取单元, 配置为获取用户登录服务器时输入的第一账号和第一 密码;
第一生成单元, 配置为根据所述第一账号和所述第一密码, 生成第一 索引;
第一查找单元, 配置为查找所述第一账号对应的第二索引;
第二查找单元, 配置为根据所述第一索引和所述第二索引, 查找第一 密码表中的第一记录;
第二获取单元, 配置为获取所述第一记录中保存的第二密码; 比较单元, 配置为将所述第二密码和所述第一密码进行比较, 生成比 较结果; 管理单元, 配置为如果所述比较结果为相同, 则允许所述用户登录。 所述处理登陆服务器的密码的装置, 还包括: 第一加密单元, 配置为 根据预定算法, 对所述第一密码进行加密;
所述比较单元配置为: 将所述第二密码和加密后的所述第一密码进行 比较, 生成比较结果。
其中, 所述处理登陆服务器的密码的装置, 还包括:
第三获取单元, 配置为获取所述用户注册时输入的第二账号和第三密 码;
第二生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第三生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第一保存单元, 配置为根据所述第三索引获取一第二密码表, 在所述 第二密码表中的一第二记录中保存所述第三密码;
第四获取单元, 配置为获取所述第二记录的记录序号, 作为第四索引; 第一建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
其中, 所述处理登陆服务器的密码的装置, 还包括:
第五获取单元, 配置为获取所述用户注册时输入的第二账号和第三密 码;
第四生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第五生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第二保存单元, 配置为根据所述第三索引获取第二记录, 在所述第二 记录中保存所述第三密码;
第六获取单元, 配置为获取所述第二记录所在的第三密码表的密码表 序号, 作为第四索引;
第二建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
本发明的实施例具有以下有益效果:
上述方案中, 密码保存在一密码表的一记录中, 并且需要通过第一索 引和第二索引来获取密码的存储位置, 因此, 用户账号和密码不是简单地 保存在一张数据库表, 增加了密码的安全性。 附图说明
图 1 为本发明所述的一种处理登陆服务器的密码的方法的一实施例的 流程示意图;
图 2为本发明所述的一种处理登陆服务器的密码的方法的另一实施例 的流程示意图;
图 3 为本发明所述的一种处理登陆服务器的密码的方法的又一实施例 的流程示意图;
图 4 为本发明所述的处理登陆服务器的密码的方法的应用场景一实施 例中终端注册服务器的流程示意图;
图 5 为本发明所述的处理登陆服务器的密码的方法的应用场景一实施 例中终端登录服务器的流程示意图;
图 6为本发明所述的一种处理登陆服务器的密码的装置的一实施例的 结构示意图。 具体实施方式
为使本发明的实施例要解决的技术问题、 技术方案和优点更加清楚, 下面将结合附图及具体实施例进行详细描述。
如图 1 所示, 为本发明所述的一种处理登陆服务器的密码的方法的一 实施例, 包括:
步骤 11 , 获取用户登录服务器时输入的第一账号和第一密码; 步骤 12, 根据所述第一账号和所述第一密码, 生成第一索引; 其中, 步骤 12包括:
步骤 121 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 122, 获取所述第一字符串中的至少一位字符, 并组合, 生成第一 索引。
其中, 步骤 121包括:
步骤 1211 , 将所述第一账号和所述第一密码组成第二字符串; 步骤 1212, 通过加密算法, 根据所述第二字符串生成第一字符串。 步骤 13 , 查找所述第一账号对应的第二索引;
步骤 14, 根据所述第一索引和所述第二索引, 查找第一密码表中的第 一记录;
其中, 在一应用场景中, 第一索引为密码表索引, 第二索引为记录索 引。 步骤 14包括:
步骤 141A, 查找所述第一索引对应的第一密码表;
步骤 142A,在所述第一密码表中,查找所述第二索引对应的第一记录; 或者, 在一应用场景中, 第一索引为记录索引, 第二索引为密码表索 引。 步骤 14包括:
步骤 141B, 查找所述第二索引对应的第一密码表;
步骤 142B,在所述第一密码表中,查找所述第一索引对应的第一记录。 步骤 15 , 获取所述第一记录中保存的第二密码;
步骤 16, 将所述第二密码和所述第一密码进行比较, 生成比较结果; 步骤 17, 如果所述比较结果为相同, 则允许所述用户登录。
可选的, 步骤 16之前, 所述方法还包括:
步骤 16 A, 根据预定算法, 对所述第一密码进行加密;
相应地, 步骤 16具体为: 将所述第二密码和加密后的所述第一密码进 行比较, 生成比较结果。
其中, 步骤 16 A包括:
步骤 16 A1 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 16 A2 , 获取所述第一字符串的预定位的字符;
步骤 16 A3 , 获取所述预定位的字符对应的加密算法;
步骤 16 A4, 根据所述加密算法, 对所述第一密码进行加密。
上述方案中, 密码保存在一密码表的一记录中, 并且需要通过第一索 引和第二索引来获取密码的存储位置, 因此, 用户账号和密码不是简单地 保存在一张数据库表, 增加了密码的安全性。
如图 2所示, 为本发明所述的一种处理登陆服务器的密码的方法的另 一实施例, 包括:
步骤 21 , 获取用户注册时输入的第二账号和第三密码;
步骤 22, 根据所述第二账号和所述第三密码, 生成第三字符串; 步骤 23 , 获取所述第三字符串中的至少一位字符, 并组合, 生成第三 索引;
步骤 24, 根据所述第三索引获取一第二密码表; 在所述第二密码表中 的一第二记录中保存所述第三密码;
步骤 25 , 获取所述第二记录的记录序号, 作为第四索引;
步骤 26, 建立所述第二账号和所述第四索引之间的对应关系。
上述步骤 21-26为用户注册时的步骤。
步骤 27, 获取用户登录服务器时输入的第一账号和第一密码; 步骤 28, 根据所述第一账号和所述第一密码, 生成第一索引; 步骤 29, 查找所述第一账号对应的第二索引;
步骤 210,根据所述第一索引和所述第二索引, 查找第一密码表中的第 一记录; 在该实施例中, 第四索引和第二索引相同, 与记录具有对应关系, 第一索引和第三索引相同, 与密码表具有对应关系。
其中, 步骤 210包括: 步骤 2101 , 查找所述第一索引对应的第一密码 表; 步骤 2102, 在所述第一密码表中, 查找所述第二索引对应的第一记录。
步骤 211 , 获取所述第一记录中保存的第二密码;
步骤 212, 将所述第二密码和所述第一密码进行比较, 生成比较结果; 步骤 213 , 如果所述比较结果为相同, 则允许所述用户登录。
上述步骤 27-213为用户登陆时的步骤。
在一应用场景中, 其中, 步骤 22包括:
步骤 221 , 将所述第二账号和所述第三密码组成第四字符串;
步骤 222, 通过加密算法, 根据所述第四字符串生成第三字符串。
相应的, 后续处理步骤中, 步骤 28包括:
步骤 281 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 282, 获取所述第一字符串中的至少一位字符, 并组合, 生成第一 索引。
其中, 步骤 281包括:
步骤 2811 , 将所述第一账号和所述第一密码组成第二字符串; 步骤 2812, 通过加密算法, 根据所述第二字符串生成第一字符串。 在一应用场景中, 步骤 24中的所述在所述第二密码表中的一第二记录 中保存所述第三密码的步骤包括:
步骤 241 , 根据预定算法, 对所述第三密码进行加密;
步骤 242, 在所述第二记录中保存加密后的所述第三密码。 相应的, 后续处理步骤中, 步骤 212之前, 所述方法还包括: 步骤 212A, 根据预定算法, 对所述第一密码进行加密;
步骤 212具体为: 将所述第二密码和加密后的所述第一密码进行比较, 生成比较结果。
在一应用场景中, 步骤 241包括:
步骤 2411 , 根据所述第二账号和所述第三密码, 生成第三字符串; 步骤 2412, 获取所述第三字符串的预定位的字符;
步骤 2413 , 获取所述预定位的字符对应的加密算法; 也就是说, 预先 设置多个加密算法, 并且建立不同字符和不同加密算法之间的对应关系。
步骤 2414, 根据所述加密算法, 对所述第三密码进行加密。
相应的, 后续处理步骤中, 步骤 212A步骤包括:
步骤 212A1 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 212A2, 获取所述第一字符串的预定位的字符;
步骤 212A3 , 获取所述预定位的字符对应的加密算法;
步骤 212A4, 根据所述加密算法, 对所述第一密码进行加密。
如图 3 所示, 为本发明所述的一种处理登陆服务器的密码的方法又一 实施例, 包括:
步骤 31 , 获取用户注册时输入的第二账号和第三密码;
步骤 32, 根据所述第二账号和所述第三密码, 生成第三字符串; 步骤 33 , 获取所述第三字符串中的至少一位字符, 并组合, 生成第三 索引;
步骤 34, 根据所述第三索引获取一第二记录, 在所述第二记录中保存 所述第三密码;
步骤 35 , 获取所述第二记录所在的第三密码表的密码表序号, 作为第 四索引; 步骤 36, 建立所述第二账号和所述第四索引之间的对应关系。
其中步骤 31 -36为用户注册时的步骤。
步骤 37 , 获取用户登录服务器时输入的第一账号和第一密码; 步骤 38 , 根据所述第一账号和所述第一密码, 生成第一索引; 步骤 39 , 查找所述第一账号对应的第二索引;
步骤 310,根据所述第一索引和所述第二索引, 查找第一密码表中的第 一记录; 在该实施例中, 第四索引和第二索引相同, 与密码表具有对应关 系, 第一索引和第三索引相同, 与记录具有对应关系。
其中, 步骤 310包括: 步骤 3101 , 查找所述第二索引对应的第一密码 表; 步骤 3102 , 在所述第一密码表中, 查找所述第一索引对应的第一记录。
步骤 311 , 获取所述第一记录中保存的第二密码;
步骤 312 , 将所述第二密码和所述第一密码进行比较, 生成比较结果; 步骤 313 , 如果所述比较结果为相同, 则允许所述用户登录。
其中步骤 37-313为用户登陆时的步骤。
在一应用场景中, 其中, 步骤 32包括:
步骤 321 , 将所述第二账号和所述第三密码组成第四字符串;
步骤 322 , 通过加密算法, 根据所述第四字符串生成第三字符串。
相应的, 后续处理步骤中, 步骤 38包括:
步骤 381 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 382 , 获取所述第一字符串中的至少一位字符, 并组合, 生成第一 索引。
其中, 步骤 381包括:
步骤 3811 , 将所述第一账号和所述第一密码组成第二字符串; 步骤 3812 , 通过加密算法, 根据所述第二字符串生成第一字符串。 在一应用场景中, 步骤 34中的所述在第二记录中保存所述第三密码的 步骤包括:
步骤 341 , 根据预定算法, 对所述第三密码进行加密;
步骤 342, 在所述第二记录中保存加密后的所述第三密码。
相应的, 后续处理步骤中, 步骤 312之前, 所述方法还包括: 步骤 312A, 根据预定算法, 对所述第一密码进行加密;
步骤 312具体为: 将所述第二密码和加密后的所述第一密码进行比较, 生成比较结果。
在一应用场景中, 步骤 341包括:
步骤 3411 , 根据所述第二账号和所述第三密码, 生成第三字符串; 步骤 3412, 获取所述第三字符串的预定位的字符;
步骤 3413 , 获取所述预定位的字符对应的加密算法;
步骤 3414, 根据所述加密算法, 对所述第三密码进行加密。
相应的, 后续处理步骤中, 步骤 312A步骤包括:
步骤 212A1 , 根据所述第一账号和所述第一密码, 生成第一字符串; 步骤 312A2, 获取所述第一字符串的预定位的字符;
步骤 312A3 , 获取所述预定位的字符对应的加密算法;
步骤 312A4, 根据所述加密算法, 对所述第一密码进行加密。
以下描述本发明实施例的应用场景。
本发明实施例釆用如下技术方案: 服务器存在一张用户表、 一张密码 算法表和若干张密码表。 账号表包含 usemame和 password-table两个字段; 其中, usemame字段保存用户的账号信息, password-table保存用户的密码 表索引, 密码表索引表示密码保存在哪张张表中。 密码算法表保存服务器 支持的密码算法。 密码表仅包含一个字段 password, 保存用户加密后的密 码。
用户第一次注册时, 通过预定协议将账号和密码发送到服务器。 服务 器收到消息后, 首先将账号和密码组成第一字符串; 通过 MD5加密算法, 根据第一字符串产生第二字符串; 然后取这个字符串的第一位, 根据字符 串的第一位的值, 从密码算法表中获取对应的加密算法; 然后对用户的密 码进行加密。 再取字符串的前四位作为用户密码的记录索引, 如果该索引 对应在第一张密码表中的记录不为空, 则查看该索引对应在第二张密码表 中是否已经存在记录, 直到产生的记录索引在第 n张密码表中的记录为空, 则将用户加密后的密码插入到第 n张密码表的记录索引对应的记录中。 记 录索引表示密码保存在密码表中哪条记录。 最后, 将账号和对应密码表的 表索引 n插入到账号表中。
以后用户每次登录时, 服务器收到用户的账号和密码后, 首先将账号 和密码组成第一字符串, 通过 MD5加密算法, 根据第一字符串产生第二字 符串; 然后根据第二字符串的第一位的值, 从密码算法表中获取对应的加 密算法, 对用户密码进行加密; 然后取第二字符串的前四位作为用户的记 录索引, 再从用户表中获取用户的账号信息和密码表索引; 根据记录索引, 到密码表索引对应的密码表中获取用户保存在服务器中的密码; 同时和登 录消息中的密码进行比较, 如果相同则用户合法, 登录结束。
以下描述本发明所述的保存服务器用户密码的方法的实施例。
服务器端的数据库包含一张用户账号表、 一张密码算法表和若干密码 表。
用户贝长号表包含 username和 password-table两个字段; 其中, username 字段保存用户的账号信息, password-table保存用户的密码表索引, 密码表 索引表示用户的密码保存在哪张密码表中。
密码算法表保存用户可以使用的密码加密算法。
密码表有若干张, 根据服务器的用户量来决定。 密码表仅包含一个字 段 password , 保存用户加密后的密码。 图 4为终端 (UE )第一次注册服务器的流程, 包括:
步骤 201 : UE发送注册消息到服务器, 注册消息中包含用户账号和密 码。
步骤 202:服务器把账号和密码组成的字符串运用 MD5算法进行加密, 得到 128位的字符串 S。 根据 MD5算法的特性, 字符串 S是唯一的。
步骤 203: 取字符串 S的第一位, 作为密码算法索引, 从算法表获取加 密算法, 对密码进行加密。
该步骤中, 如果服务器中的密码算法的数量少于字符串第一位的可能 取值的数量, 则使用散列函数映射到密码算法表中。 假如, 密码算法表中 有五种加密算法, 而字符串第一位可能是 0-9和 a-z共三十六种情况, 则使 用一种哈希函数对字符串第一位进行计算, 映射到该密码算法表中。
步骤 204 : 取字符串的前四位作为用户在密码表中的记录索引 ( password-index ),首先在第一张密码表中查看 password-index对应的记录 是否为空,如果不为空,则查看第二张密码表中 password-index对应的记录 是否为空, 直到一张密码表中 password-index对应的记录为空。
步骤 205: 把加密后的密码插入到该密码表中 password-index对应的记 录中, 同时把该密码表作为用户的密码表索引 ( table-index )。
步骤 206: 将账号和 table-index插入到用户账号表中, 使用所述 UE的 用户完成注册。
图 5为 UE登录服务器的流程, 包括:
步骤 301 : UE发送注册消息到服务器, 注册消息中包含账号和密码。 步骤 302: 同第一次注册服务器一样, 服务器对账号和密码组成的字符 串运用 MD5算法进行加密, 得到 128位的字符串 S。
步骤 303: 获取用户密码算法的流程同第一次注册服务器的流程相同。 步骤 304:从服务器的用户账号表中获取用户的账号和该用户的密码表 索引 table-index。
步骤 305: 取字符串的前四位作为用户的记录索引 ( password-index ), 从用户的 table-index对应的密码表中用户的 password-index对应的记录中获 取用户密码。
步骤 306: 比较从密码表获取的密码和登录消息中的密码是否相同。 步骤 307: 如果两者密码相同, 说明使用所述 UE的用户是合法用户, 登录结束。
如图 6所示, 为本发明所述的一种处理登陆服务器的密码的装置的一 实施例, 包括:
第一获取单元 41 , 配置为获取用户登录服务器时输入的第一账号和第 一密码;
第一生成单元 42 , 配置为根据所述第一账号和所述第一密码, 生成第 一索引;
第一查找单元 43 , 配置为查找所述第一账号对应的第二索引; 第二查找单元 44 , 配置为根据所述第一索引和所述第二索引, 查找第 一密码表中的第一记录;
第二获取单元 45 , 配置为获取所述第一记录中保存的第二密码; 比较单元 46, 配置为将所述第二密码和所述第一密码进行比较, 生成 比较结果;
管理单元 47, 配置为如果所述比较结果为相同, 则允许所述用户登录。 所述的处理登陆服务器的密码的装置, 还包括:
第一加密单元 48, 配置为根据预定算法, 对所述第一密码进行加密; 相应地, 所述比较单元 46, 具体配置为: 将所述第二密码和加密后的 所述第一密码进行比较, 生成比较结果。
所述的处理登陆服务器的密码的装置, 还包括: 第三获取单元, 配置为获取用户注册时输入的第二账号和第三密码; 第二生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第三生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第一保存单元, 配置为根据所述第三索引获取一第二密码表; 在所述 第二密码表中的一第二记录中保存所述第三密码;
第四获取单元, 配置为获取所述第二记录的记录序号, 作为第四索引; 第一建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
或者, 所述的处理登陆服务器的密码的装置, 还包括:
第五获取单元, 配置为获取用户注册时输入的第二账号和第三密码; 第四生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第五生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第二保存单元, 配置为根据所述第三索引获取一第二记录; 在所述第 二记录中保存所述第三密码;
第六获取单元, 配置为获取所述第二记录所在的第三密码表的密码表 序号, 作为第四索引;
第二建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
本发明实施例提供一种保存服务器用户密码的方法, 把账号和密码分 别保存到两张不同的数据库表中, 同时从密码算法表随机获取一种算法, 对密码进行加密, 再根据哈希算法, 把加密后的密码随机插入到密码表中。 这样即使有人非法获取整个数据库, 由于无法获取用户对应在密码表中的 索引, 因此不能查看到用户在密码表中的密码, 从而防止用户信息的泄漏, 同时防止非法用户从服务器获取用户密码, 提高了服务器的安全性,。
以上所述是本发明的优选实施方式, 应当指出, 对于本技术领域的普 通技术人员来说, 在不脱离本发明所述原理的前提下, 还可以作出若干改 进和润饰, 这些改进和润饰也应视为本发明的保护范围。 工业实用性
本发明实施例提供的处理登陆服务器的密码的方法和装置, 密码保存 在一密码表的一记录中, 并且需要通过第一索引和第二索引来获取密码的 存储位置, 因此, 用户账号和密码不是简单地保存在一张数据库表, 而是 分别保存到两张不同的数据表中, 如此, 增加了密码的安全性。

Claims

权利要求书
1、 一种处理登陆服务器的密码的方法, 包括:
获取用户登录服务器时输入的第一账号和第一密码;
根据所述第一账号和所述第一密码, 生成第一索引;
查找所述第一账号对应的第二索引;
根据所述第一索引和所述第二索引, 查找第一密码表中的第一记录; 获取所述第一记录中保存的第二密码;
将所述第二密码和所述第一密码进行比较, 生成比较结果;
如果所述比较结果为相同, 则允许所述用户登录。
2、 根据权利要求 1所述的处理登陆服务器的密码的方法, 其中, 所述 第一索引为密码表索引, 所述第二索引为记录索引; 所述根据所述第一索 引和所述第二索引, 查找第一密码表中的第一记录包括:
查找所述第一索引对应的第一密码表; 在所述第一密码表中, 查找所 述第二索引对应的第一记录; 或者,
所述第一索引为记录索引, 所述第二索引为密码表索引; 所述根据所 述第一索引和所述第二索引, 查找第一密码表中的第一记录包括:
查找所述第二索引对应的第一密码表; 在所述第一密码表中, 查找所 述第一索引对应的第一记录。
3、 根据权利要求 1所述的处理登陆服务器的密码的方法, 其中, 所述 根据所述第一账号和所述第一密码, 生成第一索引包括:
根据所述第一账号和所述第一密码, 生成第一字符串;
获取所述第一字符串中的至少一位字符, 并组合, 生成第一索引。
4、 根据权利要求 3所述的处理登陆服务器的密码的方法, 其中, 所述 根据所述第一账号和所述第一密码生成第一字符串包括:
将所述第一账号和所述第一密码组成第二字符串; 通过加密算法, 根据所述第二字符串生成所述第一字符串。
5、 根据权利要求 1所述的处理登陆服务器的密码的方法, 其中, 将所 述第二密码和所述第一密码进行比较, 生成比较结果之前, 所述方法还包 括:
根据预定算法, 对所述第一密码进行加密;
相应地, 所述将所述第二密码和所述第一密码进行比较, 生成比较结 果, 为: 将所述第二密码和加密后的所述第一密码进行比较, 生成比较结 果。
6、 根据权利要求 5所述的处理登陆服务器的密码的方法, 其中, 所述 根据预定算法, 对所述第一密码进行加密包括:
根据所述第一账号和所述第一密码, 生成第一字符串;
获取所述第一字符串的预定位的字符;
获取所述预定位的字符对应的加密算法;
根据所述加密算法, 对所述第一密码进行加密。
7、 根据权利要求 1-6任一项所述的处理登陆服务器的密码的方法, 其 中, 获取用户登录服务器时输入的账号和第一密码之前, 所述方法还包括: 获取所述用户注册时输入的第二账号和第三密码;
根据所述第二账号和所述第三密码, 生成第三字符串;
获取所述第三字符串中的至少一位字符, 并组合, 生成第三索引; 根据所述第三索引查找第二密码表, 在所述第二密码表中的第二记录 中保存所述第三密码;
获取所述第二记录的记录序号, 作为第四索引;
建立所述第二账号和所述第四索引之间的对应关系。
8、 根据权利要求 1-6任一项所述的处理登陆服务器的密码的方法, 其 中, 获取用户登录服务器时输入的第一账号和第一密码之前, 所述方法还 包括:
获取所述用户注册时输入的第二账号和第三密码;
根据所述第二账号和所述第三密码, 生成第三字符串;
获取所述第三字符串中的至少一位字符, 并组合, 生成第三索引; 根据所述第三索引获取第二记录, 在所述第二记录中保存所述第三密 码;
获取所述第二记录所在的第三密码表的密码表序号, 作为第四索引; 建立所述第二账号和所述第四索引之间的对应关系。
9、 根据权利要求 7或 8所述的处理登陆服务器的密码的方法, 其中, 所述根据所述第二账号和所述第三密码生成第三字符串包括:
将所述第二账号和所述第三密码组成第四字符串;
通过加密算法, 根据所述第四字符串生成第三字符串。
10、 根据权利要求 8所述的处理登陆服务器的密码的方法, 其中, 所 述方法还包括: 根据预定算法, 对所述第三密码进行加密;
相应地, 所述在所述第二记录中保存所述第三密码为:
在所述第二记录中保存加密后的所述第三密码。
11、 根据权利要求 10所述的处理登陆服务器的密码的方法, 其中, 所 述根据预定算法, 对所述第三密码进行加密包括:
根据所述第二账号和所述第三密码, 生成所述第三字符串;
获取所述第三字符串的预定位的字符;
获取所述预定位的字符对应的加密算法;
根据所述加密算法, 对所述第三密码进行加密。
12、 一种处理登陆服务器的密码的装置, 包括:
第一获取单元, 配置为获取用户登录服务器时输入的第一账号和第一 第一生成单元, 配置为根据所述第一账号和所述第一密码, 生成第一 索引;
第一查找单元, 配置为查找所述第一账号对应的第二索引;
第二查找单元, 配置为根据所述第一索引和所述第二索引, 查找第一 密码表中的第一记录;
第二获取单元, 配置为获取所述第一记录中保存的第二密码; 比较单元, 配置为将所述第二密码和所述第一密码进行比较, 生成比 较结果;
管理单元, 配置为如果所述比较结果为相同, 则允许所述用户登录。
13、 根据权利要求 12所述的处理登陆服务器的密码的装置, 其中, 所 述装置还包括: 第一加密单元, 配置为根据预定算法, 对所述第一密码进 行力口密;
所述比较单元配置为: 将所述第二密码和加密后的所述第一密码进行 比较, 生成比较结果。
14、 根据权利要求 12或 13所述的处理登陆服务器的密码的装置, 其 中, 所述装置还包括:
第三获取单元, 配置为获取所述用户注册时输入的第二账号和第三密 码;
第二生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第三生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第一保存单元, 配置为根据所述第三索引获取第二密码表; 在所述第 二密码表中的第二记录中保存所述第三密码;
第四获取单元, 配置为获取所述第二记录的记录序号, 作为第四索引; 第一建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
15、 根据权利要求 12或 13所述的处理登陆服务器的密码的装置, 其 中, 所述装置还包括:
第五获取单元, 配置为获取所述用户注册时输入的第二账号和第三密 码;
第四生成单元, 配置为根据所述第二账号和所述第三密码, 生成第三 字符串;
第五生成单元, 配置为获取所述第三字符串中的至少一位字符, 并组 合, 生成第三索引;
第二保存单元, 配置为根据所述第三索引获取第二记录, 在所述第二 记录中保存所述第三密码;
第六获取单元, 配置为获取所述第二记录所在的第三密码表的密码表 序号, 作为第四索引;
第二建立单元, 配置为建立所述第二账号和所述第四索引之间的对应 关系。
PCT/CN2013/079422 2012-09-03 2013-07-15 处理登陆服务器的密码的方法和装置 WO2013170822A2 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210321269.0A CN103685149B (zh) 2012-09-03 2012-09-03 处理登陆服务器的密码的方法和装置
CN201210321269.0 2012-09-03

Publications (2)

Publication Number Publication Date
WO2013170822A2 true WO2013170822A2 (zh) 2013-11-21
WO2013170822A3 WO2013170822A3 (zh) 2014-01-09

Family

ID=49584383

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/079422 WO2013170822A2 (zh) 2012-09-03 2013-07-15 处理登陆服务器的密码的方法和装置

Country Status (2)

Country Link
CN (1) CN103685149B (zh)
WO (1) WO2013170822A2 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022941A (zh) * 2015-06-24 2015-11-04 上海斐讯数据通信技术有限公司 一种用户名密码的管理方法和系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549759A (zh) * 2015-09-16 2017-03-29 阿里巴巴集团控股有限公司 身份认证方法和装置
CN105227320B (zh) * 2015-10-28 2020-01-10 腾讯科技(深圳)有限公司 一种授权方法、服务器、终端及系统
CN106357412B (zh) * 2016-10-14 2019-11-26 国政通科技股份有限公司 一种核验身份信息的方法、装置及系统
CN109450925B (zh) * 2018-12-05 2021-09-28 国网浙江省电力有限公司杭州供电公司 用于电力二次系统运维的用户权限验证方法、装置及电子设备
CN110519060B (zh) * 2019-08-23 2022-03-29 湖南财政经济学院 一种密码生成及验证方法
CN112671786B (zh) * 2020-12-29 2022-06-28 科来网络技术股份有限公司 一种基于第三方认证的安全登陆的系统及方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5497421A (en) * 1992-04-28 1996-03-05 Digital Equipment Corporation Method and apparatus for protecting the confidentiality of passwords in a distributed data processing system
US7685430B1 (en) * 2005-06-17 2010-03-23 Sun Microsystems, Inc. Initial password security accentuated by triple encryption and hashed cache table management on the hosted site's server
CN101697540A (zh) * 2009-10-15 2010-04-21 浙江大学 一种p2p服务请求用户身份认证方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1832401A (zh) * 2006-04-06 2006-09-13 陈珂 一种保护帐号密码安全的方法
CN101075873B (zh) * 2007-06-28 2012-10-03 腾讯科技(深圳)有限公司 内容输入方法及其系统
CN101159630B (zh) * 2007-11-09 2011-05-18 华为技术有限公司 流量监管方法、系统和宽带接入服务器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5497421A (en) * 1992-04-28 1996-03-05 Digital Equipment Corporation Method and apparatus for protecting the confidentiality of passwords in a distributed data processing system
US7685430B1 (en) * 2005-06-17 2010-03-23 Sun Microsystems, Inc. Initial password security accentuated by triple encryption and hashed cache table management on the hosted site's server
CN101697540A (zh) * 2009-10-15 2010-04-21 浙江大学 一种p2p服务请求用户身份认证方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022941A (zh) * 2015-06-24 2015-11-04 上海斐讯数据通信技术有限公司 一种用户名密码的管理方法和系统

Also Published As

Publication number Publication date
CN103685149A (zh) 2014-03-26
CN103685149B (zh) 2017-07-21
WO2013170822A3 (zh) 2014-01-09

Similar Documents

Publication Publication Date Title
CN109862041B (zh) 一种数字身份认证方法、设备、装置、系统及存储介质
US10411907B2 (en) Secure remote user authentication leveraging public key cryptography and key splitting
US10574648B2 (en) Methods and systems for user authentication
Li et al. An efficient and security dynamic identity based authentication protocol for multi-server architecture using smart cards
TWI587672B (zh) Login authentication method, client, server and system
CN107864115A (zh) 一种利用便携式终端进行用户账号登录验证的方法
US20220343017A1 (en) Provision of risk information associated with compromised accounts
AU2013101034B4 (en) Registration and authentication of computing devices using a digital skeleton key
JP2020009500A (ja) データセキュリティサービス
WO2013170822A2 (zh) 处理登陆服务器的密码的方法和装置
KR102555164B1 (ko) 데이터에 대한 액세스 인에이블링
US20160205098A1 (en) Identity verifying method, apparatus and system, and related devices
CN105409186B (zh) 用于用户认证的系统及方法
US11563724B1 (en) System and method for allowing access to an application or features thereof on each of one or more user devices
JP2013509840A (ja) ユーザー認証の方法及びシステム
Jung et al. An improved and secure anonymous biometric-based user authentication with key agreement scheme for the integrated EPR information system
TWI522841B (zh) 多重伺服器環境下的匿名認證方法
US20230291557A1 (en) Generating keys using controlled corruption in computer networks
Wang et al. A Robust IoT‐Based Three‐Factor Authentication Scheme for Cloud Computing Resistant to Session Key Exposure
US9654466B1 (en) Methods and systems for electronic transactions using dynamic password authentication
Mishra et al. Design of a lightweight two-factor authentication scheme with smart card revocation
CN105743905A (zh) 一种实现安全登录的方法、设备、装置及系统
CN105187382A (zh) 防止撞库攻击的多因子身份认证方法
CN110071937A (zh) 基于区块链的登录方法、系统及存储介质
Klevjer et al. Extended HTTP digest access authentication

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13790504

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct application non-entry in european phase

Ref document number: 13790504

Country of ref document: EP

Kind code of ref document: A2