[ale] A simple pseudorandom password generator

Michael B. Trausch mike at trausch.us
Sat Oct 1 12:18:03 EDT 2011


Hey!  Things are quiet!  Im'ma stir 'em up!  :-)

I put together a stupid little Python script to read bytes from
/dev/urandom and chuck them out as PGP word lists.  I thought there
might be some people on the list that would be interested in it.

I'm not sure how to actually compute the entropy of the passwords that
it generates, though; the rules of the PGP word list are kind of cool
but strange.  There is a word list of 512 words.  256 of them are used
in the "even" position, and 256 of them are used in the "odd"
position.  So, for each position there are 256 possibilities.
Naïely, I'd say that there are thus 256^n possibilities for each
possible password attempt.

*BUT* that's not quite the way it works, since there are two different
symbol sets.  If there were 512 possible symbols all the way through
the password, it'd be 512^n.  Of course, this ain't that, either.

I'd be inclined to say that it's probably something along the lines of
256^n * 2.  But I don't know.  Perhaps Mike W. can chip in to help me
understand that.

Anyway, I didn't actually make this *for* password generation, but
it'd be a lot better than the tool I am using for my users currently
for setting initial passwords, so I'm going to start using it for
that.  :-)

Script is attached.

       --- Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pwlpg.py
Type: text/x-python
Size: 7614 bytes
Desc: not available
Url : http://mail.ale.org/pipermail/ale/attachments/20111001/a7f391ff/attachment.py 


More information about the Ale mailing list