mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2012-12-02, 19:45   #1
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default SNFS factoring for neophytes?

I would like to factor a special-form number of 537 bits (which, as I understand, is quite doable with SNFS). I've run 1000 curves at B1 = 10^6 so the number seems to have no small factors. What is the easiest way to factor the number?

I have ggnfs, factmsieve.py, yafu, cado-nfs, etc. but I haven't used any of them for a long time and I'm not sure about syntax, and so forth. I'm even a little hazy on the right way to form a good poly but I'll manage I think.
CRGreathouse is offline   Reply With Quote
Old 2012-12-02, 21:02   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2×47×101 Posts
Default

You could be done in 1 core-day with this SNFS.

The only trick is to build a polynomial. If it is of an obligatory ugly degree, then the fun starts, otherwise it should be a press play and forget. (I am not using the .py script, but .pl will do everything for you. You can leave limits and other parameters off the .poly file it will fill them in.) What is the general form of the number? PM if you want to keep it secret - I am reliable! ;-)

Last fiddled with by Batalov on 2012-12-02 at 21:06
Batalov is offline   Reply With Quote
Old 2012-12-02, 21:03   #3
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

66758 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
I would like to factor a special-form number of 537 bits (which, as I understand, is quite doable with SNFS). I've run 1000 curves at B1 = 10^6 so the number seems to have no small factors. What is the easiest way to factor the number?

I have ggnfs, factmsieve.py, yafu, cado-nfs, etc. but I haven't used any of them for a long time and I'm not sure about syntax, and so forth. I'm even a little hazy on the right way to form a good poly but I'll manage I think.
With yafu, if you can manage the polynomial then create a file like the following named, for example, snfs.job. These coefficients are obviously for a gnfs job in this example but you get the picture. If the snfs difficulty is greater than the decimal size of the number then you'll need to provide that as well.

Code:
n: 1279722376069429882674916783738587645201002727982137842794710157040169036868965821113429393
skew: 222414.44
type: snfs
size: NNN
c0: 1055355831583822265944960
c1: 110053741356789971224
c2: 155632423969639
c3: -2603265818
c4: 6120
Y0: -3802720129719817966849
Y1: 269924026471
Assuming you also have the ggnfs lattice siever executables, add the following line to a yafu.ini file (in the same directory as the yafu executable) assuming you haven't already:

Code:
ggnfs_dir=..\relative\path\to\your\ggnfs\directory
Then run (an X threaded job) with

Code:
yafu-x64.exe "nfs(the number)" -j snfs.job -threads X
and yafu will do the rest.
bsquared is online now   Reply With Quote
Old 2012-12-02, 21:27   #4
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

597910 Posts
Default

Quote:
Originally Posted by Batalov View Post
The only trick is to build a polynomial. If it is of an obligatory ugly degree, then the fun starts, otherwise it should be a press play and forget. (I am not using the .py script, but .pl will do everything for you. You can leave limits and other parameters off the .poly file it will fill them in.) What is the general form of the number? PM if you want to keep it secret - I am reliable! ;-)
Nothing secret, it's 84^84 - 83^83.
CRGreathouse is offline   Reply With Quote
Old 2012-12-02, 22:21   #5
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

2·47·101 Posts
Default

Ok, let's try this. (I will use the compositeness of 84 to get a slightly better poly)
Code:
84^84 - 83^83 
2^168*21^84 - 83^83   
#let's multiply by 21 to get a degrees divisible by 5
2^168*21^85 - 21*83^83
8*(2^33*21^17)^5 - 21*83^3*(83^16)^5
So I guess, a t.poly like
Code:
n: 434052638949540480062453005064516466387568940273504907959561408643897140840774339200963955774565218462487550271836485609508404988323997310781276887844297986477749
skew: 17.2
type: snfs
size: 162
c5: 8
c0: -12007527
Y1: 5072820298953863752478356399681
Y0: -258058321049377015072521738780672
If you multiply by an extra 83^2, then c5 will be 8*83^2, c0 will be -21, Y1 will be 83x larger, and skew will be 83x smaller... Hmmm, could be faster or could be slower in sieving. Maybe a wash. E values estimated by msieve are almost identical: this is because the coefficients for the other poly are smaller but the resultant is ~4 digits larger.

Last fiddled with by Batalov on 2012-12-02 at 22:33
Batalov is offline   Reply With Quote
Old 2012-12-02, 23:10   #6
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

588610 Posts
Default

At what size for snfs does a quartic become optimal?
henryzz is offline   Reply With Quote
Old 2012-12-03, 00:34   #7
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

100101000101102 Posts
Default

For this size it could work, but some trial sieving is needed to decide. The poly would look like this:
Code:
n: 434052638949540480062453005064516466387568940273504907959561408643897140840774339200963955774565218462487550271836485609508404988323997310781276887844297986477749
skew: 0.331
type: snfs
size: 162
c4: 83
c0: -1
Y1: 19982045332214679702896737836182611234883
Y0: -25695969452033992329379379343259582070784

Last fiddled with by Batalov on 2012-12-03 at 00:35
Batalov is offline   Reply With Quote
Old 2012-12-03, 01:32   #8
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

3×1,993 Posts
Default

Quote:
Originally Posted by bsquared View Post
Then run (an X threaded job) with

Code:
yafu-x64.exe "nfs(the number)" -j snfs.job -threads X
and yafu will do the rest.
-j isn't working:
Code:
> ./yafu-linux64 "nfs(84^84-83^83)" -j snfs.job -threads 2
invalid option -j
I can't find any documentation, and the usual command line options --help, -?, etc. don't work.

Last fiddled with by CRGreathouse on 2012-12-03 at 01:33
CRGreathouse is offline   Reply With Quote
Old 2012-12-03, 02:20   #9
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

66758 Posts
Default

Sorry

-job
bsquared is online now   Reply With Quote
Old 2012-12-03, 16:41   #10
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

10111010110112 Posts
Default

Well, that works. But neither of the above polys seem to work:
Code:
> yafu-x64 "nfs(84^84-83^83)" -job test.job


nfs: checking for data file
nfs: commencing nfs on c162: 434052638949540480062453005064516466387568940273504
90795956140864389714084077433920096395577456521846248755027183648560950840498832
3997310781276887844297986477749
nfs: continuing with sieving - could not determine last special q; using default
 startq
nfs: commencing rational side lattice sieving over range: 2500000 - 2660000
Error: m is not a common root of the polynomials:
c0: -1
c1: 0
c2: 0
c3: 0
c4: 83
Y0: 0
Y1: 19982045332214679702896737836182611234883
n: 43405263894954048006245300506451646638756894027350490795956140864389714084077
43392009639557745652184624875502718364856095084049883239973107812768878442979864
77749
Received signal -1... please wait
(this one on Windows rather than Linux)
CRGreathouse is offline   Reply With Quote
Old 2012-12-03, 16:48   #11
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

3,517 Posts
Default

Y0 not set correctly?
bsquared is online now   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
SNFS polynomials. chris2be8 FactorDB 1 2012-03-10 16:49
SNFS polynomials for k*b^n+-1 mdettweiler Factoring 15 2010-01-14 21:13
fun with snfs masser Sierpinski/Riesel Base 5 36 2008-04-18 02:39
SNFS download roger Factoring 12 2007-10-24 08:45
SNFS Polynomial R.D. Silverman NFSNET Discussion 4 2007-04-11 20:39

All times are UTC. The time now is 16:02.


Mon Aug 2 16:02:21 UTC 2021 up 10 days, 10:31, 0 users, load averages: 1.74, 2.05, 2.17

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.