\documentclass[12pt]{article}
\usepackage[Mickael]{ammaths}
\usepackage{pigpen}

\begin{document}

\module{Famous ciphers 1 -- The pigpen cipher}{03}{10}{1 period}
\en\nocouleur

\prereq{Concepts of cryptography. Caesar cipher.}

\object{\begin{itemize}
        \item Discover and break the pigpen cipher
	\end{itemize}}

\mater{\begin{itemize}
	\item Cipher
	\item Slideshow
	\end{itemize}}

\modpart{Break the code}{40 mins}

Students are given a text using the pigpen cipher. They have 40 minutes to break it. 

\modpart{Presentation}{15 mins}

With a slideshow, the teacher explains the pigpen cipher and gives some information about it's history.



\pagebreak

\moddocdis{Famous ciphers 1 -- The pigpen cipher}{03}{10}{Cipher}

\begin{center}
\begin{minipage}{14cm}
\pigpenfont{IT WAS A WRONG NUMBER THAT STARTED IT THE TELEPHONE RINGING
THREE TIMES IN THE DEAD OF THE NIGHT AND THE VOICE ON THE OTHER
END ASKING FOR SOMEONE HE WAS NOT}

\pigpenfont{MUCH LATER WHEN HE WAS ABLE TO THINK ABOUT THE THINGS THAT HAPPENED TO HIM HE WOULD CONCLUDE THAT NOTHING
WAS REAL EXCEPT CHANCE}

\pigpenfont{BUT THAT WAS MUCH LATER}

\begin{flushright}
\pigpenfont{PAUL AUSTER CITY OF GLASS} 
\end{flushright}

\end{minipage}
\end{center}


\sectionblack{Optional cipher}

\begin{center}
\begin{minipage}{14cm}
\pigpenfont{IN THE BEGINNING THERE WAS SIMPLY THE EVENT AND ITS CONSEQUENCES}

\pigpenfont{WHETHER IT MIGHT HAVE TURNED OUT DIFFERENTLY OR WHETHER IT WAS ALL PREDETERMINED WITH THE FIRST WORD THAT
CAME FROM THE STRANGER S MOUTH IS NOT THE QUESTION}

\pigpenfont{THE QUESTION IS THE STORY ITSELF AND WHETHER OR NOT IT MEANS SOMETHING IS NOT FOR THE STORY TO TELL}

\pigpenfont{AS FOR QUINN THERE IS LITTLE THAT NEED DETAIN US}

\pigpenfont{WHO HE WAS WHERE HE CAME FROM AND WHAT HE DID ARE OF NO GREAT IMPORTANCE}

\pigpenfont{WE KNOW FOR EXAMPLE THAT HE WAS THIRTY FIVE YEARS OLD}

\pigpenfont{WE KNOW THAT HE HAD ONCE BE MARRIED HAD ONCE BEEN A FATHER AND THAT BOTH HIS WIFE AND SON WERE NOW DEAD}

\pigpenfont{WE ALSO KNOW THAT HE WROTE BOOKS}

\pigpenfont{TO BE PRECISE WE KNOW THAT HE WROTE MYSTERY NOVELS}

\pigpenfont{THESE WORKS WERE WRITTEN UNDER THE NAME OF WILLIAM WILSON AND HE PRODUCED THEM AT A RATE OF ABOUT ONE A
YEAR WHICH BROUGHT IN ENOUGH MONEY FOR HIM TO LEAVE MODESTLY IN A SMALL NEW YORK APARTMENT}

\pigpenfont{}
\end{minipage}
\end{center}

\pagebreak

\moddocdis{Famous ciphers 1 -- The pigpen cipher}{03}{10}{Lesson}

The pigpen cipher is a simple substitution cipher, based on the arrangment of the 26 letters of the Roman alphabet in 4
grids, as shown in the picture below.

