Wednesday, February 10, 2016

Introduction to Cryptography and Steganography


Cryptography is an interesting art. Bear with me and you will see. In this post I will tell you a brief history of Cryptography and Steganography. Next post will be more technical.
Long long time ago ancient dynasties relies on different methods of communication in their region. They always were interested in new methods to hide their message from potential enemies. Interest of enemies in those important messages encouraged dynasties to develop new methods to secure their messages using codes and ciphers. Like everywhere else our story has two sides. One the other side enemy forces had some workers who were responsible for breaking the codes and revealing the secret message. The battle between inventors of new coding methodologies and code breakers always continued and this cause many more new methods of coding being invented. In new era the act of hiding the message in form of code is called encryption. The reverse method to retrieve the secret from the encrypted message is called decryption. The art of changing plain content to a secret message that is not understandable by others is called Cryptography. In cryptography only entities that has the key for that secret are able to decrypt the secret message(Which this is true only in best scenario).
The earliest method of secret messaging is related to 519–465 BC, when there was a war between Greece and Persian(Iran). According to Herodotus, the art of secret messaging saved Greece from being conquered by Xerxes, King of Kings, leader of Persians. After Xerxes build his new kingdom capital at Persepolis, gifts arrived from all over the empire and neighbor countries except from Athens and Sparta. This made Xerxes to say "We shall extend the Persian territory as far as God's heaven reaches. The sun will then shine on no land beyond our borders". Then he spent 5 years secretly to prepare the greatest army in the history to do a surprise attack. Long story short, one Greek betrayer who was not welcomed by his homeland was working in Persian army. He still had some feelings and loyalty to his country, therefore he decided to send a message to them and inform them about this surprise attack. He have to hide the message to avoid discovery by Xerxes people. Therefore he scraped his message on a wooden folding tablets and then he cover the message with wax. This avoids guards on the way to find out about the secret message. The message delivered safety to Greeks. Greeks prepared them self for the war and they won the war against Persians.
There was another method which used in the same era. In this method  head of a person as messenger shaved and then the message was written on his scalp, then they will wait for his hair to regrow. 
The art of hiding the existence of message known as Steganography. Previous mentioned stories were good examples of Steganography In cryptography the message is viewable by public but the content of it is not understandable to them. However in Steganography the message itself is hidden from view.
Ancient Chinese used to write their secret messages on silk and make them like a ball, then cover them in wax. A messenger have to swallow the waxed ball to hide the message. 
Part of Steganography is writing messages using invisible inks. In 16th century Giovanni Battista Della Porta an Italian scholar, explained his finding about writing secret message on boiled eggs. He made an ink using a mixture of vinegar and alum. Then he used the ink to write on the shell of the egg. The ink penetrates through the shell and leaves the message on hardened albumen of egg. The message is not appear on the shell and only will be appear after the shell is removed.
Eventhough Cryptography and Steganography are two different methodologies, they can be used together to increase the secrecy of message. For instance during the World War II, German spies in America, used photographic technics to shrink a page of text to size less than a millimeter. Then they used this dot at the end of their first sentence in their letters. After a while FBI found out about the microdots and then they were able to read the content of them and intercept the message of spies to Germany. Then Spies combined the art of cryptography with Steganography to scramble their text before converting it to microdot. Afterward the content of microdots were not understandable to Americans, However they were able to block the communication.

In next post I will explain the basics of cryptography and will give few examples of primitives methods of encryption. Please start following my blog using G+, FB, Twitter. I promise you will not regret and we will cover more about new techniques of cryptography.

            .-""-.
           / .--. \
          / /    \ \
          | |    | |
          | |.-""-.|
         ///`.::::.`\
        ||| ::/  \:: ;
        ||; ::\__/:: ;
         \\\ '::::' /
          `=':-..-'`