Top
Back: wUnit
Forward: crypto_lib
FastBack: aksaka_lib
FastForward: crypto_lib
Up: atkins_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.2.14 Atkin

Procedure from library atkins.lib (see atkins_lib).

Return:
1, if N is prime,
-1, if N is not prime,
0, if the algorithm is not applicable, since there are too few discriminants

Assume:
N is coprime to 6 and different from 1

Note:
K/2 is input for the procedure "disc",
K is input for the procedure "HilbertClassPoly",
B describes the number of recursions being calculated.
The basis of the algorithm is the following theorem:
Let N be an integer coprime to 6 and different from 1 and E be an ellipic curve modulo N.
Assume that we know an integer m and a point P of E(Z/NZ) satisfying the following conditions.
(1) There exists a prime divisor q of m such that q > (4-th root(N)+1)^2.
(2) m*P = O(E) = (0:1:0).
(3) (m/q)*P = (x:y:t) with t element of (Z/NZ)*.
Then N is prime.

Example:
 
LIB "atkins.lib";
ring R = 0,x,dp;
Atkin(7691,100,5);
==> 1
Atkin(3473,10,2);
==> -1
printlevel=1;
Atkin(10000079,100,2);
==> Set i = 0, n = 0 and N(i) = N(0)= 10000079.
==> pause>
==> List H of possibly suitable discriminants will be calculated.
==> H = -3,-4,-7,-8,-11,-12,-15,-16,-19,-20,-23,-24,-27,-28,-31,-32,-35,-36,-\
   39,-40,-43,-44,-47,-48,-51,-52,-55,-56,-59,-60,-63,-64,-67,-68,-71,-72,-7\
   5,-76,-79,-80,-83,-84,-87,-88,-91,-92,-95,-96,-99,-100,-103,-104,-107,-10\
   8,-111,-112,-115,-116,-119,-120,-123,-124,-127,-128,-131,-132,-135,-136,-\
   139,-140,-143,-144,-147,-148,-151,-152,-155,-156,-159,-160,-163,-164,-167\
   ,-168,-171,-172,-175,-176,-179,-180,-183,-184,-187,-188,-191,-192,-195,-1\
   96,-199,-200
