[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [even more NOISE] BIO-MUNITION: gifs of perl-RSA tattoo




Alan Olsen <[email protected]> writes:
> [Much noise on Perl-RSA tatoo and compile problems deleted]
> 
> The only thought that came to mind on this thread was how closely
> the tatoo artist spellchecked that tatoo.  It would be pretty funny
> to have a "munitions violation" that was non-functional due to
> tatooing errors.

Funny you should say that... I thought I'd better check (before you
mentioned this btw) by transcribing from the (slightly grainy) gif,
and Richard did miss one char, fortunately in an easily correctable
position.  I'd guess his wife has probably tattooed the missing ` by
now.

(The ` was missing from the line:

$m=unpack(H.$w,$m."\0"x$w),$_=`echo "16do$w 2+4Oi0$d*-^1[d2%Sa

but there was a bit of white space between the = and the e -- plenty
enough for a ` -- phew that was close!

While I'm here generating noise, someone just sent me this:

#!/usr/local/bin/perl -s-- -export-a-crypto-system-sig -RSA-5-lines-PERL
do 'bigint.pl';($_,$n)=@ARGV;s/^.(..)*$/0$&/;($k=unpack('B*',pack('H*',$_)))=~
s/^0*//;$x=0;$z=$n=~s/./$x=&badd(&bmul($x,16),hex$&)/ge;while(read(STDIN,$_,$w
=((2*$d-1+$z)&~1)/2)){$r=1;$_=substr($_."\0"x$w,$c=0,$w);s/.|\n/$c=&badd(&bmul
($c,256),ord$&)/ge;$_=$k;s/./$r=&bmod(&bmul($r,$r),$x),$&?$r=&bmod(&bmul($r,$c
),$x):0,""/ge;($r,$t)=&bdiv($r,256),$_=pack(C,$t).$_ while$w--+1-2*$d;print}

Significance?  It's in pure perl -- no use of dc.  I was *very*
impressed.  It's a fair bit slower unfortunately, but some people
objected to the other one on the grounds that it was cheating to use
an external program (dc).  Also that will work on PCs without mods.

Adam