This project has moved and is read-only. For the latest updates, please go here.

linux cli: --random-source=some_file - allowable bytes(characters)?

Topics: Technical Issues
Mar 16, 2016 at 7:27 PM
Edited Mar 18, 2016 at 11:16 AM
In creating a crypt from the gnu/linux command line using the
option "--random-source=some_file":

What is the set of permissable bytes in this file? Does it have to be
limited to typeable or printable characters?

For example, would the file created by this:

head --quiet --bytes=10M </dev/random >some_file

be suitable as is, or is an intermediate step needed to convert the content
from /dev/random to a string composed from some more limited set of

Thanks for reading.

Added later:
And the same question about passing the intended password in the linux command line when making a crypt. Are ALL bytes permissable or just some subset, like printable characters?
Mar 18, 2016 at 1:44 PM
Data from /dev/random should be fine as-is for use with --random-source. You can even use --random-source=/dev/random directly.

Passwords use unicode characters as of 1.17. Older versions only support ASCII.
Mar 18, 2016 at 7:30 PM
Edited Mar 18, 2016 at 7:59 PM
Thank you very much, sir.

That's a great help.

The reason I used an intermediate file, rather than /dev/random
directly, is that I'm assuming if /dev/random is used directly, VC
sucks it dry, comes the end of the "file", normally between 2 & 4
kiB, I think, and proceeds with that. Whereas, using an intermediate
file, I can make it any arbitrary length. I'm not sure if that's true -
there are limits to "everythings a file" and I haven't a clue how to
test that hypothesis. If I stat /dev/random it is represented as
0 length.