8 ms·
Why It Matters Whether Hashed Passwords Are Personal Information Under U.S. Law
- woliveirajr 6y ago> As long as the salt value remains secret, this is a very effective method against rainbow attacks and other current methods of attack But salts aren't used to be a secret: they are used to make existing rainbow tables useless, as the salt wasn't used to precompute the rainbow tables. In the example they use "2@3" pre- and post-appended to the password. Ok, so any rainbow table that haven't used 2@3 is useless. But "password" will always be a lousy password and 6 characters of salt isn't that great.
- rileymat2 6y agoIf they use an unique salt for each password you are right, if they use the same salt for each password then the article is correct(ish). I should say correct enough.
- kstrauser 6y agoEven then it's better than nothing. If every company used different salt, rainbow tables would have to be completely regenerated for each company. (This is still awful, because then two users with the same password would have the same digest. If you know that joe@example.com has password "badpass", and jane@example.com has the same hashed password, then hers is also "badpass". So use randomly per-user salts, gang! Even better, pick a tested implementation of PBKDF2 or Argon2 and use that implementation. Don't roll your own crypto!) But still, it's better than nothing.
- rileymat2 6y agoOh, yeah, I agree, it is better than nothing. Just pointing out that I have seen conditions where the article is not terribly wrong in its statement. Things like bcrypt are nice because they take care of that for you.
- deleted 6y ago[deleted]
- _trampeltier 6y agoWhy not just use joe@example.com as part of the salt? So every user has a different salt.
- deleted 6y ago[deleted]
- stickfigure 6y agoUsernames and email addresses change.
- ryanlol 6y agoDoes anyone actually use rainbow tables to crack password hashes anymore with GPUs being so fast?
- kstrauser 6y agoAn O(1) "is this hash known?" lookup is going to be faster than any GPU code.
- ryanlol 6y agoIn a world with unlimited IO throughput and very few hashes to crack, yeah. Discussion from 2017: https://hashcat.net/forum/thread-6219.html https://hashcat.net/forum/thread-6219.html From 2018: https://security.stackexchange.com/questions/186953/cracking-passwords-via-hashcat-or-rainbow-tables-which-is-faster https://security.stackexchange.com/questions/186953/cracking... GPUs are much faster now. I doubt you’ll find many people using rainbowcrack or similar tools in 2021. OTOH https://www.rainbowcrackalack.com/ https://www.rainbowcrackalack.com/
- kstrauser 6y agoHuh, TIL. Thanks for the links.
- mjevans 6y agoWhat about taking results from one leak's reversed passwords and applying it to all future hash leaks? It's the same logic as applying well known target data like birthdays, anniversaries, etc.
- kstrauser 6y agoSalting makes that nearly impossible.
- mjevans 6y agoSalting makes each crack take either it's own rainbow table or other methods. I was talking about _reversed_ passwords, guesses that fulfill the algorithm. Bonus points if they look like names, words, etc, but even random junk might just be a pwgen password.
- La1n 6y ago>if they use the same salt for each password then the article is correct(ish). Wouldn't it be a pepper then? https://en.wikipedia.org/wiki/Pepper_(cryptography) https://en.wikipedia.org/wiki/Pepper_(cryptography) edit: nvm, it seems the main difference is a pepper being secret.
- cschneid 6y agoYep - a pepper is an app-wide value that forces an attacker to get both a configuration value (from the source, or env vars) and also the hashes of the passwords (a db dump). Just another incremental thing for an attacker to overcome that is cheap & easy to implement. Salts must be unique per password as far as I know? Otherwise they don't do their main goal which is to make every guess useful against only one hash. (ie: guess 'hunter2', check if any user had hunter2 as a password, but salted, you'd only be able to guess if cschneid had hunter2 since you'd be hashing hunter2-sssssaaaaallllltttt).
- rileymat2 6y agoYeah, I was trying to imply a correctish for a general audience. If right or wrong is a spectrum.
- dane-pgp 6y agoIt's maybe also worth pointing out that if the same salt is used for each password, then an attacker who can leak the hashes after creating their own account (with a known password) can try brute-forcing the salt. If the attacker hasn't seen the code, they won't know whether the salt is prepended, or appended, or both to the password (or if there are two salts), but the amount of computation needed to try all possible salts is roughly equivalent to the amount needed to crack a single well-chosen (unsalted) password.
- motohagiography 6y agoIn many privacy regulations, any unique identifier is treated as Personally Identifying Information (PII). If the hashed password is used as a lookup key, that makes it a unique identifier, and it's PII. I do work in environments where agencies are not allowed to share user PII with each other, and therefore you can't create single (SSO) identities to login to different services. The principle is that individuals should be able to compartmentalize their business and service relationships and not have their service providers collude or conspire against them for leverage.
- DoofusOfDeath 6y agoThanks for sharing! I'm curious about the exact dividing line between PII and non-PII. So if you know, could you clarify a detail? Your phrasing was: "If the hashed password *is used as* a lookup key, that makes it a unique identifier, and it's PII." If I take your wording literally, your saying that I could store everyone's SSN in a database, but as long as my system didn't attempt to use SSN as a unique identifier, the SSN doesn't count as PII. But it seems unlikely that that's how you meant it.
- derekp7 6y ago"If A, then B" does not necessarily mean "If Not A, then Not B". Now if the first logical statement was "If, and only if A, then B", then the second logical statement would follow.
- ensignavenger 6y agoIn typical username+password systems, the passwords are not unique, and thus the password hash would be an inappropriate lookup key.
- motohagiography 6y agoIt wouldn't be, unless you were sharing an unsalted hash database across organizations, where it was aggregated with other ones, then that hash is a unique identifier. Uniqueness becomes an issue in things like de-identification, which is a legal concept, and pseudonymization, which is basically tokenization, but not an information theoretic one like say, k-anonymity, or a cryptographic one like entropy. If these distinctions are new to people on this thread, I recommend https://www.oreilly.com/library/view/building-an-anonymization/9781492053422/ https://www.oreilly.com/library/view/building-an-anonymizati... for some background.
- JulianMorrison 6y agoPlease do not use the SHA family of hashes to store passwords. They are designed to be fast. This makes brute forcing them relatively easy. There are hashes designed for passwords that are not fast.
- EGreg 6y agoCan you saw which? Blowfish?
- valauran 6y agoUse argon2 or scrypt for password hashing. PBKDF2 or bcrypt are also acceptable, but prefer the first two in new systems. Make sure to use appropriate complexity factors. A good starting point when trying to decide what crypto algorithm to use is https://latacora.micro.blog/2018/04/03/cryptographic-right-answers.html https://latacora.micro.blog/2018/04/03/cryptographic-right-a...
- JulianMorrison 6y agoI absolutely love that right answers document. Thank you.
- teddyh 6y agoPeople used to say “Just use bcrypt.”, but this might have changed since. A cursory look seems to indicate that Argon2 is the current preferred choice.
- tptacek 6y agobcrypt is fine. It has held up quite well. Really, when picking among the mainstream password hashes, just throw a dart if you need to.
- __s 6y agopbkdf2: https://en.wikipedia.org/wiki/PBKDF2 https://en.wikipedia.org/wiki/PBKDF2 Your standard crypto library probably implements it (Rfc2898DeriveBytes for .NET). Under the covers you should tell it to use SHA512. If you can choose something better go ahead, but this is often good enough
- tialaramex 6y agoSeveral technical mistakes in this piece (which I assume was not primarily for a technical audience, but mistakes they are nonetheless): 1. This article repeats the misunderstanding that Rainbow Tables are the same thing as a Dictionary: > Given the processing power available, hackers have and continue to generate enormous tables that contain anything from every possible combination of values for shorter passwords to lists including variants of common and known passwords. These are called rainbow tables, and if the password used is included in one of these tables, then the cleartext password is known to the hacker. The Rainbow Table is actually an interesting improvement on a pre-existing idea (by Hellman, yes as in Diffie-Hellman) for a Time-space trade off attack. So let's describe the most basic idea: We have a list of potential passwords (a "Dictionary"). It doesn't matter whether it's an actual written list, or a procedure to pick possible passwords, but it must be strictly finite. Just trying them all is a Dictionary attack. For an online service this is one thing "rate limiting" is defending against. Now, if you have the hashes, you could do your dictionary attack except instead of trying to log in you just calculate each hash and compare it. There are automated tools that can do this for you e.g. John The Ripper. Next cleverest idea is: Let's calculate hashes from our dictionary, store and index them (or we could e.g. store them in order) with the original word so we can just look up a hash and get back the password if we know one. Hellman's idea was: Don't store all these hashes. Storage is expensive. Imagine a function that converts a hash back into a password from the dictionary, call it F() and the hash function H() now instead of calculating and storing H(password) -> password we recurse through H(F(H(F(.... some number of times, effectively chaining together many solutions in each entry stored, then we do more work to calculate each intermediate when doing a lookup of a hash later. We're trading off less space for more time. Hellman's idea is clever, but it's a bit wasteful, because sometimes there will be (at random) collisions in either H() or F() and this means you're wasting space/ losing recall in your system. So, Rainbow Tables are Philippe Oechslin's improvement, Oechslin deliberately perturbs F() differently for each iteration so that if a collision does occur it will go away again unless it was in the same iteration of the chains. This produces a "rainbow" picture in Oechslin's slides which named the resulting technique. Rainbow Tables are useless against a properly salted hash, because all this up-front work must be done again for each different salt, or, the size of the tables are inflated by the size of the salt. So e.g. a 32-bit salt (many today are far larger) makes your Rainbow Table cost four billion times more to calculate and need four billion times as much space. They got famous because some key Microsoft password technologies from the turn of the century do not use salt, and so you can attack those with Rainbow Tables. In particular the LM Hash can 100% reliably be reversed by a suitable Rainbow Table that would be affordable to store in that era. 2. It gets salt wrong: > As long as the salt value remains secret, this is a very effective method against rainbow attacks and other current methods of attack. Nope. The salt doesn't need to be secret it should be random for each record. Our goal isn't that an attacker doesn't know each salt, which in most of these cases will have been stored with the hashed passwords, but to prevent them amortizing work over a large number of hashes, see the discussion of Rainbow Tables earlier. Overall I think for lawyers or managers looking for legal advice, which I assume is the target of this article, the focus ought to be on getting away from passwords. They were already a bad idea, a last resort, last century and we've doubled down rather than seeking every other alternative. If your system is authenticated with WebAuthn you do not store any secrets you do not store anything that would "permit access" to the system, because it's all driven by Public Key Cryptography. You store things can be used to verify that the client is the same as before, but they can't be used to pretend to be that client, or even to unmask the client's identity. You could (but probably shouldn't) paint the contents of a WebAuthn authentication database on the side of your building and that'd be fine.
- Gunax 6y agoWould that also mean that encrypted (not hashed) PII is also personal information? It should not be retrievable (in theory and practice) without the key.
- number6 6y agoI have it from different DPAs that encrypted data are not PPI under the GDRP. The case might be different for passwords but you have to think around the corner a bit: You compare two hashes when you compare a password - you don't compare the password itself (the actual string in the form) - so what Identifies you as the person to the computer is not your password but the hash. So the hash itself is PII. Why isn't this true for encryption? Well good encryption in principle should not look different from random data. Will the same file encrypted with the same key produce the same outcome? Well - no. At least it shouldn't. So its not possible to identify someone with it like with a hash value. I can only speculate about the rational but this is the only explanation that come to my mind.
- Hizonner 6y agoA hash (especially a properly salted slowed hash) of a good password doesn't permit access to anything, because it's beyond cracking even with every dictionary and optimization you might have. A hash of a bad password does permit access. The law is going to have to wrap its head around that distinction somehow. Unfortunately "good" passwords have other problems, like being hard to type and remember... so there are practically no good passwords out there...
- deckard1 6y ago> The question of whether a hashed password “permits access” to an online account is a complex question that has not been fully addressed from a legal standpoint. Isn't this already answered by existing law? Wasn't Kevin Mitnick already charged and prosecuted with laws that would cover unauthorized access? Obviously if you have a hashed password and it's not your password and you're trying to access an account that isn't yours then I'm sure that qualifies as unauthorized access. What am I missing here? It sounds like there is an argument being put forth to make hashed/salted passes PII for, I can only guess, the sole purpose of litigation against businesses for being hacked. Otherwise, does anyone think hackers care about PII? I can understand prosecuting for security lapses that are related to a data breach. But within reason. You're getting close to charging the victim for the crime here. I know it's fashionable to argue against storing any PII here on HN. But that's not reasonable for our society. Because, much like salting+hashing, when you're implementing security measure X, all the future hacker has to do is X+1 to breach the wall. This game will never end. If we go down this route, you know what's going to happen? Only Amazon and Google and Facebook can control your PII. With CCPA and GDPR you're already seeing how this plays out. The businesses with deep pockets win. They can afford to deal with the legal realities of doing business all day long. There is an entire cottage industry that popped up just to put those stupid cookie banners on websites now. Does anyone really want to live in a world where Google gets to dictate if your business can exist, and Amazon constantly stepping on your neck and demanding rent? CCPA/GDPR are basically laws that punish the entire world for the sins of three or four monopolies.
- xyzzy123 6y agoNot a huge fan of offline-attackable password hashes in datastores. I want to put a vote in here for an anchoring. Lots of methods: 1) Code secret. This is ok but loses all strength if disclosed. 2) KMS wrapping of hashes. This is better; attacker needs to be in your environment, actively unwrapping all your stuff. 3) Controlled hashing step (best). Have one step of your password hashing incorporate a one-way operation using a "normally non-extractable" hardware secret. This could be in CloudHSM if you're in AWS. This completely prevents offline attacks unless the attacker compromises your HSM. 4) It would be nice if cloud providers implemented "password hashing as a service". They could easily and cheaply prevent offline attacks. 5) Of course strong key auth instead of passwords for clients would be nicer.
- pressurefree 6y agoBecause you are a nobody inserting unauthorized bread!!!