mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Factoring

Reply
 
Thread Tools
Old 2013-08-11, 19:25   #12
danaj
 
"Dana Jacobsen"
Feb 2011
Bangkok, TH

2·5·7·13 Posts
Default

Not going to wade too deep in this, but I recommend:

Montgomery, "Speeding the Pollard and elliptic curve methods of factorization", 1987

Silverman already pointed this one out, and I agree it's a gem that is full of information. I find more in it every time I look at it.

Brent, "Primality Testing and Integer Factorisation", 1990 (published 1991)

Two books I like are "Prime Numbers and Computer Methods for Factorization" by Hans Riesel (1994), available at reasonable prices used; and "Prime Numbers: A Computational Perspective" by Crandall and Pomerance (2nd edition, mine is copyright 2010). The latter is available in electronic form here. I like having a paper copy, but given the free electronic price there isn't any reason not to peruse it.

How useful Pollard's rho is depends on your application. It's always useful to know, and for CS geeks it's a fun thing to program, especially as it is quite short. I've found it to be quite useful in some cases when trying to factor tiny numbers quickly (SQUFOF and p-1 are better in the long run -- your mileage may vary). Hence I think it's a useful tool to have around if that's something you'll be doing.
danaj is offline   Reply With Quote
Old 2013-08-11, 20:39   #13
xilman
Bamboozled!
 
xilman's Avatar
 
"๐’‰บ๐’ŒŒ๐’‡ท๐’†ท๐’€ญ"
May 2003
Down not across

2·17·347 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
BTW, I am not the only one who who has these kinds of ideas.
Bruce Schneier has repeatedly stated similar ideas (on cryptography).

His summary: "So you want to be a cryptographer? Get a PhD".

I say "So you think you can improve existing algorithms? Get a PhD. (or
equivalent study)"
FWIW, I do not have a PhD.

I have a DPhil in an entirely unrelated subject (physical chemistry, specifically molecular spectroscopy). That hasn't stopped me from doing useful (but admittedly not earth-shattering) work in other fields including cryptography and, more generally, information security.

I've a lot of respect for Bruce and have learned much from him over the years. On one occasion, just before he was about to start, he asked why I was in his audience --- apparently under the impression that I already knew everything he was about to say. Needless to say, he was mistaken.
xilman is offline   Reply With Quote
Old 2013-09-04, 16:50   #14
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

3×23×89 Posts
Default

It just occurred to me that if the polynomial in pollard rho is x^2-2 then for 1.5x + gcds cost we could run pollard rho plus a lucas lehmer test at the same time. How much time would the gcds take in this circumstance for large exponents?
henryzz is offline   Reply With Quote
Old 2013-09-04, 17:51   #15
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

41·251 Posts
Default

Those orders are much higher, you won't find a factor in the first p-1 iterations. As someone said before, Pollard rho is a very inefficient algorithm. Try it for M67, M101, and see.

Last fiddled with by LaurV on 2013-09-04 at 17:52
LaurV is offline   Reply With Quote
Old 2013-09-04, 18:47   #16
only_human
 
only_human's Avatar
 
"Gang aft agley"
Sep 2002

2×1,877 Posts
Default

Quote:
Originally Posted by henryzz View Post
It just occurred to me that if the polynomial in pollard rho is x^2-2 then for 1.5x + gcds cost we could run pollard rho plus a lucas lehmer test at the same time. How much time would the gcds take in this circumstance for large exponents?
Mathworld says:
Quote:
Iterating the formula
xn+1 = (xn)2 + a (mod n),
or almost any polynomial formula (an exception being x_n^2-2) for any initial value x_0 will produce a sequence of number that eventually fall into a cycle.
This comes up in discussions occasionally. I have seen it said that -2 is an unusually poor choice for a. I don't know the reason and LL tests do exist that subtract other constant values per iteration.
only_human is offline   Reply With Quote
Old 2013-09-04, 19:58   #17
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

5·17·89 Posts
Default

Quote:
Originally Posted by only_human View Post
Mathworld says:
This comes up in discussions occasionally. I have seen it said that -2 is an unusually poor choice for a. I don't know the reason and LL tests do exist that subtract other constant values per iteration.
The reason requires knowing something about properties of finite fields.
I will offer a hint: Consider the orbit of a generator of the twisted sub-group
of GF(P^2).

