Ñò
UVà[c @ sé d d k Z d d k Z d d k l Z y d d k Z Wn e j
o
d Z n Xd „ Z e d j o e i ƒ i
ƒ d j p e i d j o d d k l Z e i
ƒ Z n d d k l Z e i
ƒ Z d e f d „ ƒ YZ d S(
iÿÿÿÿN( t
RandomPoolc C s d i t d „ | | ƒ ƒ S( Nt c S s t t | ƒ t | ƒ Aƒ S( ( t chrt ord( t xt y( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyt s ( t joint map( t at b( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyt _strxor s t windowst win32( t rng_win32( t rng_posixt StrongLockingRandomPoolc B sG e Z d Z d d „ Z d d „ Z d d „ Z d d „ Z d „ Z RS( s÷ Wrapper around RandomPool guaranteeing strong random numbers.
Crypto.Util.randpool.RandomPool will silently operate even if it is seeded
with little or no entropy, and it provides no prediction resistance if its
state is ever compromised throughout its runtime. It is also not thread-safe.
This wrapper augments RandomPool by XORing its output with random bits from
the operating system, and by controlling access to the underlying
RandomPool using an exclusive lock.
c C sh | d j o
t ƒ } n | | _ t i ƒ | _ t | _ | i i | i i d ƒ ƒ | i i
ƒ d S( Ni ( t Nonet _RandomPoolt randpoolt threadingt Lockt
randpool_lockt
rng_devicet entropyt stirt readt randomize( t selft instance( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyt __init__B s
R c C sC | i i ƒ z | i i | ƒ Wd | i i ƒ X| i i ƒ d S( N( R t acquireR R t releaseR R ( R t s( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyR M s
i c C sC | i i ƒ z | i i | ƒ Wd | i i ƒ X| i i ƒ d S( N( R R R R R R ( R t N( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyR U s
c C s6 | i i ƒ z | i i | ƒ Wd | i i ƒ Xd S( N( R R R t add_eventR ( R R! ( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyR# ] s
c C sY | i i ƒ z | i i | ƒ } Wd | i i ƒ X| i i | ƒ } t | | ƒ } | S( N( R R R t get_bytesR R R R ( R R" t
randpool_datat entropy_datat result( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyR$ d s
N( t __name__t
__module__t __doc__R R R R R# R$ ( ( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyR 6 s
( t sysR t Crypto.Util.randpoolR R t platformt ImportErrorR R t systemt lowert paramikoR t open_rng_deviceR R t objectR ( ( ( s0 /usr/lib/python2.6/site-packages/paramiko/rng.pyt s &