Linked Questions
14 questions linked to/from When to use /dev/random vs /dev/urandom
98
votes
3
answers
17k
views
What does the letter 'u' mean in /dev/urandom?
I understand that reads to /dev/random may block, while reading /dev/urandom is guaranteed not to block.
Where does the letter u come into this? What does it signify?
Userspace? Unblocking? Micro?
...
41
votes
4
answers
41k
views
Why does dd from /dev/random give different file sizes?
I am running the following command on an ubuntu system:
dd if=/dev/random of=rand bs=1K count=2
However, every time I run it, I end up with a file of a different size. Why is this? How can I ...
17
votes
1
answer
13k
views
Random image generator
I am generating random data and trying to convert it to a PNG image using :
head -c 1MB < /dev/urandom | hexdump -e '16/1 "_x%02X"' | sed 's/_/\\/g; s/\\x //g; s/.*/ "&"/' | tr -d "\"" | ...
12
votes
1
answer
12k
views
How to check if reading from /dev/random will block
I have found information that /proc/sys/kernel/random/entropy_avail indicates number of bits available in /dev/random. I wanted to check whether the next reading from /dev/random will block and my ...
4
votes
1
answer
5k
views
Why is the random seed only saved to disk on boot and shutdown?
On my system, there's /var/lib/systemd/random-seed. On boot, it's loaded it into the entropy pool and replaced with a new one. On shutdown, entropy is saved to it. I didn't find anything changing it ...
5
votes
2
answers
5k
views
What are the --use-urandom or --use-random options in LUKS used for?
I'm currently trying to teach myself some non-Windowsland operating systems, and I figured Ubuntu Server 16.04 would be the best place to start. Having "mastered" LVM, I'm trying to familiarize ...
0
votes
2
answers
4k
views
Remove space and symbols from grep output
I'm trying to generate a random password with this small script
#!/bin/bash
if [ -z $PASSWORD ]; then
PASSWORD=$(date | md5sum | grep '[a-zA-Z1-9]')
fi
But this results in a result like :
...
2
votes
1
answer
3k
views
What does mknod do?
So the mknod command, what does that do?
/dev/random$ mknod -m 666 random c 1 8
I understand that -m specifies permissions, and that mknod overall create an inode in the filesystem which can be a ...
1
vote
1
answer
2k
views
4000x "wpa_supplicant[1885]: random: Cannot read from /dev/random: Resource temporarily unavailable" log message when booting
I recently added Linux Mint (19.3) as my new main OS on my Sony Vaio notebook.
Sometimes booting takes a bit of time and I found in jounrnalctl:
Feb 11 10:45:11 notebook kernel: microcode: microcode ...
2
votes
1
answer
580
views
Different behavior of RANDOM and URANDOM on Rpi Buster
System is:
pi@titania:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
...
3
votes
0
answers
2k
views
Check if /dev/urandom has been properly seeded in Linux
Myths about /dev/urandom says that in rare cases very shortly after boot, the CSPRNG may not have had enough entropy to be properly seeded and /dev/urandom may not produce high-quality randomness.
...
0
votes
3
answers
339
views
How to improve performance in generating MAC addresses with od?
In my script I need to randomly generate MAC addresses. The code below is from a larger script extracted, that's why the MAC address calculation is in a separate function.
This works fine with the ...
1
vote
1
answer
361
views
If /dev/random is implemented as a pseudo-device, why isn't "yes"? [closed]
yes produces a stream of "y" chars, or other requested.
If Unixen have a pseudodevice for random numbers, why not useful streams like this too?
0
votes
0
answers
216
views
SSH_USE_STRONG_RNG value clarification
A security guideline makes this statement
The most important characteristic of a random number generator is its randomness, namely its ability to deliver random numbers that are impossible to predict....