Submitted by
Name:R.Rathna deepa
class:II-M.sc Computer science
Batch :2017-2019
Incharge Staff : Ms.M.Florence Dayana
 Encrypts a digital data stream one bit or one
byte at a time
 Examples:
 Auto keyed Vigenère cipher
 Vernam cipher
 A stream cipher is a symmetric key cipher where
plaintext digits are combined with
a pseudorandom cipher digit stream (key stream)
 In a stream cipher each plain text is encrypted
one at a time with the corresponding digit of
the key stream, to give a digit of the cipher text
stream.
 An alternative name is a state cipher, because the
cryptography of every digit relies on this state.
 In follow, a digit is often a bit and the combining
operation an exclusive -or (XOR)
 cryptographic bit stream will be made by each users
 It should be computationally impractical to predict
future parts of the bit stream supported previous
portions of the bit stream
 The two users want solely share the generating key and
every will manufacture the key stream
 A block of plaintext is treated as a whole and
used to produce a cipher text block of equal
length
 Typically a block size of 64 or 128 bits is used
 As with a stream cipher, the two users share a
symmetric encryption key
 The majority of network-based symmetric
cryptographic applications make use of block
ciphers
a)Stream cipher
b)block cipher
•N bits
• There are 2n possible different plaintext blocks and, for the
encryption to be reversible
•Each must produce a unique cipher text block. Such a
transformation is called reversible/nonsingular.
 Feistel cipher is the execution of two or more simple
ciphers in sequence in such a way that the final result or
product is cryptographically stronger than any of the
component ciphers.
 In a Feistel cipher, the text being encrypted is split into
two halves. The round function f is applied to one half
using a subkey and the output of f is exclusive ORed with
other half.
 The two halves are then swapped. Each round follows the
same pattern except for the last round there is no swap.
 Proposed the use of a cipher that alternates
substitutions and permutations
 Substitutions :Each plaintext element or group
of elements is uniquely replaced by a
corresponding cipher text element or group of
elements
 Permutation :No elements are added or deleted
or replaced in the sequence, rather the order in
which the elements appear in the sequence is
changed.
 confusion and diffusion
1. The inputs to the encryption
algorithm are a plaintext block of
length 2w bits and a key k.
2. The plaintext block is divided
into two halves L0,R0.
3. The two halves of the data pass
through n rounds of processing
and then combine to produce the
cipher text block.
4. Feistel Cipher Structure each
round i has an inputs Li-1 and Ri-1
derived from the previous round,
as well as the sub key ki, derived
from the overall k.
In Figure, 16 rounds are used:
All rounds have the same structure.
A substitution is performed on the left half of the data.
 This is done by applying a round function F to the right half of the
data and then taking the Exclusive-OR of the output of that function
and the left half of the data.
The round function has the same general structure for each round
but is parameterized by the round subkey Ki .
 Another way to express this is to say that F is a function of right-
half block of w bits and a subkey of y bits, which produces an
output value of length w bits: F (REi , Ki+1 ).
Following this substitution, a permutation is performed that
consists of the interchange of the two halves of the data.
 This structure is a particular form of the Substitution-
Permutation Network (SPN) proposed by Shannon.
 Block size
Key size
Number of rounds
Sub key generation algorithm
Round function F
Fast software
encryption/decryption
Ease of Analysis
This figure shows the 15th round of encryption and 2nd
round of decryption. The 14th round value is LE14=DE7F
and RE14=03A6 and the key value is K15=12DE52. after
the round 15 we have LE15=03A6 and
RE15=F(03A6,12DE52)xorDE7F.
 The DES was once a predominant symmetric key
algorithm for the encryption data.
 It was highly influential in the advancement of
modern cryptography in the academic world.
 Algorithm itself is referred to as the Data
Encryption Algorithm (DEA)
 There are two inputs to the encryption function. The
plaintext to be encrypted and the key.
 Data are encrypted in 64-bit blocks using a 56-bit key
 The algorithm transforms 64-bit input in a series of steps
into a 64-bit output
 The same steps, with the same key, are used to reverse
the encryption
6.19
6.20
Figure General structure of DES
6. Finally, the pre-output is passed through permutation [IP-1] that is
inverse of the initial permutation function, to produce the 64 bit cipher
text.
7. The right hand side portion, in which the 56 bit key is used. Initially the
key is passed through a permutation function.
8. Then for each 16 rounds, a sub key(Ki) is produced a combination of a
left circular shift and a permutation.
9.This is same for each round. But different sub key is produced because
the repeated shift of the key bits
DES Encryption Algorithm:
1. The left hand side of the figure, the plaintext proceeds in three
phases.
2.First, 64 bit plaintext passes through an initial permutation(IP)
that rearranges the bit produce the permuted input.
3. The phase consisting of sixteen rounds of the same function,
which involves both permutation and substitution functions.
4. The output of the last round consists of 64 bits that are a
function of input plaintext and a key.
5. The left & right halves of the output are swapped to produce
the pre-output.
DES Example
THE AVALANCHE EFFECT
• The avalanche effect refers to a desirable property of
cryptographic algorithms, typically block ciphers and cryptographic
hash functions.
• The avalanche effect is evident if, when an input is changed
slightly (for example, flipping a single bit) the output changes
significantly (e.g., half the output bits flip).
• In the case of high-quality block ciphers, such a small change
in either the key or the plaintext should cause a drastic change in
the ciphertext. It means that a very small change in the input will lead to
a very big change in the output. The avalanche effect is calculated
by:
 Avalanche effect
 Completeness
THE STRENGTH OF DES:
1-The use of 56-bit keys:
 In computing, 56-bit encryption refers to a key size of fifty-
six bits, or seven bytes, for symmetric encryption, with the key
length of 56 bits, there are 256 possible keys, which is approximately
7.2 * 106 keys.
 DES encryption per micro second would take more than a
thousand years to break the cipher.
2. The Nature of the DES algorithm:
 The focus of concern has been on the eight substitution
tables, S-Boxes, that are used in each iteration.
 Because the design criteria for these boxes, and indeed for the
entire algorithm, were not made public, there is a suspicion that the
boxes were constructed in such a way that cryptanalysis is possible
for an opponent who knows the weakness in the S-boxes.
3. Timing attacks
 The timing attacks relate to public key algorithms.
 The timing attack is one in which information about the
key or the plaintext is obtained by observing how long
it takes a given implementation to perform decryptions
on various ciphertexts
The timing attack Exploits the fact that an encryption
or decryption algorithm often takes slightly different
amounts of time on different inputs
Network Security UNIT-II

