Upload
joel-morris
View
215
Download
3
Embed Size (px)
Citation preview
Cryptography
Goal of this art: how do you cipher your message securely?
This is an ancient art: For example, You can conceal the message (e.g. invisible ink) and hope that the enemy can’t find it: this is known as steganography.
Examples of steganography
• Herodotus relates that one Histauaeus shaved the head of his messenger, wrote the message on his scalp, and waited for the hair to regrow.
• On reaching his destination, the messenger shaved his head again and the recipient, Aristogoras, read the message.
• Invisible ink comes into this category; the recipient develops the message by applying heat or chemicals to it.
A message can be concealed in a much longer, innocent-looking piece of text; the long text is composed so that a subsequence of the letters (chosen by some rule known to the recipient) forms the message. For example, taking every fifth letter of“The prepared letters bring news of amounts”gives the message “Retreat”.
Steganography is interesting and useful, but it’s not what we will study most of time.Instead, we will study cryptography, which is the art of scrambling the message so that the enemy will find it difficult to unscramble it.
Terminology
Plaintext: the message that you want to send (which might be a normal sentence, a sentence without punctuation, a string of 0s and 1s, etc.)
Ciphertext: what is actually transmitted (the encrypted message)
Key: The encryption uses some extra information, known as the key
Examples of encryption method
• Transposition: The order of the letters in the plaintext is rearranged in some systematic way. The key is the permutation applied to the positions.
• Substitution: Individual letters are replaced by different letters in a systematic way.
• Codebook: Complete words in the message are replaced by other words with quite different meanings. The key is the codebook, the list of words and their replacements.
Something to think about
• You want to send a postcard to your family, which will contain a secret message to your brother. How might you do it?
Examples of encryption systems
• Transposition: The order of the letters in the plaintext is rearranged in some systematic way. The key is the permutation applied to the positions.
• For example, say you reverse the order of letters for every 3 letters:
• Alice is in Wonderland -> ilaiecwnidnolredna
Examples of encryption systems
• Or the Pig-Latin:• Cat->atcay• Dog->ogday
• Simply->implysay• Scratch->atchscray• Thick->ickthay• Apple->appleyay• Under->underyay
Examples of encryption systems
Substitution cipher: Take a permutation of the alphabet, and
apply it to the plaintextFor example, A->C, B->D, C-L, … will
result inABBA-> CDDC
Suppose the permutation you are applying is
A B C D E F G H I J K L M N O P Q R S T U V W X Y ZT H E Q U I C K B R O W N F X J M P S V L A Z Y D G
Then, to decipher you need to apply its inverse
A B C D E F G H I J K L M N O P Q R S T U V W X Y ZV I G Y C N Z B F P H U Q M K R D J S A E T L O X W
Examples of encryption systems
Codebook, etc.
Weakness
Letter frequencies, etc.