Conventional Encryption
Conventional Encryption
Conventional Encryption
Security of information, security attacks, classical techniques, caesar Cipher, block cipher
principle, data encryption standard, key generation for DES, block cipher principle, design and
modes of operation, S-box design, triple DES with two three keys, introduction to international
data encryption algorithm, key distribution.
Security of information:
A Definition of Computer Security
The NIST Computer Security Handbook [NIST95] defines the term computer security as
follows:
Computer Security: The protection afforded to an automated information system in order to
attain the applicable objectives of preserving the integrity, availability, and confidentiality of
information system resources (includes hardware, software, firmware, information/data, and
telecommunications).
This definition introduces three key objectives that are at the heart of computer security:
Confidentiality: This term covers two related concepts:
Data confidentiality: Assures that private or confidential information is not made available or
disclosed to unauthorized individuals.
Privacy: Assures that individuals control or influence what information related to them may
be collected and stored and by whom and to whom that information may be disclosed.
Integrity: This term covers two related concepts:
Data integrity: Assures that information (both stored and in transmitted packets) and programs
are changed only in a specified and authorized manner.
System integrity: Assures that a system performs its intended function in an unimpaired
manner, free from deliberate or inadvertent unauthorized manipulation of the system.
Availability: Assures that systems work promptly and service is not denied to authorize
users.
These three concepts form what is often referred to as the CIA triad. The three concepts embody
the fundamental security objectives for both data and for information and computing services.
For example, the NIST standard FIPS 199 (Standards for Security Categorization of Federal
Information and Information Systems) lists confidentiality, integrity, and availability as the
three security objectives for information and for information systems. FIPS 199 provides a
useful characterization of these three objectives in terms of requirements and the definition of
a loss of security in each category:
Confidentiality: Preserving authorized restrictions on information access and
disclosure, including means for protecting personal privacy and proprietary
information. A loss of confidentiality is the unauthorized disclosure of information.
Integrity: Guarding against improper information modification or destruction,
including ensuring information nonrepudiation and authenticity. A loss of integrity is
the unauthorized modification or destruction of information.
Availability: Ensuring timely and reliable access to and use of information. A loss of
availability is the disruption of access to or use of information or an information system.
Alipta Anil Pawar
Assistant Professor,
Dept. of Electronics and Telecommunication Engineering,
Dr. Babasaheb Ambedkar Technological University, Lonere, Raigad
Although the use of the CIA triad to define security objectives is well established, some in the
security field feel that additional concepts are needed to present a complete picture (Figure
1.1). Two of the most commonly mentioned are as follows:
Authenticity: The property of being genuine and being able to be verified and trusted;
confidence in the validity of a 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 goal that generates the requirement for actions of an
entity to be traced uniquely to that entity. This supports nonrepudiation, deterrence,
fault isolation, intrusion detection and prevention, and after-action recovery and legal
action. Because truly secure systems are not yet an achievable goal, we must be able to
trace a security breach to a responsible party. Systems must keep records of their
activities to permit later forensic analysis to trace security breaches or to aid in
transaction disputes.
Security attacks:
A useful means of classifying security attacks, used both in X.800 and RFC 4949, is in terms
of passive attacks and active attacks (Figure 1.2). A passive attack attempts to learn or make
use of information from the system but does not affect system resources. An active attack
attempts to alter system resources or affect their operation.
Active Attacks
Active attacks (Figure 1.2b) involve some modification of the data stream or the creation of a
false stream and can be subdivided into four categories: masquerade, replay, modification of
messages, and denial of service.
A masquerade takes place when one entity pretends to be a different entity (path 2 of
Figure 1.2b is active). A masquerade attack usually includes one of the other forms of active
attack. For example, authentication sequences can be captured and replayed after a valid
authentication sequence has taken place, thus enabling an authorized entity with few privileges
to obtain extra privileges by impersonating an entity that has those privileges.
Replay involves the passive capture of a data unit and its subsequent retransmission to
produce an unauthorized effect (paths 1, 2, and 3 active).
Caesar Cipher:
The earliest known, and the simplest, use of a substitution cipher 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,
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: 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
DES Encryption
The overall scheme for DES encryption is illustrated in Figure 4.5. As with any
encryption scheme, there are two inputs to the encryption function: the plaintext to be encrypted
and the key. In this case, the plaintext must be 64 bits in length and the key is 56 bits in length.8
This is followed by a phase consisting of sixteen rounds of the same function, which
involves both permutation and substitution functions. The output of the last (sixteenth) round
consists of 64 bits that are a function of the input plaintext and the key. The left and right halves
of the output are swapped to produce the preoutput. Finally, the preoutput is passed through a
permutation [IP-1] that is the inverse of the initial permutation function, to produce the 64-bit
ciphertext. With the exception of the initial and final permutations, DES has the exact structure
of a Feistel cipher.
The right-hand portion of Figure 4.5 shows the way in which the 56-bit key is used.
Initially, the key is passed through a permutation function. Then, for each of the sixteen rounds,
a subkey (Ki) is produced by the combination of a left circular shift and a permutation. The
permutation function is the same for each round, but a different subkey is produced because of
the repeated shifts of the key bits.
DES Decryption
Number of Rounds
The cryptographic strength of a Feistel cipher derives from three aspects of the design: the
number of rounds, the function F, and the key schedule algorithm. Let us look first at the choice
of the number of rounds.
The greater the number of rounds, the more difficult it is to perform cryptanalysis, even
for a relatively weak F. In general, the criterion should be that the number of rounds is chosen
so that known cryptanalytic efforts require greater effort than a simple brute-force key search
attack. This criterion was certainly used in the design of DES. Schneier [SCHN96] observes
that for 16-round DES, a differential cryptanalysis attack is slightly less efficient than brute
force: The differential cryptanalysis attack requires 255.1 operations, 10 whereas brute force
requires 255. If DES had 15 or fewer rounds, differential cryptanalysis would require less effort
than a brute-force key search.
This criterion is attractive, because it makes it easy to judge the strength of an algorithm
and to compare different algorithms. In the absence of a cryptanalytic breakthrough, the
strength of any algorithm that satisfies the criterion can be judged solely on key length.
Design of Function F
The heart of a Feistel block cipher is the function F, which provides the element of confusion
in a Feistel cipher. Thus, it must be difficult to “unscramble” the substitution performed by F.
One obvious criterion is that F be nonlinear, as we discussed previously. The more nonlinear
F, the more difficult any type of cryptanalysis will be.
There are several measures of nonlinearity. In rough terms, the more difficult it is to
approximate F by a set of linear equations, the more nonlinear F is. Several other criteria should
be considered in designing F. We would like the algorithm to have good avalanche properties.
Recall that, in general, this means that a change in one bit of the input should produce a change
in many bits of the output. A more stringent version of this is the strict avalanche criterion
(SAC) [WEBS86], which states that any output bit j of an S-box (see Appendix S for a
discussion of S-boxes) should change with probability 1/2 when any single input bit i is
inverted for all i, j. Although SAC is expressed in terms of S-boxes, a similar criterion could
be applied to F as a whole. This is important when considering designs that do not include S-
boxes.
Modes of operation:
A block cipher takes a fixed-length block of text of length b bits and a key as input and produces
a b-bit block of ciphertext. If the amount of plaintext to be encrypted is greater than b bits, then
the block cipher can still be used by breaking the plaintext up into b-bit blocks. When multiple
blocks of plaintext are encrypted using the same key, a number of security issues arise. To
apply a block cipher in a variety of applications, five modes of operation have been defined by
NIST (SP 800-38A).
In essence, a mode of operation is a technique for enhancing the effect of a
cryptographic algorithm or adapting the algorithm for an application, such as applying a block
cipher to a sequence of data blocks or a data stream. The five modes are intended to cover a
wide variety of applications of encryption for which a block cipher could be used. These modes
are intended for use with any symmetric block cipher, including triple DES and AES. The
modes are summarized in following Table:
S-box design:
S-box (substitution-box) is a basic component of symmetric key algorithms which performs
substitution. In block ciphers, they are typically used to obscure the relationship between the
key and the ciphertext, thus ensuring Shannon's property of confusion.
The forward substitute byte transformation, called SubBytes, is a simple table lookup (Figure
6.5a). AES defines a 16 * 16 matrix of byte values, called an S-box (Table 6.2a), that contains
a permutation of all possible 256 8-bit values. Each individual byte of State is mapped into a
new byte in the following way: The leftmost 4 bits of the byte are used as a row value and the
rightmost 4 bits are used as a column value. These row and column values serve as indexes
into the S-box to select a unique 8-bit output value. For example, the hexadecimal value {95}
references row 9, column 5 of the S-box, which contains the value {2A}. Accordingly, the
value {95} is mapped into the value {2A}.
Two-key triple encryption was first proposed by Tuchman [TUCH79]. The function follows
an encrypt-decrypt-encrypt (EDE) sequence (Figure 7.1b):
There is no cryptographic significance to the use of decryption for the second stage. Its only
advantage is that it allows users of 3DES to decrypt data encrypted by users of the older single
DES: