%This should be a TeX file. Please change the extention of this file from crytography.txt to crytography.tex %\documentclass[landscape,troispoints,pdf,colorBG,slideColor]{prosper} %\documentclass[landscape,wcshiu,pdf,colorBG,slideColor]{prosper} \documentclass[landscape,winter,pdf,colorBG,slideColor]{prosper} %\hypersetup{pdfpagemode=FullScreen} \usepackage{epsfig}%use insert figure \usepackage{array} \usepackage{amssymb}%Use Miscell. symbols \usepackage{picinpar}%for window \usepackage{enumerate}%for enumerate environment \usepackage{hhline}%for make double line in table \usepackage{color} \usepackage{tabularx} \usepackage{amsmath} % instead of amstex \usepackage{mathrsfs} % Use \mathscr in Math Mode \newcommand{\ex}[1]{\vskip5mm \noindent {\bf Example {#1} }} \renewcommand{\baselinestretch}{1.5} \renewcommand{\arraystretch}{0.9}%default is 1 %\usepackage{times} %\usepackage{fancyheadings} \def\Z{\mathbb{Z}} \def\N{\mathbb{N}} \def\P{\mathbb{P}} \def\R{\mathbb{R}} \def\Q{\mathbb{Q}} \def\pf{\vskip3mm \noindent {\bf Proof: }} \def\rsq{\hspace*{\fill $\Box$}} \def\di{\displaystyle} \def\uf{\usefont{T1}{ptm}{m}{n}\fontsize{14.4pt}{13pt}} %\FontText{% % \mellow\usefont{T1}{ptm}{m}{n}\fontsize{14.4pt}{14pt}\selectfont}{% % \black\usefont{T1}{ptm}{m}{n}\fontsize{14.4pt}{14pt}\selectfont} \title{Cryptography} %\subtitle{which rocks} \author{W.C. Shiu} \email{wcshiu@hkbu.edu.hk} \institution{Department of mathematics\\Hong Kong Baptist University} \begin{document} \maketitle \begin{slide}{Crytosystem} Encryption function $E$: transfers plaintext to ciphertext\\ Decryption function $D$: transfers ciphertext to plaintext $D$ is the inverse function of $E$ and vice versa. \end{slide} \overlays{4}{ \begin{slide}{Public Key Cryptosystem} Each user provide a public key, i.e., publish the encryption function $E$. \medskip Keep the decryption function $D$ in security. \bigskip \FromSlide{2} Suppose Mary wants to send a plaintext $m$ to Peter. \begin{enumerate}[1.] \FromSlide{3} \item She uses Peter's encryption function $E_P$ to change the message $m$ to $c=E_P(m)$. \FromSlide{4} \item When Peter receives the ciphertext message $c$. He uses his decryption function transfers the message to $D_P(c)=D_P(E_P(m))=m$. \end{enumerate} \end{slide}} \overlays{3}{ \begin{slide}{A Public Key Cryptosystem\\ -- RSA Cryptosystem} \onlySlide*{1}{RSA : Rivest, Shamir, Adleman} \bigskip \FromSlide{2} Suppose a user's public key is $(n,b)$. \bigskip \FromSlide{3}The security of RSA is based on the hope that the encryption function $E(m)=m^b\mod n$ is one-way, so it will be computational infeasible for any opponent to decrypt a ciphertext. \end{slide}} \overlays{3}{ \begin{slide}{Number Theory\\ -- Some Basic Knowledge} {\uf\it Suppose $a$ and $m$ are relative prime, i.e., $(a,m)=1$. Then there are integers $s$ and $t$ such that $as+mt=1$.} Here $s$ and $t$ can be found by using Euclidean algorithm. \bigskip \FromSlide{2}Suppose $n$ is an integer greater than 1. Let $\Z_n=\{0,1,\cdots, n-1\}$ be the ring of the complete residue system modulo $n$. \bigskip \FromSlide{3}{\uf Theorem: \it Let $m\ge 2$. Suppose $(a,m)=1$. Then there is a unique $b\in \Z_m$ such that $ab\equiv 1\pmod{m}$. $b$ is called the {\red inverse} of $a$ and is denoted by $a^{-1}$.} \end{slide} } \overlays{2}{ \begin{slide}{Number Theory\\-- Some Basic Knowledge} Let $\phi(m)$ denote the number of positive integers less than or equal to $m$ that are relatively prime to $m$. This function is called the {\red Euler $\phi$-function}. \bigskip \FromSlide{2}{\uf Euler's Theorem: {\it If $(a,m)=1$, then $a^{\phi(m)}\equiv 1\pmod{m}$.}} \end{slide} } \overlays{3}{ \begin{slide}{RSA Cryptosystem} \FromSlide{2} Let $n=pq$, where $p$ and $q$ are primes (very large). Choose a unit $a\in \Z_{\phi(n)}$ (i.e., $(a, \phi(n))=1$). Then there is a $b$ such that $ab\equiv 1\pmod{\phi(n)}$. Thus, we have $ab=t\phi(n)+1$ for some $t\ge 1$. \FromSlide{3}Suppose $x\in \Z_n^*$, the set of units of $\Z_n$. Then \begin{align*} (x^b)^a & \equiv x^{t\phi(n)+1}\pmod{n}\\ & \equiv (x^{\phi(n)})^t x\pmod{n}\\ & \equiv x\pmod{n}. \end{align*} We leave an exercise for you to show that $(x^b)^a\equiv x\pmod{n}$ if $x\in\Z_n\setminus \Z_n^*$. \end{slide} } \overlays{2}{ \begin{slide}{RSA Cryptosystem} In order to setup the system, we follow the following steps \begin{enumerate} \item Generate two large primes $p$ and $q$. \item Compute $n=pq$ and $\phi(n)=(p-1)(q-1)$. \item Choose a random number $b$ ($0