Storing email feels like a no-brainer for a system that needs to send messages to its customers. Some prefer phone numbers, which maybe provide stronger guarantees while being maybe not as long lasting. As an individual, the issue is that "anon" or "throw-away" emails are not that commoditized. I heard that "login with Apple" meant to provide an email proxy, hiding your real email, but I have not seen it deployed, ex…
You might not need to store plaintext email addresses
31–40 of 181 posts
Re: You might not need to store plaintext email addresses
#32"You might not need to store user email addresses " Emails and email addresses are two very different things.
Re: You might not need to store plaintext email addresses
#33Earlier quoted context omitted.
You could store the hash of the downcased address plus a capitalization mask which tells you which letters to capitalize. This works from a technical perspective, as letters with ambiguous capitalization (Turkish i, etc) aren't allowed in emails. It's a very minor privacy compromise: if a user has a very rare pattern of capitalization then an attacker with access to the database could identify their account. Negligib…
It’s a neat idea but unfortunately RFC 6531 opened up the local part to most of UTF-8, so internationalised capitalisation is in the mix now. Ultimately I’ll never advise delivering to email addresses other than the precise octets of the one already verified, and this means the gold standard is always folding for match and uniqueness, but delivery precisely as verified. How about this: store the verified email addres…
Uh... How does that work if you need email address to send email to the user? If only the client is able to decrypt the addess, you will basically have to wait until the user connects and gives you the email (which your presumably never store long-term, handling it like you'd handle credit card numbers). That severely limits what you can do with an address.
If you're okay with being technically able to access email address, you'd probably better off with just straight encryption. That solves data leak protections, key rotation, backups, etc.
If you want some magic ID which is known only to the user and your servers will only use it to verify identity, then why not use just passwords with client-provided KDF parameters. Your machines will never know the plain data.
Re: You might not need to store plaintext email addresses
#34Re: You might not need to store plaintext email addresses
#35It's a good idea to protect user privacy. One drawback I can think of storing a hashed email is - What if the user forgets the username / email id and wants to know it? (This is a common use case). In such a case you have to collect additional unique data to help the user gain access to their account, but that defeats the original purpose - to protect user privacy.
People often forget usernames but not so often e-mails. The e-mail is usually the primary/only means of identifying users anyway so you're not going to provide it back on request anyway.
Re: You might not need to store plaintext email addresses
#36Re: You might not need to store plaintext email addresses
#37Maybe this is a dumb question but how do you send an email if you only have the hash of the recipient's address?
Re: You might not need to store plaintext email addresses
#38Maybe this is a dumb question but how do you send an email if you only have the hash of the recipient's address?
As per the article, you only send them when the user requests an action, and ask them for their email at that time
Re: You might not need to store plaintext email addresses
#39Re: You might not need to store plaintext email addresses
#40You use email+password for login. Does this mean that on every login attempt, you iterate through every row in the database to check for a hash match?