Second hint: Look at the roots of x^2-2 in GF(P^2) (where P is the prime
being sought)

Third hint: consider looking for a closed form solution to the recursion:

x_{n+1} = x_n^2 - 2
R.D. Silverman is offline   Reply With Quote
Old 2013-09-04, 20:04   #18
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

137758 Posts
Default

Quote:
Originally Posted by LaurV View Post
Those orders are much higher, you won't find a factor in the first p-1 iterations. As someone said before, Pollard rho is a very inefficient algorithm. Try it for M67, M101, and see.
(p-1)/2 iterations as rho iterates twice per iteration.
It wouldn't surprise me if the number of iterations would only be enough in very few situations.
Quote:
Originally Posted by only_human View Post
Mathworld says:
This comes up in discussions occasionally. I have seen it said that -2 is an unusually poor choice for a. I don't know the reason and LL tests do exist that subtract other constant values per iteration.
x^2-2 is unusual
It wouldn't surprise me if other choices of a that work for LL tests are also quite bad.


We also have to remember that factors of 2^p-1 are of the form 2kp+1 which would be relatively large factors for rho to find.
henryzz is offline   Reply With Quote
Old 2013-09-04, 20:20   #19
only_human
 
only_human's Avatar
 
"Gang aft agley"
Sep 2002

2·1,877 Posts
Default

As for considering the GCD cost in Pollard Rho, there is this optimization (Wikipedia):
Quote:
A further improvement was made by Pollard and Brent. They observed that if gcd (a,n) >1, then also gcd (ab,n)>1 for any positive integer b. In particular, instead of computing gcd (|x-y|,n) at every step, it suffices to define z as the product of 100 consecutive |x-y| terms modulo n, and then compute a single gcd (z,n). A major speed up results as 100 gcd steps are replaced with 99 multiplications modulo n and a single gcd. Occasionally it may cause the algorithm to fail by introducing a repeated factor, for instance when n is a square. But it then suffices to go back to the previous gcd term, where gcd(z,n)=1, and use the regular Rho algorithm from there.
only_human is offline   Reply With Quote
Old 2013-09-04, 21:09   #20
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

5·17·89 Posts
Default

Quote:
Originally Posted by henryzz View Post
(p-1)/2 iterations as rho iterates twice per iteration.
It wouldn't surprise me if the number of iterations would only be enough in very few situations.

x^2-2 is unusual
It wouldn't surprise me if other choices of a that work for LL tests are also quite bad.
.
Why not take the time to study the mathematics of finite fields? You
might learn how to respond to your 'surprise'. Try studying WHY the
LL test works.
R.D. Silverman is offline   Reply With Quote
Old 2013-09-06, 01:42   #21
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

22·3·499 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
The reason requires knowing something about properties of finite fields.
I will offer a hint: Consider the orbit of a generator of the twisted sub-group
of GF(P^2).
I'm interested in learning more about this, although I have never studied group theory. (I did take a general algebra class, plus a graduate class in field theory, so I'm not entirely clueless.)

You mention a generator, so you must mean a twisted subgroup of the multiplicative group GF(p^2)* since the additive group has no generator (as all elements have order 1 or p). {1} and GF(p^2)* are trivial twisted subgroups of GF(p^2)*, you must not mean those.

I looked at GF(9) as an example, and unless I am mistaken there are two nontrivial twisted subgroups: {1, 2} and {1, 2, a, b} where a and b are the square roots of 2. (I'm not sure of the usual terminology here.) Only the former has a generator, since a does not generate b and b does not generate a.

But in any case, the orbit of a generator is surely the whole twisted subgroup, no? Else it would not be a generator. So I'm confused as to what you mean.

Edit: Of course by 1 I mean the multiplicative identity and by 2 I mean 1+1 = -1.

Last fiddled with by CRGreathouse on 2013-09-06 at 01:49
CRGreathouse is offline   Reply With Quote
Old 2013-09-06, 03:21   #22
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

756510 Posts
Default

Quote:
Originally Posted by CRGreathouse View Post
I'm interested in learning more about this, although I have never studied group theory. (I did take a general algebra class, plus a graduate class in field theory, so I'm not entirely clueless.)

You mention a generator, so you must mean a twisted subgroup of the multiplicative group GF(p^2)* since the additive group has no generator (as all elements have order 1 or p). {1} and GF(p^2)* are trivial twisted subgroups of GF(p^2)*, you must not mean those.