Network Security UNIT-II

  • 1.
    Submitted by Name:R.Rathna deepa class:II-M.scComputer science Batch :2017-2019 Incharge Staff : Ms.M.Florence Dayana
  • 3.
     Encrypts adigital data stream one bit or one byte at a time  Examples:  Auto keyed Vigenère cipher  Vernam cipher  A stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (key stream)  In a stream cipher each plain text is encrypted one at a time with the corresponding digit of the key stream, to give a digit of the cipher text stream.
  • 4.
     An alternativename is a state cipher, because the cryptography of every digit relies on this state.  In follow, a digit is often a bit and the combining operation an exclusive -or (XOR)  cryptographic bit stream will be made by each users  It should be computationally impractical to predict future parts of the bit stream supported previous portions of the bit stream  The two users want solely share the generating key and every will manufacture the key stream
  • 6.
     A blockof plaintext is treated as a whole and used to produce a cipher text block of equal length  Typically a block size of 64 or 128 bits is used  As with a stream cipher, the two users share a symmetric encryption key  The majority of network-based symmetric cryptographic applications make use of block ciphers
  • 8.
  • 9.
  • 10.
    •N bits • Thereare 2n possible different plaintext blocks and, for the encryption to be reversible •Each must produce a unique cipher text block. Such a transformation is called reversible/nonsingular.
  • 11.
     Feistel cipheris the execution of two or more simple ciphers in sequence in such a way that the final result or product is cryptographically stronger than any of the component ciphers.  In a Feistel cipher, the text being encrypted is split into two halves. The round function f is applied to one half using a subkey and the output of f is exclusive ORed with other half.  The two halves are then swapped. Each round follows the same pattern except for the last round there is no swap.
  • 12.
     Proposed theuse of a cipher that alternates substitutions and permutations  Substitutions :Each plaintext element or group of elements is uniquely replaced by a corresponding cipher text element or group of elements  Permutation :No elements are added or deleted or replaced in the sequence, rather the order in which the elements appear in the sequence is changed.  confusion and diffusion
  • 13.
    1. The inputsto the encryption algorithm are a plaintext block of length 2w bits and a key k. 2. The plaintext block is divided into two halves L0,R0. 3. The two halves of the data pass through n rounds of processing and then combine to produce the cipher text block. 4. Feistel Cipher Structure each round i has an inputs Li-1 and Ri-1 derived from the previous round, as well as the sub key ki, derived from the overall k.
  • 14.
    In Figure, 16rounds are used: All rounds have the same structure. A substitution is performed on the left half of the data.  This is done by applying a round function F to the right half of the data and then taking the Exclusive-OR of the output of that function and the left half of the data. The round function has the same general structure for each round but is parameterized by the round subkey Ki .  Another way to express this is to say that F is a function of right- half block of w bits and a subkey of y bits, which produces an output value of length w bits: F (REi , Ki+1 ). Following this substitution, a permutation is performed that consists of the interchange of the two halves of the data.  This structure is a particular form of the Substitution- Permutation Network (SPN) proposed by Shannon.
  • 15.
     Block size Keysize Number of rounds Sub key generation algorithm Round function F Fast software encryption/decryption Ease of Analysis
  • 16.
    This figure showsthe 15th round of encryption and 2nd round of decryption. The 14th round value is LE14=DE7F and RE14=03A6 and the key value is K15=12DE52. after the round 15 we have LE15=03A6 and RE15=F(03A6,12DE52)xorDE7F.
  • 17.
     The DESwas once a predominant symmetric key algorithm for the encryption data.  It was highly influential in the advancement of modern cryptography in the academic world.  Algorithm itself is referred to as the Data Encryption Algorithm (DEA)  There are two inputs to the encryption function. The plaintext to be encrypted and the key.  Data are encrypted in 64-bit blocks using a 56-bit key  The algorithm transforms 64-bit input in a series of steps into a 64-bit output  The same steps, with the same key, are used to reverse the encryption
  • 19.
  • 20.
  • 22.
    6. Finally, thepre-output is passed through permutation [IP-1] that is inverse of the initial permutation function, to produce the 64 bit cipher text. 7. The right hand side portion, in which the 56 bit key is used. Initially the key is passed through a permutation function. 8. Then for each 16 rounds, a sub key(Ki) is produced a combination of a left circular shift and a permutation. 9.This is same for each round. But different sub key is produced because the repeated shift of the key bits DES Encryption Algorithm: 1. The left hand side of the figure, the plaintext proceeds in three phases. 2.First, 64 bit plaintext passes through an initial permutation(IP) that rearranges the bit produce the permuted input. 3. The phase consisting of sixteen rounds of the same function, which involves both permutation and substitution functions. 4. The output of the last round consists of 64 bits that are a function of input plaintext and a key. 5. The left & right halves of the output are swapped to produce the pre-output.
  • 23.
    DES Example THE AVALANCHEEFFECT • The avalanche effect refers to a desirable property of cryptographic algorithms, typically block ciphers and cryptographic hash functions. • The avalanche effect is evident if, when an input is changed slightly (for example, flipping a single bit) the output changes significantly (e.g., half the output bits flip). • In the case of high-quality block ciphers, such a small change in either the key or the plaintext should cause a drastic change in the ciphertext. It means that a very small change in the input will lead to a very big change in the output. The avalanche effect is calculated by:
  • 24.
  • 25.
    THE STRENGTH OFDES: 1-The use of 56-bit keys:  In computing, 56-bit encryption refers to a key size of fifty- six bits, or seven bytes, for symmetric encryption, with the key length of 56 bits, there are 256 possible keys, which is approximately 7.2 * 106 keys.  DES encryption per micro second would take more than a thousand years to break the cipher. 2. The Nature of the DES algorithm:  The focus of concern has been on the eight substitution tables, S-Boxes, that are used in each iteration.  Because the design criteria for these boxes, and indeed for the entire algorithm, were not made public, there is a suspicion that the boxes were constructed in such a way that cryptanalysis is possible for an opponent who knows the weakness in the S-boxes.
  • 26.
    3. Timing attacks The timing attacks relate to public key algorithms.  The timing attack is one in which information about the key or the plaintext is obtained by observing how long it takes a given implementation to perform decryptions on various ciphertexts The timing attack Exploits the fact that an encryption or decryption algorithm often takes slightly different amounts of time on different inputs