Lecture 3
Lecture 3
party
Access Control
The prevention of unauthorized use of a resource (i.e., this service controls who can have
access to a resource, under what conditions access can occur, and what those accessing the
resource are allowed to do). DATA
Availability
Assures that systems work promptly and service is not denied to
authorized users.
Caesar Cipher
The earliest known use of a substitution cipher, and the simplest, was by Julius Caesar. The
Caesar cipher involves replacing each letter of the alphabet with the letter standing three
places further down the alphabet.
For example,
Plain text : meet me after the toga party
Cipher Text : PHHW PH DIWHU WKH WRJD SDUWB
Note that the alphabet is wrapped around, so that the letter following Z is A. We can define
the transformation by listing all possibilities, as follows:
Plain Text: 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 z
Cipher Text: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
The matrix is constructed by filling in the letters of the keyword (minus duplicates) from left
to right and from top to bottom, and then filling in the remainder of the matrix with the
remaining letters in alphabetic order. The letters I and J count as one letter.
• Repeating plaintext letters that are in the same pair are separated with a filler letter,
such as x, so that balloon would be treated as ba lx lo on
• Two plaintext letters that fall in the same row of the matrix are each replaced by the
letter to the right, with the first element of the row circularly following the last. For
example, ar is encrypted as RM
• Two plaintext letters that fall in the same column are each replaced by the letter
beneath, with the top element of the column circularly following the last. For
example, mu is encrypted as CM
• Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its own
row and the column occupied by the other plaintext letter. Thus, hs becomes BP and
ea becomes IM (or JM, as the encipherer wishes)
Hill cipher
Another interesting multi-letter cipher is the Hill cipher, developed by the mathematician
Lester Hill in 1929. The encryption algorithm takes m successive plaintext letters and
substitutes for them m cipher text letters.
Or
C = PK mod 26
where C and P are column vectors of length 3, representing the plaintext and cipher text, and
K is a 3 x 3 matrix, representing the encryption key. Operations are performed in mod 26.
It produces random output that bears no statistical relationship to the plaintext. Because the
cipher text contains no information whatsoever about the plaintext, there is simply no way to
break the code.
An example should illustrate our point. Suppose that we are using a 27 characters in which
the twenty-seventh character is the space character, but with a one-time key that is as long as
the message.
Consider the
cipher text : ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
We now show two different decryptions using two different keys:
If the actual key were produced in a truly random fashion, then the cryptanalyst cannot say
that one of these two keys is more likely than the other. Thus, there is no way to decide which
key is correct and therefore which plaintext is correct. Therefore, the code is unbreakable.
For example,
to encipher the message "meet me after the toga party" with a rail fence of depth 2, we
write the following:
m e m a t r h t g p r y
e t e f e t e o a a t
1 2 3 4 5 6 7
1 a t t a c k p
2 o s t p o n e
3 d u n t i l t
w x y z
4 o a m
A pure transposition cipher is easily recognized because it has the same letter frequencies as
the original plaintext.
For the type of columnar transposition just shown, cryptanalysis is fairly straightforward and
involves laying out the cipher text in a matrix and playing around with column positions.
Digram and trigram frequency tables can be useful.
The transposition cipher can be made significantly more secure by performing more than one
stage of transposition. The result is a more complex permutation that is not easily
reconstructed.
Thus, if the foregoing message is re-encrypted using the same algorithm,
Key: 3 4 2 1 5 6 7
1 2 3 4 5 6 7
1 t t n a p t m
2 t t s u o a o
3 d w c o i x k
n e t z
4 l y p
A stream cipher is one that encrypts a digital data stream one bit or one byte at a time.
Examples of classical stream ciphers are the autokeyed Vigenère cipher and the Vernam
cipher.
In the ideal case, a one-time pad version of the Vernam cipher would be used, in which the
keystream is as long as the plaintext bit stream. If the cryptographic keystream is random,
then this cipher is unbreakable by any means other than acquiring the keystream. However,
the keystream must be provided to both users in advance via some independent and secure
channel. This introduces insurmountable logistical problems if the intended data traffic is
very large.
Accordingly, for practical reasons, the bit-stream generator must be implemented as an
algorithmic procedure, so that the cryptographic bit stream can be produced by both users. In
this approach, the bit-stream generator is a key-controlled algorithm and must produce a bit
stream that is cryptographically strong. Now, the two users need only share the generating
key, and each can produce the keystream.