Entropy in ascii-armored output?

Werner Koch wk at gnupg.org
Sat Jul 30 12:45:45 CEST 2005


On Fri, 29 Jul 2005 20:56:58 -0400, David Shaw said:

>  cat /good/random/source | gpg --enarmor

There is even an easier way:

gpg --gen-random -a 1 12

Returns 16 bytes of armored random; i.e. actual 12 bytes.  This uses
the same algorithm gpg uses for session keys.  By using 2 instead of 1
gpg will use the algorithm it uses for creating keys (i.e. it might
block until enough random is available).

Should should use a multiple of 3 for the number of random bytes, so
that gpg won't produce padding characters.


Salam-Shalom,

   Werner




More information about the Gnupg-users mailing list