This node How to Make Crypt::DSA use a your key to sign something
got me thinking about how to extend Crypt::DSA's potential, to make
public and private keys, for signing verification. The script below,
will verify 2 ways, once with scalars inside the script, and once from
files. The generated sig, is actually binary, so note the base64
encoding of it, for attachment to emails, etc. I must thank sisyphus
for the trick of reblessing a hash back into an object. This is the
critical part of the script, where the public and private keys are
generated. The docs for Crypt::DSA don't show how to separate them,(
and you wouldn't want to be distributing your private key in the public
PEM file. :-)