% --------------------------------------------------------
% ``The Ciphered Diary of an 19th Century Egyptologist'' 
% Emanuele Viterbo
% for submission to CRYPTOLOGIA
% Last revised: 7/1/97
% --------------------------------------------------------
%
\documentstyle[12pt]{article}
%\textwidth  16cm
\textwidth  15cm
\textheight 26cm
%\hoffset    -2cm
\hoffset    -1cm
\voffset    -3.5cm
\renewcommand{\baselinestretch}{1.2}

%\newcommand{\z}{\rule[-5mm]{0mm}{15mm}\underline{\rule[4.5mm]{10mm}{0.1mm}}}
\newcommand{\hn}{\hspace{-0.5mm}}
\newcommand{\hp}{\hspace{0.5mm}}

\font \sime=sim 

%\title{The ciphered diary of Simeone Levi}
%\title{The ciphered diary of an 19th century libertine}
\title{The Ciphered Diary of an 19th Century Egyptologist}
\author{Emanuele Viterbo}

\begin{document}
\maketitle

\input{simdefs2}

Simeone Levi was an Italian Egyptologist, who lived in 
Torino during the second half of the 19th century. 
His major work is the 8 volume Hieroglyphic dictionary \cite{vocab} for which, 
in 1886, he was awarded the prize of the Royal Academy of Lincei. 
He was the brother of  the mother of my grand-grandfather, and I 
first heard about him when my grand mother gave her copy of the 
dictionary to my father. The dictionary is a lithographic copy of his 
handwritten manuscript and its aim was also to compare the 
Hieroglyphic words with the corresponding Coptic and Hebrew words, 
in an attempt of demonstrating their derivation from Hieroglyphic. 

Simeone Levi was born in 1843  in the Jewish ghetto of Carmagnola near 
Torino from a poor family and was the seventh of the 
ten children of a goldsmith. 
Struck by a paralysis at the age of two, he remained disabled for all
his life and suffered for the limitations imposed by his handicap. 
Simeone got a degree in mathematics and initially earned his 
living by teaching mathematics. His interest for Egyptology only started
at the age of 33, after attending a series of lectures by Professor Francesco
Rossi, Vice-Director of the Egyptian Museum of Torino. 
His only other class mate was Ernesto Schiaparelli, who was to become
famous for discovering Queen Nefertari's tomb. From that moment he entirely
devoted himself to Papirology, having Professor Rossi as his guide and 
maintaining a competitive attitude towards Schiaparelli. 

Last year my grand-aunt Giorgina Levi (Simeone's grand-grand-niece) 
decided to find out more about the life of  her 
famous ancestor \cite{vita} and 
initiated an historical research. Through the documents, she 
got in touch with the direct descendants of Simeone, Ettora and Massimo Levi. 
They had several papers, books and letters of their grandfather and 
among them a manuscript written in an unknown alphabet. 
They also reported that Simeone had handed down to his sons the duty of 
interpreting and reading the 355-page manuscript. 
But all attempts to decode the mysterious text failed even though 
it was given to examine to fairly expert, but possibly not 
very motivated, people.

When I learned this story from my aunt, I could not resist my 
ancestor's challenge. At first I was only given  photocopies of  the  
front cover, the  title page  and  the first page 
(Figs. \ref{pg1}--\ref{pg3}). 
That proved insufficient to decipher the text, but gave some 
hints and an idea of the difficulties to overcome: 
{\em i)} an apparently very large character set, possibly due to 
the non constant shape of the characters because of the hand writing; 
{\em ii)} uncertainty of the language used by such a polyglot. 

At a first glance the characters all look pretty much the same: 
some appear like  calligraphic characters of the Latin alphabet, 
both small and capitals, some others of the Greek alphabet. 
The punctuation seems totally absent, but some accents appear 
occasionally, only on the last character of some words, supporting 
the hypothesis that the language was indeed Italian, as suggested by  
the fact that Simeone had expressed his wish that his descendants 
interpreted and read the text. On the assumption that the language was 
Italian, the word length statistics of the first page strongly indicated 
that he had not used a mono-alphabetic key, since the words appeared 
shorter than the average word length in Italian. 
Of course he could have also split up the words with some strange rule.

Handwriting is usually hard to interpret at a first approach, 
unless it is one's own writing. Copying a few times the entire page 
was useful  to became more familiar with the signs. This  enabled to 
complete a first approximate table of the different signs. 
Their large number was a clear hint that the same Latin characters 
could be represented by different ciphered symbols depending on their 
context within the word.
It was also possible to identify some equally ciphered words and this 
induced me to believe that the code memory did not extend across 
neighboring words. 

