Live data from Hacker News

The setup of OpenBSD Amsterdam

openbsd.amsterdam

1–10 of 21 posts

Re: The setup of OpenBSD Amsterdam

#8
Perl's rand() is not a great way to generate values that should be unpredictable. It is seeded with only 4 bytes from /dev/urandom and is an LFSR like rand(3).

The consequence is that the range of possible passwords is probably smaller than was intended, and furthermore seeing previous passwords (or the random MAC) may help in predicting passwords. Of course without seeing their entire setup it's hard to say to what extent that is the case here.

This module may be useful (it even uses the same alphabet by default): https://metacpan.org/pod/Session::Token

Re: The setup of OpenBSD Amsterdam

#9
post #8

Perl's rand() is not a great way to generate values that should be unpredictable. It is seeded with only 4 bytes from /dev/urandom and is an LFSR like rand(3). The consequence is that the range of possible passwords is probably smaller than was intended, and furthermore seeing previous passwords (or the random MAC) may help in predicting passwords. Of course without seeing their entire setup it's hard to say to what…

Was thinking the same. Then remembered that OpenBSD's rand(3) actually returns result from arc4random() now. Then went to check and it seemed like Perl doesn't actually use rand(3) from libc? At least Perl's srand(N) and then rand() returned deterministic results, which shouldn't happen if it was using rand(3)...
Post reply on HN