RSA in 5 lines of perl

#!/usr/local/bin/perl -s 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}

Source: RSA in 5 lines of perl