I found an old .rar file on my computer but I couldn't remember the password exactly. I had a rough idea of what it was, so I wrote a program using 7ziplib in c# to brute force a bunch of permutations.
After a few thousand it found a match. When I open the file in 7zip using the password I found, it opens but displays no files. When I try to open it in Winrar, it says corrupted archive or invalid password.
7ziplib reports the uncompressed file size as -1.
I ran the same brute force program for another zip in the same folder which had a similar but not identical password, and the same behaviour is exhibited.
There are other rar files in the same folder that are not password protected, which open fine.
Is there any algorithmic explanation for this? Could it be that I've found a password that gets past one stage of the password check but not another? Or is the archive corrupted?
The format is reported as Rar4 if that helps, which google says uses AES-128 but wikipedia states doesn't exit, as it jumps from version 2.9 to 5.