The encoding is simply performed by taking the number to be encrypted to the power of e, and then applying the modulus for n (i.e. p times q).
if ( $m ) { ?>The decoding process calculates the value of c ^ d % n.
The value c ^ d ( printf(" %s ^ %s ",$c,$d); ?> ) in this case would produce a number with approx echo $digits ?> decimal digits !
$gt100k = `./gt100k $digits`; if ( $gt100k == 1 ) { ?>Obviously this is unacceptable and would cause memory and processing time problems. Mathematical techniques for algebraically breaking this problem into smaller pieces, are described here
Note that for this very large value, the bc script may take up to $mins_est = (($digits/1000000) * ($digits/1000000)) * 1.5; printf("%2.2f",$mins_est); ?> minutes to finish this calculation.
} ?>