• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualBacterius

Posted 27 November 2013 - 04:16 AM

If the program knows the password is incorrect before decrypting and decompressing the data, then it means the hashed password is easily accessible - perhaps in the file header? Shouldn't the data be decrypted and decompressed regardless if the password is correct or not, the only difference being an incorrect password will produce a huge pile of garbage? Can someone explain this?

Sure, the hashed password is available. But you can't use it for decryption. Basically it goes like this:



+----------------------------------------------+              +-------------------------------+
|                                              | ONE WAY ONLY |                               |
| Plain password (typed by the user)           | +----------> | Encryption key                |
|                                              |              |                               |
+----------------------------------------------+              +-------------------------------+
+
|
| ONE WAY ONLY
|
|
v
+----------------------------------------------+
|                                              |
| Hashed password (useful only for comparison) |
|                                              |
+----------------------------------------------+


The two are unrelated and you can't deduce one from the other. So the hashed password is used to find out if you typed the right password, and then when you did, the program can calculate the encryption key and decrypt the program. That way it can warn you if you typed the wrong password without decrypting garbage, without any security issues. So technically the hashed password isn't "needed", it's a quality of life thing to guarantee that you don't end up decrypting garbage, and also lets you check the key *without* decrypting anything (which is relevant in some cases).

You can also do more advanced stuff with this such as making sure the file was not compromised (modified surreptitiously) etc.. basically it's a useful technique, and does not indicate a security flaw

### #2Bacterius

Posted 27 November 2013 - 04:12 AM

If the program knows the password is incorrect before decrypting and decompressing the data, then it means the hashed password is easily accessible - perhaps in the file header? Shouldn't the data be decrypted and decompressed regardless if the password is correct or not, the only difference being an incorrect password will produce a huge pile of garbage? Can someone explain this?

Sure, the hashed password is available. But you can't use it for decryption. Basically it goes like this:



+----------------------------------------------+              +-------------------------------+
|                                              | ONE WAY ONLY |                               |
| Plain password (typed by the user)           | +----------> | Encryption key                |
|                                              |              |                               |
+----------------------------------------------+              +-------------------------------+
+
|
| ONE WAY ONLY
|
|
v
+----------------------------------------------+
|                                              |
| Hashed password (useful only for comparison) |
|                                              |
+----------------------------------------------+


The two are unrelated and you can't deduce one from the other. So the hashed password is used to find out if you typed the right password, and then when you did, the program can calculate the encryption key and decrypt the program. That way it can warn you if you typed the wrong password without decrypting garbage, without any security issues. So technically the hashed password isn't "needed", it's a quality of life thing to guarantee that you don't end up decrypting garbage, and also lets you check the key *without* decrypting anything (which is relevant in some cases).

### #1Bacterius

Posted 27 November 2013 - 04:06 AM

If the program knows the password is incorrect before decrypting and decompressing the data, then it means the hashed password is easily accessible - perhaps in the file header? Shouldn't the data be decrypted and decompressed regardless if the password is correct or not, the only difference being an incorrect password will produce a huge pile of garbage? Can someone explain this?

Sure, the hashed password is available. But you can't use it for decryption. Basically it goes like this:



+----------------------------------------------+              +-------------------------------+
|                                              | ONE WAY ONLY |                               |
| Plain password (typed by the user)           | +----------> | Encryption key                |
|                                              |              |                               |
+----------------------------------------------+              +-------------------------------+
+
|
| ONE WAY ONLY
|
|
v
+----------------------------------------------+
|                                              |
| Hashed password (useful only for comparison) |
|                                              |
+----------------------------------------------+


The two are unrelated and you can't deduce one from the other. So the hashed password is used to find out if you typed the right password, and then when you did, the program can calculate the encryption key and decrypt the program. That way it can warn you if you typed the wrong password without decrypting garbage, without any security issues.

PARTNERS