Part 3
Part 3
1
Objectives
• Completion of this class the leaner will able to
• Stream Ciphers
• Block cipher
• Difference between stream and block cipher
• Summary
• Reference
Stream Ciphers
• A stream cipher is a method of encrypting text (to produce ciphertext) in
which a cryptographic key and algorithm are applied to each binary digit in a
data stream, one bit at a time.
• The main alternative method to stream cipher is, in fact, the block cipher,
where a key and algorithm are applied to blocks of data rather than individual
bits in a stream.
How does a stream cipher work?
• A stream cipher is an encryption algorithm that uses a symmetric key to
encrypt and decrypt a given amount of data.
• A symmetric cipher key, as opposed to an asymmetric cipher key, is an
encryption tool that is used in both encryption and decryption.
• Asymmetric keys will sometimes use one key to encrypt a message and
another to decrypt the respective ciphertext.
• What makes stream ciphers particularly unique is that they encrypt data one
bit, or byte, at a time.
• This makes for a fast and relatively simple encryption process
Basic encryption requires three main
components
a message, document or piece of data
a key
an encryption algorithm
The advantages and disadvantages of using a stream cipher
• Speed of encryption tops
• ability to decrypt selected sections of ciphertex
• The positional alignment among the plaintext, keystream and ciphertext is a
significant security vulnerability of stream ciphers.
• If the encryption process does not use a hashing algorithm or IV during the
encryption process, a hacker who obtains a segment of plaintext and its
respective ciphertext will be able to deduce the keystream used by the
process.
• This is why cryptographers refer to stream ciphers as having low diffusion,
meaning the plaintext and ciphertext are not vastly different from each
other.
Block Cipher
• A block cipher takes a block of plaintext bits and generates a block of
ciphertext bits, generally of same size.
• The size of block is fixed in the given scheme.
• The choice of block size does not directly affect to the strength of
encryption scheme.
• The strength of cipher depends up on the key length.
Block Size
• any size of block is acceptable, following aspects are borne in mind
while selecting a size of a block.
Avoid very small block size
Do not have very large block size
Multiples of 8 bit
Avoid very small block size
• Say a block size is m bits.
• Then the possible plaintext bits combinations are then 2m.
• If the attacker discovers the plain text blocks corresponding to some
previously sent ciphertext blocks, then the attacker can launch a type of
‘dictionary attack’ by building up a dictionary of plaintext/ciphertext
pairs sent using that encryption key.
• A larger block size makes attack harder as the dictionary needs to be
larger.
Do not have very large block size
• With very large block size, the cipher becomes inefficient to operate.
• Such plaintexts will need to be padded before being encrypted.
Multiples of 8 bit
• A preferred block size is a multiple of 8 as it is easy for
implementation as most computer processor handle data in multiple
of 8 bits.
Block Cipher Schemes
• Digital Encryption Standard (DES) − The popular block cipher of the
1990s. It is now considered as a ‘broken’ block cipher, due primarily to
its small key size.
• Triple DES − It is a variant scheme based on repeated DES
applications. It is still a respected block ciphers but inefficient
compared to the new faster block ciphers available
• Advanced Encryption Standard (AES) − It is a relatively new block
cipher based on the encryption algorithm Rijndael that won the AES
design competition.
• IDEA − It is a sufficiently strong block cipher with a block size of 64 and a
key size of 128 bits. A number of applications use IDEA encryption,
including early versions of Pretty Good Privacy (PGP) protocol. The use of
IDEA scheme has a restricted adoption due to patent issues.
• Twofish − This scheme of block cipher uses block size of 128 bits and a key
of variable length. It was one of the AES finalists. It is based on the earlier
block cipher Blowfish with a block size of 64 bits.
• Serpent − A block cipher with a block size of 128 bits and key lengths of
128, 192, or 256 bits, which was also an AES competition finalist. It is a
slower but has more secure design than other block cipher.
Difference between Block Cipher and Stream Cipher
Stream Cipher Block Cipher
Stream Cipher Converts the plain text into cipher text by Block Cipher Converts the plain text into cipher text by
taking 1 byte of plain text at a time. taking plain text’s block at a time.
While stream cipher uses 8 bits. Block cipher uses either 64 bits or more than 64 bits
While stream cipher is more complex. The complexity of block cipher is simple
While stream cipher uses only confusion. Block cipher Uses confusion as well as diffusion.
While in-stream cipher, reverse encrypted text is easy. In block cipher, reverse encrypted text is hard.
The algorithm modes which are used in stream cipher The algorithm modes which are used in block cipher are
are CFB (Cipher Feedback) and OFB (Output ECB (Electronic Code Book) and CBC (Cipher Block
Feedback). Chaining).
While stream cipher works on substitution techniques Block cipher works on transposition techniques like rail-
like Caesar cipher, polygram substitution cipher, etc. fence technique, columnar transposition technique, etc.
• MichaelE.WhitmanandHerbertJ.Mattord.
(2012).PrinciplesofInformationSecurity,2ndEd.,T homson, CengageDelmarLearning.
• WilliamStalling.
(2012).NetworkSecurityEssentials:ApplicationsandStandards,4thEd.,Pear
sonEducation.
• BehrouzA.Forouzan,DebdeepMukhopadhyay.
(2011).CryptographyandNetworkSecur ity,2ndEd., SpecialIndianEdition,
TataMcGraw-Hill.