\documentclass[12pt]{article} \usepackage{graphics} \usepackage{epsfig} \usepackage{comment} \usepackage{amsmath} \usepackage{amssymb} % for \nmid \usepackage{url} \newcommand{\bits}[1]{\{0,1\}^{{#1}}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\N}{\mathbb{N}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \renewcommand{\Pr}{{\rm Pr}} \newcommand{\prob}{{\rm prob}} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\abit }{\hat{a}} \newcommand{\bbit }{\hat{b}} \newcommand{\nth}{n^{th}} \begin{document} \centerline{\bf CMSC 456 Timed Midterm, Fall 2021} \begin{enumerate} \addtolength{\itemsep}{-2mm} % reduced space between lines \item This is an open-book, open-slides, open-web exam. This test is 2h long. \item There are 5 problems which add up to 50 points. \item In order to be eligible for as much partial credit as possible, show all of your work for each problem, \textbf{write legibly}, and \textbf{clearly indicate} your answers. Credit \textbf{cannot} be given for illegible answers. \item After the last page there is paper for scratch work. \item Please write out the following statement: ``\textit{I pledge on my honor that I will not give or receive any unauthorized assistance on this examination\/}.'' \bigskip \bigskip \bigskip \bigskip \item Fill in the following: \[ \begin{array}{rl} {\rm NAME: } & \cr {\rm SIGNATURE: } & \cr {\rm UID: } & \cr \end{array} \] \end{enumerate} %You may use the following table of numbers in $\{0,1,\ldots,36\}$ that are rel prime to 36, %and their inverses. % %\[ %\begin{array}{ccccccccccccc} %\hbox{NUMBER:} & 1 & 5 & 7 & 11 & 13 & 17 & 19 & 23 & 25 & 29 & 31 & 35 \cr %\hbox{INV MOD 36:} & 1 & 29& 31 & 23 & 25 & 17 & 19 & 11 & 11 & 5 & 7 & 35\cr %\end{array} %\] {\bf THERE ARE FIVE PROBLEMS} {\bf MAKE SURE YOU DO ALL OF THEM} \newpage The following programs may be useful for some of the problems: \url{https://planetcalc.com/3311/} \url{https://www.wolframalpha.com/} \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \begin{enumerate} \item (10 points) Daleks use an alphabet with 500 letters. Alice and Bob use the Affine Cipher Explain why the function $$f(x)=200x+36$$ \noindent {\bf SHOULD NOT} be used by giving an EXAMPLE of what can go wrong. (It is NOT enough to say {\it because 36 is a Jordan Number} or something like that. I made up the term {\it Jordan Number}.) \bigskip \noindent {\bf PUT ANSWER HERE } \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \item (10 points) Alice and Bob use Diffie Helman with prime $p=47$ and $g=7$. Alice picks $a=2$ and Bob picks $b=10$. What is the shared secret? Express as a number in $\{0,\ldots,46\}$. \bigskip \centerline{\bf NO EXPLANATION NEEDED} \bigskip \noindent {\bf PUT ANSWER HERE} \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \item (10 points) Alice and Bob do Diffie Helman with $p=47$ and $g=10$. Eve of course knows that $p=47$ and $g=10$. You can and should use the tables on the next two pages to do this problem. Eve sees Alice send 27 and Bob send 38. What is the shared secret? \bigskip \centerline{\bf NO EXPLANATION NEEEDED} \bigskip \noindent {\bf PUT ANSWER HERE} \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \[ \begin{array}{|c|c|} \hline a & 10^a \pmod {47} \cr \hline 0 & 1 \cr 1 & 10\cr 2 & 6\cr 3 & 13\cr 4 & 36\cr 5 & 31\cr 6 & 28\cr 7 & 45\cr 8 & 27\cr 9 & 35 \cr 10 & 21 \cr 11 & 22\cr 12 & 32\cr 13 & 38\cr 14 & 4\cr 15 & 40\cr 16 & 24\cr 17 & 5\cr 18 & 3\cr 19 & 30\cr 20 & 18\cr 21 & 39\cr 22 & 14\cr 23 & 46\cr \hline \end{array} \] For the rest of the table \centerline{\bf GOTO NEXT PAGE} \[ \begin{array}{|c|c|} \hline a & 10^a \pmod {47} \cr \hline 24 & 37 \cr 25 & 41\cr 26 & 34\cr 27 & 11\cr 28 & 16\cr 29 & 19\cr 30 & 2\cr 31 & 20\cr 32 & 12\cr 33 & 26\cr 34 & 25\cr 35 & 15\cr 36 & 9\cr 37 & 43\cr 38 & 7\cr 39 & 23\cr 40 & 42\cr 41 & 44\cr 42 & 17\cr 43 & 29\cr 44 & 8\cr 45 & 33\cr 46 & 1\cr \hline \end{array} \] \centerline{\bf GOTO NEXT PAGE} \newpage \item (10 points) Alice and Bob are doing RSA. Alice broadcasts $N=35$ and $e=5$. Bob wants to send Alice the number 2. What number does he send? (It will be a number in $\{0,\ldots,34\}$.) \bigskip \centerline{\bf NO EXPLANATION NEEDED.} \bigskip \noindent {\bf PUT ANSWER HERE} \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \item (10 points) Alice and Bob are doing RSA. Alice broadcases so $N=65$ and $e=5$. What is the value of $d$? \bigskip \centerline{\bf NO EXPLANATION NEEDED} \bigskip \noindent {\bf PUT ANSWER HERE} \vfill \centerline{\bf GOTO NEXT PAGE} \newpage \end{enumerate} \newpage \end{document}