Saturday, September 18, 2010

Re: simple 16-bit random number generator

On 09/18/2010 09:42 AM, John Little wrote:
>
>>> You might have to adjust that "libc.so.6" for your OS.
>>
>> I like the idea of system utilities, but... Not available on this Mac.
>
> I'm sure the standard library is available on Macs, but what
> "dynamically linked libraries" are on Macs I've no idea, except that
> OS X is BSD derived I thought. Have a look for something like /lib/
> libc* or /usr/lib/libc*.

Exactly. On GNU/Linux platform it's easy to check dynamic dependencies
using ldd. On OS X try otool.

>> How have you been "stung"?
>
> In one case test coverage was compromised by the random numbers
> repeating after 65536 numbers; each test used some power of 2, like 64
> or 128. In another integer to float to integer conversions lost
> bits, causing password generation code to repeat sequences of
> passwords after a variable number of passwords; once you'd got a
> password in one of the known sequences you could predict every
> password thereafter.
>
> Regards, John
>

Well, you can always think about using some cipher/hash to generate
piece of data with good entropy. Most of modern algos (AES, Camellia,
Twofish, Serpent) are doing good job here. Data encrypted using them is
passing many of randomness tests.

--
Regards,
Milo

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: