Some older versions of dc don't work, if you have problems with larger keys try getting GNU dc. If you have a SUN you will need GNU dc as the versions of dc distributed with SUN O/S, and Solaris don't seem to work.
% chmod 700 rsa % echo "squeamish ossifrage" | rsa -k=10001 -n=1967cb529 > msg.rsa % rsa -d -k=ac363601 -n=1967cb529 < msg.rsaHere are few keys to try it out with, while its not as fast as PGP it has usable performance even for large keys
e=11 d=ac1 n=ca1
e=10001 d=ac363601 n=1967cb529
e=10001 d=135b03530e94874283f0f0000ffff0001 n=24000c6c9620886831124848640044901
e=10001 d=62a03c0df0b96335047a12923a7d20bc2b7bb07c59aba2c4b094fc7d54392e8a2e7606cb 5d574407640f4bb4e0ea6aeb7fff0000ffff0000ffff0000ffff0001 n=12004001208404a43f00502200b204602600c00001da894922433e4601a2c85024024001 418004602404240109301008140000000142404002010000000000001It is possible to use this program with your PGP keys, heres my PGP public key expressed as hex numbers suitable for perl-rsa (and heres a perl program to extract your PGP public keys), send me some RSA encrypted mail!
e = 13 d = (with-held for obvious reasons) n = b487306fc179f3bd5e55a9e7c5737722dc97ec4326838b67de814638214988cd90416f f55fee783c32aacc55f2b90c073c69344f5a4d9a6fb3f90770ffe6a78084bbae3f2c77fe14 b70e0db894b063e01f91e169591ec2b5da7bf2a0427b7bd77bfa97129e9cfe10768b919f05 728e7484949bf29de83b6a9fe7f36ea2de58b5Send me some mail by doing:
% rsa -k=[e] -n=[n] | uuencode "filename" | mail -s "subject" aba@dcs.ex.ac.ukie, cut and paste this into your unix shell:
rsa -k=13 -n=b487306fc179f3bd5e55a9e7c5737722dc97ec4326838b67de814638214988cd 90416ff55fee783c32aacc55f2b90c073c69344f5a4d9a6fb3f90770ffe6a78084bbae3f2c 77fe14b70e0db894b063e01f91e169591ec2b5da7bf2a0427b7bd77bfa97129e9cfe10768b 919f05728e7484949bf29de83b6a9fe7f36ea2de58b5 | uuencode "perl-rsa-mail" | mail -s "rsa mail" aba@dcs.ex.ac.ukThen type the body of your message, and press ^D TWICE when you have finished composing your message. Heres my PGP public key in more conventional PGP format.
If you know perl or dc and can see any way to shorten the code please tell me, I'd really like to reduce its size as much as possible, heres the story at the moment.