I have two files (file1 and file2) where file1 is encrypted with rar software and file2 is the original plain text.
Does anyone know the fastest way to get the password used to rar the file?
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
The fastest way is to remember the password.
The next best thing is to use john or hashcat on cloud services with a maximum power - as long as money isn’t a limiting factor.
Knowing the original files content will not help you in any way if you are not after the content (then use that file!) but after the password.
Having the original file (i.e. the plain text of the cipher text) and leveraging that is called a known plaintext attack. You seem to be using a version of rar that uses AES from the tags you used; AES is known to be resistant against known plaintext attacks and as far as I know even against the much stronger attack model of adaptive chosen plaintext attacks. Thus your plain text will be of no help and brute force would be the way to go.
Please also note that even if AES was vulnerable to a known plaintext attack, you would still only have the AES key, not the actual password. From key to password, you would have to reverse the password based key derivation function that was used, which is borderline impossible.
TLDR: use john or hashcat.