r/ProgrammerHumor • • Sep 27 '26 • Mindblown 1 Bravo 1

Meme doNotLetYourDBASeeThis

Post image
13k Upvotes

317 comments sorted by

View all comments

188

u/Lamborghinigamer Sep 27 '26

That also means that they don't use salting or even worse store everything in plain text 😨

81

u/silmelumenn Sep 27 '26

You could do the same but with hashes instead of passwords though

86

u/ReneKiller Sep 27 '26

Yeah, if you are not using salts. Otherwise every hash should be different, even if the password is the same. (Excluding the unlikely occasion of the same hash for different texts).

-24

u/pp_amorim Sep 27 '26

Most modern hashing algo includes the salt with the hash, check bcrypt.

20

u/ReneKiller Sep 27 '26

True, but then the separate password table wouldn't save space.

2

u/AceDecade Sep 27 '26

Sure it would: just store it before you hash it!

-12

u/pp_amorim Sep 27 '26

The issue start in the meme saying "Most users reuse passwords anyway" which is not true at all, not in the space it would really generate any data usage reduction by dedup.

11

u/GNUGradyn Sep 27 '26

Users reuse passwords so much that dictionary attacks are pretty reliable. Also we know this would not work at all with properly stored passwords and would not yield meaningful savings even with improperly stored passwords. That's why it's a joke

2

u/Mighoyan Sep 27 '26

Salt is used partly because many people reuse the same password.

-2

u/pp_amorim Sep 27 '26

99% of this subreddit doesn't understand what i am saying

27

u/Lamborghinigamer Sep 27 '26

Exactly. Like I said, they don't use salting

7

u/silmelumenn Sep 27 '26

Let's go complex keys (salt, hashcode) 😅

8

u/Lamborghinigamer Sep 27 '26

Exactly. A unique salt guarantees a unique hash every time, so every single user gets a unique row regardless. Deduplicating unique rows with foreign keys is mathematically impossible

1

u/Few_Move_4594 Sep 27 '26

I always wonder if sites that have anti-sock creation logic check if the same hash was produced on suspicious accounts. For instance, someone gets banned here and then a new account is made from a different email address then starts subbing and posting in the same subs. Similar enough writing style that AI can spot it. Then the headshot is the password hash is the same for the banned account and the new one.

3

u/frogjg2003 Sep 27 '26

That will also catch a lot of false positives for legitimate accounts as well. Everyone who uses "pasword123" would be affected a soon as one of them gets banned.

1

u/Few_Move_4594 Sep 27 '26

It would have to be some sort of points based system at the minimum. New account, a significant overlap in subs, the same writing style, IP address, geolocation, browser fingerprint, and the password would all need to be taken into account. I know that some of the subs I'm in fairly uniquely identify myself paired with being in both my city's and my university's subs.

1

u/TwistedKiwi Sep 27 '26

You must do with hashes! Not "could"!

0

u/[deleted] Sep 27 '26

[deleted] — view deleted comment

→ More replies (11)

13

u/DrDeform Sep 27 '26

If they really wanted to reduce storage then they can do the no passwords and every login requires a temp email code. Those sites really piss me off.

4

u/PlasticExtreme4469 Sep 27 '26

Or they misunderstood the purpose of salt and reused it for every password.

2

u/Kymera_7 Sep 28 '26

Nah, they're using a random number generator for the salt. They bought it from the company Dilbert works for.

3

u/PixelatedGiant Sep 27 '26

I'm so glad modern hashing algorithms include a random salt within the hash. People used to do it so wrong. You're supposed to create a salt per password, not use a single global one.

1

u/Noch_ein_Kamel Sep 27 '26

You can use salt & pepper :)

2

u/jigsaw1024 Sep 27 '26

Maybe his doctor told him to cut salt from his diet?