Unit-1 ICS
Unit-1 ICS
Unit-I
Syllabus
Unit I: Need of Information Security: Legal, Ethical and Professional Issues Attributes of security- authentication,
access control, confidentiality, authorization, integrity, non-reproduction. OSI Security Architecture: attacks,
services and mechanisms. Security Attacks, Security services, A model of Internetwork Security. Conventional
Encryption: Classical Encryption Techniques and Problems on classical ciphers, Security architecture.
Unit II: Introduction to Secret key and cryptography, Encrypt given messages using DES, AES, IDEA, Problems on
cryptography algorithms, Principles, finite fields, stream cipher, block cipher modes of operation, DES, Triple DES,
AES, IDEA, RC5, key distribution.
Unit III: Introduction to Public key and Cryptography, Encrypt given messages using ECC, Problems on key
generation, cryptography algorithms Principles, Introduction to number theory, RSA- algorithm, security of RSA,
Key management- Diffie-Hellman key exchange, man-in-the-middle attack, Elliptical curve cryptography
Unit IV: Message Authentication and Hash Functions: Authentication Requirements and Functions, Hash Functions
and their Security, MD5 Message Digest Algorithm, Kerberos. Key Management: Digital Certificates-Certificate
types, X.509 Digital Certificate format, Digital Certificate in action, Public Key Infrastructure-Functions, PKI
Architecture, Certificate Authentication.
Unit V: Introduction to Network, Transport and Periphery Security, Study of IPSEC, TLS, and SSL. Firewalls - design
principles, trusted systems, Intrusion Detection System, Intrusion Prevention System. Implementation and analysis
of IPSEC, TLS and SSL, Introduction to cryptography - Classical cryptography.
Unit VI: Software Vulnerability: Phishing, Buffer Overflow, Cross-site Scripting (XSS), SQL Injection. Electronic
Payment: Payment Types, Enabling Technologies-Smart Cards and Smart Phones, Cardholder Present E-Transaction-
Attacks, Chip Card Transactions, Payment over Internet-Issues and Concerns, Secure Electronic
2 Transaction, Online
Rail Ticket Booking. Electronic Mail Security: Pretty Good Privacy, S/MIME
Text and reference Book
Text Book:
1. Cryptography and network security - principles and practices, William
Stallings, Pearson Education, 2002.
Reference Books:
1. Network Security and Cryptography, Bernard Menezes, Cengage Learning.
2. Information System Security, Nina Godbole, Wiley India, 2008.
3. Network security, private communication in a public world, Charlie
Kaufman, Radia Perlman and Mike Speciner, Prentice Hall, 2002.
4. Security architecture, design deployment and operations, Christopher M.
King and Curtis Patton, RSA press, 2001.
5. Network Security - The Complete Reference, Robert Bragg and Mark
Rhodes, Tata McGraw Hill, 2004.
3
Background
❑ Integrity: It covers two related concepts that are data integrity and system integrity.
▪ Data integrity: It assures that information and programs are changed only in a
specified an authorized manner.
▪ System integrity: It assures that a system performs its intended function in an
unimpaired manner , free from deliberate or inadvertent unauthorized manipulation
of the system.
Three Key Objectives & more
❑ Availability: It assures that systems work promptly and services is not denied to
Authorized users.
➢ Although the use of CIA triad to define security objectives is well established,
some expert in security field feel that additional concepts are needed to present a
complete picture. Two of additional concepts are as follows:
❑ Authenticity: The property of being genuine and being able to be verified and
trusted ; confidence in the validity of transmission, a message, or message originator.
This means verifying that users are who they say they are and that each input
arriving at the system came from a trusted source.
❑ Accountability: The security goals that generate the requirement for actions of an
entity to be traced uniquely to that entity. This supports non-repudiation, deterrence,
fault isolation, intrusion detection and prevention and after action recovery and
legal action. We must be able to trace security breach and take action against it.
X.800 OSI Security Architecture
• The OSI security architecture is useful to managers as a way of organizing the task
of providing security. The OSI security architecture focuses on security attacks,
mechanism and services. They are defined as follows:
❑ Security attack: Any action that compromises the security of information owned
by
an organization.
❑ Security mechanism: A process that is design to detect, prevent or recover from a
security attack.
❑ Security Services: A processing or communication service that enhances the
security of the data processing systems and the information transfers of an
organization. The services are intended to counter security attacks, and they make
use of security mechanism to provide the service.
Security Attacks
❑ Active Attack:
• Active attacks try to alter system resources or affect their operation.
• Modification of data, or creation of false data.
• A specific target or entire network.
• Difficult to prevent.
• The goal is to detect and recover.
• There are 4 types of active attack, they are masquerade, replay, modification of
Message and denial of service.
Passive Attack: Release of Message Contents
Passive Attack: Traffic Analysis
Active Attack: Masquerade
Active Attacks: Replay
Active Attacks: Modification of Messages
Active Attacks: Denial of Serv ice
Security Serv ice(X.800)
▪ Security Service enhance security of data processing systems and information
transfers of an organization and it is intended to counter security attacks using one
or more security mechanisms.
❑ Data Integrity – The assurance that data received is as sent by an authorized entity.
❑ Routing Control: Enables selection of particular physically secure routes for certain data and
allows routing changes, especially when a breach of security is suspected.
❑ Notarization: The use of a trusted third party to assure certain properties of data
exchange.
Pervasive Security Mechanism
❑ Trusted Functionality: That which is perceived to be correct with respect to some criteria.
❑ Security label: The marking bound to a resource that names or designate the security
attributes of that resource.
❑ Security Audit Trail:Data collection and potentially used to facilitates a security audit,
which is an independent review and examination of system records and activities.
❑ Security
Recovery: Deals with request from mechanism, such as event handling and
management functions and takes recovery actions.
Relationship between security service and
Mechanism
Model for Network Security
Model for Network Security
❑ Fig. Above shows that a message is to be transferred from one party to another
across some sort of internet service. The two parties, who are the principals in this
transaction, must cooperate for the exchange to take place.
❑ Sometimes the above given security model does not full fill all the needed security
requirements so another model is given to protect the information from unwanted access
by the hackers/intruder who attempt to penetrate system that can be accessed over a
network. The threat can be from software also. They may be virus, worms which attack
on the system in order to harm the system or to steal the passwords and other
confidential information. The model is shown below:
Model for Network Access Security
❑The security mechanism needed to cope with unwanted access fall into two broad
categories:
•The first category might be termed a gatekeeper function. It includes password based
login procedures that are designed to deny access to all but authorized users and
screening logic that is designed to detect and reject worms, viruses and other similar
attacks.
•Once either an unwanted user or software gains access, the second line of defense
consists of a variety of internal controls that monitor activity and analyze stored
information in an attempt to detect the presence of unwanted intruders.
☺Basic Terminologies that we must remember
• Plaintext - original message always☺
• Cipher text - coded message
• Cipher - algorithm for transforming plaintext to cipher text
• Key - info used in cipher known only to sender/receiver
• Encipher (encrypt) - converting plaintext to cipher text
• Decipher (decrypt) - recovering cipher text from plaintext
• Cryptography - study of encryption/decryption principles/methods
• Cryptanalysis (codebreaking) - study of principles/ methods of deciphering
cipher text without knowing key.
• Cryptology - field of both cryptography and cryptanalysis
Symmetric Cipher Model or Symmetric Encryption or
Conventional Encryption Model
Fig. given below shows the conventional encryption process. The original intelligible
message, referred to as plaintext is converted into apparently random nonsense referred
to as cipher text. The encryption process consists of an algorithm and key. The key is a
value independent of the plaintext.
Symmetric Cipher Model or Symmetric Encryption or
Conventional Encryption Model
• The algorithm will produce a different output depending on the specific key being
used at the time . Changing the key changes the output of the algorithm. Once the
cipher text is produced, it may be transmitted.
• Upon reception, the cipher text can be transformed back to the original plaintext by
using a decryption algorithm and the same key that was used for encryption. The
security of conventional encryption depends on several factors.
• With the message X and the encryption key K as input, the encryption algorithm forms the
cipher text Y =[Y1,Y2…..Yn]. We can write this as Y=Ek(X).This notation indicates that Y
is produced by using encryption algorithm E as a function of the plaintext X, with the
specific function determined by the value of the key K.
• The intended receiver, in possession of the key is able to decrypt the message, X=Dk(Y). An
opponent, observing the Y but not having access to K or X may attempt to recover X or K or
both X and K. It is assumed that the opponent knows the encryption (E) and decryption (D)
algorithms.
Symmetric Cipher Model or Symmetric Encryption or
Conventional Encryption Model
If the opponent is interested in only this particular message, then the focus of the effort is to
recover X by generating a plaintext estimate often, however the opponent is interested in
being able to read future message as well, in which case an attempt is made to recover K by
generating an estimate
Cryptanalysis and Brute-Force Attack
❑ Typically, the objective of attacking an encryption system is to recover the key in
Use rather than simply to recover the plaintext of a single cipher text. There are two
general approaches to attacking a conventional encryption scheme:
• Brute-force attack: The attacker tries every possible key on a piece of cipher text
until an intelligible translation into plaintext is obtained. On average, half
of all possible keys must be tried to achieve success.
“If either type of attack succeeds in deducing the key, the effect is catastrophic:
All future and past messages encrypted with that key are compromised”
Cryptanalysis
❑ Table given below summarizes the various types of cryptanalytic attacks based on
the amount of information known to the cryptanalyst. The most difficult problem is
Presented when all that is available is the cipher text only.
❑ In some cases, not even the encryption algorithm is known, but in general, we can
assume that the opponent does know the algorithm used for encryption. One possible
attack under these circumstances is the brute-force approach of trying all possible keys.
❑ If the key space is very large, this becomes impractical. Thus, the opponent must
rely on an analysis of the cipher text itself, generally applying various statistical tests
to it.
❑ To use this approach, the opponent must have some general idea of the type of
plaintext that is concealed, such as English or French text, an EXE file, a Java source
listing, an accounting file, and so on.
TWO Important Definitions
❑ An encryption scheme is unconditionally secure if the cipher text generated by
the scheme does not contain enough information to determine uniquely the
corresponding plaintext, no matter how much cipher text is available.
❑ While designing any cryptography algorithm we must strive for is an algorithm that
meets one or both of the following criteria:
• The cost of breaking the cipher exceeds the value of the encrypted information.
• The time required to break the cipher exceeds the useful lifetime of the
information.
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years 5.9 1030 years
➢ Results are also shown for what are called substitution codes that use a 26-
character key in which all possible permutations of the 26 characters serve as
keys.
➢ For each key size, the results are shown assuming that it takes 1 μs to perform a
single decryption, which is a reasonable order of magnitude for today’s machines.
➢ With the use of massively parallel organizations of microprocessors, it may be
possible to achieve processing rates many orders of magnitude greater.
➢ The final column of Table considers the results for a system that can process 1
million keys per microsecond. As you can see, at this performance level, DES can
no longer be considered computationally secure.
❑ Following are classical encryption techniques:
1. Substitution Techniques
2. Transposition Techniques
3. Steganography
❑ Then the algorithm can be expressed as follows. For each plaintext letter p, substitute
the cipher text letter C. A shift may be of any amount, so that the general Caesar algorithm is
where takes on a value in the range 1 to 25.The Encryption/ decryption algorithm is simply
C = E(k, p) = (p + k) mod 26
p = D(k, C) = (C - k) mod 26
❑ If it is known that a given cipher text is a Caesar cipher, then a brute-force cryptanalysis is
easily performed: simply try all the 25 possible keys. Three important characteristics of this
problem enabled us to use a brute force cryptanalysis:
❑ In most networking situations, we can assume that the algorithms are known. What generally
makes brute-force cryptanalysis impractical is the use of an algorithm that employs a large
Substitution Techniques: Caesar Cipher
❑ The third characteristic is also significant. If the language of the plaintext is unknown, then
plaintext output may not be recognizable. Furthermore, the input may be abbreviated or
compressed in some fashion, again making recognition difficult. For example, Figure below
shows a portion of a text file compressed using an algorithm called ZIP. If this file is then
encrypted with a simple substitution cipher (expanded to include more than just 26 alphabetic
characters), then the plaintext may not be recognized when it is uncovered in the brute-force
cryptanalysis.
Substitution Techniques: Caesar
Let us take an example..!!
Cipher
46
Cryptanalysis of Caesar Cipher
only have 26 possible ciphers
A maps to A,B,..Z
could simply try each in turn
a brute force search
given ciphertext, just try all shifts of letters
do need to recognize when have plaintext
eg. break ciphertext "GCUA VQ DTGCM"
Substitution Techniques: Monoalphabetic Ciphers
❑ Before proceeding, we define the term permutation. A permutation of a finite set of
elements S is an ordered sequence of all the elements of S, with each element appearing
exactly once. For example, if S={a,b,c} , there are six permutations of S :
abc, acb, bac, bca, cab, cba
❑ In general, there are n! permutations of a set of n elements, because the first element can be
chosen in one of n ways, the second in n-1ways, the third in n-2 ways, and so on. Recall the
assignment for the Caesar cipher:
plain: 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: 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
❑ If, instead, the “cipher” line can be any permutation of the 26 alphabetic characters, then
there are 26! possible keys. This is 10 orders of magnitude greater than the key space for
DES and would seem to eliminate brute-force techniques for cryptanalysis. Such an
approach is referred to as a monoalphabetic substitution cipher, because a single cipher
alphabet (mapping from plain alphabet to cipher alphabet) is used per message.
Substitution Techniques: Monoalphabetic Ciphers
❑ There is, however, another line of attack. If the cryptanalyst knows the nature of the
plaintext (e.g., non compressed English text), then the analyst can exploit the regularities of
the language. To see how such a cryptanalysis might proceed, we give a partial example
here: The cipher text to be solved is given below:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
❑ As a first step, the relative frequency of the letters can be determined and compared to a
standard frequency distribution for English, such as is shown in figure below. If the message
were long enough, this technique alone might be sufficient, but because this is a relatively
short message, we cannot expect an exact match. In any case, the relative frequencies of the
letters in the cipher text (in percentages) are as follows:
❑ Only four letters have been identified, but already we have quite a bit of the message.
Continued analysis of frequencies plus trial and error should easily yield a solution from
this point.The complete plaintext, with spaces added between words, follows:
“it was disclosed yesterday that several informal but
direct contacts have been made with political
representatives of the viet cong in Moscow”
Substitution Techniques: Playfair Ciphers
➢ The Playfair algorithm is based on the use of a 5 × 5 matrix of letters constructed
using a keyword. In this case, the keyword is monarchy.
➢ 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. Plaintext is
encrypted two letters at a time, according to the following rules:
Rules
1. 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”.
2. 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”.
Substitution Techniques: Playfair Ciphers
3. 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”.
4. 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).
❑The Playfair cipher is a great advance over simple monoalphabetic ciphers. For one thing,
whereas there are only 26 letters, there are 26 * 26 = 676 digrams, so that identification of
individual digrams is more difficult.
❑Furthermore, the relative frequencies of individual letters exhibit a much greater range
than that of digrams, making frequency analysis much more difficult. For these reasons, the
Playfaircipher was for a long time considered unbreakable.
❑Despite this level of confidence in its security, the Playfair cipher is relatively
easy to break, because it still leaves much of the structure of the plaintext language
intact. A few hundred letters of ciphertext are generally sufficient.
Substitution Techniques: Playfair Ciphers
C = PK mod 26
Substitution Techniques: Hill Ciphers
❑where C and P are row vectors of length 3 representing the plaintext and ciphertext,
and K is a 3 * 3 matrix representing the encryption key. Operations are performed
mod 26. For example, consider the plaintext “paymoremoney” and use the encryption
Key given below:
K = (17 17 5
21 18 21
2 2 19)
❑The first three letters of the plaintext are represented by the vector (15 0 24).
Then(15 0 24)K = (303 303 531) mod 26 = (17 17 11) = RRL.
❑Continuing in this fashion, the ciphertext for the entire plaintext is RRLMWBKASPDH.
❑Decryption requires using the inverse of the matrix K. We can compute det K = 23, and
therefore, (det K) inverse mod 26 = 17. We can then compute the inverse as
K-1 = ( 4 9 15
15 17 6
24 0 17)
Substitution Techniques: Hill Ciphers
❑This is demonstrated as:
(17 17 5 (4 9 15 (443 442 442 (1 0 0
21 18 21 * 15 17 6 = 858 495 780 mod 26 = 0 1 0
2 2 19) 24 0 17) 494 52 365) 0 0 1)
❑It is easily seen that if the matrix K-1 is applied to the ciphertext, then the plaintext is
recovered. In general terms, the Hill system can be expressed as:
C = E(K, P) = PK mod 26
P = D(K, C) = CK-1 mod 26 = PKK-1 = P
❑As with Playfair, the strength of the Hill cipher is that it completely hides single-letter
frequencies. Indeed, with Hill, the use of a larger matrix hides more frequency information.
Thus, a 3 * 3 Hill cipher hides not only single-letter but also two-letter frequency
information. Although the Hill cipher is strong against a ciphertext-only attack, it is
easily broken with a known plaintext attack.
Substitution Techniques: Hill Ciphers
❑The best known, and one of the simplest, polyalphabetic ciphers is the Vigenère cipher. In
this scheme, the set of related monoalphabetic substitution rules consists of the 26 Caesar
ciphers with shifts of 0 through 25.
❑Each cipher is denoted by a key letter, which is the ciphertext letter that substitutes for the
plaintext letter a. Thus, a Caesar cipher with a shift of 3 is denoted by the key value 3.8
We can express the Vigenère cipher in the following manner.
❑Assume a sequence of plaintext letters P = p0, p1, p2, c, pn-1 and a key consisting of the
sequence of letters K = k0, k1, k2, c, km-1, where typically m < n. The sequence of
ciphertext letters C = C0, C1, C2, c, Cn-1 is calculated as follows:
Substitution Techniques: Polyalphabetic Cipher
C = C0, C1, C2,...., Cn-1 = E(K, P) = E[(k0, k1, k2,....., km-1), (p0, p1, p2,....,
pn-1)]
= (p0 + k0) mod 26, (p1 + k1) mod 26,........., (pm-1 + km-1) mod 26,
(pm + k0) mod 26, (pm+1 + k1) mod 26,....., (p2m-1 + km-1) mod 26........
❑Thus, the first letter of the key is added to the first letter of the plaintext, mod
26, the second letters are added, and so on through the first m letters of the
plaintext. For the next m letters of the plaintext, the key letters are
repeated.This process continues until all of the plaintext sequence is encrypted.
A general equation of the
encryption process is:
Ci = (pi + kimod m)mod 26
Similarly, decryption is given as:
pi = (Ci - kimod m)mod 26
❑To encrypt a message, a key is needed that is as long as the message. Usually,
Substitution Techniques: Polyalphabetic Cipher
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
❑The strength of this cipher is that there are multiple ciphertext letters for each
plaintext letter, one for each unique letter of the keyword.Thus, the letter
frequency
information is obscured.
Substitution Techniques: One Time Pad
❑An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement to the
Vernam cipher that yields the ultimate in security. Mauborgne suggested using a random key
that is as long as the message, so that the key need not be repeated.
❑In addition, the key is to be used to encrypt and decrypt a single message, and then is
discarded. Each new message requires a new key of the same length as the new message.
Such a scheme, known as a one-time pad, is unbreakable. It produces random output that
bears no statistical relationship to the plaintext. Because the ciphertext 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 Vigenère scheme with
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 ciphertext:
ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
We now show two different decryptions using two different keys:
ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
Substitution Techniques: One Time Pad
❑We now show two different decryptions using two different keys:
ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
key: pxlmvmsydofuyrvzwc tnlebnecvgdupahfzzlmnyih
plaintext: mr mustard with the candlestick in the hall
ciphertext: ANKYODKYUREPFJBYOJDSPLREYIUNOFDOIUERFPLUYTS
key: mfugpmiydgaxgoufhklllmhsqdqogtewbqfgyovuhwt
plaintext: miss scarlet with the knife in the library
❑Suppose that a cryptanalyst had managed to find these two keys. Two plausible plaintexts
are produced. How is the cryptanalyst to decide which is the correct decryption (i.e., which
is the correct key)? 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.
Substitution Techniques: One Time Pad
❑In fact, given any plaintext of equal length to the ciphertext, there is a key that produces
that plaintext. Therefore, if you did an exhaustive search of all possible keys, you would end
up with many legible plaintexts, with no way of knowing which was the intended
plaintext.Therefore, the code is unbreakable.
❑The security of the one-time pad is entirely due to the randomness of the key. If the stream
of characters that constitute the key is truly random, then the stream of characters that
constitute the ciphertext will be truly random. Thus, there are no patterns or regularities that
a cryptanalyst can use to attack the ciphertext.
❑In theory, we need look no further for a cipher.The one-time pad offers complete
security but, in practice, has two fundamental difficulties:
1. There is the practical problem of making large quantities of random keys. Any
heavily used system might require millions of random characters on a regular basis.
Supplying truly random characters in this volume is a significant task.
Substitution Techniques: One Time Pad
2. Even more daunting is the problem of key distribution and protection. For
every message to be sent, a key of equal length is needed by both sender and receiver. Thus,
a mammoth key distribution problem exists.
❑Because of these difficulties, the one-time pad is of limited utility and is useful primarily
for low-bandwidth channels requiring very high security. The one-time pad is the only
cryptosystem that exhibits what is referred to as perfect secrecy
Transposition Techniques: Rail Fence
❑All the techniques examined so far involve the substitution of a ciphertext symbol for a
plaintext symbol. A very different kind of mapping is achieved by performing some sort of
permutation on the plaintext letters. This technique is referred to as a transposition cipher.
❑The simplest such cipher is the rail fence technique, in which the plaintext is written
down as a sequence of diagonals and then read off as a sequence of rows. For example, to
encipher the message “meet me after the toga party” with a rail fence of depth 2, we write
the following:
mematrhtgpry
etefeteoaat
❑The encrypted message is:
MEMATRHTGPRYETEFETEOAAT
❑This sort of thing would be trivial to cryptanalyze.A more complex scheme is to write the
message in a rectangle, row by row, and read the message off, column by column, but
permute the order of the columns. The order of the columns then becomes the key to the
algorithm. For example:
Transposition Techniques: Rail Fence
❑This sort of thing would be trivial to cryptanalyze.A more complex scheme is to write the
message in a rectangle, row by row, and read the message off, column by column, but
permute the order of the columns. The order of the columns then becomes the key to the
algorithm. For example,
Key: 4 3 1 2 5 6 7
Plaintext: a t t a c k p
ostpone
duntilt
woamxyz
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
❑Thus, in this example, the key is 4312567.To encrypt, start with the column that is labeled
1, in this case column 3.Write down all the letters in that column. Proceed to column 4,
which is labeled 2, then column 2, then column 1, then columns 5, 6, and 7. The
transposition cipher can be made significantly more secure by performing more than one
stage of transposition.
Transposition Techniques: ROTOR MACHINES
❑The basic principle of the rotor machine is illustrated in Figure on next slide. The machine
consists of a set of independently rotating cylinders through which electrical pulses can flow.
❑Each cylinder has 26 input pins and 26 output pins, with internal wiring that connects each
input pin to a unique output pin. For simplicity, only three of the internal connections in each
cylinder are shown.
❑If we associate each input and output pin with a letter of the alphabet, then a single cylinder
defines a monoalphabetic substitution. For example, in Figure, if an operator depresses the
key for the letter A, an electric signal is applied to the first pin of the first cylinder and flows
through the internal connection to the twenty-fifth output pin.
❑Consider a machine with a single cylinder.After each input key is depressed, the cylinder
rotates one position, so that the internal connections are shifted accordingly. Thus, a different
monoalphabetic substitution cipher is defined. After 26 letters of plaintext, the cylinder would
be back to the initial position. Thus, we have a polyalphabetic substitution algorithm with a
period of 26.
Transposition Techniques: ROTOR MACHINES
Transposition Techniques: ROTOR MACHINES
❑A single-cylinder system is trivial and does not present a formidable cryptanalytic task.
The power of the rotor machine is in the use of multiple cylinders, in which the output pins
of one cylinder are connected to the input pins of the next.
❑Figure above shows a three-cylinder system. The left half of the figure shows a position
in which the input from the operator to the first pin (plaintext letter a) is routed through the
three cylinders to appear at the output of the second pin (ciphertext letter B).
❑With multiple cylinders, the one closest to the operator input rotates one pin position with
each keystroke. The right half of Figure above shows the system’s configuration after a
single keystroke. For every complete rotation of the inner cylinder, the middle cylinder
rotates one pin position.
❑Finally, for every complete rotation of the middle cylinder, the outer cylinder rotates one
pin position. This is the same type of operation seen with an odometer. The result is that
there are 26 * 26 * 26 = 17,576 different substitution alphabets used before the system
repeats. The addition of fourth and fifth rotors results in periods of 456,976
and 11,881,376 letters, respectively.
STEGANOGRAPHY
❑A plaintext message may be hidden in one of two ways. The methods of steganography
conceal the existence of the message, whereas the methods of cryptography render the
message unintelligible to outsiders by various transformations of the text.
❑Figure 2.9 shows an example in which a subset of the words of the overall message is
used to convey the hidden message. See if you can decipher this; it’s not too hard.Various
other techniques have been used historically; some examples are the following:
•Pin punctures: Small pin punctures on selected letters are ordinarily not visible unless the
paper is held up in front of a light.
• Typewriter correction ribbon: Used between lines typed with a black ribbon, the results
of typing with the correction tape are visible only under a strong light.
❑Although these techniques may seem archaic, they have contemporary equivalents.
proposes hiding a message by using the least significant bits of frames on a CD. For
example, the Kodak Photo CD format’s maximum resolution is 2048 X 3072 pixels, with
each pixel containing 24 bits of RGB color information.
❑The least significant bit of each 24-bit pixel can be changed without greatly affecting the
quality of the image. The result is that you can hide a 2.3-megabyte message in a single
digital snapshot.There are now a number of software packages available that take this type
of approach to steganography.
STEGANOGRAPHY
❑Steganography has a number of drawbacks when compared to encryption. It requires a lot
of overhead to hide a relatively few bits of information, although using a scheme like that
proposed in the preceding paragraph may make it more effective. Also, once the system is
discovered, it becomes virtually worthless.
❑ This problem, too, can be overcome if the insertion method depends on some sort of key.
Alternatively, a message can be first encrypted and then hidden using steganography.