首页 > 试题广场 >

What is the purpose of using a

[问答题]

What is the purpose of using a"salt" along with the user-provided password? Where should the"salt" be stored,and how should it be used?

推荐

When a user creates a passw ond,the system generates a random number (which is the salt ) and appends it to the user-provided password,encrypts the resulting string and stores the encrypted result and the salt in the password file.When a password check is to be made,the password presented by the user is first concatenated with the salt and then encrypted before checking for equality wi th the stored password.Since the salt is different for different users,a passwork cracker cannot check a single candidate password,encrypt it,and check it against all of the encrypted passwords simultaneously.

发表于 2018-03-25 10:23:44 回复(0)