0
$\begingroup$

I am using the same password for some encrypted files currently (I know this is bad practice, though), and I wonder whether an attacker could decrypt if one decrypted file fell into his hands.

$\endgroup$
  • $\begingroup$ What is the software you're using and the encryption mode exactly (CBC? CTR?). $\endgroup$ – Dmitry Khovratovich Oct 15 '14 at 13:47
  • $\begingroup$ It's hard to answer this question authoritatively; it really depends upon the specific software you're using. The question is roughly equivalent to, "Will a bridge made out of steel collapse?" The answer is hopefully no, and it should be no, but there are many critical variables besides the particular choice of building material. $\endgroup$ – Stephen Touset Oct 15 '14 at 19:21
1
$\begingroup$

Any good software should use PBKDF (a password based key derivation function) that uses a random salt. This salt is stored with the ciphertext and should be different for each ciphertext. As long as this is the case they key will be different for each ciphertext.

The best way an attacker can then attack your ciphertext (when stored on disk) is to iterate over the most likely passwords and perform the PBKDF. So the password and PBKDF together will provide the barrier that the attacker has to take. That is, if there are no other vulnerabilities to the crypto system, this is about the general case.

If you don't want to type a (different) password for each encrypt and if you want to use the same password each time, you might be better off using PGP encryption/decryption with a public / private key pair. PGP directly uses a public key for encryption and will request the same password each time to decrypt the private key, which decrypts the session key, which decrypts the data.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you! It's not that I'm too lazy, but the data is not very sensitive, so I chose my disposable password. Anyway the question was more a "what if ..." one ;) . $\endgroup$ – Tah Ree Oct 15 '14 at 17:34
  • $\begingroup$ Well, the lazy was a bit tongue in cheek. PGP makes a lot of sense here and you can encrypt without providing a password at all. $\endgroup$ – Maarten Bodewes Oct 15 '14 at 18:40
0
$\begingroup$

It really depends on you block cipher mode of operation and likeliness between your files. With any proper implementation, it should really not, but since you don't really give any details about your encryption scheme, it's hard to tell.

(side-note: how do you derive the key from the password?)

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.