Secondary abstract: |
Digital communication is becoming an essential part of modern way of life. In some cases it is desired, that message stays secret, while in some other cases it is required to be revealed. Simplified, cryptography is a theory that studies techniques to enable secret communication with the use of encryption and the use of decryption to obtain back the original message. This thesis deals with cryptoanalysis, in particular, it explains mathematical background for breaking the substitution cipher based on statistics of pairs of letters. It presents our implementation of algorithms, which encrypt a clear text with the use of random substitution cipher, calculate the frequencies of pairs of letters in corpus and encrypted text and stores them in two matrices. It permutes the substitution cipher in matrix of the encrypted text and calculates the distance with corresponding matrix of corpus. The algorithm is running, until
the distance is decreasing. As result we get substitution cipher, which was used to encrypt the clear text. |