The observation of the cover page (Fig. \ref{pg1}) and title page 
(Fig. \ref{pg2}) 
was of little use, since nothing appeared to match with Simeone's name. 
The signs on these pages are written in a fancy variant of the
standard font. In fact the same word appears both in the second 
line of the cover page 
(Fig. \ref{pg1}) and in the title of the first page (Fig. \ref{pg3}).
The only line I was able to decipher was one with totally different signs. 
I assumed that they were numbers, and on the hypothesis that the text 
was his diary, they could indicate the year range 18??-1900 
(the last two equal characters had to be ``00'', because they were 
different from the first ``1'' and Simeone died in 1913). 
The two unknown digits could have been ``43'', the year of Simeone's birth, 
but I could not go any further. 

I was going to give up when I received the photocopies of the entire
manuscript. Some new essential elements became available. All 
the pages after the first one were numbered and the signs for the digits
could be easily derived. The sign representing the same 
digit is  different according to its position within the number. 
The upper left part of the character is constant but is followed by 
a sort of calligraphic  {\em u}, if the digit is in odd position starting
from right (units), or by a calligraphic {\em n}, when in even 
position within the number (see Table \ref{digits}). 
This enabled to establish without any doubt that the front cover 
contained the year range 1843-1900 and confirmed the 
hypothesis that the manuscript could be Simeone's autobiography.
The next step was to search through the entire text for all the 
occurrences of  numbers possibly corresponding to dates or amounts of money. 

The only way I could proceed was then by guessing some complete words. 
The historical research carried out by my aunt turned out to be valuable, since 
she could associate some particular facts in the life of Simeone to some 
of the years. Unfortunately the precise date, including day and month, 
was never available.

Still the breakthrough came from the analysis of the dates. I wrote down 
and collected together all the words around the dates on the assumption 
that some of them represented articles, prepositions and names of 
months or seasons. The first words I could guess were {\em nel}  \neS\lS \hp (in)
usually preceding a year and {\em di}  \diS\hp (of)  
preceding the possible name of a month. Then came all the 
variants 
{\em nell'}\spS  \neS\lS\lS\apoS, 
{\em nella}\spS  \neS\lS\laS, 
{\em del}\spS    \deS\lS, 
{\em dell'}\spS  \deS\lS\lS\apoS, 
{\em della}\spS  \deS\lS\laS, 
for the two genders and for the 
words beginning with vowels in the Italian language. 
I was lucky to find four different months with the 
same last two signs, which corresponded to: 
{\em settembre} \seS\tS\teS\mS\bS\hn\hn\reS\spS (September),
{\em ottobre}   \oS\tS\toS\bS\hn\hn\reS\spS     (October),
{\em novembre}  \noS\veS\mS\bS\hn\hn\reS\spS    (November),
{\em dicembre}  \diS\ceS\mS\bS\hn\hn\reS\spS    (December).     
%
%\rule{0pt}{15pt}
I also found \pS\riS\maS\veS\raS\spS  which was preceded by 
{\em nella}, indicating a feminine word starting with a consonant. 
Since all months are masculine in Italian it could only be 
the season {\em primavera} (spring).
Then I recognized the words {\em anno}  \aS\nS\noS\hp (year), 
{\em il} \iS\lS\hp (the), {\em fine}  \fiS\hn\hn\neS\hp  (end) and {\em fino} 
\fiS\hn\hn\noS\hp (until), also related to the dates.

This set of words was sufficient to break the code. From the four months 
and from {\em primavera} containing the strings {\em ra}, {\em re} and 
{\em ri}, it became clear that a basic 
character \rS\spS representing {\em r} was altered in the upper part according 
to the vowel which was following it (see Table \ref{conso}).
Similarly from {\em novembre} and {\em nel} it was possible to derive the signs
for {\em n} and {\em o}.
With the above words the signs for  the vowels {\em a, e, i, o} 
and some consonants became clear. With these few signs I started translating 
the first page and guessing some other words and I could
gradually complete the set of signs. This representation of the
vowels as diacritical signs attached to consonants was certainly
inspired in Simeone by his knowledge of Sanscript.

The first meaningful sentences appeared. Simeone was writing his 
autobiography, telling us about all his good and bad actions, 
his successes and failures, his friends and his enemies, 
his loves and his betrayals.  
To confuse even more the potential reader, Simeone on the third line of the
first page (Fig. \ref{pg3}) quotes a sentence in a mysterious 
foreign language: \\
\maS\spS  \peS\cuS\glieS\spS  \riS\spS  \siS\faS\faS\nuS\spS
\ceS\cuS\muS\ceS\laS\spS  \oS\spS  \queS\aS\nS\ruS\spS
\yS\taS\gnoS\spS  \fuS\spS   \aS\spS  \peS\cuS\taS\gnoS\spS
\peS\cuS\spS  \niS\caS\geS\nuS\UpunS \\
({\em Ma pecuglie ri sifafanu cecumucela o queanru ytagno fu a
pecutagno pecu nicagenu.}) \\
I consulted various linguists in Ancient Egyptian, Sanscript, Coptic 
and Hebrew, but  the language of this sentence still remains a mystery.
I leave it as a challenge for the interested readers. \\

\vspace{5mm}
\noindent
By going on reading it was possible to unveil all the tricks he had 
used for ciphering. 
\begin{enumerate}
\item
Consonants followed by other consonants or at the end of a word
take on the basic sign in the first column of Table \ref{conso}. 
\item
The most important trick,  which makes the code resist a simple statistical 
cripto-analysis is the way the vowels are encoded. 
As already mentioned, when they are following a consonant they are added 
on top of it. When they are following another vowel, either in the 
same or in the previous word (an exception to my first guess  that the 
code memory did not extend across neighboring words), then they 
take on the basic sign for the lower part, while the upper part 
corresponds to the sign of the preceding vowel (see Table \ref{vowels}). 
This makes the signs for the vowels position depended.
Vowels at the beginning of a word following a word ending with 
a consonant take on the basic sign in the first 
column of Table \ref{vowels}. 
\item
The signs for the punctuation are also position dependent, since 
they change according to the last character in the preceding word, as 
for the vowels (see Table \ref{punctuation}). 
Punctuation does not break the memory for the vowels of Table \ref{vowels}.
For example a word ending with {\em ra} followed by  a comma, 
then followed by another word starting with an {\em o} would be
encrypted as  $\ldots$\raS\AvgS\spS \AoS$\,\ldots$.
\item
There are no capital letters.
\item
Apostrophes, accents and hyphens are not encrypted, but no sign is used 
for word hyphenation.
\item
Some special pairs of consonants, typical of the Italian language,
{\em ch, gh, gn, gli},  were encrypted with a special sign, following 
the same rules of the consonants (see Table \ref{spechar}).
\item
The {\em qu} is a single sign, in which  the {\em u} is omitted being redundant.
\item
Finally some words are occasionally misspelled and the spacing between 
words is not always well defined.
\end{enumerate}

The complete set of signs is reported in Tables 
\ref{digits}--\ref{punctuation}.
Letters {\em j,k,x,y,w} do not belong to the standard Italian alphabet
and appear very rarely in the text in some foreign
words or names. These were  among the last to be deciphered.
All combinations of characters not allowed in 
the Italian language are only reported for completeness and are marked with 
an asterisk.

In the last pages of the manuscript Simeone tells us that he wrote the entire 
manuscript between February and March 1900, while he was already immobilized 
at home by his paralysis. Simeone Levi died in 1913. 

While creating the entire ciphered font with Metafont \cite{Knuth}, 
in order to typeset this paper, a new interesting feature of the 
signs became clear: 
whenever a sign is ascending or descending this corresponds to
an ascending or descending character in a common calligraphic alphabet.
This property is a very helpful reminder when writing the ciphered signs
and enables {\em real-time} ciphering once the basic rules are known.

The Metafont character set for use within \LaTeX can be obtained 
through anonymous ftp at {\tt entropy.polito.it}.


% -------------------------------------------------------------------------
\begin{table}
\begin{center}
\Large
%\begin{tabular}{||p{6mm}||p{11mm}|p{11mm}||p{6mm}||p{11mm}|p{11mm}||} 
\begin{tabular}{||c||c|c||c||c|c|c||}
\hline \hline
& odd    & even   &   & odd    &  even  \\ \hline \hline  
0 & \uzerS & \nzerS & 5 & \ucinS & \ncinS \\ \hline
1 & \uunoS & \nunoS & 6 & \useiS & \nseiS \\ \hline
2 & \udueS & \ndueS & 7 & \usetS & \nsetS \\ \hline
3 & \utreS & \ntreS & 8 & \uottS & \nottS \\ \hline
4 & \uquaS & \nquaS & 9 & \unovS & \nnovS \\ \hline
\hline  
\end{tabular}
\end{center}
\caption{\label{digits}
The digits: {\em odd} is for units and hundreds and  
{\em even} is for tens and thousands.}
\end{table}

% -------------------------------------------------
\begin{table}
\begin{center}
\Large
%\begin{tabular}{||c||p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}||} 
\begin{tabular}{||c||c|c|c|c|c|c||} 
\hline \hline
&   & a & e & i & o & u \\ \hline \hline  
%  &  & \hspace{3mm}a & \hspace{3mm}e & \hspace{4mm}i & 
%  \hspace{3mm}o & \hspace{3mm}u \\ \hline \hline  
%  &      &   a   &   e   &   i   &   o   &   u   \\ \hline \hline  
b & \bS  & \baS  & \beS  & \biS  & \boS  & \buS  \\ \hline
c & \cS  & \caS  & \ceS  & \ciS  & \coS  & \cuS  \\ \hline
d & \dS  & \daS  & \deS  & \diS  & \doS  & \duS  \\ \hline
f & \fS  & \faS  & \feS  & \fiS  & \foS  & \fuS  \\ \hline
g & \gS  & \gaS  & \geS  & \giS  & \goS  & \guS  \\ \hline
h & \hS  & \haS  & \heS  & \hiS  & \hoS  & \huS$^*$  \\ \hline
j & \jS$^*$  & \jaS$^*$  & \jeS  & \jiS$^*$  & \joS$^*$  & \juS$^*$  \\ \hline
k & \kS$^*$  & \kaS$^*$  & \keS  & \kiS  & \koS$^*$  & \kuS$^*$  \\ \hline
l & \lS  & \laS  & \leS  & \liS  & \loS  & \luS  \\ \hline
m & \mS  & \maS  & \meS  & \miS  & \moS  & \muS  \\ \hline
n & \nS  & \naS  & \neS  & \niS  & \noS  & \nuS  \\ \hline
p & \pS  & \paS  & \peS  & \piS  & \poS  & \puS  \\ \hline
qu &\qS$^*$  & \quaS & \queS & \quiS & \quoS & \quuS$^*$  \\ \hline
r & \rS  & \raS  & \reS  & \riS  & \roS  & \ruS  \\ \hline
s & \sS  & \saS  & \seS  & \siS  & \soS  & \suS  \\ \hline
t & \tS  & \taS  & \teS  & \tiS  & \toS  & \tuS  \\ \hline
v & \vS  & \vaS  & \veS  & \viS  & \voS  & \vuS  \\ \hline
w & \wS$^*$  & \waS  & \weS$^*$  & \wiS  & \woS$^*$  & \wuS$^*$  \\ \hline
x & \xS  & \xaS$^*$  & \xeS$^*$  & \xiS$^*$  & \xoS$^*$  & \xuS$^*$  \\ \hline
y & \yS  & \yaS$^*$  & \yeS$^*$  & \yiS$^*$  & \yoS$^*$  & \yuS$^*$  \\ \hline
z & \zS  & \zaS  & \zeS  & \ziS  & \zoS  & \zuS  \\ \hline
\hline  
\end{tabular}
\end{center}
\caption{\label{conso}
The consonants.}
\end{table}

% ----------------------------------------------------------
\begin{table}
\begin{center}
\Large
%\begin{tabular}{||c||p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}||} 
\begin{tabular}{||c||c|c|c|c|c|c||} 
\hline \hline
&   & a & e & i & o & u \\ \hline \hline  
%  &  & \hspace{3mm}a & \hspace{3mm}e & \hspace{4mm}i & 
%       \hspace{3mm}o & \hspace{3mm}u \\ \hline \hline  
a & \aS  & \AaS  & \EaS  & \IaS  & \OaS  & \UaS  \\ \hline
e & \eS  & \AeS  & \EeS  & \IeS  & \OeS  & \UeS  \\ \hline
i & \iS  & \AiS  & \EiS  & \IiS  & \OiS  & \UiS  \\ \hline
o & \oS  & \AoS  & \EoS  & \IoS  & \OoS  & \UoS  \\ \hline
u & \uS  & \AuS  & \EuS  & \IuS  & \OuS  & \UuS$^*$  \\ \hline
\hline  
\end{tabular}
\end{center}
\caption{\label{vowels}
The vowels.}
\end{table}

% ------------------------------------------------------
\begin{table}
\begin{center}
\Large
%\begin{tabular}{||c||p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}||}
\begin{tabular}{||c||c|c|c|c|c|c||}
\hline \hline
  &   & a & e & i & o & u \\ \hline \hline  
%   &  & \hspace{3mm}a & \hspace{3mm}e & \hspace{4mm}i & 
%        \hspace{3mm}o & \hspace{3mm}u \\ \hline \hline  
ch & \chS  & \chaS$^*$  & \cheS  & \chiS  & \choS$^*$  & \chuS$^*$  \\ \hline
gh & \ghS$^*$  & \ghaS$^*$  & \gheS  & \ghiS  & \ghoS$^*$  & \ghuS$^*$  \\ \hline
gn & \gnS$^*$  & \gnaS  & \gneS  & \gniS  & \gnoS  & \gnuS  \\ \hline
%gl(i) & \glS$^*$  & \gliaS  & \glieS  & \gliS  & \glioS  & \gliuS$^*$  \\ \hline
gli & \gliS  & \gliaS  & \glieS  & --  & \glioS  & \gliuS$^*$  \\ \hline
\hline  
\end{tabular}
\end{center}
\caption{\label{spechar}
Some special consonant pairs.}
\end{table}

% -------------------------------------------------
\begin{table}
\begin{center}
\Large
%\begin{tabular}{||c||p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}|p{10mm}||}
\begin{tabular}{||c||c|c|c|c|c|c||}
\hline \hline
%  &   & a & e & i & o & u \\ \hline \hline  
  &  & \hspace{3mm}a & \hspace{3mm}e & \hspace{4mm}i & \hspace{3mm}o & \hspace{3mm}u \\ \hline \hline  
