Magic — From Heaven To Earth

So Who Wrote The First Book on Cryptography?

Magic — From Heaven To Earth

So Who Wrote The First Book on Cryptography?

I think cryptography is truly magical. It is founded on mathematical principles and is one of the few areas of cybersecurity that has a solid base of core methods. As an engineer, I am always happiest when something is grounded in solid principles.

And, so, when I first encountered the ability to create a secret for two parties over an open communication channel — the Diffie Hellman method — I was hooked on the magic of cryptography. The great thing is that cryptography saved the Internet, and where communications which were at one time open for others to read and change, were secured through the magic of cryptography. For me, I saturated my knowledge in many other areas, such as in networking and data communications, but cryptography gives an almost endless supply of learning (and in the learning of magic tricks).

Overall, cryptography provides the foundation of confidentiality, integrity, authorization, and, most of all, digital trust. So, who started it all off? Well, many might say that it was Alan Turing, but the first published work is thought to have been by Johannes Trithemius. He was a German Benedictine abbot who lived from 1462 to 1516 and wrote many books related to cryptography — the art of secret messages. This included Polygraphiae and which was written in 1499 and published in 1606:

While Polygraphiae was the first book on cryptography. In the book, Trithemius outlines that cryptography is a:

secular consequent of the ability of a soul specially empowered by God to reach, by magical means, from earth to Heaven

His book on Steganographia remains his most famous output and contains three volumes. At first glance, it appears to be focused on magic and how spirits could communicate over long distances, but the revealing of a decryption key shows that they focused on cryptography. Both Polygraphiae and Steganographia were written as covertexts — the reason for this is still unknown, but he could have been writing it to be only read by a trusted set of people.

Ref [here]

Many have since used the methods to send secret messages, including John Dee, who used a Trithemian cypher to secretly communicate with Queen Elizabeth I.

One of the ciphers in the Steganographia book is the Ave Maria (“Hail Mary”) cipher, and where each of the letters in the plaintext is replaced by a short Latin sentence about Jesus. The mappings can then be:

We have no mapping for ‘V’ and ‘W’ and where these are mapping to ‘U’. Also ‘J’ is mapped to ‘I’. The basic coding in C# is [here]:

public static string trithemiu(string str)
string cipher
= "";
string[,] alphabet = new string[26, 2]{
{"deus", "clemens"}, {"creator", "clementissimus"},
{"conditor", "pius"}, {"opifex", "piissimus"},
{"dominus", "magnus"}, {"dominator", "excelsus"},
{"consolator", "maximus"}, {"arbiter", "optimus"},
{"iudex", "sapientissimus"}, {"",""},
{"illuminator", "inuisibilis"},
{"illustrator", "immortalis"}, {"rector", "aeternus"},
{"rex", "sempiternus"}, {"imperator", "gloriosus"},
{"gubernator", "fortissimus"}, {"factor", "sanctissimus"},
{"fabricator", "incompraehensibilis"}, {"conseruator", "omnipotens"},
{"redemptor", "pacificus"}, {"auctor", "misericors"},
{"",""}, {"",""},
{"princeps", "misericordissimus"}, {"pastor", "conctipotens"},
{"moderator", "magnificus"}
};
var rnd = new System.Random();
str = str.Replace("j", "i");
str = str.Replace("v", "u");
str = str.Replace("w", "u");
foreach (char ch in str)
{
int num = rnd.Next(2);
if (ch >= 'a' && ch <= 'z')
{
int val = (int)ch - (int)'a';
cipher = cipher + alphabet[val, num] + " ";
}
else cipher = cipher + ch;
}
return (cipher);
}
{

In this case, we randomly select one of the two Latin words that map to a specific letter. So, let’s take “heaven and earth”, and convert to a cipher [here]:

optimus dominus clemens auctor magnus 
rex deus sempiternus piissimus dominus 
clemens incompraehensibilis pacificus optimus

This translates to:

the best lord, the most gracious, the great author king god eternal most pious lord merciful, incomprehensible, peaceful, the best

Conclusions

Go believe in cryptography building a more private, secure and trusted digital world. If you are interested in ciphers, there are 120 of them waiting for you: