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?

link|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
show 1 more comment
feedback

1 Answer

up vote 2 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.

link|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
feedback

Your Answer

 
or
required, but never shown

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