I'm helping a friend intergrate Movable Type into his current login system. Since MT uses the TypeKey API for commenter auth, I figured I'd make a few changes to his login to behave like a TypeKey system.
Now according to Six Apart this sounds really simple. Once you validate the user, just take what MT submitted, process it, and return it to the URL specified.
So anyway my problem right now is with Crypt::DSA. I created a key with the following script:
#!/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 . " "; }
That fails with the error:my %key; $key{"priv_key"} = "864936564936746739711078786791024560681741810216"; $key{"p"} = "103389578900933505962259092511631192256092079077336779855 +585334041474848850089585441001014183922540716749810264398731049494647 +20186311018367111795638927603"; $key{"g"} = "295468312836227549163017971559304985039133262378345815627 +315465892672058916494919915988882646491840732863667119568864913013161 +2326212886632087281832722137"; $key{"q"} = "1001831165198829652697436093010198645746872403487"; $key{"pub_key"} = "132346092772099461807044872757466388868899357571508 +126750807181863604967004471330240874757885029643259002077192969991245 +2512506924349344334420749206004502"; $sig = $dsa->sign(Message=>$sig_msg, Key => %key);
So maybe I don't understand how to assign the key var correctly. In the keygen script it doesn't have a % in front of it so lets try this:
Can't call method "q" on unblessed reference at /usr/lib/perl5/site_perl/5.8.0/Crypt/DSA.pm line 45.my $key; $key->{"priv_key"} = "864936564936746739711078786791024560681741810216 +"; $key->{"p"} = "1033895789009335059622590925116311922560920790773367798 +555853340414748488500895854410010141839225407167498102643987310494946 +4720186311018367111795638927603"; $key->{"g"} = "2954683128362275491630179715593049850391332623783458156 +273154658926720589164949199159888826464918407328636671195688649130131 +612326212886632087281832722137"; $key->{"q"} = "1001831165198829652697436093010198645746872403487"; $key->{"pub_key"} = "1323460927720994618070448727574663888688993575715 +081267508071818636049670044713302408747578850296432590020771929699912 +452512506924349344334420749206004502"; $sig = $dsa->sign(Message=>$sig_msg, Key => $key);
Ok that helped so much that I'm pretty sure I'm over my head. So what am I doing wrong here?
Actually, if anyone has already implemented a typekey server, that would be really cool and more useful.
In reply to How to Make Crypt::DSA use a your key to sign something by xorl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |