Use this to drain your available entropy

Filed under hacks on jan 08, 2010

Tired of the huge amounts of available entropy generated by your RNG being wasted? Here is the solution:

#!/bin/sh
set -e
DIR=$(mktemp -t -d rsa-art-XXXXXX)
trap "rm -f $DIR/key*; rmdir $DIR" EXIT HUP INT QUIT TERM

while :
do
    ART=$(ssh-keygen -t rsa -f $DIR/key -N "" | tail -n 11)
    rm -f $DIR/key
    /bin/echo -e "\x1Bc"
    echo "$ART"
done

It even gives you very neat “RSA ASCII art” …

Add to

Feedback

No feedback has been posted.

Post your feedback

You can use this form to leave your feedback. Your insights are always appreciated.

Tools

View document source in text/plain