From 84d0ed4fd4a98943287d88cca08a9492fcbffefa Mon Sep 17 00:00:00 2001 From: Jeremy Teitelbaum Date: Wed, 30 May 2018 10:27:50 -0400 Subject: [PATCH] Fixed minor typos in the talk --- ctnt2018/ModularExponentiation.ipynb | 22 +++++++++++----------- ctnt2018/PminusOneMethod.ipynb | 20 ++++++++++++++++---- ctnt2018/ctnt2018.tex | 11 ++++++++--- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/ctnt2018/ModularExponentiation.ipynb b/ctnt2018/ModularExponentiation.ipynb index c582406..3ab5570 100644 --- a/ctnt2018/ModularExponentiation.ipynb +++ b/ctnt2018/ModularExponentiation.ipynb @@ -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", @@ -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" ] }, { @@ -41,7 +41,7 @@ "55006" ] }, - "execution_count": 6, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } diff --git a/ctnt2018/PminusOneMethod.ipynb b/ctnt2018/PminusOneMethod.ipynb index 9b322d9..41f484b 100644 --- a/ctnt2018/PminusOneMethod.ipynb +++ b/ctnt2018/PminusOneMethod.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 25, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -61,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -77,7 +77,7 @@ "(641, -1415069, 615794)" ] }, - "execution_count": 40, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -91,7 +91,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -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, diff --git a/ctnt2018/ctnt2018.tex b/ctnt2018/ctnt2018.tex index 080fcae..283bec5 100644 --- a/ctnt2018/ctnt2018.tex +++ b/ctnt2018/ctnt2018.tex @@ -182,7 +182,7 @@ \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}} $$ @@ -190,7 +190,7 @@ \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. @@ -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} @@ -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: