Skip to content

Commit

Permalink
Fixed minor typos in the talk
Browse files Browse the repository at this point in the history
  • Loading branch information
jet08013 committed May 30, 2018
1 parent 8ff3f88 commit 84d0ed4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
22 changes: 11 additions & 11 deletions ctnt2018/ModularExponentiation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"def mexp(a,x,N):\n",
" m,s=1,a\n",
" while x>0:\n",
" print('{0:5d} {1:5d} {2:10d}'m,s,x)\n",
" print('{0:10d} {1:10d} {2:10b}'.format(m,s,x))\n",
" if x % 2 ==1:\n",
" m=((m*s) % N)\n",
" s=((s*s) % N)\n",
Expand All @@ -19,20 +19,20 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 5 123\n",
"5 25 61\n",
"125 625 30\n",
"125 21028 15\n",
"41321 15573 7\n",
"23556 62697 3\n",
"104119 3316 1\n"
" 1 5 1111011\n",
" 5 25 111101\n",
" 125 625 11110\n",
" 125 21028 1111\n",
" 41321 15573 111\n",
" 23556 62697 11\n",
" 104119 3316 1\n"
]
},
{
Expand All @@ -41,7 +41,7 @@
"55006"
]
},
"execution_count": 6,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
20 changes: 16 additions & 4 deletions ctnt2018/PminusOneMethod.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -61,7 +61,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -77,7 +77,7 @@
"(641, -1415069, 615794)"
]
},
"execution_count": 40,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -91,7 +91,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -127,6 +127,18 @@
"show_factors(640)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"N=2**128+1\n",
"T=mexp(3,factorial(10000),N)-1\n",
"print(T)\n",
"euclid(T,N)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
11 changes: 8 additions & 3 deletions ctnt2018/ctnt2018.tex
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@
\end{frame}
\begin{frame}{A simple example}
Suppose $N=F_{5}=2^{2^5}+1$ is the fifth Fermat number. We can't use $a=2$ because clearly high powers of $a$ are going to be
$-1$ mod $N$; so let's try $a=3$. That doesn't work -- but $a=5$ does. Take $M=10!$.
$-1$ mod $N$. Let's try $a=5$ instead. Take $M=10!$.
$$
5^M-1 \equiv 1869036133\pmod{F_{5}}
$$
and $(1869036133,F_{5})=641$.
\end{frame}

\begin{frame}{The Elliptic Curve Method}
For the $p-1$ method to work, we have to be lucky enough to have a prime factor that is $B$-powersmooth for a relatively small $B$.
For the $p-1$ method to work, we have to be lucky enough to have a prime factor $p$ of $N$ so that $p-1$ is $B$-powersmooth for a relatively small $B$.

\bigskip\noindent
If the number $N$ we are trying to factor doesn't have this property, then the $p-1$ method won't work.
Expand Down Expand Up @@ -281,7 +281,7 @@
where $e(r)$ is maximal so that
$r^{e(r)}\le v+2\sqrt{v}+1.
$
\item Draw three elements $a,x_0,y_0$ at random modulo $N$. Let $b=y_0^2-x_0^3-ax$. Then $P=(x_0,y_0)$ is a point on the curve
\item Draw three elements $a,x_0,y_0$ at random modulo $N$. Let $b=y_0^2-x_0^3-ax_0$. Then $P=(x_0,y_0)$ is a point on the curve
$E$ with equation $y^2=x^3+ax+b$.
\item Try to compute $kP$. If you find a divisor, cheer! Otherwise, try again until you've tried $h$ times, then give up.
\end{enumerate}
Expand Down Expand Up @@ -375,3 +375,8 @@
\href{http://swc.math.arizona.edu/aws/2006/notes.html}{Bernstein's notes} from the 2006 Winter School address some of these optimizations.
\end{frame}
\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

0 comments on commit 84d0ed4

Please sign in to comment.