ezPyCrypto keys

Heiko Wundram heikowu at ceosg.de
Wed Aug 27 11:18:02 CEST 2003


On Wed, 2003-08-27 at 04:37, John Hunter wrote:
> What's going on?  Is it abnormal for so many of the characters in the
> exported string to be the same?  The machine I am running on is a
> server that rarely has anyone logged in directly.  Is this a problem
> with not enough randomness in /dev/random?

It's sure got nothing to do with too little randomness, I'd rather say
this is just a serialization issue. The Ms and Ns are probably control
characters in the underlying cPickle key output. I guess it'd be hard
for the key output to be random, except when you compress it using
zlib/bzip2 on output, this should randomize the data sufficiently.

I haven't done any tries for this on my machine, so I might just as well
be plain wrong, and you have too little randomness available. But, as
PyCrypto uses /dev/random, this can't really be the case, as this would
mean that your kernel is buggy, and I don't recall any problems with
2.4.9.

If you want more control over the output format of keys, have a look at
yawPyCrypto, "yet another wrapper for PyCrypto", which defines a much
more flexible interface for wrapping stringified key data (and btw. is
written and maintained by me ;)). You could easily write a plugin which
zips all key output.

HTH!

Heiko.






More information about the Python-list mailing list