PHP hackers wanted -- here's a seed
pp at myelin.co.nz
Thu May 26 14:08:39 PDT 2005
> >(And repeating my call before: anyone want to write some DSS key
> >generation and signing routines in PHP? I think Brad or Ben mentioned
> >that someone has done this in pure Perl - so anyone who can read Perl
> >and write PHP should be able to take this on.)
> Though I use it once in a while I *hate* Perl but I found some sample
> DSS key generation & signing in C thus I can do it.
> Two questions:
> - Which kind of API would you want?
> - It looks trivial (less than 200 lines each), am I missing something or
> are you lazier than me?
I'm lazier, definitely. As it is this is taking all my spare time -
so if someone else can do bits of it, I'll have more time to do stuff
like put proper error checking into the consumer code :-)
As for an API, the key things I need are:
-> returns array($private_key, $public_key)
function dsa_sign_message($private_key, $message)
-> returns $signature
create_dsa_key_pair() would return a private key (suitable to be
passed back into dsa_sign_message()) and a public key.
Ideally the public key would be PEM-encoded so I can print it straight
out on a getpublickey request, but returning an array of the key
integers in binary format or as stringified bigints would be OK too.
dsa_sign_message() would ideally return a signature suitable for
base64'ing, but an array of the signature integers in binary format or
as stringified bigints would be OK too.
I'll mail you my current DSA signing / bigint code (from Daiji
Hirata's TypeKey code); it will probably be handy...
More information about the yadis