, & \vgS  & \AvgS  & \EvgS  & \IvgS  & \OvgS  & \UvgS  \\ \hline
; & \pvS  & \ApvS  & \EpvS  & \IpvS  & \OpvS  & \UpvS$^*$  \\ \hline
: & \dpS  & \AdpS  & \EdpS  & \IdpS  & \OdpS  & \UdpS$^*$  \\ \hline
. & \punS  & \ApunS  & \EpunS  & \IpunS  & \OpunS  & \UpunS  \\ \hline
? & \pinS  & \ApinS  & \EpinS  & \IpinS  & \OpinS  & \UpinS  \\ \hline
! & \pesS  &   &   &   &   &   \\ \hline
\hline  
\end{tabular}
\end{center}
\caption{\label{punctuation}
The punctuation.}
\end{table}

\section*{Acknowledgments}
I thank Professor Ezio Biglieri for carefully 
reading the translated manuscript and pointing me out two words containing 
the letter {\em k}, which was still missing to complete the alphabet.
I would also like to acknowledge Professor Michele Elia for introducing me to 
cryptography and for his helpful advice.

\begin{thebibliography}{99}

\bibitem{vocab}
S.~Levi: {\em Vocabolario Geroglifico--Copto--Ebraico}, Litografia Salussolia,
 Torino, 1887--1894.

\bibitem{vita}
G.~Levi, E.~Viterbo: {\em Simeone Levi matematico ed egittologo}, in preparation.

\bibitem{Knuth}
D.~E.~Knuth: {\em The MetafontBook (Volume C of Computers and Typesetting),}
         Addison-Wesley, 1986.
	       
\end{thebibliography}

\section*{Biographical Sketch}

Emanuele Viterbo was born in Torino in 1966. He received his
degree in 1989 in Electrical Engineering
from the Politecnico of Torino, Italy. 
From 1990 to 1992, he was with the European Patent Office,
The Hague, Holland,  as a patent examiner
in the field of dynamic recording and in particular in the field
of error-control coding.
In 1995 he received his  Ph.D. in Electrical Engineering
from the Politecnico of Torino.
He currently holds a post-doctoral fellowship
at the Politecnico di Torino, Italy.
His current interests are in lattice codes for Gaussian and for 
fading channels, algebraic coding theory and cryptography.  


% -------------------------------------------------------------------------
\clearpage
\begin{figure}
\vspace{22cm}
\caption{\label{pg1} The cover page.}
\end{figure}
% -------------------------------------------------------------------------
\clearpage
\begin{figure}
\vspace{22cm}
\caption{\label{pg2} The title page.}
\end{figure}
% -------------------------------------------------------------------------
\clearpage
\begin{figure}
\vspace{22cm}
\caption{\label{pg3} The first page.}
\end{figure}


\end{document}

