random number module

Paul Rubin <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
I'd like to submit a secure RNG module for Python 2.3.  Like block
ciphers, Guido has also expressed interest in this.

I included a Linux implementation in the block cipher reference
implementation that I just sent the url for:

      http://www.nightsong.com/phr/crypto/blockcipher.tgz

It works by reading pseudo-random bytes from /dev/urandom, i.e. it
lets the kernel do the heavy lifting.  I've been using it for quite
a while and I'm pretty happy with the interface.

There needs to be something similar for Windows, that gets random
bytes by calling CryptGenRandom function in the Windows CAPI,
preferably using a CSP of the user's choice, but it's ok if it uses
the standard Microsoft CSP.  All that's needed is a dll with one or
two entry points, to select the CSP and to read N random bytes with a
CAPI call.  I'd write this, except I'm mostly a Linux user and I don't
have any Windows dev tools.

Are there any Windows programmers here willing to do this?  I'll
provide whatever assistance I can, given that I can't compile or
easily test the code.  But I can help interpret the CAPI documentation
if that's useful.

Thanks.

Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.