Number factorisation using Yafu

2.1k views Asked by At

I am trying to use Yafu to factorize RSA Keys. One thing that surprises me is Yafu shows more than 2 factors even though RSA keys should have only 2 factors. Why is this so?

For example, when I factor the following no:

factor(1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139)

I get these as factors:

  P2 = 11 
  P7 = 6698689 
  P8 = 18633149 
  P12 = 407893628797 
  P22 = 4702659209804290841741 
  P50 = 57813341690015577934703993485336625998708275892717
1

There are 1 answers

0
Rick Gutleber On

My command line calculator uses yafu for factorization. This took about an hour running on 4 cores:

c:>rpn 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139 factor

[ 37975227936943673922808872755445627854565536638199, 40094690950920881030683735292761468389214899724061 ]

So, your original answer was wrong, although I can't imagine how that happened.

This answer checks out by multiplying (-a110 sets the accuracy to 110 digits):

c:>rpn -a110 37975227936943673922808872755445627854565536638199 40094690950920881030683735292761468 389214899724061 * 1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139

Edit:

Multiplying the factors you posted above shows that for your input to yafu you seem to have dropped a '5' about 25 digits from the end:

c:>rpn -a100 [ 11 6698689 18633149 407893628797 4702659209804290841741 57813341690015577934703993485336625998708275892717 ] prod 152260502792253336053561837813263742971806811496138068865790849458012296325892897654000350692006139