I was reading about device files in FreeBSD, but my understanding is not great. To practice, I thought up the following scenario. I suspect that the problem can be solved using device files.
Imagine that I am a part time spy and I need to generate some one-time pad. I could go to my secure FreeBSD box and write some
/dev/urandom to a pad file, knowing that the randomness coming from this source is Good Enough (tm). My flash drive with pad file will be delivered to my future contact.
However, seeing as this drive will only contain one file full of random bytes, it seems a waste to write a whole filesystem to the disk. Why not fill the USB to the brim with random data?
My question: How can I achieve my aim of reading and writing raw data from and to a disk? Should I point
dd at the disk's device file?