Keyfile Line Length

Topics: Users Discussion
Jan 15, 2015 at 2:28 PM
Hello everyone.

I have a question which I guess is bordering on paranoia.

I generated a random key-file some time ago using a different technique than the current VeraCrypt keyfile tool. I believe the generator was good and this does not form the basis of my question.

I used a separate tool because I wanted to make a 1MB file and TC was not able to create such a file at the time.

I have since compared the output from VeraCrypts keyfile generator to that of my original and I noticed something which has been puzzling me.

My original keyfile lines are of a fixed length, 64 characters actually.

I noticed the VeraCrypt output has random line lengths.

Is my original keyfile, less random due to the line length being fixed, or does this have no impact on VeraCrypt?

I personally assume this has no impact as VeraCrypt views the keyfile as a whole and discounts line lengths.
Jan 16, 2015 at 12:26 AM
far as i know the file is taken as a whole and hashed, i dont see having line returns mattering much u need to wait for Mounir or L0ck to say for sure.
Coordinator
Jan 16, 2015 at 12:01 PM
As Cipher1 said, keyfiles content bytes are processed with no special treatment of any specific value like line ending.

Moreover, keyfiles are usually binary files so they should not be opened in text editors but rather in a binary editor like HxD (http://mh-nexus.de/en/hxd/).

One possibility is that your custom generator creates text files with lines containing 64 printable characters. In such case, you are not benefiting from the full randomness offered by real random binary keyfiles.
Jan 16, 2015 at 3:44 PM
Thank you for the information Cipher1 and Mounir.

As Mounir has permitted the creation of larger keyfiles using VeraCrypt itself, I intend to use one of those and re-encrypt my master key.