# Cryptography by stariya

VIEWS: 6 PAGES: 4

• pg 1
```									  1.           Cryptography in the Context Of Communication
Theory

Another very important area where the Communication Theory introduced by C. E. Shannon
has found its application is the science of cryptography and cryptanalysis. The theoretical
foundations of how the theory can be used to analyse cryptographic systems in their most general
and abstract form has been consolidated in the article called 'Communication Theory of Secrecy
Systems' by Claude Shannon, which has been the main 'inspiration' of this chapter.

To start with, we first introduce cryptography as a discipline in its own right, including historical
remarks on its development, complemented by a brief description of some commonly used types of
ciphers, which will be used for illustrative purposes later in the chapter.
[To fill – the main body]
The chapter will be summarized by the discussion of the state-of-the-art cryptographic
methodologies available now.

1.1.      Introduction to Cryptography

The fundamental goal of cryptography is make communication over an insecure channel
possible, in such a way that even if the message being passed between the participants is
somehow obtained by the 'enemy', the information conveyed in this message could not be
understood.
In order to informally introduce the terminology subsequently required, let's consider a very
simple cryptographic situation. The message generated by some information source, called
plaintext, is encrypted using some algorithm and some encryption key into unintelligible
ciphertext and then sent over the communication medium. When the ciphertext is received at the
destination, it gets decrypted back into plaintext, using the reverse algorithm. The pair of
algorithms, used by the message sender to create the encryption and then by the recipient for
reversing it, is called a cipher. Hence, the transformation of plaintext into ciphertext is controlled by
both the encryption algorithm and the key, the latter of which is of great importance. This is due to
the fact that ciphers used in any particular cryptographic system stay constant, apart from this
variable parameter, and consequently, even if initially unknown, can be assumed trivially broken
over time. In fact, that is the treatment given to the situation by Claude Shannon in his theory, i.e.
the system is assumed to be known to the enemy. Although this seems to be slightly on the
pessimistic side, it can hardly be argued to be a totally unrealistic assumption.

1.1.1.    Historical Overview

Cryptography is thought to have appeared thousands of years ago in Ancient Egypt, possibly
triggered by the spread of literacy among wider masses of people, so that the need to 'hide' written
communication from unwanted eyes became more apparent.[2]
The first forms were rather simple and looked at physically concealing the message. This
ancient technique, the first recorded use of which is dates back to 440 BC, is called
steganography ( derived from the Greek 'steganos' – covered and 'graphen' – to write) – the art
of concealed writing. Quite a lot of descriptions of the actual ways to cover messages exist in
literature, ranging from using invisible ink, which then could be developed by some means (e.g.
heat or chemical reaction), to transcribing a message on the messenger's shaved head and
allowing the hair to grow back on, in order to conceal the writing.[3]
It must be noted that the weak spot of this form of cryptography is that it relies on some sort of
secret or obscurity, known only to communication participants. If this secret either accidentally or
purposefully gets discovered, the message is ultimately revealed. However, there does exist a
digital form of steganography nowadays, as opposed to the classical pen and paper variety, which
is mainly concerned with concealment of information in computer files. Very often digital images
are used for this purpose due to their large size.
E.g.: The fully recoverable lossless Tag Image File Format (TIF) uses 3 bytes to store every
pixel (that is 8 bits per each of the primary colours – red, green and blue). Thus, even a relatively
small 170x170 TIF image will contain 28900 pixels = 693600 bits = 86.7 KB. If we reserve just one
bit in the representation of each of the primary colours – a change that would only be possible to
detect programatically and not visible to a human eye – we have 3 bits per each pixel, or 86700 in
total, spare for some other use. Thus, if we wanted to hide a message in the English language, we
would need at most 5 bits (25 = 32 > 26 letters of the English alphabet) per character. This
arrangement would allow us to hide a message consisting of up to 17340 English letters (that's the
whole essay!) in such a seemingly small digital picture.
Another historically notable method of cryptography is the so-called 'privacy systems'[1] – the
systems requiring some special equipment in order to recover encrypted messages. Early
examples can be found in some literary works, e.g. in the 'The Dark Castle Olshansky' by a
Belarusian writer Uladzimir Karatkievich, where the author describes the following medieval
encryption technique. A narrow paper tape was wrapped around an object, preferably of some rare
and strange shape, and then the writing was done across different layers of the tape. The result of
such a transcription was what appeared to be random symbols written under different angles and
with some arbitrary in length gaps in between. However, for anyone in possession of the secret
object, the reconstruction of the original message was just a matter of wrapping the tape around it.
More modern examples of privacy systems include speech inversion – a voice encryption method
based on reversing the signal around some fixed or variable frequencies.[4]
And finally, the class of cryptosystems that is of primary interest in relation to the
Communication Theory, due to being essentially a mathematical problem, are the ones where the
message is encrypted using codes and ciphers (called 'true secrecy systems' by Claude
Shannon[1]). The honour of inventing the first known ciphers belongs to the Greeks of Classical
times, who are believed to have used, for example, the scytale transposition cipher for their military
campaigns or the Polybius cipher as an aid to telegraphy[2]. These are the secrecy systems that
will be the main focus of this chapter.
It's also worth mentioning that alongside the developments in cryptography, there appeared
another science trying to constantly keep up – cryptanalysis, or the study of how to 'break' codes
and ciphers. An example of this would be a discovery of frequency analysis in the Medieval ages
that could be employed to break some simple ciphers, like substitution cipher[2], as will be
demonstrated shortly below. Keeping this 'counter-cryptography' science in mind, the natural
question one might ask is whether it is possible to create an ideal secrecy system, which cannot be
broken, even if infinite resources are assumed, e.g. computation power, time, etc. This is the
motivational question that we will leave until the end to answer.

1.1.2.    Standard Ciphers

In this sub-section, we present some widely known ciphers that will later serve for the purpose
of illustrating the theoretical concepts behind secrecy systems as well some practical
considerations.

Simple Substitution Ciphers

In a simple substitution cipher, as the name suggests, each symbol in the message is
substituted by another symbol in such a manner that the original message can be uniquely and
unambiguously recovered, once the key is known. I.e. speaking in mathematical terms, this cipher
is defined as a finite set of transformations Ti, each of which corresponds to some encryption key i
and is applied to a finite set of messages M:

E= TiM

Hence, the message M = m1m2m3m4… becomes the encryption E = e1e2e3e4… with e1 = f(m1), e2
= f(m2), e3 = f(m3), e4 = f(m4)…

For this kind of coding, the key can be thought of as a permutation of the substitution alphabet
being used. So, if we are encrypting a message in English by substituting for each letter another
letter of the English alphabet, we have 26! possible encryption keys and transformations
corresponding to the number of ways we can substitute for 26 different symbols. One instance of
the encryption key could be:
Q U C Z R K F A S Y E V M O N J W P X D G I B H T L

where letter Q is used as a substitute for A, U – a substitute for B and so on.

Using the above key, the text extract

becomes

Although the encryption looks like a complete gibberish, in fact, the ciphertext is not that hard
to reverse. All it takes, in this case, is the knowledge of the letter frequency analysis of the English
language: a typical distribution of letters in the English text is not uniform, with certain letters or
combinations of letters more likely to appear than others (this is extremely likely to be true for all
natural languages???). For instance, it is common knowledge that in English the most frequently
occurring letter is 'E', while the least frequent is 'Z'. Or, there are very few words in the English
language, where the letter 'Q' is not followed immediately by 'U' (e.g. qadi - a Muslim judge, qanat -
an irrigation channel), of which practically all are of foreign origin. Hence, if we manage to decode
'Q' in some piece of ciphertext, the probability that the next letter is 'U' is nearly unity, with the
probabilities of all other solutions effectively approaching zero.

In the general case, of course, the success of reversing a passage of simple substitution
ciphertext depends on the number of intercepted letters: the greater this number is, the more likely
it is that there will only be one possible message that could have produced the cryptogram. For the
demonstration of the weaknesses of simple substitution ciphers discussed in this section, please
see a separate program (to be developed).

(Need to decide on which of the well-known ciphers would be most interesting to pick)

Transposition Ciphers

Vigenere Ciphers

The Playfair Cipher

Others

1.2.       Mathematical Foundations of Cryptographic Systems
From Shannon's paper

1.3.   State-of-the-art developments, or where the cryptography is

Quantum Cryptography

[1] – Claude Shannon, “The Theory of Secrecy Systems”

[2] - http://en.wikipedia.org/wiki/History_of_cryptography

[3] - http://en.wikipedia.org/wiki/Steganography

[4] - http://seussbeta.tripod.com/crypt.html

[5] – Charles Dickens, “Great Expectations”

http://mathcircle.berkeley.edu/BMC3/crypto/node2.html

```
To top