Skip to main content
fix paren typo
Source Link
D.W.
  • 100.6k
  • 34
  • 282
  • 617

Try to avoid using passwords as encryption keys.

A common weakness in many systems is to use a password or passphrase, or a hash of a password or passphrase, as the encryption/decryption key.

The The problem is that this tends to be highly susceptible to offline keysearch attacks. Most users choose passwords that do not have sufficient entropy to resist such attacks.

The best fix is to use a truly random encryption/decryption key, not one deterministically generated from a password/passphrase. However

However, if you must use one based upon a password/passphrase, use an appropriate scheme to slow down exhaustive keysearch; take a look at bcryptkeysearch. I recommend PBKDF2, or usewhich uses iterative hashing (e.g.,along the lines of H(H(H(....H(password)...))), with) to slow down dictionary search. Arrange to use sufficiently many iterations to cause this process to take, say, 100ms on the user's machine) to generate the key.

Try to avoid using passwords as encryption keys.

A common weakness in many systems is to use a password or passphrase, or a hash of a password or passphrase, as the encryption/decryption key.

The problem is that this tends to be highly susceptible to offline keysearch attacks. Most users choose passwords that do not have sufficient entropy to resist such attacks.

The best fix is to use a truly random encryption/decryption key, not one deterministically generated from a password/passphrase. However, if you must use one based upon a password/passphrase, use an appropriate scheme to slow down exhaustive keysearch; take a look at bcrypt, or use iterative hashing (e.g., H(H(H(....H(password)...))), with sufficiently many iterations to cause this process to take, say, 100ms on the user's machine) to generate the key.

Try to avoid using passwords as encryption keys.

A common weakness in many systems is to use a password or passphrase, or a hash of a password or passphrase, as the encryption/decryption key. The problem is that this tends to be highly susceptible to offline keysearch attacks. Most users choose passwords that do not have sufficient entropy to resist such attacks.

The best fix is to use a truly random encryption/decryption key, not one deterministically generated from a password/passphrase.

However, if you must use one based upon a password/passphrase, use an appropriate scheme to slow down exhaustive keysearch. I recommend PBKDF2, which uses iterative hashing (along the lines of H(H(H(....H(password)...)))) to slow down dictionary search. Arrange to use sufficiently many iterations to cause this process to take, say, 100ms on the user's machine to generate the key.

Source Link
D.W.
  • 100.6k
  • 34
  • 282
  • 617

Try to avoid using passwords as encryption keys.

A common weakness in many systems is to use a password or passphrase, or a hash of a password or passphrase, as the encryption/decryption key.

The problem is that this tends to be highly susceptible to offline keysearch attacks. Most users choose passwords that do not have sufficient entropy to resist such attacks.

The best fix is to use a truly random encryption/decryption key, not one deterministically generated from a password/passphrase. However, if you must use one based upon a password/passphrase, use an appropriate scheme to slow down exhaustive keysearch; take a look at bcrypt, or use iterative hashing (e.g., H(H(H(....H(password)...))), with sufficiently many iterations to cause this process to take, say, 100ms on the user's machine) to generate the key.