Package Crypto :: Package Random :: Package OSRNG :: Module nt :: Class WindowsRNG
[hide private]
[frames] | no frames]

Class WindowsRNG

      object --+    
               |    
rng_base.BaseRNG --+
                   |
                  WindowsRNG

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
flush(self)
Work around weakness in Windows RNG.
 
_close(self)
 
_read(self, N)

Inherited from rng_base.BaseRNG: __del__, __enter__, __exit__, close, read

Inherited from rng_base.BaseRNG (private): _selftest

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  name = "<CryptGenRandom>"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

flush(self)

 
Work around weakness in Windows RNG.

The CryptGenRandom mechanism in some versions of Windows allows an
attacker to learn 128 KiB of past and future output.  As a workaround,
this function reads 128 KiB of 'random' data from Windows and discards
it.

For more information about the weaknesses in CryptGenRandom, see
_Cryptanalysis of the Random Number Generator of the Windows Operating
System_, by Leo Dorrendorf and Zvi Gutterman and Benny Pinkas
http://eprint.iacr.org/2007/419

Overrides: rng_base.BaseRNG.flush

_close(self)

 
Overrides: rng_base.BaseRNG._close

_read(self, N)

 
Overrides: rng_base.BaseRNG._read