Browse Source

Again on "random corrections" over the book.

Michele Orrù 11 years ago
parent
commit
b114d5c0ff
5 changed files with 46 additions and 14 deletions
  1. 32 10
      book/dixon.tex
  2. 3 0
      book/fermat.tex
  3. 2 2
      book/math_prequisites.tex
  4. 1 1
      book/pollard+1.tex
  5. 8 1
      book/wiener.tex

+ 32 - 10
book/dixon.tex

@@ -10,7 +10,7 @@ can somehow be assembled, and so a fatorization of N attemped.
 %% understood this section without Firas (thanks).
 %% <http://blog.fkraiem.org/2013/12/08/factoring-integers-dixons-algorithm/>
 %% I kept the voila` phrase, that was so lovely.
-\section{A little bit of History \label{sec:dixon:history}}
+\section{Interlude \label{sec:dixon:history}}
 During the latest century there has been a huge effort to approach the problem
 formulated by Fermat ~\ref{eq:fermat_problem} from different perspecives. This
 led to an entire family of algorithms, like \emph{Quadratic Sieve},
@@ -173,7 +173,7 @@ and storing dependencies into a \emph{history matrix} $\mathcal{H}$.
 \end{algorithm}
 
 
-\section{Implementation}
+\section{An Implementation Perspective}
 
 Before gluing all toghether, we need one last building brick necessary for
 Dixon's factorization algorithm: a \texttt{smooth}($x$) function. In our
@@ -181,7 +181,16 @@ specific case, we need a function that, given as input a number $x$, returns the
 empty set $\emptyset$ if $x^2 -N$ is not $\factorBase$-smooth. Otherwise,
 returns a vector $v = (\alpha_0, \ldots, \alpha_r)$ such that each $\alpha_j$ is
 defined just as in \ref{eq:dixon:alphas}. Once we have established $\factorBase$, its
-implementation is fairly straightforward:
+implementation comes straightfoward.
+
+\paragraph{How do we choose $\factorBase$?}
+It's not easy to answer: if we choose $\factorBase$ small, we will rarely find
+$x^2 -N$ \emph{smooth}. If we chose it large, attempting to factorize $x^2 -N$
+with $\factorBase$ will pay the price of iterating through a large set.
+\cite{Crandall} \S 6.1 finds a solution for this employng complex analytic
+number theory. As a  result, the ideal value for $|\factorBase|$ is
+$e^{\sqrt{\ln N \ln \ln N}}$.
+
 
 \begin{algorithm}
   \caption{Discovering Smoothness}
@@ -204,13 +213,6 @@ implementation is fairly straightforward:
     \EndProcedure
   \end{algorithmic}
 \end{algorithm}
-\paragraph{How do we choose $\factorBase$?}
-It's not easy to answer: if we choose $\factorBase$ small, we will rarely find
-$x^2 -N$ \emph{smooth}. If we chose it large, attempting to factorize $x^2 -N$
-with $\factorBase$ will pay the price of iterating through a large set.
-\cite{Crandall} \S 6.1 finds a solution for this employng complex analytic
-number theory. As a  result, the ideal value for $|\factorBase|$ is
-$e^{\sqrt{\ln N \ln \ln N}}$.
 
 \begin{algorithm}
   \caption{Dixon}
@@ -243,6 +245,26 @@ $e^{\sqrt{\ln N \ln \ln N}}$.
   \end{algorithmic}
 \end{algorithm}
 
+\paragraph{Parallelization}
+
+Dixon's factorization is ideally suited to parallel implementation. Similarly to
+other methods like ECM and MPQS, treated in \cite{brent:parallel} \S 6.1,
+we can \emph{linearly} improve the running time by distributing across many
+nodes the discovery of $\factorBase$-smooth numbers.
+
+Depending on the granularity we desire - and the number of nodes available, we
+can even act on the \texttt{ker} function - but less easily.
+This idea would boil down to the same structure we discussed with Wiener's attack:
+one node - the \emph{producer} - discovers linear dependencies, while the others
+- the \emph{consumers} - attempt to factorize $N$.
+For this reason that we introduced the \texttt{yield} statement in line
+$12$ of algorithm \ref{alg:dixon:kernel}: the two jobs can be performed
+asynchronously.
+
+Certainly, due to the probabilistic nature of this algorithm, we can even think
+aboutrunning multiple instances of the same program. This solution is fairly
+effective in proportion to the development cost.
+
 %%% Local Variables:
 %%% mode: latex
 %%% TeX-master: "question_authority"

+ 3 - 0
book/fermat.tex

@@ -155,6 +155,9 @@ the class \bigO{\log^2 N}, as we saw in section ~\ref{sec:preq:sqrt}.
 Computing separatedly $x^2$ would add an overhead of the same order of magnitude
 \bigO{\log^2 N}, and thus result in a complete waste of resources.
 
+As a result of this, we advice the use of a strictly limited number of
+processors - like two or three - performing in parallel fermat's factorization
+method over different intervals.
 %%% Local Variables:
 %%% TeX-master: "question_authority.tex"
 %%% End:

+ 2 - 2
book/math_prequisites.tex

@@ -3,7 +3,7 @@
 
 In this chapter we formalize the notation used in the rest of the thesis, and
 furthermore attempt to discuss and study the elementary functions on which the
-project has been grounded.
+whole project has been grounded.
 \\
 The $\ll$ and $\gg$ are respectively used with the meaning of left and right
 bitwise shift, as usual in computer science.
@@ -262,7 +262,7 @@ $d = (b-a) \idiv 2$.
       \If{$(a+d)^2 \leq n$} $a \gets a+d$
       \Comment increment left bound
       \ElsIf{$(b-d)^2 > n$} $b \gets b-d$
-      \Comment increment right bound
+      \Comment decrement right bound
       \EndIf
     \EndWhile
     \State \Return $a, a^2-n$

+ 1 - 1
book/pollard+1.tex

@@ -114,7 +114,7 @@ Finally, we need the following (\cite{Williams:p+1} \S 2):
 \end{remark}
 
 
-\section{Dressing Up}
+\section{Dressing up}
 
 At this point the factorization proceeds just by substituting the
 exponentiation and Fermat's theorem with lucas sequences and Lehmer's theorem

+ 8 - 1
book/wiener.tex

@@ -202,7 +202,14 @@ convergent, we provide an algorithm for attacking the RSA cipher via Wiener:
   \end{algorithmic}
 \end{algorithm}
 
-\section{Building a distributed version}
+\paragraph{Parallelism}
+Parallel implementation of this specific version of Wiener's Attack is
+difficult, because the inner loop is inherently serial. At best, parallelism
+could be employed to construct a constructor process, building the $f_n$
+convergents, and consumers receiving each of those and processing them
+seperatedly. The first one arriving to a solution, broadcasts a stop message to
+the others.
+
 %%% Local Variables:
 %%% mode: latex
 %%% TeX-master: "question_authority"