If attacker has original data, and encrypted data, can they determine the passphrase?
Posted
by Brad Cupit
on Stack Overflow
See other posts from Stack Overflow
or by Brad Cupit
Published on 2010-04-06T18:04:35Z
Indexed on
2010/04/06
18:13 UTC
Read the original article
Hit count: 223
If an attacker has several distinct items (for example: e-mail addresses) and knows the encrypted value of each item, can the attacker more easily determine the secret passphrase used to encrypt those items? Meaning, can they determine the passphrase without resorting to brute force?
This question may sound strange, so let me provide a use-case:
- User signs up to a site with their e-mail address
- Server sends that e-mail address a confirmation URL (for example: https://my.app.com/confirmEmailAddress/bill%40yahoo.com)
- Attacker can guess the confirmation URL and therefore can sign up with someone else's e-mail address, and 'confirm' it without ever having to sign in to that person's e-mail account and see the confirmation URL. This is a problem.
- Instead of sending the e-mail address plain text in the URL, we'll send it encrypted by a secret passphrase.
- (I know the attacker could still intercept the e-mail sent by the server, since e-mail are plain text, but bear with me here.)
- If an attacker then signs up with multiple free e-mail accounts and sees multiple URLs, each with the corresponding encrypted e-mail address, could the attacker more easily determine the passphrase used for encryption?
Alternative Solution
I could instead send a random number or one-way hash of their e-mail address (plus random salt). This eliminates storing the secret passphrase, but it means I need to store that random number/hash in the database. The original approach above does not require this extra table.
I'm leaning towards the the one-way hash + extra table solution, but I still would like to know the answer: does having multiple unencrypted e-mail addresses and their encrypted counterparts make it easier to determine the passphrase used?
© Stack Overflow or respective owner