Frequency Analysis and the Kama Sutra Substitution Cipher - Maple Application Center
Application Center Applications Frequency Analysis and the Kama Sutra Substitution Cipher

Frequency Analysis and the Kama Sutra Substitution Cipher

Author
: Judith Koeller
This Application runs in Maple. Don't have Maple? No problem!
In the 4th century BC, the Indian text "Kama Sutra" proposed a method of encrypting text. Each letter of the alphabet was paired with one other letter. A ciphertext was formed by replacing each letter in the plaintext with its paired letter. When this scheme is used in the English language, the number of possible keys is surprisingly high: around 7.9 * 10^12. An exhaustive attack on such a scheme would be unwieldly using a modern computer, and it was certainly infeasible at the time this scheme was suggested. The art of cryptanalysis (systematic techniques used to break ciphers) traces back to Arab Islamic society, from 750-900 AD. al Kindi proposed the technique of frequency analysis to break substitution ciphers like that proposed in the Kama Sutra text. Frequency analysis recognizes that in long blocks of text, certain letters tend to occur much more frequently than others. When a big enough sample text is used in a particular language, certain patterns occur predictably, for example in English text, the most common letters are E, T and N while Q and Z are used infrequently. Different languages have different typical frequency patterns. In this worksheet, letters of the English alphabet will be paired at random according to the Kama Sutra scheme. A block of text will be encrypted by swapping letters according to this pairing. The user can refer to the frequency patterns for the English language and the letter frequencies in the ciphertext to try to determine the letter pairings and hence receover the original plaintext. The Maplet uses the user's pairing of letters to guess at the plaintext, and tracks how many guesses have been made.

Application Details

Publish Date: August 30, 2005
Created In: Maple 10
Language: English

Share

This app is not in any Collections

cryptography