Subject: Re: set Global ID field to SHA hash of domain name

From: Zefram <[email-masked]>
Date: Fri, 12 Sep 2003 17:40:41 +0100

George Gross wrote:
>	At the risk of triggering another firestorm of pro/con debate, is
>there any reason why the centrally assigned Global ID defined by
>hinden-ipv6-global-local-addr-02.txt could not be simply the low-order 40
>bits of a SHA hash of a domain name? i.e. if you own the domain name, you
>get the IP-v6 global ID for "free"?

That sounds like a decent way of generating a locally assigned ID, but
it doesn't have the uniqueness guarantee that is the raison d'etre for
the central registry.  You Have Missed The Point, as one of my favourite
games can be provoked into saying.

-zefram
-- 
Andrew Main (Zefram) <[email-masked]>

--------------------------------------------------------------------
IETF IPv6 working group mailing list
[email-masked]
Administrative Requests: https://www1.ietf.org/mailman/listinfo/ipv6
--------------------------------------------------------------------

---

From: Iljitsch van Beijnum <[email-masked]>
Date: Fri, 12 Sep 2003 18:52:41 +0200

On vrijdag, sep 12, 2003, at 11:07 Europe/Amsterdam, George Gross wrote:

> get the IP-v6 global ID for "free"? This would side step the angst of
> setting up yet another global registry...

Hm, with 2^40 possible prefixes and already something in the order of 
2^25 domains in use, I expect collisions will be a definite factor. I 
would also be interested in seeing how the SHA-1 algorithm holds up. 
Anyone care to get a suitably large list of domain names (a million or 
so) and do some statistics on the lower 40 bits of the associated SHA-1 
hash?

It did occur to me that the domain name sellers are in a better 
position to give out these prefixes than the traditional IP address 
registries, though. Especially if you consider that they'd just be 
selling domain names under c.f.ip6.arpa.  :-)

---

From: George Gross <[email-masked]>
Date: Fri, 12 Sep 2003 12:03:26 -0400 (EDT)

Hi Zefram,

> games can be provoked into saying.

hmmm... I'm not religous about whether the mechanism gets used locally
only or centrally or both.

For the central registry, could we define a reverse DNS lookup to verify
the hash's uniquesness?

Even if the first reverse DNS probe proved not to be unique, one could
append a well-specified computed string, such as "0", "1", "2", ... to the
domain name on each successive attempt, until the hash's uniqueness was
confirmed.

George

---

From: George Gross <[email-masked]>
Date: Fri, 12 Sep 2003 12:33:12 -0400 (EDT)

Hi Iljitsch,

On Fri, 12 Sep 2003, Iljitsch van Beijnum wrote:

> 2^25 domains in use, I expect collisions will be a definite factor.

In a parallel e-mail to Zefram, I offered an algorithm for probing for
uniqueness, and then retrying. OTOH, if you merely want a genuinely local
pseudo-random number, then the collision factor is moot.

> I would also be interested in seeing how the SHA-1 algorithm holds up.
> so) and do some statistics on the lower 40 bits of the associated
> SHA-1 hash?

SHA-1 has fairly strong hashing properties, even changing one bit in the
input yields a reasonably diverse output. OTOH, I'm not a cryptographer,
though I'll add that most of what I've heard about SHA-1 is that it is
held in high regard. FYI, you may wish to dredge the IRTF CFRG e-mail
archives for the thread with the Subject line of "one question about hash"
that occured in July of this year.

The good news about those 2^25 domain name holders is that they are the
most likely consumers of this local IP-v6 address prefix, and they would
immediately inherit their's for free without doing anything.

> selling domain names under c.f.ip6.arpa.  :-)

Another implicit benefit is that every domain name holder already has a
local IP-v6 prefix allocated on the shelf waiting for them. Musing
outloud, I wonder how that could be leveraged to automatically compute the
IP-v6 address of any IP-v4 endpoint for which you know the FQDN and
your DNS query returned an IP-v4 address record.

br,
	George

---

From: "Stephen Sprunk" <[email-masked]>
Date: Fri, 12 Sep 2003 13:50:35 -0500

Thus spake "Iljitsch van Beijnum" <[email-masked]>
> selling domain names under c.f.ip6.arpa.  :-)

The same thought occurred to me several months ago; the draft even
references the .org registry -- not an RIR -- as a model of how the
allocating authority could be structured.

Also, thinking of this in a domain mindset caused me to rethink whether
local addresses should be in the global DNS.  I can understand the arguments
against it, but as the draft says, there's no harm.  Given the (expected)
sparse population of FC00::/8, the only reason anyone is likely to go
looking for a PTR record is if they received a packet from that prefix -- 
meaning they probably have a legitimate reason to know who sent it.  A
specific example would be two private sites, such as business partners, that
use their local addresses to communicate; these sites should be able to
resolve each others' addresses without mucking around with every DNS server
to list "special" zones that aren't in the global DNS.

S

Stephen Sprunk         "God does not play dice."  --Albert Einstein
CCIE #3723         "God is an inveterate gambler, and He throws the
K5SSS        dice at every possible opportunity." --Stephen Hawking

---

From: "Eugene M. Kim" <[email-masked]>
Date: Fri, 12 Sep 2003 17:49:22 -0700

Hello,

I asked a coworker (she's a cryptographer) about this, and she said that
output of SHA-1 is random enough that it should not exhibit any
noticeable trait in its result even if we fed it with inputs that
all exhibit a common trait (e.g. domain names).

Assuming this uniformity, the probability of no 40-bit hash values
colliding out of 2^25 ones is:

(1 - 0 / 2^40)(1 - 1 / 2^40)(1 - 2 / 2^40)(1 - 3/2^40)...(1 - (2^25 - 1) / 2^40)

So the probability of *any* collision is one minus this probability
(this is the formula she gave me):

1 - (1 - 1 / 2^40)(1 - 2 / 2^40)(1 - 3/2^40)...(1 - (2^25 - 1) / 2^40)

Because even (2^25 - 1) / 2^40 is really close to 0, the dominant term
would be 1, and the probabilty of collision in turn will be really
close to 0.

Eugene

---

From: George Gross <[email-masked]>
Date: Fri, 12 Sep 2003 05:07:23 -0400 (EDT)

Hi,
	At the risk of triggering another firestorm of pro/con debate, is
there any reason why the centrally assigned Global ID defined by
hinden-ipv6-global-local-addr-02.txt could not be simply the low-order 40
bits of a SHA hash of a domain name? i.e. if you own the domain name, you
get the IP-v6 global ID for "free"? This would side step the angst of
setting up yet another global registry... if this has already been
discussed on this list, just let me know when and the Subject line...

br,
	George