|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: randomid(3)
From: Charles Blundell (cb
kittenz.org)
Date: Fri Sep 12 2003 - 10:49:15 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
on Tue, Sep 09, 2003 at 09:04:09PM +0900, Jun-ichiro itojun Hagino wrote:
> here's randomid(3) code i propose to integrate into libc.
> first we'll use this from:
> - lib/libc/net (DNS query ID)
> - lib/libc/rpc (RPC XID)
> then maybe more places. comments are welcome.
I am curious: why did you choose this method for generating ids
over that present in djbdns?
http://cr.yp.to/djbdns/dns_random.html
google found the source for this:
http://un.bewaff.net/dnsmodule/djb/dns_random.c
dns_random looks like it might be quite fast since the only division
occurs right at the end, the rest is bit-wise operations or addition.
It does not appear to reseed itself, though.
Are the udp source ports randomised too? Seems to me that this
might help considerably, giving you approximately 30 hard to predict
bits in the query packet instead of just 16...
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]