Are salts useless for security if the attacker knows them?

后端 未结 7 1702
误落风尘
误落风尘 2021-02-14 11:14

Let\'s say I have a table of users set up like this:

CREATE TABLE `users` (
    `id` INTEGER PRIMARY KEY,
    `name` TEXT,
    `hashed_password` TEXT,
    `salt`         


        
7条回答
  •  轮回少年
    2021-02-14 11:32

    Knowing the salt makes it possible to do a brute-force attack, but that doesn't make it useless. Salt prevents the attacker from using an already generated rainbow table (which you could find on the web).

    The best way to prevent brute-forcing is simply to use long, complex passwords.

提交回复
热议问题