This scheme struggles in the face of email address case folding. At the protocol level, email addresses are case-folded on the RHS but case-sensitive on the LHS. So it’s crucial that LHS case is preserved by delivery systems. Unfortunately most users then treat them as folded on both. So you can successfully verify one variant, store the downcased hash, and it’ll subsequently match but delivery bounces. Or, hash the…
I thought email addresses were case folded on the right hand side and site dependent on the left hand side. The right hand side is more or less forced by the rules of DNS. As for the left hand side, if I run the email for a site, can't I decide whether to deliver ABC@ and abc@ both to the same mailbox or to different mailboxes? And can't someone else make a different decision for their site? If a site administrator d…
You might not need to store plaintext email addresses
121–130 of 181 posts
Re: You might not need to store plaintext email addresses
#122Earlier quoted context omitted.
How would you check for duplicate entries if you use a different salt per entry?
Check every previously generated salt with the currently received email for collision.
Re: You might not need to store plaintext email addresses
#123> In conclusion, if you only use emails for transactional emails, you might be able to only store hashed versions of them.
HUH?
The most obvious way to interpret this sentence is as storing hashed versions of transaction e-mail messages. Which makes no sense and isn't what the author means, but wow this is some confusing writing.
Re: You might not need to store plaintext email addresses
#124This would not work for any serious/useful service: e-mails are not only for marketing, there are many good reasons to send one like (user requested) notifications, invoicing, ... and also screw-ups! If your service had a problem (security, broken data, invoicing again, long downtime, ...), you better contact your users before they find out on hackernews.
The only drawback is that such scheme must then be made available to any system that consumes the database, possibly from multiple languages.
Re: You might not need to store plaintext email addresses
#125This is a clever idea but limited in applicability. It is probably fine for a low security web app or game, but could still leak personal information if the db got hacked. The problem is that the salt has to be the same for each record and that emails present a limited search space. Imagine I stole the database for blackmailable-fetish.com. All the emails are hashed with the same salt so I can brute-force the followi…
Not sure why you're bringing this up. If you stored them in plaintext it gives hackers 100% of the emails with zero effort required.
Re: You might not need to store plaintext email addresses
#126This is a clever idea but limited in applicability. It is probably fine for a low security web app or game, but could still leak personal information if the db got hacked. The problem is that the salt has to be the same for each record and that emails present a limited search space. Imagine I stole the database for blackmailable-fetish.com. All the emails are hashed with the same salt so I can brute-force the followi…
Not sure why you're bringing this up. If you stored them in plaintext it gives hackers 100% of the emails with zero effort required.
Re: You might not need to store plaintext email addresses
#127This would not work for any serious/useful service: e-mails are not only for marketing, there are many good reasons to send one like (user requested) notifications, invoicing, ... and also screw-ups! If your service had a problem (security, broken data, invoicing again, long downtime, ...), you better contact your users before they find out on hackernews.
Plaintext email could be stored client side in a cookie and may be submitted to the server when use of the email is required, and if it validates. If the user logs in and the site is down, a backup system could email them about the issue. This is the backup system, primary systems are down. Please contact support if you need more information. No need to email users who aren't using the system currently about downtime…
Re: You might not need to store plaintext email addresses
#128Sidenote, but I find this post maddening to understand, because the author seems to be using the word "e-mail" to mean both "e-mail address" and "e-mail message", and then uses ambiguous pronouns to boot: > In conclusion, if you only use emails for transactional emails, you might be able to only store hashed versions of them. HUH? The most obvious way to interpret this sentence is as storing hashed versions of transa…
Re: You might not need to store plaintext email addresses
#129Re: You might not need to store plaintext email addresses
#130Sidenote, but I find this post maddening to understand, because the author seems to be using the word "e-mail" to mean both "e-mail address" and "e-mail message", and then uses ambiguous pronouns to boot: > In conclusion, if you only use emails for transactional emails, you might be able to only store hashed versions of them. HUH? The most obvious way to interpret this sentence is as storing hashed versions of transa…