\begin{center}
\sf\Large
\psset{unit=1cm}
\begin{pspicture}(0,0)(3,3)
\psline(0,1)(3,1)
\psline(0,2)(3,2)
\psline(1,0)(1,3)
\psline(2,0)(2,3)
\uput{10pt}[ul](1,2){A}
\uput{7pt}[u](1.5,2){B}
\uput{10pt}[ur](2,2){C}
\uput{10pt}[ul](1,1){D}
\uput{7pt}[u](1.5,1){E}
\uput{10pt}[ur](2,1){F}
\uput{10pt}[ul](1,0){G}
\uput{7pt}[u](1.5,0){H}
\uput{10pt}[ur](2,0){J}
\end{pspicture}\quad
\begin{pspicture}(0,0)(3,3)
\psline(0,1)(3,1)
\psline(0,2)(3,2)
\psline(1,0)(1,3)
\psline(2,0)(2,3)
\uput{10pt}[ul](1,2){J}
\uput{7pt}[u](1.5,2){K}
\uput{10pt}[ur](2,2){L}
\uput{10pt}[ul](1,1){M}
\uput{7pt}[u](1.5,1){N}
\uput{10pt}[ur](2,1){O}
\uput{10pt}[ul](1,0){P}
\uput{7pt}[u](1.5,0){Q}
\uput{10pt}[ur](2,0){R}
\psdots(0.85,2.15)(1.5,2.15)(2.15,2.15)(0.85,1.5)(1.5,1.15)(2.15,1.5)(0.85,0.85)(1.5,0.85)(2.15,0.85)
\end{pspicture}\quad
\begin{pspicture}(0,0)(3,3)
\psline(0,0)(3,3)
\psline(0,3)(3,0)
\uput{20pt}[u](1.5,1.5){S}
\uput{20pt}[l](1.5,1.5){T}
\uput{20pt}[d](1.5,1.5){V}
\uput{20pt}[r](1.5,1.5){U}
\end{pspicture}
\quad
\begin{pspicture}(0,0)(3,3)
\psline(0,0)(3,3)
\psline(0,3)(3,0)
\uput{20pt}[u](1.5,1.5){W}
\uput{20pt}[l](1.5,1.5){X}
\uput{20pt}[d](1.5,1.5){Z}
\uput{20pt}[r](1.5,1.5){Y}
\psdots(1.5,1.75)(1.75,1.5)(1.5,1.25)(1.25,1.5)
\end{pspicture}
\end{center}

To encrypt a message using the pigpen cipher, one just has to replace each letter by a symbol, as defined by the
positio.n of the letter in the grids. The table below shows in a more conventional way the correspondance between
letters and pigpen symbols.

\begin{center}\sf
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\rowcolor{lightgray} A & B & C & D & E & F & G & H & I & J & K & L & M \rule{0pt}{13pt}\\
\hline
{\pigpenfont A} & {\pigpenfont B} & {\pigpenfont C} & {\pigpenfont D} & {\pigpenfont E} & {\pigpenfont F} & {\pigpenfont
G} & {\pigpenfont H} & {\pigpenfont I} & {\pigpenfont J} & {\pigpenfont K} & {\pigpenfont L} & {\pigpenfont M}
\rule{0pt}{15pt} \\
\hline
\rowcolor{lightgray} N & O & P & Q & R & S & T & U & V & W & X & Y & Z \rule{0pt}{13pt} \\
\hline
{\pigpenfont N} & {\pigpenfont O} & {\pigpenfont P} & {\pigpenfont Q} & {\pigpenfont R} & {\pigpenfont S} & {\pigpenfont
T} & {\pigpenfont U} & {\pigpenfont V} & {\pigpenfont W} & {\pigpenfont X} & {\pigpenfont Y} & {\pigpenfont Z}
\rule{0pt}{15pt}\\
\hline
\end{tabular}
\end{center}

The exact origin of the cipher is uncertain, but records of this system have been found which go back to at least the
18th century. Its was so often used by the Freemasons  that the system is frequently called the Freemason's cipher.
They began using it in the early 18th century to keep their records of history and rites private, and for correspondence
between lodge leaders. Gravestones of Freemasons can also be found, which use the system as part of the
engravings, for example the gravestone of James Lesson in Trinity Church Cemetery in New York City, and Thomas
Brierley's gravestone in Mellor Churchyards in Cheshire.

\begin{multicols}{2}
\begin{center}
\includegraphics[width=6cm]{images/jamesleeson.eps}
\end{center}

This cipher can be used to hide messages from plain sight, but is so well-known that it's not very secure. Also, being
a simple substitution codes, it is easy to break with simple techniques.

\begin{center}
\includegraphics[width=6cm]{images/brierley.eps}
\end{center}
\end{multicols}




\end{document}
