Re: Entropy sources under WinXP
- From: "Sebastian G." <seppi@xxxxxxxxx>
- Date: Sat, 19 May 2007 01:13:12 +0200
Mark Nudelman wrote:
You can use CryptGenRandom to generate random numbers, or directly read
the registry value HKLM\Software\Microsoft\Cryptography\RNG\Seed.
You cannot directly read this value without risking a buffer overflow on
Windows version before Windows Vista.
Eh? As far as I'm aware, it can be read safely the same way any other
registry value of unknown size can be read: call RegQueryValueEx once to
discover the size of the value in the registry, and then call it again
to read the amount of data you want.
And if the size of the value can change in between (which is the case for this one), you have a problem. You'd require either a lock (which you won't get) or transactional semantics (only on Windows Vista).
.
- Follow-Ups:
- Re: Entropy sources under WinXP
- From: Mark Nudelman
- Re: Entropy sources under WinXP
- References:
- Entropy sources under WinXP
- From: keith
- Re: Entropy sources under WinXP
- From: Mark Nudelman
- Re: Entropy sources under WinXP
- From: Sebastian G.
- Re: Entropy sources under WinXP
- From: Mark Nudelman
- Entropy sources under WinXP
- Prev by Date: Re: Entropy sources under WinXP
- Next by Date: Re: Entropy sources under WinXP
- Previous by thread: Re: Entropy sources under WinXP
- Next by thread: Re: Entropy sources under WinXP
- Index(es):
Relevant Pages
|