17.01.2023 Айдар Фархутдинов 12266

Authentication Unique Keys And Salts -

| | Right | |-----------|------------| | Store in browser localStorage | Store in HTTP-only, Secure, SameSite cookies | | Log keys in debug output | Hash keys before storing in database (use bcrypt) | | Hardcode in client-side code | Use secrets manager (AWS Secrets, HashiCorp Vault) |

We have hashing. We have salts. Is the system perfect? Almost. There is one final vulnerability: .

The salt prevents Rainbow Tables, but it does not need to be encrypted. Store it in the clear next to the hash. An attacker with the database has the salt, but they still have to brute-force each password individually.

| Attack Type | Without Salt | With Salt (unique per user) | |-------------|--------------|-----------------------------| | | Instant (lookup) | Useless – would need a table per user | | Precomputed hash | Effective | Completely ineffective | | Brute-force | Same cost for all users | Same cost, but cannot reuse across users |

A salt is random data added to an input (typically a password) before it is passed through a hashing function.

and salts are not alternatives – they are complementary layers:

Наши соц. сети

authentication unique keys and salts Telegram-канал «Koderline 1С» authentication unique keys and salts Группа в Вконтакте «Кодерлайн КОРП» authentication unique keys and salts Rutube
authentication unique keys and salts

Остались вопросы - обратитесь к нам!

Впишите свои Имя и Телефон, чтобы мы ответили на все интересующие Вас вопросы.
ФИО*
E-mail*
Телефон*
Сообщение