==> pause>
==> Next discriminant D will be chosen. D = -3.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -4.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -7.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -8.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -11.
==> pause>
==> The equation x^2+|D|y^2 = 4N(0) has no solution.
==> pause>
==> Next discriminant D will be chosen. D = -12.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -15.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -16.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -19.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -20.
==> pause>
==> Jacobi(D,N(0)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -23.
==> pause>
==> The solution (x,y) of the equation x^2+|D|y^2 = 4N(0) is
==> [1]:
==>    1704
==> [2]:
==>    1270
==> pause>
==> List L2 of possible m = |E(Z/N(0)Z)| will be calculated.
==> L2 = 
==> [1]:
==>    10001784
==> [2]:
==>    9998376
==> pause>
==> List S of factors of all possible m will be calculated.
==> S=
==> [1]:
==>    [1]:
==>       10001784
==>    [2]:
==>       [1]:
==>          13
==>       [2]:
==>          3
==>       [3]:
==>          2
==>       [4]:
==>          32057
==>       [5]:
==>          8
==> [2]:
==>    [1]:
==>       9998376
==>    [2]:
==>       [1]:
==>          23
==>       [2]:
==>          59
==>       [3]:
==>          307
==>       [4]:
==>          2
==>       [5]:
==>          3
==>       [6]:
==>          2
==>       [7]:
==>          708
==> pause>
==> Suitable pair (m,q) has been found such that q|m,
==> q > (4-th root(N(0))+1)^2 and q passes the Miller-Rabin-Test.
==> m = 10001784,
==> q = 32057
==> pause>
==> The minimal polynomial T of j((D+sqr(D))/2) in Z[X] will be calculated fo\
   r D=-23.
==> T = x3+3491750x2-5151296875x+12771880859375
==> pause>
==> Set T = T mod N(0).
==> T = x3+3491750x2+8743889x+9962392
==> pause>
==> The 3 zeroes of T modulo N(0) are
==> [1]:
==>    -4866045
==> [2]:
==>    2252673
==> [3]:
==>    -878378
==> pause>
==> Choose the zero j = -4866045 and set
==> c = j/(j-1728) mod N(0), a = -3c mod N(0), b = 2c mod N(0).
==> a = 7354336,
==> b = 8430548
==> pause>
==> g = 2776172
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(0) = 10000079,
==>    a = 7354336,
==>    b = 8430548
==> will be chosen.
==> P = (3401270,6891676,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (0,1,0),
==> P2 = (2926610,5219022,1)
==> pause>
==> 1. Recursion:
==> 
==> N(0) = 10000079 suffices the conditions of the underlying theorem,
==> since P1 = (0:1:0) and P2[3] in (Z/N(0)Z)*.
==> 
==> Now check if also the found factor q=32057 suffices these assumptions.
==> Therefore set i = i+1, N(1) = q = 32057 and restart the algorithm.
==> pause>
==> Next discriminant D will be chosen. D = -3.
==> pause>
==> Jacobi(D,N(1)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -4.
==> pause>
==> The solution (x,y) of the equation x^2+|D|y^2 = 4N(1) is
==> [1]:
==>    358
==> [2]:
==>    4
==> pause>
==> List L2 of possible m = |E(Z/N(1)Z)| will be calculated.
==> L2 = 
==> [1]:
==>    32416
==> [2]:
==>    31700
==> [3]:
==>    32066
==> [4]:
==>    32050
==> pause>
==> List S of factors of all possible m will be calculated.
==> S=
==> [1]:
==>    [1]:
==>       32416
==>    [2]:
==>       [1]:
==>          2
==>       [2]:
==>          2
==>       [3]:
==>          1013
==>       [4]:
==>          4
==> [2]:
==>    [1]:
==>       31700
==>    [2]:
==>       [1]:
==>          5
==>       [2]:
==>          317
==>       [3]:
==>          2
==>       [4]:
==>          31700
==> [3]:
==>    [1]:
==>       32066
==>    [2]:
==>       [1]:
==>          2
==>       [2]:
==>          16033
==>       [3]:
==>          2
==> [4]:
==>    [1]:
==>       32050
==>    [2]:
==>       [1]:
==>          5
==>       [2]:
==>          641
==>       [3]:
==>          2
==>       [4]:
==>          2
==> pause>
==> Suitable pair (m,q) has been found such that q|m,
==> q > (4-th root(N(1))+1)^2 and q passes the Miller-Rabin-Test.
==> m = 32416,
==> q = 1013
==> pause>
==> Since D = -4, set a = -1 and b = 0.
==> pause>
==> g = 17472
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(1) = 32057,
==>    a = -1,
==>    b = 0
==> will be chosen.
==> P = (28364,10569,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (0,1,0),
==> P2 = (4744,23564,1)
==> pause>
==> 2. Recursion:
==> 
==> N(1) = 32057 suffices the conditions of the underlying theorem,
==> since P1 = (0:1:0) and P2[3] in (Z/N(1)Z)*.
==> 
==> Now check if also the found factor q=1013 suffices these assumptions.
==> Therefore set i = i+1, N(2) = q = 1013 and restart the algorithm.
==> pause>
==> Next discriminant D will be chosen. D = -3.
==> pause>
==> Jacobi(D,N(2)) = -1
==> pause>
==> Next discriminant D will be chosen. D = -4.
==> pause>
==> The solution (x,y) of the equation x^2+|D|y^2 = 4N(2) is
==> [1]:
==>    46
==> [2]:
==>    22
==> pause>
==> List L2 of possible m = |E(Z/N(2)Z)| will be calculated.
==> L2 = 
==> [1]:
==>    1060
==> [2]:
==>    968
==> [3]:
==>    1058
==> [4]:
==>    970
==> pause>
==> List S of factors of all possible m will be calculated.
==> S=
==> [1]:
==>    [1]:
==>       1060
==>    [2]:
==>       [1]:
==>          5
==>       [2]:
==>          53
==>       [3]:
==>          2
==>       [4]:
==>          4
==> [2]:
==>    [1]:
==>       968
==>    [2]:
==>       [1]:
==>          11
==>       [2]:
==>          2
==>       [3]:
==>          2
==> [3]:
==>    [1]:
==>       1058
==>    [2]:
==>       [1]:
==>          23
==>       [2]:
==>          2
==>       [3]:
==>          1058
==> [4]:
==>    [1]:
==>       970
==>    [2]:
==>       [1]:
==>          5
==>       [2]:
==>          97
==>       [3]:
==>          2
==>       [4]:
==>          5
==> pause>
==> Suitable pair (m,q) has been found such that q|m,
==> q > (4-th root(N(2))+1)^2 and q passes the Miller-Rabin-Test.
==> m = 1060,
==> q = 53
==> pause>
==> Since D = -4, set a = -1 and b = 0.
==> pause>
==> g = 910
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(2) = 1013,
==>    a = -1,
==>    b = 0
==> will be chosen.
==> P = (673,443,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (999,377,1),
==> P2 = (526,38,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(2)Z)| for the coefficients a = \
   -1 and b = 0.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D = -4, set a = a*g mod N(2).
==> a = 103,
==> b = 0,
==> k = 1
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(2) = 1013,
==>    a = 103,
==>    b = 0
==> will be chosen.
==> P = (583,113,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (498,275,1),
==> P2 = (641,270,1)
==> pause>
==> Since P1 != (0:1:0), it holds m != |E(Z/N(2)Z)| for the coefficients a = \
   103 and b = 0.
==> Therefore choose new coefficients a and b.
==> pause>
==> Since D = -4, set a = a*g mod N(2).
==> a = 534,
==> b = 0,
==> k = 2
==> pause>
==> A random point P on the elliptic curve corresponding
==> to the equation y^2 = x^3+ax+b for
==> N(2) = 1013,
==>    a = 534,
==>    b = 0
==> will be chosen.
==> P = (682,221,1)
==> pause>
==> The points P2 = (m/q)*P and P1 = q*P2 on the curve will be calculated.
==> P1 = (0,1,0),
==> P2 = (788,903,1)
==> pause>
==> N(B) = N(2) = 1013 suffices the conditions of the underlying theorem,
==> since P1 = (0:1:0) and P2[3] in (Z/N(2)Z)*.
==> In particular N = 10000079 is prime.
==> pause>
==> 1
==> > 


Top Back: wUnit Forward: crypto_lib FastBack: aksaka_lib FastForward: crypto_lib Up: atkins_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-7, Aug 2013, generated by texi2html.