Public Key 'Modulus' Generation
$e = $_POST['e'];
$d = $_POST['d'];
$p = $_POST['p'];
$n = $_POST['n'];
$q = $_POST['q'];
$phi = $_POST['phi'];
$mprivate = $_POST['mprivate'];
$p = $_POST['p'];
$q = $_POST['q'];
$p = trim($p);
$q = trim($q);
$n = $big_num = `echo $p*$q | bc`;
$k = `./ln2 $n`;
printf("
the result is
%s ",$big_num);
printf(" which is the result of %s * %s
which forms part of the public key (n)
\n", $p,$q);
printf(" The large number here, as a rough guide ",strlen($big_num)-1);
printf(" is capable of encrypting a %s bit length key
",$k-1);
?>