Most of the online guides I found about using dm-crypt with a random keyfile use files bigger than 512 bits (64 bytes).
For example:
dd bs=512 count=4 if=/dev/urandom of=keyfile iflags=fullblock As the biggest key a cipher can use is 512 bits (aes-xts-plain64 splits it into two 256 bits key for AES-256), is there any advantage to using more than that, given that /dev/urandom is considered cryptographically secure and that the spec limits the keyfile to 8 MiB?
The cryptsetup man page also mentions the --master-key-file option but I did not find it mentioned elsewhere.