0% found this document useful (0 votes)
10 views

Is - Unit 3

Uploaded by

mahek malidwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Is - Unit 3

Uploaded by

mahek malidwale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Information Security

Unit 3: Symmetric Cipher


• Block Ciphers and Stream Ciphers
• Feistel Cipher
• Data Encryption Standard (DES):
• Encryption
• Decryption
• Example
• Strength of DES
• Block Cipher Modes of Operations
• Electronic Code Book (ECB)
• Cipher Block Chaining (CBC)
• Output Feedback Mode (OFB)
• Cipher Feedback Mode (CFB)
• Counter Mode (CTR)
Block Cipher
• An n-bit plaintext is encrypted to an n-bit ciphertext as a block
• Block size: n
• Key size: s
• Advantage of Block Cipher
• to defeat frequency analysis
• The size of the block depends on the algorithm
• DES - 64 bit
• AES - 128, 192, 256 bits…
Are Block Ciphers Attack-resistant??
• No, not exactly
• Types of attacks to consider
• known plaintext : given several pairs of plaintexts and ciphertexts,
recover the key (or decrypt another block encrypted under the same
key)
• Standard attacks
• exhaustive key search
• dictionary attack
• differential cryptanalysis, linear cryptanalysis
• Side channel attacks.
Need for Encryption Modes
• A block cipher encrypts only one block
• Needs a way to extend it to encrypt an arbitrarily long message
• Want to ensure that if the block cipher is secure, then the encryption is
secure
Encryption Modes of Operations
• Electronic Code Book (ECB)
• Cipher Block Chaining (CBC)
• Output Feedback Mode (OFB)
• Cipher Feedback Mode (CFB)
• Counter Mode (CTR)
Block Cipher Encryption Modes: ECB

• Plaintext message is broken into independent block;

• each block encrypted separately.

• Encryption: ci = Ek(pi ,Key1)

• Decryption: pi = Dk(ci ,Key1)

• Properties of ECB

• Deterministic:

• The identical data block gets encrypted the identical way, reveals patterns of
data when a data block repeats
Block Cipher Encryption Modes: ECB
• Advantages
• Each clock is independent; multiple blocks can be processed simultaneously
• If any plaintext/ciphertext block is lost, other blocks are not affected
• Parallel processing during encryption and decryption will increase the speed
• Disadvantages
• Two identical plaintext blocks will generate two identical ciphertext blocks
• Therefore, known plaintext attack is possible!
Block Cipher
Encryption Modes:
CBC
• Cipher Block Chaining (CBC):
• Uses a random Initial Vector (IV)
• Next input depends upon previous
output
• Encryption: Ci= Ek (Mi⊕Ci-1), with
C0=IV
• Decryption: Mi= Ci-1⊕Dk(Ci), with
C0=IV
• Size of Pi,Ci and IV?
Properties of CBC

• Randomized encryption:
• repeated text gets mapped to different encrypted data.
• A ciphertext block depends on all preceding plaintext blocks; reorder affects
decryption
• Usage:
• chooses random IV and protects the integrity of IV
Pros and Cons of CBC mode
• Aadvantages:
• For identical blocks of plaintext, different ciphertext blocks are generated; It
is more resilient to the known plaintext attacks as compared to the ECB
• Hash Value: last ciphertext block depends upon all the plaintext blocks; it can
be used as a hash value of the whole message, and it helps to identify if the
message is modified
• Disadvantages
Block Cipher Encryption Modes: CFB
• Feedback Mode
• No padding required..
• Two types of feedback – CFB and OFB
• CFB
• Initialization vector of 64 bit is chosen randomly
• IV is passed through a 64-bit shift register
• The result is encrypted
• From the encryption results – s bits are selected and 64-s bits are discarded
• Plaintext block is XORed with s bits to generate the Ciphertext block
• Ciphertext block is fed as an input to the shift register for processing Next
plaintext block
Block Cipher Encryption Modes: CFB
• Advantages
• No padding needed
• Disadvantages
• Bit error may propagate
Block Cipher Encryption Modes: OFB
• Output Feedback (S bits – S = size of plaintext block)
• A 64 bit Shift register is used here.
• One Initialization Vector (IV) is selected and passed through the shift
register;
• Apply the encryption Algorithm
• Divide the Cipher text into two parts: s-bits and b-s bits
• Discard (64-s) bits and XOR the s bits with the plaintext block –
ciphertext generated
• Feed s bits to the next block
Pros and Cons of OFB
• Advantages
• Free from Bit error
• Disadvantages
• Vulnerable to a stream modification attack
Block Cipher Encryption Modes: CTR
• The block cipher works like a stream cipher.
• Here one counter is used and the value of counter is changed for processing next block
• Initially, the user needs to set some value to the counter.
• That counter value is encrypted and the result is XORed with the plaintext block to
generate the ciphertext.
• For the next block, the counter value is increased by 1 and the same procedure is
followed.
• For identical plaintexts, ciphertexts would be different.
Block Cipher Encryption Modes: CTR
• Advantages:
• This is faster that CBC mode
• Encryption can be done in parallel
• Padding is not required
• Processing of blocks can be done randomly
• Disadvantages:
• If the counter values are reused, the security is compromised.
• Integrity of the message is not maintained.

You might also like