%YOU ALSO NEED THE FILES multm_table.eps AND addm_table.eps AVAILABLE
%IN THIS DIRECTORY IN ORDER TO PROPERLY COMPILE THIS FILE.
\font\largerbold = cmbx10 scaled \magstep1
\font\largestbold = cmbx10 scaled \magstep2
\input epsf
%\nopagenumbers
\magnification=\magstep1
\font\show = cmdunh10.tfm
%\headline{\bf\ifodd\pageno\hfil\folio\else\folio\hfil\fi}
\parindent = 0pt
%% To typeset a problem:`\points{25}\tag. Text of problem...'
%% To typeset a part of a problem: `(\i) Part of problem...'
%% To typeset problem in left-justified block of width three inches:
%%       `\block{3truein}{\points{25}\tag. Text of problem...}'

\newcount\problem \problem=0 \newcount\partno \newcount\total\total=0
\def\points#1{\advance\total by #1\relax%
    \noindent\llap{\hbox to .5truein{(#1)\hfil}}}
\def\tag{\global\advance\problem by 1 \message{\number\problem}%
     \partno=96\relax\the\problem}
\def\prob#1{\points{#1}\tag\expandafter\expandafter\expandafter%
   \expandafter\gdef\csname\the\problem pointsforproblem\endcsname{#1}.\ }
\def\i{\global\advance\partno by 1 \char\partno}
\outer\def\exambye{\write16
  {Number of problems: \number\problem. Total points: \number\total.}
   \par\vfill\supereject\end}

\def\zw#1{\omit&height4pt&\omit&&\omit&&\omit&\cr
&&#1&&\csname#1pointsforproblem\endcsname&&\hphantom{abcde}&\cr
\omit&height2pt&\omit&&\omit&&\omit&\cr \tablerule }
\def\tablerule{\noalign{\hrule}}
\def\heavytablerule{\noalign{\hrule height 2pt}}
\newtoks\zws \zws={}
\newcount\cover \cover=0 \let\xft=\expandafter
\def\tablesetup{\loop\ifnum\cover<\problem \advance\cover by 1 \let\temp=\zws%
 \xft\xft\xft\zws\xft\xft\xft{\xft\the\xft\temp\xft\zw\xft{\number\cover}}%
 \repeat}
\font\typ=cmtt10
\input amssym.def
\def\d{\displaystyle}
\nopagenumbers
\headline{\bf\hfil{\largestbold \folio}}
%\headline{\bf\hfil\folio}
%\headline{\bf\ifodd\pageno\hfil\folio\else\folio\hfil\fi}
%\magnification=\magstep1
\def\dd{\displaystyle} 
\parindent=0pt
\def\mod{\ {\rm mod}\ }
\def\beya{Briefly explain your answer.}
\def\blank{\rightline{{\sevenbf ANSWER: }\vrule height 0pt depth 1pt width 1in}}
\prob{25}Complete these tables of addition and multiplication mod 6. 
\bigskip
\centerline{\epsfxsize=2.2in \epsfbox{addm_table.eps}\qquad\epsfxsize=2.2in  \epsfbox{multm_table.eps}} 
\medskip
\line{\bf \hskip 1.25in Addition \hskip 1.6in Multiplication\hfil }
\bigskip\bigskip
Find all solutions of $4x+1=3 \mod 6$. \beya

\vfil

%Find all solutions of $2x+3=2 \mod 6$. \beya

\vfil\eject
\centerline{
\vbox{
{\offinterlineskip
\def\tablerule{\noalign{\hrule}}
\def\tableskip{\omit&height 4pt&&&&\omit\cr}
\halign{\tabskip=.7em plus 1em 
\hfil #\hfil\strut &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil &#\vrule &
\hfil #\hfil
\cr
$\ \vphantom{j_{J_J}}n=\!\!$ && 0 && 1 && 2 && 3 && 4 && 5 && 6 && 7 && 8 && 9 && 10 \cr
%\tableskip
\noalign{\hrule height.5pt depth.5pt}%\tableskip
$\ \vphantom{J^{J^J}}2^n=\!\!$ && 1 && 2 && 4 && 8 && 16 && 32 && 64 && 128 && 256 &&
512 && 1024\cr}}
}}
\medskip
\centerline{\bf Powers of 2}
\bigskip
\prob{20}a) What is 29 in binary? \beya

\vskip 2in
b) Compute $8^{29} \mod 13$. \beya
\vskip 2in

\prob{15}{\tt Maple} reports that $\left(48^{456}\right)^{\! 789}\!
\mod 57$ is 39. What then is the value of
$\left(48^{789}\right)^{\! 456}\! \mod 57\, $? \beya\  No computation
should be necessary for this problem. 

\vfil\eject
 
\prob{20}a) Define {\bf prime number}.

\vskip 2in

b) Exactly one of the numbers below is prime. Explain why the others
are not. 
%b) None of the numbers below is prime. Explain why.
\bigskip
\bigskip

%\qquad i) 80000 20000 30700
%\vskip .95in
\qquad i) 80000 70000 30002
\vskip 1.11in
\qquad ii) 80000 20000 30007
\vskip 1.11in
\qquad iii) 90000 70000 40007
%\vskip .8in
%v) 90000 70000 20007


\vfil\eject
\def\A{{\bf A}}
\def\B{{\bf B}}
\def\C{{\bf C}}
\def\D{{\bf D}}

\prob{24}Suppose messages in a language are strings of the letters
{\bf A}, {\bf B}, {\bf C}, and {\bf D}. So one message might be {\bf
AACDB}. The spy memorizes a phrase, such as {\B ald \D ucks \A re \C
ute}
\smallskip
\noindent and uses it to substitute letters: $\d{\left\{\matrix{\A \to \B \
{\scriptstyle\rm \underline{B}ald}\ \cr
\,\B \to \D \
{\scriptstyle\rm \underline{D}ucks}\cr
\C \to \A \
{\scriptstyle\rm \underline{A}re}\ \;\,\cr
\D \to \C \
{\scriptstyle\rm \underline{C}ute}\ \cr}\right.}$ .
\medskip
The message {\bf AACDB} then becomes {\bf BBACD}.
\bigskip

a) Identify the encryption key, the plaintext, and the ciphertext in
this system.

\vfil

b) If {\bf CCBDD} is an encrypted message using this system with the
phrase given, what was the original message?

\vfil 

c) Make up another key for the same system, and use it to encrypt the
message {\bf BDBAB}.

\smallskip

Please be sure to tell me your key!

\vfil

d) Could your answer to the previous question (an encryption of the
message {\bf BDBAB}) possibly have been {\bf CADBC}?
Why or why not?
\vfil\eject

\prob{20} A committee of 3 people wishes to share a secret so that any
majority of the committee (at least 2 of them) must agree to have
access to the secret, which is the number {\bf 17}. Describe
explicitly one way that this can be done. 
%how
%to do this. Illustrate your description by showing a worked-out example for
%the secret number {\bf 26}.

\vskip 3in 

\prob{15}a) Define {\bf one-time pad}.
\vskip 2in

b) Write the xor of the bitstrings
\def\t{\thinspace}
\medskip
\qquad \qquad {\tt 0\thinspace 0\thinspace 0\thinspace 1\thinspace 1\ \ 
1\t 0\t 1\t 0\t 1\ \ 
1\t 1\t 0\t 1\t 0}

and\hskip 2.1in .

\qquad \qquad {\tt 1\t 0\t 1\t 0\t 1\ \  1\t 1\t 1\t 0\t 0\ \  0\t 0\t 1\t 1\t 0}

\def\bl{\vrule height 0pt depth .6pt width .073in}
\medskip
Answer:

\qquad \qquad 
{\tt \bl\thinspace \bl \thinspace \bl \thinspace \bl \thinspace \bl\ \ 
\bl\thinspace \bl \thinspace \bl \thinspace \bl \thinspace \bl\ \ 
\bl\thinspace \bl \thinspace \bl \thinspace \bl \thinspace \bl}




  
%xor work done
\vfil\eject
\prob{30}Write a paragraph or two explaining why an encryption standard 
might be useful.

\medskip
{\bf Comments}
\smallskip
Write clearly and logically; support your assertions.
\smallskip
You may care to explain: first, why have {\it any} encryption
scheme available -- what purpose does it serve? Second, why might a
widely known standard be good? 

\vfil\eject

\prob{30}Write a paragraph or two explaining real world uses of hash
functions and digital signatures. Try to give at least one example
where a mistake or weakness in the system used could have serious
real-world consequences.

\medskip

{\bf Comments}
\smallskip
Write clearly and logically; support your assertions.
\smallskip
You should certainly try to explain in a non-technical manner what
hash functions and digital signatures are. Also indicate how each
might be used, and then discuss the consequences of ``a mistake or
weakness''. 

\vfil\eject

\headline{}
%\footline{\largestbold A\hfil\largestbold A}
%\headline{\hfil}
\centerline{\largerbold Final Exam}
\medskip
\centerline{\largerbold Math 103, section 99}
\medskip
%\centerline{\bf Sections 16, 17, and 18}
\smallskip
\centerline{May 4, 2000}
\bigskip\bigskip
\leftline{\hfil (1) NAME \thinspace \vrule height .5pt depth 0pt
width 4truein}
\bigskip
%\leftline{\hfil SIGNATURE:\thinspace \vrule height .5pt depth 0pt
%width 4truein}
%\bigskip
%\leftline{\hfil SECTION \#:\thinspace \vrule height .5pt depth 0pt
%width 2truein}
\bigskip
\centerline{\bf Do all problems, in any order.}
\smallskip
%\centerline{\bf Show all your work. Full credit may not be given for
%an answer alone.}
%\smallskip
\centerline{\bf You may use any notes, books, or calculators on this exam.}
%\centerline{\bf a QWERTY keypad on this exam. You may use
%\underbar{no} other materials.}
\bigskip\bigskip
\tablesetup
\centerline{\vbox{\tabskip=0pt \offinterlineskip
\halign to 2.3in{\strut#&\vrule#\tabskip=1em plus2em&
  \hfil#& \vrule#& \hfil#& \vrule#&
  \hfil#& \vrule#\tabskip=0pt\cr\tablerule
\omit&height2pt&\omit&&\omit&&\omit&\cr
&&\omit\hidewidth Problem\hidewidth&&
 \omit\hidewidth Possible\hidewidth&&
 \omit\hidewidth Points\hidewidth&\cr
&&\omit\hidewidth Number\hidewidth&&
 \omit\hidewidth Points\hidewidth&&
 \omit\hidewidth Earned:\hidewidth&\cr\tablerule
\the\zws
\heavytablerule
&&\multispan3 \ \hfil&&&\cr
&&\multispan3 \hidewidth Total Points Earned:\hidewidth &&&\cr
&&\multispan3 \ \hfil&&&\cr\tablerule
}}}
%&&1&&5&&\hphantom{abcde}&\cr\tablerule
\bigskip
%\bigskip

\exambye 



\bye





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