I looked at GF(9) as an example, and unless I am mistaken there are two nontrivial twisted subgroups: {1, 2} and {1, 2, a, b} where a and b are the square roots of 2. (I'm not sure of the usual terminology here.) Only the former has a generator, since a does not generate b and b does not generate a.

But in any case, the orbit of a generator is surely the whole twisted subgroup, no? Else it would not be a generator. So I'm confused as to what you mean.

Edit: Of course by 1 I mean the multiplicative identity and by 2 I mean 1+1 = -1.
A generator x, of the twisted sub-group is a solution to x^2-2 = 0 in
GF(p^2)

The fact that there is a generator which is a solution to x^2 - 2 = 0
(and there is a closed form solution )
combined with the fact that the recurrence x_{n+1} = x_n^2 -2 is
just squaring an element in the twisted sub-group shows that there
is a closed form solution to the recurrence. Which makes it bad
as a pseudo RNG (and hence bad for Pollard Rho)
R.D. Silverman is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pollard rho with known factor of P-1 henryzz Math 2 2017-08-15 12:13
PFGW can't find a small factor. Arkadiusz Software 7 2013-02-18 12:43
How much ECM does it take to find a given factor? geoff Factoring 5 2004-09-29 20:14
Where I find the best program to it factor keys? I use AMD. chrow Factoring 5 2004-02-19 10:15
How large a factor can P-1 testing find ? dsouza123 Software 3 2003-12-11 00:48

All times are UTC. The time now is 13:24.


Fri Jul 7 13:24:45 UTC 2023 up 323 days, 10:53, 0 users, load averages: 1.66, 1.29, 1.19

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

โ‰  ยฑ โˆ“ รท ร— ยท โˆ’ โˆš โ€ฐ โŠ— โŠ• โŠ– โŠ˜ โŠ™ โ‰ค โ‰ฅ โ‰ฆ โ‰ง โ‰จ โ‰ฉ โ‰บ โ‰ป โ‰ผ โ‰ฝ โŠ โА โŠ‘ โŠ’ ยฒ ยณ ยฐ
โˆ  โˆŸ ยฐ โ‰… ~ โ€– โŸ‚ โซ›
โ‰ก โ‰œ โ‰ˆ โˆ โˆž โ‰ช โ‰ซ โŒŠโŒ‹ โŒˆโŒ‰ โˆ˜ โˆ โˆ โˆ‘ โˆง โˆจ โˆฉ โˆช โจ€ โŠ• โŠ— ๐–• ๐–– ๐–— โŠฒ โŠณ
โˆ… โˆ– โˆ โ†ฆ โ†ฃ โˆฉ โˆช โІ โŠ‚ โŠ„ โŠŠ โЇ โŠƒ โŠ… โŠ‹ โŠ– โˆˆ โˆ‰ โˆ‹ โˆŒ โ„• โ„ค โ„š โ„ โ„‚ โ„ต โ„ถ โ„ท โ„ธ ๐“Ÿ
ยฌ โˆจ โˆง โŠ• โ†’ โ† โ‡’ โ‡ โ‡” โˆ€ โˆƒ โˆ„ โˆด โˆต โŠค โŠฅ โŠข โŠจ โซค โŠฃ โ€ฆ โ‹ฏ โ‹ฎ โ‹ฐ โ‹ฑ
โˆซ โˆฌ โˆญ โˆฎ โˆฏ โˆฐ โˆ‡ โˆ† ฮด โˆ‚ โ„ฑ โ„’ โ„“
๐›ข๐›ผ ๐›ฃ๐›ฝ ๐›ค๐›พ ๐›ฅ๐›ฟ ๐›ฆ๐œ€๐œ– ๐›ง๐œ ๐›จ๐œ‚ ๐›ฉ๐œƒ๐œ— ๐›ช๐œ„ ๐›ซ๐œ… ๐›ฌ๐œ† ๐›ญ๐œ‡ ๐›ฎ๐œˆ ๐›ฏ๐œ‰ ๐›ฐ๐œŠ ๐›ฑ๐œ‹ ๐›ฒ๐œŒ ๐›ด๐œŽ๐œ ๐›ต๐œ ๐›ถ๐œ ๐›ท๐œ™๐œ‘ ๐›ธ๐œ’ ๐›น๐œ“ ๐›บ๐œ”