pgp-in-50-lines-of-perl? (Re: The Pure Crypto Project's Hash Function)

Bill Stewart bill.stewart at pobox.com
Mon May 5 03:07:53 EDT 2003


At 09:33 PM 05/04/2003 +0200, Ralf Senderek wrote:
>On Sun, 4 May 2003, Adam Back wrote:
>
> > There is also a RSA key generator (including prime generation) by
> > Steve Reid in 13 lines.  I guess you could probably get a basic PGP
> > compatible implementation of encryptions, signature and keygen in one
> > page of perl/dc etc. ie 60 lines perhaps less.  I mean we have RSA in
> > 2 lines, md5 in 8 lines, key gen in 13 lines; you'd need IDEA which no
> > one has implemented in compacted perl, but we have
> > 2+8+13+IDEA+formatting IDEA has no s-boxes or magic values or
> > anything, so could probably be quite compact and perl is good at
> > formatting.
>
>Is there anything I can do to make you come forward with at least
>some of this to look at?

It's all sitting on http://cypherspace.org/~adam/rsa/ ,
including the RSA key generator which I don't remember having noticed.
Personally, I'd go with rc5 instead of IDEA, or even RC4,
and use much simpler data formats (crypto parameters in hex or decimal,
stuff separated by white space or maybe even newlines.)

There are too many PGP formats out there to bet on compatibility,
and Phil's various compacted integers were all ugly.
Admittedly, if somebody does have even more too much time on their hands,
even one-way compatibility with even one version would have major hack value,
but I'd lean toward cleanliness myself.

Personally I've always disliked the mixture of perl+dc, but it probably works
faster than the pure-perl version, as well as being smaller.
The 4-line LISP and Python versions are quite clean and readable :-)





---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo at metzdowd.com



More information about the cryptography mailing list