This commit is contained in:
danogentili 2016-07-21 14:29:46 +02:00
parent 0c9dadf2b8
commit 656d5145ae
2 changed files with 2 additions and 0 deletions

View File

@ -281,6 +281,7 @@ class Session
$public_key_fingerprint = $ResPQ['server_public_key_fingerprints'][0];
$pq_bytes = $ResPQ['pq'];
$pq = new \phpseclib\Math\BigInteger($pq_bytes, 256);
var_dump($this->PrimeModule->primefactors($pq));die;
var_dump($this->PrimeModule->pollard_brent(15));
var_dump($this->PrimeModule->primefactors(1724114033281923457));

View File

@ -117,6 +117,7 @@ class PrimeModule
public function primefactors($n, $sort = false)
{
$factors = [];
var_dump((int)$n->toString());
$limit = ((int) (pow($n, 0.5)) + 1);
foreach ($this->smallprimes as $checker) {
if (($checker > $limit)) {