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

: Maplesoft AuthorJudith Koeller
Engineering software solutions from Maplesoft
This Application runs in Maple. Don't have Maple? No problem!
 Try Maple free for 15 days!
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

More Like This

The Advanced Encryption Standard and its modes of operation
The SHA-3 Family of Cryptographic Hash Functions and Extendable-Output Functions
Secure Symmetric-Key Block Cipher Based on Generalized Finite Fields
RSA with maple
Elliptic Curve Cryptography
User-Friendly ElGamal Public-Key Encryption Scheme
Elliptic Curve Arithmetic over the Real Numbers
Exploring the Modified IDEA Using the topicIDEA Package
A Symmetric-Key Block Cipher Generating Cryptograms Containing Characters Belonging to the Definite Set
Mersenne Primes-Based Symmetric-Key Masquerade Block Cipher
CBC Mode Fast AES Directory Encryption/Decryption