3 ms·
> because people are poorly educated and copy their system disks without changing the random seed. To a first approximation: * SHA256( cat /var/lib/randomseed
by throw0101a 7y ago
> because people are poorly educated and copy their system disks without changing the random seed.
To a first approximation:
* SHA256( cat /var/lib/randomseed || ifconfig || date -u ) > /dev/urandom
will get any decent stream-cipher-based PRNG going.
Each machine will have a unique MAC address, so that's 48 bits right off the bat, even if randomseed is identical and every machine is booted at the exact same second.
- Hello71 7y agoI strongly suspect that this information is already included in the Linux kernel RNG, but it is not given much weight in the entropy calculation, on the basis that virtualized systems frequently have duplicated MAC addresses (as is allowed on a non-public system), and sometimes also have low initial timestamp resolution.
- throw0101a 7y agoIf a system will be communicating with other systems, it will need a unique Layer 2 address. This can be leveraged for some entropy (certainly you don't have to credit the full 48 bits, but are you tell saying that not even 1-2 bits of credit cannot be applied?). If the system is not communicating with other systems... what attack tree are you actually worried about if it is inaccessible? I would also be curious to know which virtualization environments generate duplicate MAC addresses over (say) dozens of systems?
- Hello71 7y agoMAC addresses are not used in a purely routed/virtualized network. qemu uses the same MAC address by default.
- mehrdadn 7y agodate -u just returns 1-second resolution? It's trivial to go through all the possibilities...
- throw0101a 7y ago$(date -u | wc --bytes) says there is 29 bytes worth of output, which is 232 bits. Are you telling me there is not even, say, 8 bits' worth of entropy credit in there? (Especially when hashed with other data?) Remember: the context of this discussion is VMs (and not embedded systems without a battery-backed RTC).
- viraptor 7y agoMACs are very much not random. Especially on a series of machines for a given provider, you can likely predict one. Date of the bootup is also not random if it's got only seconds resolution and you can figure out when a machine comes online by constantly trying to connect. In practice you added much fewer than 48 bits.