what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

rsa-details.html

rsa-details.html
Posted Dec 21, 1999

rsa-details.html

tags | encryption
SHA-256 | aefce94f6c643ab9baa5098e1db54c64251bbcc1ba18e00a239b52951539c789

rsa-details.html

Change Mirror Download
<HTML>
<HEAD>
<TITLE>export-a-crypto-system sig</TITLE>
</HEAD>

<BODY BGCOLOR="#000000" TEXT="#FFFFFF" LINK="#00FFFF" VLINK="#FFFF00" ALINK="#FF00FF">

<H1>export-a-crypto-system-sig</H1>

This is a perl program which implements RSA encryption and decryption,
and is small enough to use as a
<A HREF="perl-rsa-sig.html">signature file</A>:

<HR>
<XMP>
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
</XMP>
<HR>

<H2>Software required, compatibility</H2>

To use you will need <A HREF="http://www.perl.com">perl</A>,
and <A HREF="dc.html">dc</A>.

<P>

Some older versions of dc don't work, if you have problems with larger
keys try getting

<A HREF="dc.html">GNU dc</A>. 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.

<H2>Using</H2>

To test, save it as "rsa" then try:

<PRE>
% chmod 700 rsa
% echo "squeamish ossifrage" | rsa -k=10001 -n=1967cb529 > msg.rsa
% rsa -d -k=ac363601 -n=1967cb529 < msg.rsa
</PRE>

Here are few keys to try it out with, while its not as fast as
<A HREF="http://www.ifi.uio.no/~staalesc/PGP/">PGP</A> it has usable
performance even for large keys

<H3>8bits:</H3>
<PRE>
e=11
d=ac1
n=ca1
</PRE>

<H3>32 bits:</H3>
<PRE>
e=10001
d=ac363601
n=1967cb529
</PRE>

<H3>128 bits:</H3>
<PRE>
e=10001
d=135b03530e94874283f0f0000ffff0001
n=24000c6c9620886831124848640044901
</PRE>

<H3>512 bits:</H3>
<PRE>
e=10001

d=62a03c0df0b96335047a12923a7d20bc2b7bb07c59aba2c4b094fc7d54392e8a2e7606cb
5d574407640f4bb4e0ea6aeb7fff0000ffff0000ffff0000ffff0001

n=12004001208404a43f00502200b204602600c00001da894922433e4601a2c85024024001
418004602404240109301008140000000142404002010000000000001
</PRE>

It 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 <A HREF="pgpacket.html">
extract your PGP public keys</A>), send me some RSA encrypted mail!

<H3>1024 bits:</H3>

<PRE>
e = 13
d = (with-held for obvious reasons)
n = b487306fc179f3bd5e55a9e7c5737722dc97ec4326838b67de814638214988cd90416f
f55fee783c32aacc55f2b90c073c69344f5a4d9a6fb3f90770ffe6a78084bbae3f2c77fe14
b70e0db894b063e01f91e169591ec2b5da7bf2a0427b7bd77bfa97129e9cfe10768b919f05
728e7484949bf29de83b6a9fe7f36ea2de58b5
</PRE>

Send me some mail by doing:

<PRE>
% rsa -k=[e] -n=[n] | uuencode "filename" | mail -s "subject" aba@dcs.ex.ac.uk
</PRE>

ie, cut and paste this into your unix shell:

<PRE>
rsa -k=13 -n=b487306fc179f3bd5e55a9e7c5737722dc97ec4326838b67de814638214988cd
90416ff55fee783c32aacc55f2b90c073c69344f5a4d9a6fb3f90770ffe6a78084bbae3f2c
77fe14b70e0db894b063e01f91e169591ec2b5da7bf2a0427b7bd77bfa97129e9cfe10768b
919f05728e7484949bf29de83b6a9fe7f36ea2de58b5 |
uuencode "perl-rsa-mail" | mail -s "rsa mail" aba@dcs.ex.ac.uk
</PRE>

Then type the body of your message, and press ^D TWICE when you have
finished composing your message.

Heres my <A HREF="/~aba/pgp-key.html">PGP public key</A>
in more conventional PGP format.

<P>
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 <A HREF="story.html">story at the moment</A>.
<HR>
<EM>
Comments, html bugs to me
(<A HREF="http://www.dcs.ex.ac.uk/~aba/">Adam Back</A>) at
<A HREF="mailto:aba@dcs.ex.ac.uk"><aba@dcs.ex.ac.uk></A>
</EM>
</BODY>
</HTML>
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close