Question about encrypt

Discussion related to AES Crypt, the file encryption software for Windows, Linux, Mac, and Java.
Post Reply
name
Posts: 1
Joined: Tue Nov 18, 2014 7:40 am

Question about encrypt

Post by name » Tue Nov 18, 2014 7:54 am

Hi. Your program working very good. but...
if i encrypt some *.txt file with password "123456" and if i encrypt this *.txt file with password "123456" again then i will see two different files! Why? I must see two equal files, because passwords is equal and content of files is equal and name of files equal too. I hope what you give me answer. Thank you.

User avatar
paulej
Posts: 524
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Question about encrypt

Post by paulej » Wed Nov 19, 2014 5:19 am

No two files are ever encrypted exactly the same. I assume you might be looking at the hash of the files using sha-1 or similar? With that, they'll always be different.

The reason is that the password is used to encrypt a session key that is a random 256-bit key. It is the session key that is used to encrypt the bulk of the file.

AES Crypt also uses CBC, which uses an IV of 16 bytes. That is not a secret value, but is is randomly generated.

That's why you'll never see the same file encrypted with the same password result in an identical file.

Post Reply