You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auth: Reduce bcrypt cost for faster login on small devices #3718
As a user of a small device like a NAS or a Raspberry Pi, I would like the cost of the bcrypt password to be lower so that logging in does not take a very long time (or even timeout).
The default password cost (2^number of rounds) of most implementations is 11 and the current cost in PhotoPrism is 14, so we reduce it to 121, which is still more secure than what most other applications use:
Cost
Iterations
8
256 iterations
9
512 iterations
10
1,024 iterations
11
2,048 iterations
12
4,096 iterations
13
8,192 iterations
14
16,384 iterations
15
32,768 iterations
16
65,536 iterations
Footnotes
Developers can change this value in internal/entity/password.go to use a higher/lower cost in custom builds, depending on their needs. ↩
changed the title [-]Auth: Reduce bcrypt password cost for faster login on small devices[/-][+]Auth: Reduce bcrypt cost for faster login on small devices[/+]on Sep 12, 2023
I've seen this week that Laravel Php framework have advise people to increase the default (10 rounds) to 12. So having it to 12 here as well sounds sensible to me :)
Activity
[-]Auth: Reduce bcrypt password cost for faster login on small devices[/-][+]Auth: Reduce bcrypt cost for faster login on small devices[/+]Auth: Reduce bcrypt cost for faster login on small devices #3718
maxime1992 commentedon Oct 6, 2023
I've seen this week that Laravel Php framework have advise people to increase the default (10 rounds) to 12. So having it to 12 here as well sounds sensible to me :)