Pseudo-random generator in python described in RFC4187
<p>Is there an existing python implementation of pseudo-random generator described in RFC4187 (FIPS186-2)</p>

<p>Appendix A.  Pseudo-Random Number Generator</p>

<p>The "|" character denotes concatenation, and "^" denotes
   exponentiation.</p>

<p>Step 1: Choose a new, secret value for the seed-key, XKEY</p>

<p>Step 2: In hexadecimal notation let
       t = 67452301 EFCDAB89 98BADCFE 10325476 C3D2E1F0
       This is the initial value for H0|H1|H2|H3|H4
       in the FIPS SHS [SHA-1]</p>

<p>Step 3: For j = 0 to m - 1 do</p>

<pre><code>     3.1.  XSEED_j = 0 /* no optional user input */

     3.2.  For i = 0 to 1 do

           a.  XVAL = (XKEY + XSEED_j) mod 2^b

           b.  w_i = G(t, XVAL)

           c.  XKEY = (1 + XKEY + w_i) mod 2^b

     3.3.  x_j = w_0|w_1
</code></pre>

<p>I'm lost at the exponentiation. I managed to find C implementation, but I'm not fluent enough in C to translate it easily. What is b?
<a href="http://www.opensource.apple.com/source/eap8021x/eap8021x-137.2/EAP8021X.fproj/fips186prf.c" rel="nofollow">http://www.opensource.apple.com/source/eap8021x/eap8021x-137.2/EAP8021X.fproj/fips186prf.c</a></p>

<p>RTFM answer is OK, just points me to the right manual.</p>
