Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Diceware Passwords 1

Status
Not open for further replies.

SamBones

Programmer
Aug 8, 2002
3,186
US
Saw this article on a different site and found it interesting.

This 11 Year Old is Selling Cryptographically Secure Passwords for $2 Each

I wrote a little shell script to generate the passphrases using the word list found here (just remove the PGP stuff at top and bottom and call it 'diceware.dat').

Code:
#!/bin/ksh

WORDS=./diceware.dat

NUMWORDS=6

print

while (( NUMWORDS ))
do
        RND=$((${RANDOM}%6+1))$((${RANDOM}%6+1))$((${RANDOM}%6+1))$((${RANDOM}%6+1))$((${RANDOM}%6+1))
        WORD=$(grep ${RND} ${WORDS} | awk '{print $2}')
        print -n "$WORD "

        (( NUMWORDS -= 1 ))
done

print "\n"

I'm still going to buy some passwords from her because I like her initiative.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top