Word – is it possible for two files in a rar to have different passwords

passwordsrar

I have a password-protected rar file with a few text files in it that are not hidden (you can enter the rar file and see its content), i know the password, I edited one text file and it asked me to enter the password twice to confirm, I pasted it, all seemed in order. Now I can't open this one file (says "incorrect password") but the password still works for all the other files. How come?

Best Answer

Yes, every entry in a .rar file can be encrypted with a different password.

To prove this, simply create a .rar archive and protect it with a password.
enter image description here
We now have an archive with 1 file that is encrypted:
Now we just drop another file in there...
enter image description here
...chose a different password for this one...
enter image description here

If we now try to extract that second file, using the first password.. enter image description here
...it fails. enter image description here

Additional Notes

This might not be immediately apparent, but the password given when creating the archive, does not protect the archive itself, it protects every single file individually.

For example, setting a password for an archive does not stop you from adding new files to it.

However, this changes when choosing the Encrypt file names option (which you always should when using encryption with file archives). If you also encrypt the file names, this will encrypt the entire stream (not just the individual file streams).
If you want to modify an archive like that at all (like adding new files), you'll need the password that was used to encrypt the entire archive.

Related Question