r/howdidtheycodeit • u/heisenberg_dev • Apr 10 '22
How do password managers like Bitwarden check if my password was involved in a data breach? Is there an API for this? Or is there a publicly available database through which they search? I am working on a project that involves something similar. Any help would be appreciated. Thanks!
45
Upvotes

33
u/AmnesiA_sc Apr 10 '22
Haveibeenpwned.com I think has some databases available
8
u/_kellythomas_ Apr 10 '22 edited Apr 10 '22
For most purposes you can just have your code check here.
But if you want to know how they code it is covered in good detail here:
And of course humans can check their password here:
2
u/deshara128 Apr 10 '22
the data breaches sell your data, companies buy data from data breaches so they can tell their clients if they have had a data breach. if they don't use those companies to warn them then they will figure it out once the banks start calling with the charge disputes. there's more to this process on the back-end than you know -- for example, your phone company, those payments you make on the website or app? someone has to type those in. so if you live in a community that has inexplicably large amounts of fraud, some accountant somewhere in the world knows about it, and hates the town you live in.
PS, you might be missing a trick here; the pic says known data breaches. the app might actually have no system or code set up for checking against data breaches whatsoever & is just employing a trick of language to imply that it it's safe when it is in fact just admitting that it's doing nothing for safety
15
u/rreeddeerr Apr 10 '22
There are databases with passwords (and emails) which were exposed during breaches
1
u/RippStudwell Apr 11 '22
https://github.com/danielmiessler/SecLists
0
u/[deleted] Apr 10 '22
Specifically in very rare breaches, passwords were stored in plaintext which gives people a large list of commonly used passwords. You can download them online and they're usually called rainbow tables. The program might have a rainbow table installed that checks your password against the table.
Technically though, your password manager should generate a completely random password for you. If you're using anything remotely close to rainbow table passwords, you're doing something that isn't very good.