Somethings wrong with my Dickson factorization algorithm implementation Please check:


*

*I use N = 89755 as a sample number;

*I calculate the limit for my primes base M = sqrt(exp(sqrt(log(N)*log(log(N))))) = 14

*I create primes base = {2,3,5,7,11,13} Loop: 

*Generate random B: sqrt(N) <= B <= N;

*Generate A = (B*B) mod N;

*Perform factorization of A according to the primes base(step3) with "trial division". If A factors fully with primes base, thus being a B-smooth number, store powers of canonical form to vector and save A,B and vector; 

*Perform 4-6 until I have more vectors than primes in the base
after this stage i got 


 A:        B:        2:  3:  5:  7:  11: 13:
24750     52210     1   2   3   0   1   0
750       66270     1   1   3   0   0   0
86400     9190      7   3   2   0   0   0
900       68120     2   2   2   0   0   0 
3696      47289     4   1   0   1   1   0
324       89737     2   4   0   0   0   0
87846     37689     1   1   0   0   4   0




*Convert the resulting matrix of powers of canonical form to mod 2


A: I'll make an answer of it, since it would be a bit cramped as a comment.
On the wiki page it does say that "The resulting factorization is 84923 = gcd(20712 − 16800, 84923) × gcd(20712 + 16800, 84923) = 163 × 521."
I guess that can be misleading. Yes, in their case you are left directly with a factorization. But, as you have shown with your calculation, GCD(X+Y,N)*GCD(X-Y,N) doesn't have to be N, it can also be a multiple of N.
But doesn't change much. GCD(X+Y,N) and GCD(X-Y,N) are factors of N. And you get a factorization N = (N/GCD(X+Y,N)) * GCD(X+Y,N) (also = (N/GCD(X-Y,N)) * GCD(X-Y,N)) .
When $GCD(X+Y,N)\neq 1 {or} N$ it gives you a proper factorization.
Step 11 has to read "Check that $X \mod N \neq \pm Y \mod N$".
Take for example $2^2 \equiv 13^2 mod 15$. You get $GCD(13+2,15)= 15$ and $GCD(13-2,15)= 1$. Neither of which are of much help in finding a proper factor.
