Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using 7-Zip to compress/encrypt some data to store on Dropbox. I've noticed that when I use encryption, 7-Zip generates different archives from the same source files (the size is often different by a byte!).

Is there any way to make 7-Zip generate the exact same files without removing encryption?

share|improve this question
Doesn't 7zip have an option to "only update modified files"? – grawity Feb 11 '11 at 19:57
Silly question, but couldn't you just copy the first one? – Jeff F. Feb 11 '11 at 19:58
@grawity Can't see anything like that – Danny Tuppeny Feb 11 '11 at 20:30
@Jeff It's my backup script. When it runs, if the resulting archive is the same as the previous one, I want to avoid Dropbox uploading it again. However, since 7zip is generating different archives for the same source files, it's always "different", and therefore Dropbox always re-uploads. – Danny Tuppeny Feb 11 '11 at 20:31
Try using WinMerge to figure out what the differences are. There's a 7zip plugin that will compare archives. – Chris Nava Feb 11 '11 at 21:07
up vote 4 down vote accepted

From what I understand, 7-ZIP uses a AES256 for encryption. I am pretty sure a unique initialization vector is used each time. I don't believe there is anything you can do to change, this, and I am not sure that you would want to since it not having a unique IV each time would possibly lead to someone compromising your encryption.

If you are willing to look at alternate tools, a search for rsyncable encryption may turn up something that will help you.

share|improve this answer
Looks like you're correct - I found some threads on SO saying it created a random IV. The encryption is not that important - it was just because of the way Dropbox hashes files, it's possible (but unlikely) other people will end up with the files. I'll look at an alternative way of encrypting the files. Thanks! – Danny Tuppeny Feb 12 '11 at 12:29

I found that 7zip version 4.48 stated "Now it uses random initialization vectors".

I tested an older 7zip stable version (4.42), and found that it "works" : the same file with the same password is always encrypted to the same 7zip file.

I know that this is a no good property when talking from the security point of view, but becomes quite useful when you try to store with deduplication or backup data over networks.

If you know the security implications (please read, and have no problem with that, you can download and use the older 4.42 version from sourceforge

share|improve this answer
Good to know! It's a shame this isn't an option in new versions - in my case, the security wasn't critical (it's just personal files), just a small barrier in case the files are exposed. – Danny Tuppeny Jul 11 '12 at 9:15
You are not alone: there is a thread in the 7zip sourceforge forum… where you can ask for this option. – FerFebles Jul 11 '12 at 11:36
@FerFebles: I just added my 2¢ to the SF thread. – martineau Aug 22 '12 at 18:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.