public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Gromanowski <lgromanowski@gmail.com>
To: Petr Ovtchenkov <ptr@void-ptr.info>
Cc: linux-kernel@vger.kernel.org
Subject: Re: constant half-byte from /proc/sys/kernel/random/uuid
Date: Tue, 01 Jun 2010 14:52:42 +0200	[thread overview]
Message-ID: <4C05029A.5020000@gmail.com> (raw)
In-Reply-To: <201006011622.58834.ptr@void-ptr.info>

Petr Ovtchenkov pisze:
> Lack of randomness during generating uuid.
> 
> Sample:
> 
> for i in 1 2 3 4 5 6 7 8 9; do cat /proc/sys/kernel/random/uuid ; done
> 
> 3faf5c7e-5e1b-4b3c-a318-979653d85404
> a929d2d3-e229-42ca-9f33-9c09801f41fb
> c2a96cb6-0dba-401c-a9c6-dabe1dec89d6
> df341de3-eb97-4327-bb63-46afd8dbfaa8
> 9d84d61c-0c55-4914-8bd6-7f1601110908
> 6d82e69b-418e-4189-b5a4-0661b6e24dcf
> eb38de66-4e0b-4bd0-827b-e75ba273e85a
> 5585c367-754f-4bbf-81f6-8a728380860d
> c074480b-ad5c-4e10-81d2-82225c449b91
> 
> 
> See on 7th high half-byte: it '4' in
> all cases---4b, 42, 40, 43, 49, 41,
> 4b, 4b, 4e. Checked three comps, with
> similar results. All Linux-generated UUID (boot_id)
> that I see in internet has '4' in this
> half-byte.

Hi,
quote from wikipedia[1]

"Version 4 (random)

Version 4 UUIDs use a scheme relying only on random numbers. This
algorithm sets the version number as well as two reserved bits.
All other bits are set using a random or pseudorandom data source.
Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
with any hexadecimal digits for x but only one of 8, 9, A, or B for y.
e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479."

[1] http://en.wikipedia.org/wiki/Universally_Unique_Identifier

-- 
best regards,
Lukasz

  reply	other threads:[~2010-06-01 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 12:22 constant half-byte from /proc/sys/kernel/random/uuid Petr Ovtchenkov
2010-06-01 12:52 ` Lukasz Gromanowski [this message]
2010-06-01 13:03 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C05029A.5020000@gmail.com \
    --to=lgromanowski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ptr@void-ptr.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox