Package Crypto :: Package Random :: Package Fortuna :: Module FortunaGenerator :: Class AESGenerator
[hide private]
[frames] | no frames]

Class AESGenerator

object --+
         |
        AESGenerator

The Fortuna "generator"

This is used internally by the Fortuna PRNG to generate arbitrary amounts of pseudorandom data from a smaller amount of seed data.

The output is generated by running AES-256 in counter mode and re-keying after every mebibyte (2**16 blocks) of output.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
reseed(self, seed)
 
pseudo_random_data(self, bytes)
 
_set_key(self, key)
 
_pseudo_random_data(self, bytes)
 
_generate_blocks(self, num_blocks)

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

Class Variables [hide private]
  block_size = 16
  key_size = 32
  max_blocks_per_request = 65536
  _four_kiblocks_of_zeros = '\x00\x00\x00\x00\x00\x00\x00\x00\x0...
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)

Class Variable Details [hide private]

_four_kiblocks_of_zeros

Value:
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0\
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0\
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0\
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0\
...