# Tag Info

2

When you change your password you are required enter your both old password and new password in clear text, so they can be compared against each other for similarities. Once this test passes, you encrypt the old password and check it against its stored hash etc.

2

Essentially, instead of checking against a (salted) hash of a password, you suggest using the hash (since you can choose hashing = keygen) as a key to encrypt a kind of test value. The main question is whether this adds or reduces security. If you store the hash/key directly, the chance of a randomly chosen password hashing to the same value is $2^{-n}$, ...

0

Your proposal is not good. First, the checking procedure is wrong: Checking password validity: calculating test_hash=cipher(test_password+salt) for a given test_key=keygen(test_password+salt) check if test_hash consisting only symbols/bytes of predefined dictionary (...) I guess you meant: calculating test_phrase=decipher(hash) with ...

1

Regarding your comment "Would the database need to be compromised for a dictionary attack to be useful?" The answer is no. A dictionary attack would require a username/email (which might either be known or could come from a small dictionary) and then trying words from the dictionary. This is attempting to get in via your normal logic prompt logic. A simple ...

0

I think the idea is good - it is pretty much what Lastpass does (see below). But as with anything to do with cryptography every detail matters. If you're using email for the client salt it seems like a good idea to run the email through PBKDF2 first to ensure sufficient entropy. encryption_key = PBKDF2(HMAC-SHA256, password, client-salt, rounds) // decrypts ...

0

Just to make sure I'm on the same page about the details: So, there's a master key, presumably randomly generated in the client, never shown to the server, call it $k_m$. Then there's an encryption key, derived from a user passphrase and a (random) salt: $$k_e = \operatorname{PBKDF2}(p, s)$$ There's also an authentication key, derived from the same ...

1

This is far from secure, assuming a passphrase that a human can remember. The main thing you have to note is that an offline brute force attack on the password can be carried out. This is because the server can guess the password and follow the same procedure and see if decryption works. It is possible to buy a machine that computes billions of hashes a ...

2

The easiest passwords to guess will always be vulnerable to guessing attacks. If you're intending to identify easy passwords, you should tell your user not to use those passwords.

11

Using several different encryption algorithms, and not disclosing which is used in each particular case would require password verification to try all possible algorithms. Feasible only when using just a few algorithms. Truecrypt does this, for example. This could strengthen security, when implemented properly - but it is much more difficult to implement. ...

7

The best practice for protecting passwords is to first concatenate (public) random salt and then iteratively hash. This prevents constructing a static dictionary like you mention, and also prevents Hellman time-space tradeoffs (and extensions like Rainbow tables).

2

This approach would constitute security through obscurity, which is not recommended to be relied upon. Enhancing security by design would be advisable. In this particular case a stricter password policy that requires stronger passwords and possibly making users change password regularly. Multi-factor authentication would typically enhance security even ...

2

No, in general you cannot. WinRAR uses AES (128 or 256 depending on version) for encryption, which does not allow key recovery even with know plaintext and ciphertext. It also uses key stretching to derive the encryption key from a password. The algorithm used is PBKDF2 with a version dependent iteration count. So a key-guessing attack is only possible for ...

0

Ok, I found out how to extract my password (but I didn't understand how the javascript works). Here you go : How to extract modem PPPoE username and password: Enter Firefox, and in the address bar type: 192.168.1.x (the modem address) the User Name: the Password: On the main page, press: Disconnect On the main page, press: Internet In ...

2

You cannot; most (symmetric) encryption routines create output that is indistinguishable from random. This is however more likely to be the output of a password hash. The only thing you can say is that the result is 24 bytes. That 24 bytes hopefully contains a fully random salt (mostly 8 bytes) and a hash or password hash. In that case it's probably MD5 as ...

1

Hash the original text, store the hash along with other auxiliary data. Check decrypted text against the hash. This will check the overall integrety of the process, not just the use of the correct key.

-2

This is an addition to the answer of Maarten Bodewes. I have found RNCryptor, which is file encryption/decryption utility. IMHO, anyone who is trying to solve problems similar to mine (checking passwords, encrypting files) will benefit from studying algorithm and specification of encryption/decryption process of RNCryptor. Not sure what would cryptography ...

1

This is a perfect job for a Key Based Key Derivation Function or KBKDF. Generate two keys from the input (salt and password). One is stored directly in front of the ciphertext and one is used as encryption key. Because the KBKDF is based on PRF it cannot be reverted, so the keys are not related as far as an attacker is concerned. Currently the best KDF is ...

2

Yes, that is a problem. There are protocols like SRP that both eliminate the need for Bob to store the password in plaintext and prevent replay attacks.

3

TL;DR: You put less of a burden an any attacker trying to brute-force this. And please note: Implementing PBKDF2 shouldn't be much harder than implementing your approach. Now let's head over to the explanation why "your" scheme is really bad for password-hashing. The scheme you propose is that each try cost you exactly two hash-function evaluations. One ...

Top 50 recent answers are included