in reply to How to Make Crypt::DSA use a your key to sign something

Hi, looking at a post by Sisyphus on comp.lang.perl. misc, it seems that you CAN use the numeric keys, like you tried in your original post. He showed a neat trick ( which I will have to explore further) where he reblessed the key data, and it works.

This brings up alot more possiblities where you might be able to remove the priv_key , and write it in PEM, so as to distribute the key?

#!/usr/bin/perl use Crypt::DSA; my $dsa = Crypt::DSA->new; # my $key = $dsa->keygen(Size => 512, Verbosity => 1); # print ref $key; foreach my $k (keys %{$key}) { # print $k . "=" . $key->$k . " "; # } my %key; # Note: keys shortened for display $key{"priv_key"} = ........86791024560681741810216"; $key{"p"} = .........7985558533404147484885008958544 $key{"g"} = ........1562731546589267205891649491991 $key{"q"} = .......97436093010198645746872403487"; # $key{"pub_key"} = ......5081267508071818636049670044 # don't need pub_key for signing my $sig_msg = "xxxxxxxxxxxxxxxxxx\n" x 40; my $k = \%key; bless($k, "Crypt::DSA::Key"); $sig = $dsa->sign(Message=>$sig_msg, Key => $k);

I'm not really a human, but I play one on earth. flash japh