period find problem

May 2013
94
10
i was looking at shor's algorithm and had a bright idea, square the numbers rather than multiply by a specific base.
this idea however doesn't seem to work.
for example, the followng code:
Code:
def gcd(p,q):
   if p == 0:
      return q
   else:
      return gcd(q%p,p)
N= 97*79
per = 1
start = 23**2
mult = [23]
while start not in mult:
   mult += [start]
   start = start**2
   start = start %N
per = len(mult) -mult.index(start)
print(mult)
print(per)
print(gcd(start**(2**(per-1)) +1,N),gcd(start**(2**(per-1)) -1,N))
doesn't generate a valid solution.