GPG with GPUs

Werner Koch wk at
Mon Jun 18 10:49:09 CEST 2012

On Mon, 18 Jun 2012 05:31, rjh at said:

> results can check for themselves.  Warning: if you ever write Python
> code like this in the real world your programming team will beat you to
> death.

To me this awk script is more readable, although most other will

  $ gpg2 --gen-random 0 262144 | time gpg2 --always-trust --batch -ea \
    $(gpg2 --with-colons -k | awk -F: \
    '$1=="pub" && $2~/[fmu]/ && $12~/[E]/ {print "-r "$5;if(++cnt>50){exit}}')\

resulting in

  0.32user 0.03system 0:01.00elapsed 

On a slower machine but likely with another state of the entropy pool.

I use only keys which are usable as indicated by the "$2~/[fmu]/"
condition and which have at least one encryption subkey ("$12~/[E]/").
I need this test because I have some invalid keys (Elgamal signatures)
in my ring.

I actually found a bug in GPG: If a key has been disabled, it is not
flagged as disabled in the --with-colons key listing.  I need to
investigate that closer - might be the reason for bugs reported to GUI



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-users mailing list